DOSBox ECE (for Windows & Linux)

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

Re: DOSBox ECE (for Windows & Linux)

Postby Srandista » 2019-7-28 @ 19:00

realnc wrote:640x400 for example is not shown as 4:3.

How could this resolution even be shown as 4:3? :?:
My overkill "retro" PC - ASRock 4CoreDual-VSTA, Pentium E6500K, 512MB/4GB RAM, Radeon 9500@9700 (Softmod), ESS Solo-1 + Dreamblaster X2, 80GB IDE HDD, Win 98/XP
User avatar
Srandista
Member
 
Posts: 386
Joined: 2017-4-07 @ 17:14
Location: Czech Republic

Re: DOSBox ECE (for Windows & Linux)

Postby realnc » 2019-7-28 @ 19:04

KainXVIII wrote:
realnc wrote:On the other hand, 6x integer upscaling with subsequent bilinear opengl downscaling looks virtually perfect (at least on my higher-than-regular-DPI screen) *and* is fullscreen *and* has the correct aspect ratio.

How do you do this?

viewtopic.php?f=32&t=52414&start=660#p768666

But as my own reply to that post mentions, it kills performance in many games due to the scaling being done on the CPU.

Another way to get a good image is to run dosbox in RetroArch (it now has a dosbox-svn core.) But it's somewhat inconvenient. The payoff though is that you can then use shaders, which are very good at upscaling. PCem also supports shaders (but PCem is of course a different beast.)

For example, standard 640x400 text mode upscaled to 1440p without black bars and no distortion can look like this with a CRT shader:

https://i.imgur.com/IWAvSQy.png

This needs to be viewed at 1:1 magnification (meaning unscaled,) or in fullscreen on a 1440p display, otherwise it looks completely broken. Shaders are really a powerful tool for upscaling and adding CRT effects, but it seems all attempts so far to add shader support to dosbox have died off at some point. In the future, dosbox through RetroArch might become the best way to do it.
User avatar
realnc
Member
 
Posts: 402
Joined: 2010-10-13 @ 11:02

Re: DOSBox ECE (for Windows & Linux)

Postby realnc » 2019-7-28 @ 19:07

Srandista wrote:
realnc wrote:640x400 for example is not shown as 4:3.

How could this resolution even be shown as 4:3? :?:

By stretching it vertically, just like a CRT would do. But this distorts the image. For this to not look distorted, you need to "supersample" it first. Meaning doing integer scaling to 3840x2400 (normal6x), and then take the result and downscale it to 1080p or 1440p (or whatever your display resolution is) with bilinear filtering. The result is then 4:3 and looks very good without distortion but also without blur.
User avatar
realnc
Member
 
Posts: 402
Joined: 2010-10-13 @ 11:02

Re: DOSBox ECE (for Windows & Linux)

Postby Ant_222 » 2019-7-28 @ 21:36

realnc wrote:In any event, the best way to upscale "pixel-art" games really is to upscale them with integer scaling to a higher then native res, and then downscale that with filtered downscaling to the native res. The result is rather superb.
That is what surfacenp does, albeit slowly. But I dislike the result because of interpolative artefacts and am of the opinion that the one true way of upscaling pixel-art is by integer scaling without any subsequent interpolation.

The slightly lossy scaling that you want can be implemented on the GPU with good performance. You can post a request in the thread for DOSBox version with pixel shaders.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

Re: DOSBox ECE (for Windows & Linux)

Postby Ant_222 » 2019-7-28 @ 21:38

Srandista wrote:
realnc wrote:640x400 for example is not shown as 4:3.
How could this resolution even be shown as 4:3? :?:
By applying a 5:6 scale on a 3200x2400 display...
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

Re: DOSBox ECE (for Windows & Linux)

Postby realnc » 2019-7-28 @ 22:08

Ant_222 wrote:
realnc wrote:In any event, the best way to upscale "pixel-art" games really is to upscale them with integer scaling to a higher then native res, and then downscale that with filtered downscaling to the native res. The result is rather superb.
That is what surfacenp does, albeit slowly. But I dislike the result because of interpolative artefacts and am of the opinion that the one true way of upscaling pixel-art is by integer scaling without any subsequent interpolation.

Oops, I missed that. Yep, it indeed does. It looks very clear to me (1440p 108dpi). There is no blur and no distortion. Of course it's not usable due to the slowdown, but it looks good.

The slightly lossy scaling that you want can be implemented on the GPU with good performance. You can post a request in the thread for DOSBox version with pixel shaders.

That seems to be dead (404 error page.) Also, I think it's Windows-only.

I'd like to say that retro game pixel art needs lossy scaling. This picture pretty much sums up my opinions:

Image

In my opinion, shaders are the best way to replicate the look of retro games. Yes, computer monitors are not TVs, but still, my 90's PC looked like the previous image I posted (https://i.imgur.com/IWAvSQy.png) rather than what you get with normal upscaling (integer or otherwise.)
User avatar
realnc
Member
 
