realnc / dosbox-core

A DOSBox core for use in RetroArch and other libretro frontends.
GNU General Public License v2.0
42 stars 16 forks source link

Scaling ratio issues with 640x200 and 640x350 modes #15

Open Jamirus238 opened 4 years ago

Jamirus238 commented 4 years ago

Each of these is relatively rare, but it adds up: Dosbox insists on internally doubling pre-VGA 640x200 modes vertically to 400. This causes them to be detected as interlaced when using shaders in RA, which is of course inaccurate. 640x350 EGA mode aspect correction doesn't work correctly at all, the core turns this into some sort of widescreen mode. Trivial fix with the RA scaling settings for the rare cases where it's necessary, but I thought it's worth mentioning anyway. Since I'm at it, could the text for the Aspect correction option in RA be slightly modified? It references non-square VGA resolutions, but the VGA reference seems unnecessary. There are also a few games which will look more correct with Aspect correction off, some European games which where probably developed with the Amiga as lead platform. For that reason, I suggest just deleting the latter part of the last sentence ("but this will result in a squashed or stretched image).

realnc commented 4 years ago

Can you post the games where this happens?

Jamirus238 commented 4 years ago

Just to clarify, this looks to be general behavior of dosbox that kicks in as soon as you start a core with EGA (640x350 native) or Tandy/CGA (640x200) (Hercules is corrected to 4:3). It shouldn't be game specific, so because CGA composite is treated as 640x400 also, any game here is affected: https://www.mobygames.com/attribute/sheet/attributeId,29/p,4/

Some other examples of games that use 640x200 mode, mostly in EGA: Sorcerian, Zeliard , Silpheed,various early Koei games like Gemfire, Romance of the three Kingdoms

Examples of games that use 640x350 mode: Blockout, Flight Simulator 3, Simcity, SimEarth, Sierra's 3D-Helicopter Simulator, Magnetic Scrolls Adventures such as The Pawn etc.

realnc commented 4 years ago

OK, this is not specific to the core then. I tried a couple of these games and dosbox's aspect correction will give wrong results. So it seems all we can do here is document that in the option description.

Jamirus238 commented 4 years ago

Aspect is only affecting the second example though, the 640x200 games require a different internal res, is this not possible to set specific in the RA cores?

realnc commented 4 years ago

It's not possible to disable line doubling with EGA. The only case where line doubling can be disabled is with VGA or SVGA rmodes when dosbox is configured to just emulate a framebuffer instead of the actual video card. This happens when using one of the "SVGA" options for the "machine" core option. EGA will never result in framebuffer emulation though, so it's always going to be line-doubled.