VOGONS


Reply 20 of 25, by Joseph_Joestar

User metadata
Rank l33t
Rank
l33t
doublebuffer wrote on 2023-07-26, 09:20:

320x200 isn't 4:3, it's 16:10. If you integer scale it, you end up with stretched image. I have not to found a solution which would scale it "circle perfect" to modern displays.

This has been discussed before. Basically, 320x200 is 4:3 with non-square pixels. The closest you can get to scaling that correctly is with a 1920x1200 monitor (16:10) and then using its aspect ratio setting to squish the image to 4:3. You'll still get some blurring and interpolation, but it's not a bad fit overall. Or just use a native 1600x1200 LCD monitor and go with that.

But if you really want those razor sharp pixels, you can use DOSBox on such a monitor and set the resolution to 1600x1200. Phil showcases it at the end of this video.

PC#1: Pentium MMX 166 / Soyo SY-5BT / S3 Trio64V+ / Voodoo1 / YMF719 / AWE64 Gold / SC-155
PC#2: AthlonXP 2100+ / ECS K7VTA3 / Voodoo3 / Audigy2 / Vortex2
PC#3: Athlon64 3400+ / Asus K8V-MX / 5900XT / Audigy2
PC#4: i5-3570K / MSI Z77A-G43 / GTX 970 / X-Fi

Reply 21 of 25, by doublebuffer

User metadata
Rank Member
Rank
Member
Joseph_Joestar wrote on 2023-07-26, 09:29:

Basically, 320x200 is 4:3 with non-square pixels.

Yes. In theory it's possible, but it requires different vertical and horizontal scale factors. In 320x200, the pixels are 1.0 * width 1.2 * height. So to get the scale correctly each pixel must be horizontally scaled by 6, and vertically by 5. This gives as the smallest proper "circle perfect" resolution 320*5 x 200*6 = 1600 x 1200.

I hope my calculation is correct:

- Resolution 320 x 200, aspect ratio 4:3
- Therefore, pixel sizes 320/4, 200/3 = 0.0125, 0.015
- So the pixel width is 0.015/0.0125 = 1.2 times the height

Now, if only there was a scaler capable of outputting this non-uniform integer scale 6:5 on each pixel.

Reply 22 of 25, by Joseph_Joestar

User metadata
Rank l33t
Rank
l33t
doublebuffer wrote on 2023-07-26, 19:51:

Now, if only there was a scaler capable of outputting this non-uniform integer scale 6:5 on each pixel.

As mentioned before, DOSBox can do it just fine. Here's a screenshot of Simon the Sorcerer 2 running in DOSBox on my 1920x1200 monitor (black borders cropped). It's the same approach that Phil used in the video that I linked to earlier. If the forum image compression doesn't destroy the screenshot, you should be able to see the sharpness. This was captured by Fraps, in case anyone's wondering.

Simon2_DOSBox.jpg
Filename
Simon2_DOSBox.jpg
File size
647.16 KiB
Views
303 views
File license
Fair use/fair dealing exception

But if you're looking to do this on real hardware, I'm not sure if that's possible. The monitor's built-in scaler will always add a bit of blur, though that may depend on the model.

PC#1: Pentium MMX 166 / Soyo SY-5BT / S3 Trio64V+ / Voodoo1 / YMF719 / AWE64 Gold / SC-155
PC#2: AthlonXP 2100+ / ECS K7VTA3 / Voodoo3 / Audigy2 / Vortex2
PC#3: Athlon64 3400+ / Asus K8V-MX / 5900XT / Audigy2
PC#4: i5-3570K / MSI Z77A-G43 / GTX 970 / X-Fi

Reply 23 of 25, by alvaro84

User metadata
Rank Member
Rank
Member

On a funny side note - 256-byte intros (which run, in most cases, at 320x200) usually just don't have the space to deal with non-square pixels and despite being "classic" DOS programs they look best on a 16:10 display that has no idea that 320x200 should be a 4:3 resolution. But they're the exception, not the rule.

Shame on us, doomed from the start
May God have mercy on our dirty little hearts

Reply 24 of 25, by doublebuffer

User metadata
Rank Member
Rank
Member
Joseph_Joestar wrote on 2023-07-26, 20:38:

Simon the Sorcerer 2 running in DOSBox on my 1920x1200 monitor

It looks good. I think it should be achievable on 4k monitors as well, but you have to tweak the integer scale factors and it probably leaves some black borders around the picture.

Joseph_Joestar wrote on 2023-07-26, 20:38:

But if you're looking to do this on real hardware, I'm not sure if that's possible.

Indeed it would be awesome to be able to do that on hardware.

Joseph_Joestar wrote on 2023-07-26, 20:38:

The monitor's built-in scaler will always add a bit of blur, though that may depend on the model.

Not necessarily if you output the native resolution (by-bass the monitor's scaler) and could somehow scale the image before it gets to the display (as the dosbox does), but as you said there probably aren't any hardware solutions. To my knowledge even OSSC cannot do separate integer scale horizontally and vertically (correct me if I'm wrong).

Reply 25 of 25, by doublebuffer

User metadata
Rank Member
Rank
Member

I did some math (reader beware) and calculated the integer scale for 4k display. There are no optimal solution for them, but with 7, 9 scale factors we'd get:

7 x 320 = 2240
9 x 200 = 1800

Which fits to 3840 x 2160 but leaves black borders around the picture. And the scale is not circle perfect:

9/7 = 1.285 which is a bit off from the desired 1.2 pixel aspect ratio, but probably close enough to not to be noticeable.

It seems 1600 x 1200 is the perfect aspect ratio for DOS games. Now, are there any OLEDs in that resolution?