I wonder whether would it be possible to implement different horizontal/vertical scaling factors and/or making for automatic calculations to take them in count when using fullscreen.
Why? Well, let me explain: I always play these 320x200 EGA/VGA games in fullscreen native 1600x1200 resolution which IMHO is perfect for a proper 4:3 aspect ratio with 5x horizontal / 6x vertical scaling; the different scaling factors implement the non-square pixels perfectly with their classic 20% taller than wide. Of course these usually means to disable any automatic aspect ratio correction in emulators and such for it's not needed anymore; fullscreen native resolution at 100% does the work.
In xu4, however, you only have a single factor for both horizontal and vertical whose maximum appears to be 5x, and it seems it's not even taken in count when using fullscreen because calculations are automatic depending on resolution. In the end with 1600x1200 you have a 5x h/v scaling factor which forces top and bottom black bars that shouldn't be necessary had 6x be available for vertical and independant from horizontal which would wind up being 5x.
On any case, thanks for your attention and for your work to date in such a splendid recreation of one of the best games ever for modern OSs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are three scaler shaders and two have a single scale factor. The one that seems to give the best results does allow scaling to any dimensions. For xu4 version 2 I may drop the other scalers and could add an option to emulate the taller pixel aspect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I only use "point" for I wouldn't want anything else to mess with my precious pixels in all their squary glory. Then I use ReShade (OpenGL) for scanlines, shadow mask, double scanline per pixel (640x400 actual rendering for anything over 350px height) and other VGA classic monitor emulation gimmicks. Implementing shaders to leave ReShade out would be yet another suggestion, but I deem that one less important than a proper scaling previous to shading.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's a new Windows snapshot (DR-482a46d7) that has a "point-43" filter that may be what you want.
Note that fullscreen autoscaling goes up to 6x (unless using the HQX filter).
I'm still a bit confused about how you get a 4:3 display aspect while also saying that you "disable any automatic aspect ratio correction". Stretching the 200 pixel base height to 240 is aspect correction, no? Or does your monitor not have square pixels?
Last edit: Karl Robillard 2025-03-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's what I said: unless I'm able to use different scaling factors I need aspect ratio correction. Using different scaling factors, scalers themselves stretch those pixels. Of course my monitor, Dell 2007FP with 1600x1200 60Hz native (320x200 x5/x6), and able to go to 1280x800 (320x200 x4/x4) for 70Hz as necessary in order to replicate standard VGA Mode 13h, has square pixels as any other. Hehehe... except those old CRT glories of old, of course, that (in their own manner) didn't even know what a pixel is!
I'll be testing this new snapshot in a few hours, along with that sound test program as you suggested in the other thread to look for Faun reasonable buffer and sample values. Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, see... I fetched a few minutes to quickly try the new snapshot and I can say this new "point-43" scaler is EXACTLY what I was looking for! Please take a look at the result (screenshot attached), with ReShade shaders already applied.
I see Dell had that model number almost 20 years ago - how old is yours? If that's supposed to be a CRT emulation shouldn't it have 200 dark lines (between each row of pixels)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah, this old glory of mine was bought more than 10 years ago and it's still my 'modern' monitor of choice, out of a proper CRT, for everything retro due to some of its capabilities. Of course is NOT the best one you could have for your money, but it definitely gets the job done.
And about that screenshot, what you see (please take note that you'll need to open the PNG screenshot under a proper resolution on its original version because it's impossible to see it properly in the preview) is but a compromise solution that looks proper when seen from a reasonable distance. Why? See, 1600x1200 is enough to get perfect 4:3 320x200 pixels, either EGA or VGA of course, and it's also enough for EGA single scanlines (and shadow mask is halfway there).
But for VGA scanlines the thing is different: since VGA doubles resolution for anything lesser than 350px height, 320x200@70Hz (Mode 13h) gets rendered as 640x400, of course with only 200px height, so each pixel gets 2 scanlines.
Problem is that 1200 real pixels height (my native resolution) is not enough to properly simulate that many scanlines. 1200 real pixels / 400 scanlines = 3 real pixel rows per scanline and 6 pixel rows per retro pixel. And 3 pixel rows are not enough for the 'scanline effect' with 'light/dark' electron beam effect. Those dark lines, which are just part of the real scanline effect (they're dark because they aren't been scanned by the electron beam), also need to be somehow represented by real pixels on modern monitors so they end up -eating- pixels that would be needed for proper scanlines otherwise.
Short version: some experts (please don't add me there!) say that the absolut minimum for 320x200 -proper- CRT emulation is 1440px height, though from 1080px you can get something good enough when seen from distance. And they also say that the absolut minimum for -proper- 640x480 CRT emulation is... 4K! Go figure...
Having said this, other software like "DOSBox Staging" somehow managed to do it better (if not perfect) than I did here for only 1080p height with their current OpenGL shaders, and I'm also using those for "DOSBox-X". Alas! Their code doesn't seem to be 100% compatible with ReShade implementation.
And the funny thing is that I wouldn't be facing this trouble if using original EGA graphics instead the VGA upgrade since the scanlines wouldn't need to be doubled...
Last edit: Zósite Kónstyte Styles 2025-03-31
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wonder whether would it be possible to implement different horizontal/vertical scaling factors and/or making for automatic calculations to take them in count when using fullscreen.
Why? Well, let me explain: I always play these 320x200 EGA/VGA games in fullscreen native 1600x1200 resolution which IMHO is perfect for a proper 4:3 aspect ratio with 5x horizontal / 6x vertical scaling; the different scaling factors implement the non-square pixels perfectly with their classic 20% taller than wide. Of course these usually means to disable any automatic aspect ratio correction in emulators and such for it's not needed anymore; fullscreen native resolution at 100% does the work.
In xu4, however, you only have a single factor for both horizontal and vertical whose maximum appears to be 5x, and it seems it's not even taken in count when using fullscreen because calculations are automatic depending on resolution. In the end with 1600x1200 you have a 5x h/v scaling factor which forces top and bottom black bars that shouldn't be necessary had 6x be available for vertical and independant from horizontal which would wind up being 5x.
On any case, thanks for your attention and for your work to date in such a splendid recreation of one of the best games ever for modern OSs.
There are three scaler shaders and two have a single scale factor. The one that seems to give the best results does allow scaling to any dimensions. For xu4 version 2 I may drop the other scalers and could add an option to emulate the taller pixel aspect.
Well, I only use "point" for I wouldn't want anything else to mess with my precious pixels in all their squary glory. Then I use ReShade (OpenGL) for scanlines, shadow mask, double scanline per pixel (640x400 actual rendering for anything over 350px height) and other VGA classic monitor emulation gimmicks. Implementing shaders to leave ReShade out would be yet another suggestion, but I deem that one less important than a proper scaling previous to shading.
There's a new Windows snapshot (DR-482a46d7) that has a "point-43" filter that may be what you want.
Note that fullscreen autoscaling goes up to 6x (unless using the HQX filter).
I'm still a bit confused about how you get a 4:3 display aspect while also saying that you "disable any automatic aspect ratio correction". Stretching the 200 pixel base height to 240 is aspect correction, no? Or does your monitor not have square pixels?
Last edit: Karl Robillard 2025-03-30
That's what I said: unless I'm able to use different scaling factors I need aspect ratio correction. Using different scaling factors, scalers themselves stretch those pixels. Of course my monitor, Dell 2007FP with 1600x1200 60Hz native (320x200 x5/x6), and able to go to 1280x800 (320x200 x4/x4) for 70Hz as necessary in order to replicate standard VGA Mode 13h, has square pixels as any other. Hehehe... except those old CRT glories of old, of course, that (in their own manner) didn't even know what a pixel is!
I'll be testing this new snapshot in a few hours, along with that sound test program as you suggested in the other thread to look for Faun reasonable buffer and sample values. Thank you!
Ok, see... I fetched a few minutes to quickly try the new snapshot and I can say this new "point-43" scaler is EXACTLY what I was looking for! Please take a look at the result (screenshot attached), with ReShade shaders already applied.
I'll work on that sound test later.
I see Dell had that model number almost 20 years ago - how old is yours? If that's supposed to be a CRT emulation shouldn't it have 200 dark lines (between each row of pixels)?
Yeah, this old glory of mine was bought more than 10 years ago and it's still my 'modern' monitor of choice, out of a proper CRT, for everything retro due to some of its capabilities. Of course is NOT the best one you could have for your money, but it definitely gets the job done.
And about that screenshot, what you see (please take note that you'll need to open the PNG screenshot under a proper resolution on its original version because it's impossible to see it properly in the preview) is but a compromise solution that looks proper when seen from a reasonable distance. Why? See, 1600x1200 is enough to get perfect 4:3 320x200 pixels, either EGA or VGA of course, and it's also enough for EGA single scanlines (and shadow mask is halfway there).
But for VGA scanlines the thing is different: since VGA doubles resolution for anything lesser than 350px height, 320x200@70Hz (Mode 13h) gets rendered as 640x400, of course with only 200px height, so each pixel gets 2 scanlines.
Problem is that 1200 real pixels height (my native resolution) is not enough to properly simulate that many scanlines. 1200 real pixels / 400 scanlines = 3 real pixel rows per scanline and 6 pixel rows per retro pixel. And 3 pixel rows are not enough for the 'scanline effect' with 'light/dark' electron beam effect. Those dark lines, which are just part of the real scanline effect (they're dark because they aren't been scanned by the electron beam), also need to be somehow represented by real pixels on modern monitors so they end up -eating- pixels that would be needed for proper scanlines otherwise.
Short version: some experts (please don't add me there!) say that the absolut minimum for 320x200 -proper- CRT emulation is 1440px height, though from 1080px you can get something good enough when seen from distance. And they also say that the absolut minimum for -proper- 640x480 CRT emulation is... 4K! Go figure...
Having said this, other software like "DOSBox Staging" somehow managed to do it better (if not perfect) than I did here for only 1080p height with their current OpenGL shaders, and I'm also using those for "DOSBox-X". Alas! Their code doesn't seem to be 100% compatible with ReShade implementation.
And the funny thing is that I wouldn't be facing this trouble if using original EGA graphics instead the VGA upgrade since the scanlines wouldn't need to be doubled...
Last edit: Zósite Kónstyte Styles 2025-03-31