|Re: [hatari-devel] correct ? (scrollbar width in VDI mode)|
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
On Sonntag, 19. November 2017 13:18:40 CET Eero Tamminen wrote:
> I'm seeing the problem (with and without the patch) both with normal
> TOS and EmuTOS.
Ok i've got it now. Strangely, i get the same effect now also with 2.06, so i can't tell what i was using half a year ago ;) But i can reproduce it with the command line Thomas posted.
The reason is that AES calculates the width of the elements using
gl_wbox = (gl_hbox * gl_ws.ws_hpixel) / gl_ws.ws_wpixel;
where ws_hpixel and ws_wpixel are the informations from the DEV_TAB and DEV_TAB of the linea variables (same as you get by calling vq_extnd). Those variables are adjusted by the VDI when it opens the physical workstation, depending on the resolution. For medium resolution, it uses wpixel=278 and hpixel=556, which gives the correct look when using 8x8 font, but not when changing that to 8x16 for higher resolution.
The difficulty however in fixing this is different behaviour of different TOS versions. The VDI_LineA function, where the default font is changed, is called very early from the cartridge routines. At this time, the dev_tab has not even been copied to RAM, so changing anything there does not have any effect. I have tried a quick hack that changes these values when the video register is read, just to verify that setting the values fixes the issue, but of course this is not the way it should be done, and it only works for 2.0x.
So unless someone comes up with a bright idea on how to "hack" these values that works for all TOS versions, i would suggest two solutions:
a) leave it as it is, and document it as a known bug ;) Not very nice, but the problem only occurs when you use extended vdi with medium resolution, with a height of >= 400. One could argue that, when you already use an extended VDI mode, you might as well use low resolution giving 16 colors instead of 4.
b) do not change the font when using medium resolution. That would fix the problem, but then you get the 8x8 small font even when using a high resolution.
|Mail converted by MHonArc 2.6.19+||http://listengine.tuxfamily.org/|