VOGONS


The Quest for Pixel Perfect DOS Emulation

Topic actions

Reply 20 of 60, by WDStudios

User metadata
Rank Member
Rank
Member
mothergoose729 wrote on 2021-06-22, 18:20:

non uniform aspect ratios

Could you clarify what you mean by this?

Since people like posting system specs:

LGA 2011
Core i7 Sandy Bridge @ 3.6 ghz
4 GB of RAM in quad-channel
Geforce GTX 780
1600 x 1200 monitor
Dual-booting WinXP Integral Edition and Win7 Pro 64-bit
-----
XP compatibility is the hill that I will die on.

Reply 21 of 60, by mothergoose729

User metadata
Rank Oldbie
Rank
Oldbie
WDStudios wrote on 2021-06-22, 18:40:
mothergoose729 wrote on 2021-06-22, 18:20:

non uniform aspect ratios

Could you clarify what you mean by this?

Not square pixels. I am not aware of a vocabulary for this stuff so I am inventing terms a little bit.

The super nintendo is infamous for it. It uses a digital 8:7 aspect ratio which is stretched horizontally to 4:3 by analog televisions. Sometimes even within the same game you can find evidence for the 8:7 or 4:3 being "correct" to the art.

8:7 the bubbles are round in yoshi's island but oblong in 4:3
14001346425_41b6ae33aa_o.png

The opposite in the title screen of mortal combat.

1474855982147.png

And in Chrono Trigger you can see evidence for both

1608967184375.png

DOS games have some of the same problems. Depending on the tools the developers used, some of the sprite work can look obviously stretched, or entirely correct on a CRT.

EDIT: This is doubly true if you are talking about amiga conversions....

EDIT2: Attaching images, broken links

Attachments

Last edited by mothergoose729 on 2021-06-23, 00:01. Edited 2 times in total.

Reply 22 of 60, by superfury

User metadata
Rank l33t++
Rank
l33t++

Well, UniPCemu renders it in it's entirety (everything but the retrace areas itself, so including overscan and active display, which Dosbox doesn't do afaik). After it renders it, it resizes the rendered screen to the specified resolution (usually in 4:3, although 4K and 1080p aspect ratio is also supported (as well as 4:3 on 4K letterboxed by the emulator itself)). It finally (on Windows and Linux, using a command line parameter) can allow SDL2 to perform more letterboxing as needed.

Since it does actually render anything (so including overscan, but not retrace areas itself), the software itself should letterbox itself without issues (using the porch tricks used by software). Although I did notice the 800x600 resolution at 32K/64K colors having a weird amount of horizontal front/back porch somehow? Like for example 800x600x64K on Windows 3.1 seems to have way more front porch than back porch, incorrectly centering the image. Although the aspect ratio seems fine?

