The methods described in this article can generate malicous video signals that are able to damage your CRT.
Please apply anything written here with care and thought. I can't be held responsible for damages on your hardware.
That said, if your monitor is showing strange rolling screens or makes noises that it has never made before, SHUT IT DOWN immeditatly.
Well, let's start....
How to use an RGB Monitor with ~15 kHz horizontal frequency on a modern graphics card?
I don't know if this topic was already addressed at various sites and forums on the internet. Some MAME enthusiasts seem to try to get this running. But with some random scripts from the internet I had no luck. So here is how I did it.
First of all? Why?
Simple! Native Amiga video modes on a PC for proper visuals with emulators!
Of course this means that an unusual horizontal frequency is needed. While standard VGA modes rely onto ~31kHz, a lower frequency is not reachable with standard methods as such a modeline will most likely be not accepted by Xorg.
Also of course you need of connecting your PC to your Amiga monitor.
There do exist passive cables with VGA on one side and SCART on the other.
As my GTX 960 doesn't offer a VGA port I've also used a DVI-I to VGA adapter without issues.
How to enable flexible clock rates
I assume that currently no xorg.conf file is used on your system.This is quite common in in the current Linux world as the modes are now auto configured.
Open nvidia-settings.
Click on "XServer Display Configuration"
Click on "Save to X Configuration File" and save a folder you are allowed to.
Edit the file and search for this line:
HorizSync 30.0 - 83.0
Replace 30.0 by 13.0 and save that file to /etc/X11/xorg.conf
Restart Xorg and pray that it's still running.
You are now able to set horizontal frequencies below any VGA standard.
Add some modes
As I live in a PAL country I'm used to PAL video modes on my Amiga system.There are 3 common video modes which were used.
320 x 256 progressive, nearly square pixels, mostly used for games
640 x 256 progressive, pixels with half width, mostly used on workbench
640 x 512 interlaced, the perfect way to damage your eyes
At least for games 320 x 256 is probably a nice resolution to work with.
640 x 256 is supported by Xorg but I haven't found any program which is in harmony with that mode. It seems non square pixels are not common any more.
Now onto some modelines you can add with xrandr:
These modes have a similar timing to the Amiga ones on a 1084 monitor.
You don't need to readjust the monitor to switch between your Linux system and your Amiga:
xrandr --newmode 320x256_50.08 7.09379 320 363 388 454 256 273 278 312 -hsync -vsync
xrandr --newmode 640x512_25.00i 14.18758 640 720 770 908 512 542 547 625 -hsync -vsync interlace
If you like to have some overscan this can be used:
xrandr --newmode 768x576@25i 14.75 768 789 858 944 576 581 586 625 -hsync -vsync interlace
For NTSC these can be used. I haven't tested them with an Amiga emulator though. Please keep in mind that these resolutions are not exactly the ones you find on an US Amiga model. Use them as a starting point.
xrandr --newmode 320x210_60.12 7.15909 320 363 388 458 210 225 230 260 -HSync -VSync
xrandr --newmode 640x210_60.12 14.31818 640 726 776 916 210 225 230 260 -HSync -VSync
xrandr --newmode 640x435_30.07i 14.31818 640 720 760 907 435 456 460 525 -hsync -vsync interlace
Again some overscan:
xrandr --newmode 720x480@30i 13.5 720 736 799 858 480 486 492 525 -hsync -vsync interlace
Now as the modes are created we need to add them:
In my case I have do to this:
xrandr --addmode DVI-I-0 320x256_50.08
And to switch to that mode:
xrandr --output DVI-I-0 --mode 320x256_50.08
Your monitor should now show the upper left of your desktop.
Use something like this to create an extended desktop to have a different view on your CRT.
xrandr --output DVI-I-0 --left-of HDMI-0
I've tested this configuration with fs-uae in full screen mode and the results seems to look like it was executed on a real Amiga which is some really cool shit.
To avoid tearing in fs-uae you need to add video_sync = 1 to your .fs-uae config file. Without it, a tear line is very slowly traveling down the screen. :-(