Closed thec0n closed 2 months ago
Update: Removing the crt shader, I confirm that newer versions when employing the horizontal blend do not create 3 unique colors, as they should; they create only 2 colors, which probably confirms the bug report.
The change in vga_dac.cpp in commit https://github.com/joncampbell123/dosbox-x/commit/bc99b648ffd09de2c03943da8f4c8207aa892488 seems to be the reason. However, I don't know if reverting this will affect other games. @joncampbell123 do you have any observations?
vga_dac.cpp line 189
else if (machine == MCH_MDA || machine == MCH_HERC) {
/* the DAC mapping for MDA/Herc must be maintained or colors will not come out right */
#if 0 // current code
if ((index&7) != 0)
VGA_DAC_SendColor(index,(index & 8) ? 0xF : 0x7);
#else // reverted code
if (index !=0)
VGA_DAC_SendColor(index,(index & 1) ? 0x7 : 0xF); /* 1=>7, 2=>F Ref. vga_other.cpp function Herc_Palette() */
#endif
The upper screenshot is the latest commit, and the lower is when the above commit for vga_dac.cpp is reverted.
The changes made to vga_dac.cpp were done to simplify how MDA/Hercules mode works in combination with HGC+ and InColor emulation. It normalizes the DAC layout to a 16-color mapping from the attribute bit according to how MDA/Hercules maps it from the attribute byte:
It was also done to solve some issues in DOSBox-X where at some point, triggered by I/O writes, the DAC mapping would change and make the MDA/Hercules display black and dark blue and other bugs.
If the shader was heavily dependent on the DOSBox SVN style {0,1,2} => {black, gray, white} mapping, I'm sorry.
If the shader works entirely on the color palette given, it will have to work with 0=black 1-7=gray 8=black 9-f=white instead of 0=black 1=gray 2=white.
Thanks for your comment. I didn't enable any shaders for the the screenshot I uploaded above. Anyway we have to find a solution to both this issue and the dark blue issue that you mentioned.
Got it. Should appear in the next nightly build.
Describe the bug
Hello, I had been using DosBox-X 2022.09.0 for playing QG1 on Hercules with horizontal blending (CTRL+F8) and decided to go for the latest DosBox-X version (currently at 2024.03.1). There, I noticed that there is no longer a horizontal blend, but something a bit different (high intensity), which produces a much less desirable effect (and not realistic, if I can remember correctly the ways of Hercules back in the day). During my tests, it doesn't matter if you use mingw or vs, 64-bit or 32-bit. The last version working is 2023.03.31. The first version with the problem is 2023.05.01 (up to the last available version: 2024.03.1). You may notice this difference on the files I attach (sorry for the crt shader): • 01_2023.03.31-normal.intensity.png (normal details, 1 shade of "color") • 02_2023.05.01-normal.intensity.png (99.9% same as 01, some pixels seem to be fixed on the right side, but some garbage at the bottom; everything not related to the matter at hand). • 03_2023.03.31-high.intensity.png ("correct" horizontal blend, details evident, 2 shades of "color") • 04_2023.05.01-high.intensity.png ("problematic" horizontal blend, details gone, I think I can also see 2 shades of "color", but it is MUCH worse than 03. The unrelated differences such as some pixels better rendered at the right but the existence of garbage pixels at the bottom, exist just as in 02).
Is the described problem about hercules horizontal blending a bug, or is it by design, changed after 2023.05.01? If any, the older version is much better IMHO, and closer to what I can remember.
Steps to reproduce the behaviour
Just run any hercules game (I only tested QG1, to be honest) with machine=hercules. Then press CTRL+F8 to activate hercules horizontal blend and see that details are lost (contrary to older builds of Dosbox-X).
Expected behavior
No response
What operating system(s) this bug have occurred on?
Windows 11 23H2
What version(s) of DOSBox-X have this bug?
2023.05.01+ all types
Used configuration
Output log
No response
Additional information
No response
Have you checked that no similar bug report(s) exist?
Code of Conduct & Contributing Guidelines