[hatari-devel] Extended VDI screen in Falcon mode

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hello.

I noticed that Hatari's "Extended VDI screen" feature did not work in Falcon mode.

This is particularly visible in the latest EmuTOS snapshot which has been bugfixed regarding to Hatari's Line A hacks to extend the resolution. It works find in ST mode, but clearly something is wrong with the VIDEL in Falcon mode. You can get the latest EmuTOS snapshot there:
http://sourceforge.net/projects/emutos/files/snapshots/CVS-20130201/

I made a few tests, and fortunately it seems easy to fix those issues.

Some initializations occur very early in the TOS/EmuTOS startup process: determine the boot video mode, use the appropriate font, etc.

Hatari can extend the resolution (I mean screen dimensions, in pixels) by changing the Line A variables when appropriate. But it can't change the font sizes, etc. So when Hatari wants to extend the resolution, it has to boot in a similar standard video mode, then it can increase the screen dimensions afterwards (but not bit depth, etc.). This works fine in TOS mode.

To support extended modes on Falcon hardware, I propose that Hatari overrides the NVRAM boot video mode. It can be found at offset 0x0e in the NVRAM. Of course the checksum has to be recomputed accordingly.

So: When the "Use extended VDI screen" option is checked and the Machine is set to Falcon, patch the NVRAM according to the number of colors selected in the dialog box:

 2 colors -> mode 0x0188 (ST High)
 4 colors -> mode 0x0089 (ST Medium)
16 colors -> mode 0x0082 (ST Low)

I made preliminary tests by hacking EmuTOS, this should just work fine.
I got 1024x768 in 2 and 4 color mode without trouble.
In 16 color mode, I had to decrease the resolution to 800x600. There is probably another issue related to the size of the video RAM in very high resolutions.

Feel free to implement that in Hatari, if you like.
This may also work with TOS 4.04, too.

--
Vincent Rivière



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/