Menu

#469 Bogus aspect ratio calculation for VESA mode 10F

0.74
fixed
Qbix
None
1
2020-02-14
2017-10-20
No

For VESA mode 0x10F (320x200 with 16M colors), dosbox computes an aspect ratio of 0.6; 1.2 would be the correct value.

Looking at src/ints/int10_modes.cpp, note that the 'htot' value is different for modes 0x10D, 0x10E (which have htot=100), and 0x10F (which has htot=50). Changing the value to 100 for mode 0x10F would produce the correct aspect ratio.

I suspect that this isn't the right fix though; as far as I understand it, the 50 indicates that the pixel clock rate is halved, which indeed it is. So I believe that those values should be 50. However, the aspect ratio calculation in VGA_SetupDrawing() (src/hardware/vga_draw.cpp) should take the scanline doubling (_EGA_LINE_DOUBLE) into account.

This should also affect other modes, but there is a "Cheap hack" in VGA_SetupDrawing() that computes the pixel aspect ratio based on an assumed screen aspect ratio of 4:3 for modes 640x480 and above.

Discussion

  • Qbix

    Qbix - 2020-02-14
    • status: open --> fixed
    • assigned_to: Qbix
     
  • Qbix

    Qbix - 2020-02-14

    Fixed in 4324

     

Log in to post a comment.

Monday.com Logo