Reply 40 of 54, by superfury
Just managed to get my test program to render 1 line of all 4 attributes (to planes 0 and 3 as a 2-bit spread value) by utilizing the map mask register and writing VRAM directly at segment A000 after setting the mode and precalculating one scanline of data to use for all scanlines pixels (due to floating point calculations, use precalcs for that (simply divide by 640 and multiply that by 4 once for all scanlines and rendering)).
Edit: I clearly see it rendering the pixels like it should! 4 colors in full glory mode 0Fh! Although blinking seems to be disabled? But that's the mode control register's issue of not having enabled blinking by default?
Edit: Added theortical blinking enable by adding INT 10h function 10h BX=01h. It should enable blinking (in text modes at least). But for some reason it's not activating said bit at all?
Guess I'll have to modify it manually. Luckily that's not too difficult.
Edit: Perhaps it's not required though? It looks like the INT 10h video handler already sets said bit properly.
And it looks like the blinking is an attribute controller graphics-only issue. That issue applies to all graphics mode with blinking enabled 😖
It was detecting graphics mode like blinking in this case. So all EGA additions I added were handled like in text mode (based on bit 7, which is never set in the graphics attributes!).
Besides of course handling background incorrect as well when blinking is disabled, but that won't affect graphics because they're always font pixels, never background pixels.
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io