The weird front/back porch seems to be due to the horizontal timings seeming to be correct, but since the end registers for retrace/blanking are incorrectly set (or perhaps because they're not enough bits) they don't last long enough for those timings?

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 23 of 60, by ZellSF

User metadata
Rank l33t
Rank
l33t
WDStudios wrote on 2021-06-22, 17:57:

Ah, I think I've cracked the Red Alert case, at least for Win95. There's a program in the Red Alert directory named "RASETUP.EXE". This is a Windows executable that allows the user to select between 640x400 and 640x480 modes. This is misleading, because both options produce 640 x 480 output. The difference is that if this program is not run, or if 640x400 is chosen, then the 640x400 image will be resampled to 640x480 before being sent to the monitor

Incorrect, the 640x400 option produces a 640x400 output. If you're getting anything else, that's happening elsewhere than the game.

The 640x480 option provides a 640x480 output, with the 640x400 image letterboxed. This was probably a compatibility mode for GPUs that didn't support 640x400 output with the assumption that you would just use your monitor controls to stretch the image back to its original resolution.

The DOS version I believe is 320x200. So 4:3 was likely the intended aspect ratio, some asset mishaps aside. If the intent was a widescreen presentation, why would they implement 640x400 at all?

Last edited by ZellSF on 2021-06-22, 20:28. Edited 1 time in total.

Reply 24 of 60, by mothergoose729

User metadata
Rank Oldbie
Rank
Oldbie
ZellSF wrote on 2021-06-22, 20:22:
Incorrect, the 640x400 option produces a 640x400 output. If you're getting anything else, that's happening elsewhere than the ga […]
Show full quote
WDStudios wrote on 2021-06-22, 17:57:

Ah, I think I've cracked the Red Alert case, at least for Win95. There's a program in the Red Alert directory named "RASETUP.EXE". This is a Windows executable that allows the user to select between 640x400 and 640x480 modes. This is misleading, because both options produce 640 x 480 output. The difference is that if this program is not run, or if 640x400 is chosen, then the 640x400 image will be resampled to 640x480 before being sent to the monitor

Incorrect, the 640x400 option produces a 640x400 output. If you're getting anything else, that's happening elsewhere than the game.

The 640x480 option provides a 640x480 output, with the 640x400 image letterboxed. This was probably a compatibility mode for GPUs that didn't support 640x400 output with the assumption that you would just use your monitor controls to stretch the image back to its original resolution.

The DOS version I believe is 320x200. So 4:3 was likely the intended aspect ratio, some asset mishaps aside.

The DOS version supports both modes, I believe. In windows 640x400 and 640x480 look the same. It seems like for C&C Red Alert 640x400 resolution in DOS was an after thought. Not an error in emulation just an oddity of the software.

Reply 25 of 60, by ZellSF

User metadata
Rank l33t
Rank
l33t
mothergoose729 wrote on 2021-06-22, 20:27:

The DOS version supports both modes, I believe. In windows 640x400 and 640x480 look the same. It seems like for C&C Red Alert 640x400 resolution in DOS was an after thought. Not an error in emulation just an oddity of the software.

Well it takes two minutes to test so I did. The DOS version is 320x200 only, unless there's a hidden option I missed.

640x400 and 640x480 does not look the same. I mean they're the same pixels (well 640x480 has those black bars), but CRTs would display them differently (640x480 would have a 1:1 PAR, 640x400 would have a 5:6 PAR).

Reply 26 of 60, by WDStudios

User metadata
Rank Member
Rank
Member
mothergoose729 wrote on 2021-06-22, 19:14:

Not square pixels. I am not aware of a vocabulary for this stuff so I am inventing terms a little bit.

Ah, yes. The history of nonsquare pixels goes all the way back to the dawn of television, where NTSC televisions use pixels that are taller than they are wide, and PAL/SECAM televisions do the opposite. Naturally, this caused headaches for the developers of video games and consoles.

Since people like posting system specs:

LGA 2011
Core i7 Sandy Bridge @ 3.6 ghz
4 GB of RAM in quad-channel
Geforce GTX 780
1600 x 1200 monitor
Dual-booting WinXP Integral Edition and Win7 Pro 64-bit
-----
XP compatibility is the hill that I will die on.

Reply 27 of 60, by mothergoose729

User metadata
Rank Oldbie
Rank
Oldbie
ZellSF wrote on 2021-06-22, 20:32:
mothergoose729 wrote on 2021-06-22, 20:27:

The DOS version supports both modes, I believe. In windows 640x400 and 640x480 look the same. It seems like for C&C Red Alert 640x400 resolution in DOS was an after thought. Not an error in emulation just an oddity of the software.

Well it takes two minutes to test so I did. The DOS version is 320x200 only, unless there's a hidden option I missed.

640x400 and 640x480 does not look the same. I mean they're the same pixels (well 640x480 has those black bars), but CRTs would display them differently (640x480 would have a 1:1 PAR, 640x400 would have a 5:6 PAR).

You're right about the DOS version.

I would have to reinstall C&C in windows to check, but from what I remember 640x400 was just centered vertically. Could be hardware dependent.

Reply 28 of 60, by ZellSF

User metadata
Rank l33t
Rank
l33t

640x400 is entered vertically when you select the 640x480 mode. When you select the 640x400 mode, then 640x400 is output. 640x400 is used when no choice has been made. just tested this btw, so I'm not going from memory.

If your GPU didn't support 640x400, the game would probably automatically fall back on 640x480.

Reply 29 of 60, by mothergoose729

User metadata
Rank Oldbie
Rank
Oldbie
ZellSF wrote on 2021-06-22, 20:51:

640x400 is entered vertically when you select the 640x480 mode. When you select the 640x400 mode, then 640x400 is output. 640x400 is used when no choice has been made. just tested this btw, so I'm not going from memory.

If your GPU didn't support 640x400, the game would probably automatically fall back on 640x480.

Right again, I tried it in PCem and that is what it does. My GPU doesn't support 640x400 in windows, it would seem.

Reply 30 of 60, by WDStudios

User metadata
Rank Member
Rank
Member

All right everyone, here's a new wrinkle:

I couldn't get RA95 working in a Win98 virtual machine because something something Direct Sound Object, so I had to try it out in an XP virtual machine. If I only installed the 1.08 patch, and not cnc-ddraw, then both the 640x400 and 640x480 settings would yield identical results: a 640x400 image letterboxed to 640x480. It was only after installing cnc-ddraw that 640x400 mode would produce the weird stretching.

So, I dunno what that implies about anything, except that the results of experiments like these are going to be extremely sensitive to whatever settings, patches, third-party software, etc. you're using. And obviously both the DOS and Windows versions of Red Alert are meant to be seen in letterboxed 1.6:1, regardless of how the DOS version actually behaves in any particular real DOS environment.

Since people like posting system specs:

LGA 2011
Core i7 Sandy Bridge @ 3.6 ghz
4 GB of RAM in quad-channel
Geforce GTX 780
1600 x 1200 monitor
Dual-booting WinXP Integral Edition and Win7 Pro 64-bit
-----
XP compatibility is the hill that I will die on.

Reply 31 of 60, by ZellSF

User metadata
Rank l33t
Rank
l33t
WDStudios wrote on 2021-06-22, 21:59:

And obviously both the DOS and Windows versions of Red Alert are meant to be seen in letterboxed 1.6:1, regardless of how the DOS version actually behaves in any particular real DOS environment.

I'm not sure why you insist the developer intent must have been something other than what they shipped.

Red Alert is a 4:3 game. That's how it's meant to be seen. That's how practically everyone who played the game saw it. That's how the developers saw it. Some assets being stretched does not change that.

If they truly were going for a widescreen presentation there wouldn't be any reason to include the 640x400 mode. And why would you think they ignored the DOS version, which does not support widescreen in any way? What about Command & Conquer, which looks mostly the same, but has no widescreen support at all?

WDStudios wrote on 2021-06-22, 21:59:

All right everyone, here's a new wrinkle:

I couldn't get RA95 working in a Win98 virtual machine because something something Direct Sound Object, so I had to try it out in an XP virtual machine. If I only installed the 1.08 patch, and not cnc-ddraw, then both the 640x400 and 640x480 settings would yield identical results: a 640x400 image letterboxed to 640x480. It was only after installing cnc-ddraw that 640x400 mode would produce the weird stretching.

Before you installed cnc-ddraw, 640x400 did the same as 640x480 because your GPU drivers don't support 640x400. So the game automatically falls back to 640x480.

cnc-ddraw pretends to support 640x400 and internally scales it to whatever resolution you set in ddraw.ini. Obviously, software scaling is way off-topic here, since this is a topic about displaying games 1:1 on a CRT. Though I will mention that to scale this properly on a 1:1 PAR display you need a 3200x2400 resolution...

I have to clarify this, since I'm not sure you're aware, but these:
KIhOojD.jpg
(lines being different height)
KD5HGd0.jpg
(jaggies on Allied logo)

Are scaling errors caused by modern software, and has nothing to do with how the game originally looked.

Reply 32 of 60, by WDStudios

User metadata
Rank Member
Rank
Member
ZellSF wrote on 2021-06-22, 23:28:

I'm not sure why you insist the developer intent must have been something other than what they shipped.

It happens all the time in computer games, including the very next game in the series, Tiberian Sun, which was supposed to have all kinds of features that never made the final cut.

ZellSF wrote on 2021-06-22, 23:28:

If they truly were going for a widescreen presentation there wouldn't be any reason to include the 640x400 mode.

Except, you know, as a workaround for different hardware and software setups rendering things differently.

ZellSF wrote on 2021-06-22, 23:28:

And why would you think they ignored the DOS version, which does not support widescreen in any way?

I have seen no evidence that they ignored the DOS version or that it didn't support widescreen.

ZellSF wrote on 2021-06-22, 23:28:

What about Command & Conquer, which looks mostly the same, but has no widescreen support at all?

The original CnC was, according to the OP, designed around rectangular pixels, which is why a 320x200 resolution yields a 4:3 DAR. Sufficient evidence of this has been provided and I don't feel like doing the work to independently verify it.

ZellSF wrote on 2021-06-22, 23:28:

I have to clarify this, since I'm not sure you're aware, but these:

Are scaling errors caused by modern software, and has nothing to do with how the game originally looked.

Wrong. The game very very definitely had a tendency to stretch its 1.6:1 image to cover a 4:3 screen even way back then, even though it was the wrong thing to do. These screenshots are just confirming what I remember from 25 years ago.

To clarify: the jaggies aren't the underlying problem. The black lines of different thicknesses aren't the underlying problem. They are merely additional proof of the underlying problem, which is that Red alert was obviously meant to be displayed in letterboxed widescreen but had a tendency back then, and still has a tendency today, to be stretched vertically and displayed at the wrong aspect ratio.

Since people like posting system specs:

LGA 2011
Core i7 Sandy Bridge @ 3.6 ghz
4 GB of RAM in quad-channel
Geforce GTX 780
1600 x 1200 monitor
Dual-booting WinXP Integral Edition and Win7 Pro 64-bit
-----
XP compatibility is the hill that I will die on.

Reply 33 of 60, by ZellSF

User metadata
Rank l33t
Rank
l33t
WDStudios wrote on 2021-06-22, 23:47:
ZellSF wrote on 2021-06-22, 23:28:

I'm not sure why you insist the developer intent must have been something other than what they shipped.

It happens all the time in computer games, including the very next game in the series, Tiberian Sun, which was supposed to have all kinds of features that never made the final cut.

Cutting features and building the entire game at the wrong aspect ratio are entirely different things.

WDStudios wrote on 2021-06-22, 23:47:
ZellSF wrote on 2021-06-22, 23:28:

If they truly were going for a widescreen presentation there wouldn't be any reason to include the 640x400 mode.

Except, you know, as a workaround for different hardware and software setups rendering things differently.

Ok, name the hardware setup that can't handle 640x480/8bit color on Windows 95, but does support 640x400. You can't. 640x480/8bit was the most common display mode. 640x400 is not needed as a compatibility fallback. So again, why was it there if it was not intended to be used?

WDStudios wrote on 2021-06-22, 23:47:
ZellSF wrote on 2021-06-22, 23:28:

And why would you think they ignored the DOS version, which does not support widescreen in any way?

I have seen no evidence that they ignored the DOS version or that it didn't support widescreen.

It's pretty simple, the DOS version runs only in 320x200. That's a 4:3 resolution. There is no way to run the DOS version at 16:10 without manually adjusting display geometry. If 16:10 was the intent (it was not), then they seriously neglected the DOS version.

WDStudios wrote on 2021-06-22, 23:47:
ZellSF wrote on 2021-06-22, 23:28:

What about Command & Conquer, which looks mostly the same, but has no widescreen support at all?

The original CnC was, according to the OP, designed around rectangular pixels, which is why a 320x200 resolution yields a 4:3 DAR. Sufficient evidence of this has been provided and I don't feel like doing the work to independently verify it.

So you agree that Command & Cconquer is 4:3, yet it looks largely identical (sharing a lot of assets even) with Red Alert which somehow is 16:10? That must mean that at the very least, every shared asset has the wrong aspect ratio in Red Alert.

Why would they change aspect ratio from Command & Conquer, creating problems like that? It's not very logical.

WDStudios wrote on 2021-06-22, 23:47:
ZellSF wrote on 2021-06-22, 23:28:

I have to clarify this, since I'm not sure you're aware, but these:

Are scaling errors caused by modern software, and has nothing to do with how the game originally looked.

Wrong. The game very very definitely had a tendency to stretch its 1.6:1 image to cover a 4:3 screen even way back then, even though it was the wrong thing to do. These screenshots are just confirming what I remember from 25 years ago.

To clarify: the jaggies aren't the underlying problem. The black lines of different thicknesses aren't the underlying problem. They are merely additional proof of the underlying problem, which is that Red alert was obviously meant to be displayed in letterboxed widescreen but had a tendency back then, and still has a tendency today, to be stretched vertically and displayed at the wrong aspect ratio.

Saying the different thickness black lines aren't the underlying problems is ok, but when you say they serve as additional proof of any underlying problem then you show a lack of understanding of what's going on here.

On system without software scaling (any system when Red Alert was released and probably for at least 5 years after) those black lines will always be equal height when sent to the display. The difference in height of the black lines are software scaling errors that have nothing to do with what was intended as the original aspect ratio.

Reply 34 of 60, by WDStudios

User metadata
Rank Member
Rank
Member
ZellSF wrote on 2021-06-23, 00:18:

Cutting features and building the entire game at the wrong aspect ratio are entirely different things.

But the game wasn't built at the wrong aspect ratio. It just displays at the wrong aspect ratio under some circumstances.

ZellSF wrote on 2021-06-23, 00:18:

Ok, name the hardware setup that can't handle 640x480/8bit color on Windows 95, but does support 640x400.

Why would I? That's far from the only possible scenario that could cause an aspect ratio screwup.

ZellSF wrote on 2021-06-22, 23:28:

the DOS version runs only in 320x200. That's a 4:3 resolution.

No. It's 1.6:1 unless you specify nonsquare pixels, in which case it can be any damn aspect ratio you want.

320x240 is the fullscreen resolution.

ZellSF wrote on 2021-06-22, 23:28:

So you agree that Command & Cconquer is 4:3, yet it looks largely identical (sharing a lot of assets even) with Red Alert which somehow is 16:10? That must mean that at the very least, every shared asset has the wrong aspect ratio in Red Alert.

That is entirely plausible. I'd have to do some tests with the DOS and Gold versions of C&C to be sure.

ZellSF wrote on 2021-06-22, 23:28:

Why would they change aspect ratio from Command & Conquer, creating problems like that? It's not very logical.

I agree it's not very logical. There may have been some internal confusion over what the intended output resolution was. Or maybe there was some kind of conflict between their desire to reuse old assets and their desire to support higher resolutions, and they created an... inelegant and problematic solution that frequently failed. Who knows?

ZellSF wrote on 2021-06-22, 23:28:

Saying the different thickness black lines aren't the underlying problems is ok, but when you say they serve as additional proof of any underlying problem then you show a lack of understanding of what's going on here.

On system without software scaling (any system when Red Alert was released and probably for at least 5 years after) those black lines will always be equal height when sent to the display. The difference in height of the black lines are software scaling errors that have nothing to do with what was intended as the original aspect ratio.

It doesn't matter if scaling was done less badly back then than it is now. The fact that it's being done at all is proof that the game is not being displayed at its intended aspect ratio.

Since people like posting system specs:

LGA 2011
Core i7 Sandy Bridge @ 3.6 ghz
4 GB of RAM in quad-channel
Geforce GTX 780
1600 x 1200 monitor
Dual-booting WinXP Integral Edition and Win7 Pro 64-bit
-----
XP compatibility is the hill that I will die on.

Reply 35 of 60, by ZellSF

User metadata
Rank l33t
Rank
l33t
WDStudios wrote on 2021-06-23, 01:04:
ZellSF wrote on 2021-06-23, 00:18:

Cutting features and building the entire game at the wrong aspect ratio are entirely different things.

But the game wasn't built at the wrong aspect ratio. It just displays at the wrong aspect ratio under some circumstances.

If 16:10 is the intended aspect ratio (still isn't, btw) then it would display at the wrong aspect ratio under most circumstances. The DOS version runs at a 4:3 resolution (320x200), the Windows version by default runs at a 4:3 resolution (640x400) unless a compatibility mode is triggered manually or automatically.

WDStudios wrote on 2021-06-23, 01:04:
ZellSF wrote on 2021-06-23, 00:18:

Ok, name the hardware setup that can't handle 640x480/8bit color on Windows 95, but does support 640x400.

Why would I? That's far from the only possible scenario that could cause an aspect ratio screwup.

There's only two scenarios that are relevant to what aspect ratios the original game supported. Those are the 640x400 and 640x480 options. The question is still: why is 640x400 there? It cannot be a compatibility option.

The obvious answer is, since it's the default option and the same aspect ratio as the DOS version, it's probably how the game's intended to be played.

WDStudios wrote on 2021-06-23, 01:04:
ZellSF wrote on 2021-06-22, 23:28:

the DOS version runs only in 320x200. That's a 4:3 resolution.

No. It's 1.6:1 unless you specify nonsquare pixels, in which case it can be any damn aspect ratio you want.

Nope, resolutions are standardized. 320x200 is 4:3 with a 5:6 PAR. Displaying it any other way is just incorrect.

WDStudios wrote on 2021-06-23, 01:04:
ZellSF wrote on 2021-06-22, 23:28:

Saying the different thickness black lines aren't the underlying problems is ok, but when you say they serve as additional proof of any underlying problem then you show a lack of understanding of what's going on here.

On system without software scaling (any system when Red Alert was released and probably for at least 5 years after) those black lines will always be equal height when sent to the display. The difference in height of the black lines are software scaling errors that have nothing to do with what was intended as the original aspect ratio.

It doesn't matter if scaling was done less badly back then than it is now. The fact that it's being done at all is proof that the game is not being displayed at its intended aspect ratio.

It wasn't scaled back then. It was displayed as is.

Reply 36 of 60, by WDStudios

User metadata
Rank Member
Rank
Member
ZellSF wrote on 2021-06-23, 01:39:

Nope, resolutions are standardized. 320x200 is 4:3 with a 5:6 PAR. Displaying it any other way is just incorrect.

That's absolute bollocks and everyone here knows it except you. This whole thread exists because those "standards" don't. The idea that any particular SAR must be displayed at a specific nonsquare PAR, and that anything else is "incorrect," is utterly bonkers and has no basis in reality.

If you wanted to argue that certain common resolutions had their origins in specific use cases where a particular PAR and DAR were used, as was the case with 1280 x 1024, that would be a much more defensible position but also irrelevant.

ZellSF wrote on 2021-06-23, 01:39:

It wasn't scaled back then. It was displayed as is.

I spent many, MANY hours playing Red Alert back in the '90s. It absolutely, positively, definitely scaled to fit a 4:3 monitor.

Since people like posting system specs:

LGA 2011
Core i7 Sandy Bridge @ 3.6 ghz
4 GB of RAM in quad-channel
Geforce GTX 780
1600 x 1200 monitor
Dual-booting WinXP Integral Edition and Win7 Pro 64-bit
-----
XP compatibility is the hill that I will die on.

Reply 37 of 60, by ZellSF

User metadata
Rank l33t
Rank
l33t
WDStudios wrote on 2021-06-23, 02:00:

That's absolute bollocks and everyone here knows it except you. This whole thread exists because those "standards" don't.

The OP is about non-standard resolutions. Command & Conquer and Red Alert does not use any of those non-standard resolutions. They use the well known standard resolutions of 320x200 and 640x400, which are 4:3.

WDStudios wrote on 2021-06-23, 02:00:
ZellSF wrote on 2021-06-23, 01:39:

It wasn't scaled back then. It was displayed as is.

I spent many, MANY hours playing Red Alert back in the '90s. It absolutely, positively, definitely scaled to fit a 4:3 monitor.

It didn't scale to fit a 4:3 monitor.

It displayed a 4:3 image, as is, on a 4:3 monitor.

Edit: feel free to send me a private message to continue this. It's as noted going wildly off topic.

Last edited by ZellSF on 2021-06-23, 02:35. Edited 2 times in total.

Reply 38 of 60, by mothergoose729

User metadata
Rank Oldbie
Rank
Oldbie
mothergoose729 wrote on 2021-02-01, 07:24:

The goal of this project is to make DOS on a modern PC look as close to identical as possible as a real DOS machine. This means identical resolution, identical refresh rate, and no software scaling.