VOGONS


First post, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

In DOSBox 0.72, the 640x200x2 video mode 6, aka M_CGA2, gets an aspect ratio of 2.4 when using machine=vga. Being doubleheight, it displays 640x960 with aspect correction enabled... a tall screen indeed. It has the normal aspect ratio of 1.2 when using machine=cga. I would normally just use the CGA machine type as a workaround, but I have a program which tries to set the palette of this mode (INT 10/0B), and that doesn't work on CGA hardware.

Explicitly setting the aspect ratio to 1.2 on this mode in vga_draw.cpp seems an easy and safe patch given that a number of other modes do just that:

  case M_CGA2:
aspect_ratio=1.2;
doubleheight=true;
vga.draw.blocks=2*width;
width<<=3;
VGA_DrawLine=VGA_Draw_1BPP_Line;
break;

Reply 1 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I re-tested this with latest CVS, and the M_CGA2 (640x200x2) mode is getting the doubled aspect ratio of 2.4 with all vga machine types; however the cga, tandy, pcjr, and ega machine types don't have the same issue. Also noticed that the composite color version of the same resolution, M_CGA16, is getting an aspect ratio of 1.379057, but not sure if that's supposed to reflect an accurate distortion on video-out situations or not.

swso0.th.png kqyr9.th.png

As mentioned before, both can be forced into 4:3 by setting aspect_ratio=1.2 under their respective vga.mode case statements in VGA_SetupDrawing() in vga_draw.cpp, but maybe that's taking the easy way.

Reply 2 of 4, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

So the issue is with aspect=true and machine=svga_s3, right?

Reply 3 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yes, except all VGA machine types seem to do the same thing, not just svga_s3. Maybe the double-height pixels aren't being figured in when coming up with a pixel aspect ratio of 2.4 on top of the doubling.

The composite color mode only works with machine=cga, afaik. Shouldn't it have a pixel aspect ratio of 1.2 as well?

Reply 4 of 4, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The composite color mode only works with machine=cga, afaik.

Yes.

Shouldn't it have a pixel aspect ratio of 1.2 as well?

Don't know if it should have a forced ratio, that is usually bad if there
are games that reprogram line stuff pretty much. Harekiet should know.