|Re: Rép : [hatari-devel] window size|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 05/02/2018 12:00 PM, Cocoa Pod wrote:
I found where is the problem. File vdi.c, routine "VDI_SetResolution()", lines 136 to 140,
/* First align to 128 pixels */
VDIWidth = Opt_ValueAlignMinMax(w, 128, MIN_VDI_WIDTH, MAX_VDI_WIDTH);
/* then make sure width is 128 + 256*x */
if (VDIWidth > 3*128 && (VDIWidth-128) % 256)
VDIWidth -= 128;
Width request is 800. First align to 128 pixels returns VDIWidth = 768.
Then "then make sure width is 128 + 256*x" returns VDIWidth = 640. !!!!!!!!
After that, Log_printf writes: VDI screen: request = 800x600@4, result = 640x592@4
Ok, so the bug is that you don't see the resulting resolution
immediately after OKing the new VDI resolution + Atari reset,
it comes into effect only after restarting Hatari.
If you were using OSX GUI to configure Hatari, could you try
using SDL GUI and see whether you get the corrected resolution
right away with it?
-> If yes, OSX GUI doesn't properly propagate the configuration
change information, and needs to be fixed.
I don’t know the emulator so I don’t know how to correct this calculation and why !
The 640x592 resolution is separate issue from your bug.
Calculation was based on observations on here:
But as you can see from the latest comment, it wasn't quite
correct. There's some funky problem with VDI on TOS v2 or earlier
*when* having >= 4MB of RAM.
First step in fixing that problem is somebody going back enough
in Hatari versions to check whether the crash problem is a regression,
or something that has never worked.
If crash was a regression, it needs to be bisected to find out
what caused it. If it's not, somebody needs to debug what causes
these crashes with older TOS versions, so that it can be worked
After that is done, I can re-test whether above listed calculation
can be removed completely.
"set window size" meaning and test:
I open "Preference window", in "Atari Screen" I check on "Use extended GEM VDI resolution" and I choose 800x600, 16 colors.
Then I push on "Save config..." then on "Ok". I do reset asked by hatari and at this point real Atari screen size is 800x600. That’s correct !
I quit hatari then I open hatari.cfg and I find nVdiWidth = 800 and nVdiHeight = 600. Correct !!
I relaunch Hatari and I verify the real size of the Hatari window. Size is 640x600 !!
That sounds very weird. I cannot reproduce it on Linux.
I would think it's something on the OS windowing system side, but
could you build latest Hatari Mercurial version and provide
"--log-level debug" output from T0/T1 and T2?