-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pinball Fantasies (SVGA): wrong colors in table selection #553
Comments
I'm not sure what to try next. Unless the issue is properly understood, any changes to original DOSBox behavior on this will likely break other stuff. The code in Putting
What I really don't understand, and feel it's critical to what's happening here is... Why is the final resolution in the table selection reported as 640x240, but no corruption is seen other than the wrong colors? The double-scanning done later on could explain this, but the frame is still 640x480 even when @schellingb Any ideas? |
I've found this commit in DOSBox Staging which might point in the right direction: "Improve VGA double scanning criteria" Lemmings also uses the same trick for the bottom control area. It also requires |
There are many games that only work with VGA. SVGA is just the standard, it is compatible with VGA but does not support all its features, it is not a video card compatible with both standards, VGA/SVGA. |
@alexb3d SVGA cards were backwards compatible with VGA but, even if they weren't, that would not be relevant for this issue. The reason why DOSBox requires I've spent a few more hours on this after opening this issue and got nowhere. My conclusion is that the way In summary, |
@schellingb Continuing here, since #552 has been merged...
They rewrote the whole thing, and seem to rely more closely to what's set in the VGA registers to derive the correct behavior. That's the correct approach. Roughly, what Pinball Fantasies is doing here is setting things up in a way that triggers an interrupt midway through the frame as if it were starting a new frame (and that's why the resolution is reported as 640x320 instead of the correct 640x480). At that point it switches the palette, but the draw continues from the same position without doing a VSYNC. "When the scan line counter reaches the value in the Line Compare field, the current scan line address is reset to 0 and the Preset Row Scan is presumed to be 0." I see places in the code where VGA triggers interrupts, and I see some references to the line counter. But can't, for the life of me, figure out where the two are glued together regarding this specific behavior. Nor where it is triggering a different behavior based on |
Opening an issue specifically for this, as it seems like something that won't have a quick fix, and to avoid the discussion being split between issue #550 and PR #552.
Summary (from what was said before):
Pinball Fantasies has historically required
vgaonly
in DOSBox. Right now, under SVGA the table selection screen shows the wrong colors (the 16-color palette change for the bottom half isn't applied).Even though the table selection screen is 640x480 (
vga.mode=2
), which doesn't require double-scanning in VGA, the game still sets double-scanning explicitly in the maximum scan line register (SD=1
).In
vgaonly
the SD bit in that register is ignored forvga.mode
2 and 3 — here — which is then expected to be compensated later on — here. The side-effect of this is making the frame always double-scanned regardless of what's set in the "Aspect Ratio Correction" core option.In SVGA, the SD bit is honored — here — and later causes the reported horizontal resolution to be halved — here.
Looking at the code in "DOSBox-X" and "DOSBox Staging" doesn't help much, as
vga_draw.cpp
has been changed beyond recognition in those forks.The text was updated successfully, but these errors were encountered: