dosbox-staging
dosbox-staging copied to clipboard
Graphical issues with some Pinball games
Are you using the latest Dosbox-Staging Version?
- [X] I have checked releases and am using the latest release.
Different version than latest?
0.79.0-alpha-220-ga2df5
What Operating System are you using?
Windows 11
Whats your question and how can we help?
Hi, I would like to show you some graphical issues I have encountered with Pinball Dreams Deluxe, Pinball Fantasies Deluxe and Pinball Illusions. I haven't marked it as a "bug" as I don't know if all the problems are due to DOSBox or the games themselves. I used the latest alpha version from the main branch, to make sure those problems were still present.
Pinball Dreams Deluxe
Pinball Dreams Deluxe uses two video modes: low-res 320x200 and high-res 320x350 (which DOSBox indicates as VGA 640x350 8-bit (mode 13h)).
Let's start with the first:
With aspect = true, low-res mode is displayed incorrectly, everything is stretched vertically

In this case the solution is simple, set aspect = false

Unfortunately the same solution doesn't work for the 320x350 high-res mode, as the image is extremely stretched horizontally, occupying the entire viewing area of the 16:9 screen.
The image will be stretched horizontally even with aspect = true:

Pinball Fantasies Deluxe Pinball Fantasies Deluxe uses two video modes: low-res 320x240 and high-res 320x350. It contains two games: Pinball Fantasies and Pinball Mania.
In Pinball Fantasies, setting machine = svga_s3, the colors in the main menu are wrong

With machine = vgaonly the correct colors will be shown.

Low-res mode is displayed correctly with both aspect = true and aspect = false

High-res mode is displayed stretched horizontally (aspect = true) like Pinball Dreams Deluxe:

Pinball Mania behaves the same way:
Low-res

High-res