Posts: 402
Joined: 2010-10-13 @ 11:02

Re: DOSBox ECE (for Windows & Linux)

Postby Yesterplay80 » 2019-7-29 @ 08:43

KainXVIII wrote:Something wrong with dosbox ece download page? :confused:

No. But I created a new blog just for ECE (https://dosboxece.yesterplay.net), so if you are using a bookmark in your browser you might get a certificate error, but otherwise it should work.

Ant_222 wrote:
aardvark82 wrote:640x480 --> 960x720 surfacenp scaling is glitchy since ECE r4180.3
Bottom of the window doesn't update properly. Works fine on r4180.2 and older.
Yesterplay80, can you please check whether the bug persists the with the attached version of my patch?

Sure. Compiled it and so far it's looking great here! :-D

dosbox_pp24.JPG


Here's the updates binary, in case anyone else (aardvark82?) wants to give it a try as well:

DOSBox_pp24.zip
(1.78 MiB) Downloaded 13 times
Last edited by Yesterplay80 on 2019-7-29 @ 08:45, edited 1 time in total.
My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 414
Joined: 2016-2-23 @ 11:02
Location: Germany

Re: DOSBox ECE (for Windows & Linux)

Postby KainXVIII » 2019-7-29 @ 08:45

realnc wrote:For example, standard 640x400 text mode upscaled to 1440p without black bars and no distortion can look like this with a CRT shader:

https://i.imgur.com/IWAvSQy.png

This screen looks very good!
User avatar
KainXVIII
Member
 
Posts: 317
Joined: 2015-5-20 @ 15:04
Location: Yaroslavl

Re: DOSBox ECE (for Windows & Linux)

Postby Ant_222 » 2019-7-29 @ 20:10

realnc wrote:
Ant_222 wrote:That is what surfacenp does, albeit slowly. But I dislike the result because of interpolative artefacts and am of the opinion that the one true way of upscaling pixel-art is by integer scaling without any subsequent interpolation.
Oops, I missed that. Yep, it indeed does. It looks very clear to me (1440p 108dpi). There is no blur and no distortion. Of course it's not usable due to the slowdown, but it looks good.
In fact, there is a small amount of blur due to bilinear interpolation...
realnc wrote:
Ant_222 wrote:The slightly lossy scaling that you want can be implemented on the GPU with good performance. You can post a request in the thread for DOSBox version with pixel shaders.
That seems to be dead (404 error page.) Also, I think it's Windows-only.
Do you know of any maintained version of DOSBox with shader support?
realnc wrote:I'd like to say that retro game pixel art needs lossy scaling. This picture pretty much sums up my opinions:
The effect is grossly exagerrated. Here are some photos I made from a CRT display I tried to sell but had to give away for free. There are some screens of MS-DOS games, including Alone in the Dark.
realnc wrote:In my opinion, shaders are the best way to replicate the look of retro games. Yes, computer monitors are not TVs, but still, my 90's PC looked like the previous image I posted (https://i.imgur.com/IWAvSQy.png) rather than what you get with normal upscaling (integer or otherwise.)
Well, modern static pixel art designed for square pixels looks best to me as is, without any processing. As to old games, there were tens of thousands of CRT monitors and there are infinitely many ways to emulate their effects, but only one way to keep an image pixel-perfect. I therefore consider pixel-perfect display an absolute requirement, and various CRT emulation methods useful options.
Last edited by Ant_222 on 2019-7-29 @ 20:26, edited 1 time in total.
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

Re: DOSBox ECE (for Windows & Linux)

Postby Ant_222 » 2019-7-29 @ 20:20

YP80, have you seen my question in the thread for the pixel-perfect patch, where I ask if you can contact the OBS guys and kindly ask them to diagnose the freezing during at resolution switch? Even if they can't solve it, maybe they can suggest what I should look for in the DOSBox code...
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

Re: DOSBox ECE (for Windows & Linux)

Postby realnc » 2019-7-29 @ 21:40

Ant_222 wrote:
realnc wrote:There is no blur and no distortion. Of course it's not usable due to the slowdown, but it looks good.

In fact, there is a small amount of blur due to bilinear interpolation...

I can see some loss in brightness (and maybe contrast), but no blur. Maybe the slightest hint of blur, but nothing I'd actually recognize as blur without constantly switching between the two images. I took two screenshots of a 320x200 game scene at 1440p and bumped the brightness and contrast with Gimp in the near-perfect screenshot, and they look very close.

pixel-perfect:
https://i.imgur.com/eWNFvUG.png

near-perfect original:
https://i.imgur.com/2apYZLt.png

near-perfect fixed:
https://i.imgur.com/dIQOuwf.png

Colors are still not correct though and it's easy to tell the difference in the dark areas in the hills in the left part of the image. But bilinear seems to be bad in general at this, as it gets the colors wrong. Bilinear downscaling seems to be more "muddied" than "blurry". There's other algorithms that are supposed to be much better for preserving the original color balance and contrast when downscaling (Mitchel I think is one of the best?) Doing it on the CPU though is probably not feasible.

Ant_222 wrote:
realnc wrote:This picture pretty much sums up my opinions:

The effect is grossly exagerrated.

No, that's a CRT TV with an NES. It doesn't apply to PC CRT monitors. They are much, much sharper than CRT TVs. It was just an example to make the point that retro games were played on screens that had a natural smoothing effect (gaussian blur) with the phosphor grid further hiding some of the pixel aliasing. Shaders can help replicate that look to some extent (easier for retro console games, much harder for PC games, since they ran on sharp, low dot-pitch CRT displays and you need 8K LCD monitors to emulate that kind of image.)

In any event, a completely unprocessed image of a PC retro game just looks "wrong" to me. Bilinear upscaling is horrible of course, I'll just take interger upscaling instead any day of the week. But I like a good CRT shader even more :-)
Last edited by realnc on 2019-8-08 @ 05:18, edited 1 time in total.
User avatar
realnc
Member
 
Posts: 402
Joined: 2010-10-13 @ 11:02

Re: DOSBox ECE (for Windows & Linux)

Postby Ant_222 » 2019-8-07 @ 20:53

realnc wrote:I can see some loss in brightness (and maybe contrast), but no blur. Maybe the slightest hint of blur, but nothing I'd actually recognize as blur without constantly switching between the two images. I took two screenshots of a 320x200 game scene at 1440p and bumped the brightness and contrast with Gimp in the near-perfect screenshot, and they look very close.

pixel-perfect: https://i.imgur.com/eWNFvUG.png
near-perfect: https://i.imgur.com/dIQOuwf.png
I agree, and can't believe you had to increase brightness and contrast in the latter screenshot, because the colors look very similar. Does it mean that bilinear interpolation decreases perceived brightness and contrast? The blur is indeed very slight, but it is its uneven distribution (some edges are sharp and some soft) that really galls my sense of esthetics. I want no such blur in pixel-art. High-fidelity CRT emulation on high-resolution displays is, however, another matter:
realnc wrote:No, that's a CRT TV with an NES. It doesn't apply to PC CRT monitors. They are much, much sharper than CRT TVs. It was just an example to make the point that retro games were played on screens that had a natural smoothing effect (gaussian blur) with the phosphor grid further hiding some of the pixel aliasing. Shaders can help replicate that look to some extent (easier for retro console games, much harder for PC games, since they ran on sharp, low dot-pitch CRT displays and you need 8K LCD monitors to emulate that kind of image.)

In any event, a completely unprocessed image of a PC retro game just looks "wrong" to me. Bilinear upscaling is horrible of course, I'll just take interger upscaling instead any day of the week. But I like a good CRT shader even more :-)
And you can have a pixel-perfect shader as well!
Ant_222
Member
 
Posts: 466
Joined: 2010-7-24 @ 21:29

Re: DOSBox ECE (for Windows & Linux)

Postby realnc » 2019-8-08 @ 05:20

Ant_222 wrote:I agree, and can't believe you had to increase brightness and contrast in the latter screenshot, because the colors look very similar.

I just noticed I didn't upload the original screenshot, prior to increasing the brightness/contrast. I uploaded that too now.

Does it mean that bilinear interpolation decreases perceived brightness and contrast?

It seems so. It makes the image look more "washed out".
User avatar
realnc
Member
 
Posts: 402
Joined: 2010-10-13 @ 11:02

Re: DOSBox ECE (for Windows & Linux)

Postby krcroft » 2019-8-08 @ 05:59

(snip) ... retro games were played on screens that had a natural smoothing effect (gaussian blur) with the phosphor grid further hiding some of the pixel aliasing.

I'm in full agreement; but just wanted to reminisce: back in the late 80s a childhood friend had his NES hooked up to a very high end but small-ish (maybe 15"?) CRT. It was a beast of a display having gray industrial housing similar to the medical imaging displays common in the 90s.

I'm not sure what it was.. but the pixels were super crisp, far better than any TV or the CRT on my family's Amstrad PC.

That surely kindled my preference for high DPI CRTs (at 85+Hz) in the 90s and crisp pixels for Retro gaming today.

(the phosphor smoothing and drop-off effect was always a hardware limitation and flaw in my mind that vendors would have eliminated if they could.. the less distortion the better! Although I now understand that many game artists relied on this effect, so I find myself torn.. alas.. too much Retro-choice today is a good thing I suppose!).
User avatar
krcroft
Member
 
Posts: 251
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: DOSBox ECE (for Windows & Linux)

Postby gen13_dv8 » 2019-8-20 @ 14:58

In DOSBox ECE you have to use univbe and machine: svga_et4000 in Need for Speed Special Edition?
gen13_dv8
Newbie
 
Posts: 1
Joined: 2018-5-30 @ 22:41

Previous

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 1 guest