Hacker News new | ask | show | jobs
by fireattack 2559 days ago
I think what he meant is that,

The pixels are square in DOSBox, but the graphics from these old programs are designed for non-square pixel ratio. So, if you display it with square pixel, the display aspect ratio will be wrong.

(Of course, this still contradicts with what neatcoder said, but I can't remember if these programs were "squished" on CRTs or not.)

1 comments

See these screenshots of SCREEN 2 in GW-BASIC running in DOSBox:

- https://imgur.com/NZUGL1e (aspect=0)

- https://imgur.com/rnQOfA4 (aspect=1)

The one with aspect=1 looks very odd.

The one with aspect=1 looks incorrectly configured.

There are a number of different graphics modes, they have different pixel aspect ratios, you can also adjust the monitor, it is possible that back in school you were using a different mode or a different monitor. I think there are some other factors that can affect this.

Back in school, I played with SCREEN 0, SCREEN 1, and SCREEN 2 documented in the GW-BASIC user manual. Here's a copy: http://www.antonis.de/qbebooks/gwbasman/screens.html .

The reason why I stick to aspect=0 (the DOSBox default) is that this is the one that more closely reproduces the experience I had with the CRT monitors at school. I agree that the actual monitor or the way it is configured could affect the aspect ratio we observe. Perhaps ours was not adjusted to produce 1:1 square while working with IBM Logo. But it did produce 1:1 square with GW-BASIC SCREEN 1 mode.

CGA/EGA/VGA is supposed to have a pixel aspect ratio of 1:1.2 in 320x200 mode. If you adjusted the monitor to give 1:1 square pixels, then this was unusual.
I think I know why the screenshot for SCREEN mode looks odd with aspect=1. The documentation at https://www.dosbox.com/wiki/Dosbox.conf mentions,

> Do aspect correction. It only affects non-square pixel modes like VGA Mode 13h, which has a resolution of 320x200 pixels and is used by many DOS games (DOOM, etc).

However SCREEN 2 mode of GW-BASIC has a resolution of 640x200 ( http://www.antonis.de/qbebooks/gwbasman/screens.html ).

That mode is also non-square, with an aspect of 0.6:1. The IBM PC and its various video cards in the early days used a number of tricks to keep the cost down, one of those tricks is to keep the horizontal and vertical sync signals the same for different modes as much as possible. (Recently I’ve started to appreciate just how many tricks they used to keep the cost down, without sacrificing hardware reliability in the process!)

For both 320x200 and 640x200, HSYNC ran at 15.75 kHz, VSYNC ran at 60 Hz. When you go from 320x200 to 640x200, all that happens is the pixel clock (the rate at which you read out from RAM) is doubled, so you get exactly two pixels horizontally packed in where there used to be one pixel. The older hardware, like EGA video cards, can only generate one other HSYNC speed: 21.8 kHz, for special 350-line modes. When VGA came out, it doubled the HSYNC frequency and, for these modes, would just read each row out twice.

http://www.minuszerodegrees.net/video/bios_video_modes.htm

So SCREEN 1 should have 1.2:1 ratio, and SCREEN 2 should have a 0.6:1 ratio.

One of the better ways to verify this kind of thing is to compare box art from DOS video games to screenshots taken from DOSBox or sprites extracted from the data files. You can see that the screenshots from DOSBox match the sprite files, if you leave aspect unadjusted, but if you look at the box art from the retail packaging, you will (often) see artwork and screenshots with the correct aspect ratio, just like you see on real hardware.

Here's a DOOM Wiki page discussing it, with a number of pictures and sources: https://doom.fandom.com/wiki/Aspect_ratio