Pinball Illusions
Pinball Illusion supports 320x240, 360x350, 640x480, 800x600 video modes.
320x240 mode displays correctly (right side is slightly cropped, but I think that's intended):

360x350 mode is stretched horizontally:

The 640x480 and 800x600 modes, setting machine = svga_s3, are completely broken:
640x480
800x600

However, if you set machine = svga_et3000, they are displayed correctly:
640x480
800x600

Code of Conduct & Contributing Guidelines
- [X] Yes, I agree.
Thanks for this detailed post @Kappa971.
Tagging this as a bug:
- 360x350, similar to DOSBox SVN and correct per hardware CRT (see below)
- 640x480, similar to DOSBox SVN
- 800x600, similar to DOSBox SVN
360x250 on real DOS and CRT, courtesy Great Hierophant:

By filling the screen with more horizontal pixels, users could tighten up their CRT's width with an analog control to get a modest ~10% DPI improvement.
But those quick-to-adjust analog knobs are gone on today's bezel-less flat panels (perhaps buried in a sluggish OSD menu, if that). Staging wants to support modern hardware, so this is an area where "correcting" the aspect will deviate from original behaviour. This might cause some people to cringe, but that's Staging's goal and scope. (Ideally we can leave non-aspect corrected 360x250 to behave per original hardware).
Question: does anyone know of other games that used these less common VGA modes 13h/X resolutions to regression test against?
So Pinball Illusions 360x350 mode is displayed incorrectly even on a CRT screen? Interesting.
By filling the screen with more horizontal pixels, users could tighten up their CRT's width with an analog control to get a modest ~10% DPI improvement.
But those quick-to-adjust analog knobs are gone on today's bezel-less flat panels (perhaps buried in a sluggish OSD menu, if that). Staging wants to support modern hardware, so this is an area where "correcting" the aspect will deviate from original behaviour. This might cause some people to cringe, but that's Staging's goal and scope. (Ideally we can leave non-aspect corrected 360x250 to behave per original hardware).
Is it possible to recreate an "analog control" (with a hotkey) in the DOSBox settings? This would avoid problems with other games and keep the original behavior, with the ability to tighten the image via DOSBox's virtual analog controls. It would also avoid discussions about the correct aspect ratio.
The 320x350 modes of Pinball Dreams Deluxe and Pinball Fantasies Deluxe are also stretched horizontally. Are these also displayed that way on a CRT screen?
Yes, during the DOS heydays before Windows high-resolution gaming became common (with direct-draw and such), CRTs had front-facing hsize and vsize knobs allowing for quick adjustment to suit the users taste. These were often used especially after launching applications that set more obscure graphical modes that might not have appeared correct, like this one:
I remember myself using these knobs for a handful of games when in those video modes.
For example, Great Hierophant mentioned: "If I reduce my horizontal width to 0 and keep the vertical width to 100, /snip/ I can get square pixels"

And that's on DOS hardware + CRT. The knobs were very handy; a quick adjustment and carry-on playing.
The 320x350 modes of Pinball Dreams Deluxe and Pinball Fantasies Deluxe are also stretched horizontally. Are these also displayed that way on a CRT screen?
I would assume so - but would need someone running actual hardware to confirm.
So I guess DOSBox is scaling resolutions the right way... A virtual analog knob would solve these problems. It is feasible?
Regarding the wrong colors in Pinball Fantasies and the 640x480/800x600 modes broken in Pinball Illusions with machine = svga_s3, can these be considered bugs?
Yes to both.
- for the 3-hundred line modes, if the majority of (ideally all) games that use these less common modes appear similarly "wide-aspect", then we can correct them with whatever vertical pullup is necessary to make them appear perfectly square.
- for the non-vesa mode-X higher resolutions: we also need to check how other games behave, because (in some cases), the bug lies in the game. For example, many build engine games struggled with flicker when in some modes, and it was a known issue. It was often trial and error to find a video mode that worked correctly.
So next step is to try to find other games (or graphical test tools, etc..) that exercise these same modes.
Yes to both.
- for the 3-hundred line modes, if the majority of (ideally all) games that use these less common modes appear similarly "wide-aspect", then we can correct them with whatever vertical pullup is necessary to make them appear perfectly square.
- for the non-vesa mode-X higher resolutions: we also need to check how other games behave, because (in some cases), the bug lies in the game. For example, many build engine games struggled with flicker when in some modes, and it was a known issue. It was often trial and error to find a video mode that worked correctly.
So next step is to try to find other games (or graphical test tools, etc..) that exercise these same modes.
If I understand correctly this would make DOSBox adjust these resolutions automatically, which could potentially create problems with other games using the same modes. As you said, we should find other games with such resolutions.
What I thought instead, based on what you said about the analog control of old CRT monitors, is to add new options in the DOSBox settings for horizontal and vertical control of the image, controllable via hotkeys, so that you can see the changes made in real time. It would also avoid a long search for games that use the same modes.
This site is interesting: http://nerdlypleasures.blogspot.com/2014/09/oddball-ega-and-vga-resolutions-when.html?m=1 I didn't know that DOS games use so many strange modes.
EDIT I also found this (although not strictly related to games): http://www.columbia.edu/~em36/wpdos/videomodes.txt
Yes, if it turns out these modes are handled inconsistently then we would need to decide what to do. My guess is they (should) be similar, but need the data.
From what I've learned over the years, I believe games ported from other systems such as Amiga may not have bothered to correct their artwork to account for different video modes, so one has to be careful about making changes.
I have tested other Pinball games:
- Extreme Pinball appears to only use 320x400 mode (DOSBox recognizes it as 640x400) and displays correctly

- Psycho Pinball uses 320x240 and 320x368 modes (DOSBox recognizes it as 640x368). The first mode is displayed correctly, while the second is horizontally stretched

- Absolute Pinball isn't working. I can't test it as it crashes (even with DOSBox SVN).
If you choose Gravis Ultrasound, Absolute Pinball crashes. With the Sound Blaster 16 it works well.
Anyway, the 320x240 mode is displayed correctly.

The 360x270 mode (recognized correctly by DOSBox) is displayed correctly.

The 320x400 mode (DOSBox recognizes it as 640x400) is stretched horizontally. This mode was displayed correctly in Extreme Pinball, demonstrating that each game could behave differently (the graphics appear to have been adapted to display correctly in Extreme Pinball)

This game supports two other video modes, but I don't know the exact resolutions:

I still think that letting the user adjust the image, like in CRT monitors, is the simplest solution (although I don't know how complicated it is to implement that function).
I found another game that uses 320x400, 320x350, and 360x350 video modes... it's Quake. The menu graphics are stretched horizontally, but the game is displayed correctly:
320x400

320x350

360x350

Note that compared to Pinball games, all modes are stretched to use a 4:3 aspect ratio, but this horizontal stretch seems to have been taken into consideration by the developers, as all modes are displayed without errors. However, they didn't bother to readjust the hud and the menus which instead are stretched horizontally.
From what I've learned over the years, I believe games ported from other systems such as Amiga may not have bothered to correct their artwork to account for different video modes, so one has to be careful about making changes.
That's definitely true. This is how Pinball Dreams looks with square-pixels on a PAL Amiga:


I remember when I first saw the DOS port it definitely appeared squashed on my VGA monitor set up for standard VGA modes. Virtually no one redrew the art when porting to a different platform with different pixel aspect ratios. Playing ports of DOS games on PAL Amigas that used 320x256 screen modes appeared similarly squashed (but they looked fine on 320x200 NTSC).
(By the way, if you're into pinball games, you definitely should play the Amiga original. While the DOS port is technically impressive and one of the better ports from the Amiga, the ball physics is completely different; I much prefer the original. And with beamracing (lagless vsync) enabled in WinUAE, it finally plays just like on my A500 in the 90s 😁)
I remember when I first saw the DOS port it definitely appeared squashed on my VGA monitor set up for standard VGA modes. Virtually no one redrew the art when porting to a different platform with different pixel aspect ratios. Playing ports of DOS games on PAL Amigas that used 320x256 screen modes appeared similarly squashed (but they looked fine on 320x200 NTSC).
But it seems that in old PC monitors you could adjust the image with analog controls (see the photo shared by @kcgen), maybe it would be useful to have "analog controls" for manual correction of the image in the configuration file. Obviously I don't know how much work it would take and if it would be worth it for just these games.
(By the way, if you're into pinball games, you definitely should play the Amiga original. While the DOS port is technically impressive and one of the better ports from the Amiga, the ball physics is completely different; I much prefer the original. And with beamracing (lagless vsync) enabled in WinUAE, it finally plays just like on my A500 in the 90s 😁)
I have them 😁
Hello,
after a long search i have found this issue. I hope i understand all well.
When dosbox recognize 320x350 as 640x350 why is it not possible to fix this old bug in dosbox. I hope i have it fully understood. When dosbox recognize 320x350 as 320x350 Pinball Dreams and others will rendered well.
Or is the emulation of an vertical and horizontal switch the only way? Will it be possible to include an vsize and hsize config param with negative and positive values?
thx
I think the solution is not as simple as I thought... Here it is specified that these games change resolution and aspect ratio all the time: https://github.com/joncampbell123/dosbox-x/issues/3546#issue-1259816259
Just noticed the ball in Pinball Illusions doesn't get displayed correctly in high-res modes... It's sometimes flashing, sometimes it completely disappears, sometimes black bars appear overlaid on top of it. That's with svga_s3, same behaviour in 0.80.1 and main.
From what I've learned over the years, I believe games ported from other systems such as Amiga may not have bothered to correct their artwork to account for different video modes, so one has to be careful about making changes.
That's definitely true. It was expensive enough to draw the art once. In 99.99% of cases nobody bothered redrawing it when the game was ported to a platform that had a different aspect ratio. The art just became stretched, squashed, whatever... like no big deal, nothing to see here 😅
It needs a bit more juice at those higher resolutions. (I also run the high res VESA rate at 60 Hz given the game's Amiga roots).
These are dialed in if you run the game in 800x600 res:
[render]
aspect = false
[dosbox]
dos_rate = 60
[cpu]
cycles = 4900
Just noticed the ball in Pinball Illusions doesn't get displayed correctly in high-res modes... It's sometimes flashing, sometimes it completely disappears, sometimes black bars appear overlaid on top of it. That's with
svga_s3, same behaviour in 0.80.1 and main.
I have other problems with svga_s3, as specified here (Pinball Illusions CD version): https://github.com/dosbox-staging/dosbox-staging/issues/1578#issue-1144727782
With svga_et3000 and svga_et4000 it should work fine.
That's definitely true. It was expensive enough to draw the art once. In 99.99% of cases nobody bothered redrawing it when the game was ported to a platform that had a different aspect ratio. The art just became stretched, squashed, whatever... like no big deal, nothing to see here 😅
If it were possible to have controls to change the aspect ratio manually, the problem would be solved.
I'm using your config @kcgen from your "strange_ega_and_vga_modes" pack. I haven't changed the config, it's configured for machine = svga_et3000. Same results with svga_et4000. Video attached, the ball is flashing randomly, often completely disappearing.
illusion_000.zip (rename to *.avi)
This is main, but I'm getting the exact same behaviour on 0.80.1 as well on macOS.
If it were possible to have controls to change the aspect ratio manually, the problem would be solved.
@Kappa971 but the aspect ratio is perfect with svga_et3000 and svga_et4000. You can't change it manually as the game switches frequently between all sorts of weird-ass resolutions, there's no single aspect ratio that would work for all. We won't support such aspect ratio overrides, it's pointless and to do it properly, you'd need to provide a whole table of custom aspect ratio overrides. Hugely complicated, and total overkill, so no...
I'm using your config @kcgen from your "strange_ega_and_vga_modes" pack. I haven't changed the config, it's configured for machine = svga_et3000. Same results with svga_et4000. Video attached, the ball is flashing randomly, often completely disappearing.
Yup.. the confs were only setup enough for me to look for regressions in video modes (not setup for audio or gameplay).
suggest updating your conf with these:
[render]
aspect = false
[dosbox]
machine = svga_et3000
dos_rate = 60
[cpu]
cycles = 4900
To change resolutions, pass the "o" (I suppose, options) parameter to its BAT file: illusion.bat o
I'm using your config @kcgen from your "strange_ega_and_vga_modes" pack. I haven't changed the config, it's configured for
machine = svga_et3000. Same results withsvga_et4000. Video attached, the ball is flashing randomly, often completely disappearing.illusion_000.zip (rename to *.avi)
This is main, but I'm getting the exact same behaviour on 0.80.1 as well on macOS.
with svga_et3000 at 640x480 and 800x600 I'm having another kind of issue: PB_ILLUSIONS.zip
@Kappa971 - yes, in the high res modes, Pinball Illusion's rendering artifacts are cycle-specific.
Launch the ball and start rapidly tapping both paddles to generate as much sprite movement load on the game as possible.
At 3000 cycles, you should see vertical gap lines periodically during left paddle sprite rendering (as you recorded). This is true for SVN and X too.
Now tap ctrl+F12 to step cycles up, and those rendering gaps will march right. Keep doing that until you find when you push them off the right edge of the screen - but don't go too far, they will wrap around back to the left side (at this point, manually enter the cycles to find the sweet spot prior to wrap-around).
This is where I landed on 4900 cycles for 60 Hz VESA at 800x600.
I also suspect this would be true for a 386 16-Mhz SX running a real ET 3000 card and the game set to 800x600. People playing the Amiga version also report the ball phasing in and out too - https://eab.abime.net/showthread.php?t=27345.
@Kappa971 - yes, in the high res modes, Pinball Illusion's rendering artifacts are cycle-specific.
Launch the ball and start rapidly tapping both paddles to generate as much sprite movement load on the game as possible.
At 3000 cycles, you should see vertical gap lines periodically during left paddle sprite rendering (as you recorded). This is true for SVN and X too.
Now tap ctrl+F12 to step cycles up, and those rendering gaps will march right. Keep doing that until you find when you push them off the right edge of the screen - but don't go too far, they will wrap around back to the left side (at this point, manually enter the cycles to find the sweet spot prior to wrap-around).
This is where I landed on 4900 cycles for 60 Hz VESA at 800x600.
I also suspect this would be true for a 386 16-Mhz SX running a real ET 3000 card and the game set to 800x600. People playing the Amiga version also report the ball phasing in and out too - https://eab.abime.net/showthread.php?t=27345.
You are right! at 4800-4900 cycles there are no graphical artifacts in 800x600, but at 640x480 I didn't find the right cycles without graphical glitches. Before closing this issue, I would like to ask a few questions:
- Does Pinball Illusions also have these artifacts on real PCs with the ET3000? Is it a video card limitation or is the game broken?
- Choosing
svga_s3, the game doesn't display correctly in SVGA. Is it a DOSBox issue or of the emulated card? - This game came out in 1995. I don't know which CPU equals 4900 cycles, but in those years didn't most have much faster CPUs? (perhaps the
cputypeoption should be improved to make it more understandable and useful, for example if I select 486_20, ie 486 20mhz which doesn't exist now, DOSBox automatically sets the cycles as similar as possible to that CPU, but that's another discussion).
but at 640x480 I didn't find the right cycles without graphical glitches
Yup - 3648 is OK 800x600 except for babewatch, which has a paddle a lot higher up on the board.
If you run at 35000 cycles and above, it always renders OK (and that speed is a lot more period correct, too). Even max is OK, but unnecessary.
I'm not sure how the game behaves with real graphics cards. I know the S3 implementation is very compliant (passing all of UniVBEs tests), so the game might just need an older spec, like the ET 3000 gives.
Yup - 3648 is OK 800x600 except for babewatch, which has a paddle a lot higher up on the board.
If you run at 35000 cycles and above, it always renders OK (and that speed is a lot more period correct, too). Even
maxis OK, but unnecessary.I'm not sure how the game behaves with real graphics cards. I know the S3 implementation is very compliant (passing all of UniVBEs tests), so the game might just need an older spec, like the ET 3000 gives.
Ok, so I think I can close this, thanks.
improved to make it more understandable and useful, for example if I select 486_20, ie 486 20mhz which doesn't exist now
This is a good suggestion, @Kappa971.
Letting users select cpu model and speed similar to terminology used by manufacturers at the time:
- 86 8 MHz
- 286 12 MHz
- 386 16 MHz
- 386 33 Mhz
- 486 66 MHz
- Pentium 120 MHz
(With some generous bounds on ranges of speed) this would let users punch in period-correct values.
Short Info: Dosbox-X has an OpenGL-Perfect Output-Driver, thats scale all Pinball-Games perfectly. Is it possible to implement this in your Dosbox-Staging Version?
I have all dosbox versions on this planet tested after i have buyed pinball dreams on gog, and the dosbox-x output opengl-perfect ist the only one that resolved the problems with pinball dreams.
If dosbox-staging become this driver it will be the best dosbox fork.
thx
Short Info: Dosbox-X has an OpenGL-Perfect Output-Driver, thats scale all Pinball-Games perfectly. Is it possible to implement this in your Dosbox-Staging Version?
Set aspect = false in the config?
@johnnovak Yes i have. Same Problem on low-res i have perfectly round ball and in highres i have a squeezed ball:). Ah i understand perfectly in the gui mean openglpp. facepalm. Cann you please post a config where Pinball Dreams in Highres-Mode show a perfect round ball? thx