Re: [hatari-devel] Hatari/EmuTOS peculiarity

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




On 30.8.2021 6.39, Roger Burrows wrote:
Setup: Hatari 2.3.0, running EmuTOS under Falcon emulation.

Peculiarity: switching from a 640x400 256-colour mode to a 640x400 2-colour
mode currently causes the following Hatari message to be issued:
>
WARN : Strange screen size 160x400 -> aspect corrected by 4x1!

This message [1] happens for me also when
switching from other resolutions, at least
from 640x400 4-color mode, not just 256 color
one.

Whether it happens, seems to be very timing
dependent, not depending on which of those 2
color modes is used.  At times that message
triggered almost every time, and sometimes I had
to repeat the resolution change tens of times
before getting it.

Could this be due to what EmuTOS bg interrupts
happen to trigger at same time with resolution switch?


This was introduced by EmuTOS commit de32a25, which fixed a problem with
switching to monochrome mode.  This is what the code used to do, as part of
setting monochrome mode (after setting all the other videl registers):
	move 0x0400 to 0xff8266
Hatari did not issue the warning message.

This is what it does now:
	move 0x0400 to 0xff8266
	vsync();
	move 0 to 0xff8266
	vsync();
	move 0x0400 to 0xff8266
Hatari *does* issue the warning message.

With "--trace Videl" one can see when/which frame
has the odd aspect ratio:
---------------------------------------------
Videl : $ff8266 Falcon Shift Mode (SPSHIFT) write: 0x0000
Videl : $ff8266 Falcon Shift Mode (SPSHIFT) write: 0x0400
Videl : $ff8266 Falcon Shift Mode (SPSHIFT) write: 0x0000
Videl : width change from 640 to 160
Videl : bpp change from 8 to 4
Videl : video mode change to 160x400@4
WARN : Strange screen size 160x400 -> aspect corrected by 4x1!
Videl : $ff8266 Falcon Shift Mode (SPSHIFT) write: 0x0400
Videl : width change from 160 to 640
Videl : bpp change from 4 to 1
Videl : video mode change to 640x400@1
---------------------------------------------

I'm not sure whether this triggers when setting of
the zero value, or the final 0x400 is too slow.


I'm not sure why setting the number of bitplanes would cause Hatari to think
there was something wrong with the aspect ratio.  In any case, the current
EmuTOS code works on real hardware (just tested on my Falcon), so there isn't
an actual bug in EmuTOS.

Because:
* It sometimes happens very rarely
* CRT monitor does "aspect correction"
* EmuTOS clears / draws screen while this happens

You're unlikely to notice single frame with
odd aspect ratio.

Even if one disables Hatari aspect correction [1],
one is unlikely to notice it in windowed mode as
that frame goes by so fast (16 ms in 60Hz).


Can you remove the warning message for this please?  It might make a user think
there was something wrong when there isn't.

You can already disable it [1], but for now I'm
thinking it's a real issue.

If the issue is on Hatari Videl emulation side,
I guess aspect ratio warning could be downgraded
to info messages.


	- Eero

[1] that aspect correction message comes from
Hatari "monitor emulation".

If you're not watching Falcon demos [2] in
fullscreen with SDL v1, you can probably disable
it (--aspect off).

[2] There are some Falcon demos that switch
between couple of completely different sized
resolutions multiple times per second.

They are unwatchable in fullscreen on LCD monitors
with slow resolution changes.

This may be mostly issue with SDL1, SDL2 might be
doing its own aspect correction instead of relying
on app to do it, or monitor changing resolution /
doing aspect correction.  I last looked into that
over a decade ago...



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