Well, I tried to run Genecyst (a Genesis emulator) in DOSEmu today and,
even with the latest version (0.99.5), I encountered the same bug: The
palette in VESA modes gets corrupted. Now, I did some testing and found
this bug only affects VESA modes, and when I placed some debugging code in
the set/get palette code (VESA fn 0x09, vesa.c:vbe_palette_data(), I found
that ES:DI appears to be pointing to a corrupted block of memory, as the
palette entries read from there make NO sense at all (even with the top 2
bits stripped off... it's in 6-bit DAC mode, btw... I checked).
Unfortunately, I don't know enough about DOSEmu internals to be able to
figure out WHY this is happening, but I can tell you that the (unsigned
char *) pointer returned by SEG_ADR((unsigned char *), es, di) is not a
valid palette data block... the values being passed into DAC_set_entry()
are totally non-sensical. In fact, I placed some debugging output in
refresh_truecolor() and found that the palette values after Genecyst did a
VESA mode switch were totally different from the palette values found
after a switch to plain old mode 0x13 (non-VESA, forced using the -novesa
flag)... there was absolutely NO correspondence between the two palettes.
So, any ideas on where to go from here?
Brett.