ossc icon indicating copy to clipboard operation
ossc copied to clipboard

[Request] 400p VGA mode auto detection

Open wbcbz7 opened this issue 1 year ago • 1 comments

Hello, I've been using OSSC with a couple of retro PC/DOS machines. As you may know, there are two 400p VGA modes - 720x400 (used in text mode) and 640x400 (used by graphics modes like Mode 0x0D/0x13). There is no general way for VGA display device to differ between these modes, since they share the same sync timings and polarity - as a consequence, when using OSSC, you need to manually switch between 640x400 and 720x400 when running a game from console or returning back to the text mode. However, there is another VGA mode (640x350 mode 0x10), which uses different sync polarity, but in fact uses the 640x400 timings (info here) with larger vertical blanking, and, on some monitors (primarly LCD) it actually appears as letterboxed 640x350 picture over 640x400 raster.

I've made a TSR utility called LCD640, which, for every graphics mode that uses 640x400 raster (e.g. 320x200 or 640x200), sets sync polarity from 640x350 mode; on some LCD displays, whose treat 640x350 as 640x400, this have a positive impact on image sampling quality. Therefore, it would be nice to have an option to autodetect the 400p mode from sync polarity. As a reference, I've modded a 0.90 firmware with these changes, but as 1.x branch bringing more improvements in other aspects, there may be a better approach for this problem.

Thanks in advance! :)

wbcbz7 avatar Jan 22 '24 18:01 wbcbz7