Closed ikreymer closed 3 years ago
I had a very similar issue when first booting XP in the browser. It turned out that the colors were being moved in the wrong location, and the fix was here. You can try doing #define EMSCRIPTEN
at the top, and if that works, I'll add it as a workaround (unfortunately, I don't have a Mac). If that doesn't work, you might have to fiddle around with the positions in the DAC. I wonder if there's a way to determine pixel format at compile time...
The bug doesn't happen on Emscripten version since browsers have have standardized on ARGB for 32bpp displays, at least.
Thanks for the pointer on where to look!
Yes, I had to set the DAC to:
vga.dac_palette[i] = 255 << 0 | c6to8(vga.dac[index | 0]) << 8 | c6to8(vga.dac[index | 1]) << 16 | c6to8(vga.dac[index | 2]) << 24;
The SDL PixelFormat had Ashift 0, Rshift 8, Gshift 16, Bshift 24, so I tried that and it worked..
Maybe there's way to use the pixel format settings?
I didn't like the idea of creating an #ifdef
for each system, so I solved the root issue: instead of relying on SDL_SetVideoMode
, I use SDL_CreateRGBSurfaceFrom
and blit the pixels from there. Let me know if this works!
Yep, that fixes it on osx. Thanks!
That's good to hear! Thanks for the bug report.
Ex: This happens for at least win2k and win98 when using a native build. The emscripten build has correct rendering with the same images. It seems like the initial blue channel background persists?