VOGONS


First post, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Some DOS games (not many) use a register-tweaked video mode 13h for a 320x240 resolution, which has the benefit of a 1:1 pixel aspect ratio compared to mode 13h's usual 320x200 resolution. DOSBox is using an aspect ratio of 0.996205 for this mode, and resizing will cause the display to become a bit blurry when most of the pixels are blended horizontally. I know that aspect correction is optional, but I tend to leave it on most of the time.

The reason the calculated AR is off is because 320x240 uses sync mode 3, which expects 525 total vertical lines, and the CRTC values add up to exactly 525 lines, but according to a comment in vga_crtc.cpp on the Vertical Total Register (index 6): "Note: For the VGA this value is the number of scan lines in the display -2." Applying that rule, DOSBox always increases the vtotal from the CRTC values by 2, and 525/527 = 0.996205

If 0x0b was written to index 6 of the CRTC, there would be no problem, but 0x0d is written. I've read some examples of how to program various tweaked modes, and 0x0d is documented as the correct value for 320x240. However, I don't know enough about VGA hardware to suggest how an exception to the -2 rule could be applied.