"aspect=true" does not work with CGA 160x100 and some other modes

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

"aspect=true" does not work with CGA 160x100 and some other modes

Postby VileRancour » 2010-9-03 @ 13:08

I'm kind of stubborn when it comes to getting the right pixel aspect ratio, when emulating screen modes that weren't designed for square pixels. For 320x200 (being the most common), setting "aspect=true" works perfectly, and gives me those beautiful stretched 1:1.2 pixels we all know and love :)

This doesn't work for higher resolution modes... from another thread about this, I understand that current scalers would produce bad results with ugly interpolation effects, if they tried to do aspect correction on higher resolution modes.
So (while it would be nice to solve this by having higher-factor scalers), I can see why aspect correction doesn't work for e.g. 640x200, 640x350, 640x400, 720x350, 720x400 incl. text modes.

However... when I run games that use the tweaked 160x100x16 CGA "mode", aspect correction doesn't seem to work either.
Intuitively, if a scaler can aspect-correct 320x200, it should have no problem doing the same for 160x100.

Why does this happen... is it because 160x100 is not really a graphics mode but a tweaked text mode? So the problems with aspect-correcting 640x200 (CGA's text mode) apply to this mode as well?

I wonder if there couldn't be an option to enforce aspect correction anyway, in the special case of this screen mode... Games like Round42, Moon Bugs etc. would obviously benefit, since they only use it for simple "pixels". But games that do more complicated stuff (ICON?) might suffer, I don't know.

Anyway, I'd like this thread to be more than a plain boring feature request... so brainstorming is welcome...

---------------------------------
EDIT - forgot to add some of my relevant config options, for reference (using dosbox v0.74). The fullresolution below matches the native resolution of my LCD monitor.

fullscreen=true
fulldouble=false
fullresolution=1280x1024
windowresolution=original
output=ddraw

machine=cga

aspect=true
scaler=normal3x
Last edited by VileRancour on 2010-9-03 @ 15:48, edited 1 time in total.
User avatar
VileRancour
Oldbie
 
Posts: 1150
Joined: 2003-5-14 @ 22:11
Location: B800:0000

Re: "aspect=true" does not work with CGA 160x100 games

Postby leileilol » 2010-9-03 @ 14:09

4:3 aspect correction doesn't work with those 640x200 modes unfortunately, I tried it too :/ some other screenmodes don't get corrected for 4:3 as well.
94cheen : AM5x86P75ADW@160mhz; AWE64; Trio64v+ 1mb; 95C
97cheen : PII-300; 440LX; AWE32 8MB; Voodoo3 3000 16mb; 98se
pvrcheen : P4 2.8GHz Northwood; SBPCI128; Rage128 32mb; PowerVR PCX2 4mb; 98se
PRJ: Q3V - 3dfx Pixel Shader - Engoo
User avatar
leileilol
l33t++
 
Posts: 5929
Joined: 2006-12-16 @ 18:03

Re: "aspect=true" does not work with CGA 160x100 and some other modes

Postby ripsaw8080 » 2010-9-03 @ 16:53

Text modes are forced to 1:1 aspect ratio. More discussion on the subject here.

If I'm not mistaken, 160x100 is done by using the left-right-full block characters and a register tweak that displays quarter height characters. Because CGA doesn't have character generator functions like EGA and VGA that allow variable-height fonts, perhaps the combination of CGA and a non-standard character height could be used apply a different aspect ratio.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 3380
Joined: 2006-4-25 @ 23:24

Re: "aspect=true" does not work with CGA 160x100 and some other modes

Postby VileRancour » 2010-9-03 @ 19:19

Yeah, I was just running the "GRATEST2.EXE" tool by h-a-l-9000, which was posted at --> "Experimental VGA Patch" (pg.4) <--

And indeed, it seems that graphics modes at e.g. 640x200 / 640x400 and 640x350 work very nicely with aspect correction set to true - but text modes don't, even when they're at the exact same pixel resolutions.

(This tool itself has nothing to do with aspect correction, but that's what I was running when I noticed this)

So it's quite baffling why there's no possibility to toggle this behavior for text modes, like there is with graphics, even though the resulting effect would be exactly the same.
User avatar
VileRancour
Oldbie
 
Posts: 1150
Joined: 2003-5-14 @ 22:11
Location: B800:0000

Re: "aspect=true" does not work with CGA 160x100 and some other modes

Postby h-a-l-9000 » 2010-9-03 @ 19:35

Try MB5
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4179
Joined: 2005-2-23 @ 00:14

Re: "aspect=true" does not work with CGA 160x100 and some other modes

Postby VileRancour » 2010-9-06 @ 02:47

Works beautifully with MB5, thanks!! Great work on that one.

Any chance that this feature will be incorporated into a future official build of DOSBox? (along with others from MB5 that aren't there already). Would be good to have all the latest features along with this.
User avatar
VileRancour
Oldbie
 
Posts: 1150
Joined: 2003-5-14 @ 22:11
Location: B800:0000


Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 0 guests