GloriousCow wrote on 2024-03-01, 13:55:
Nice work. How does a user specify that the EGA should be in lo-res mode in UniPCemu?
I simply have a setting to specify the monitor (EGA 5154 enhanced, EGA 5154 normal, CGA 5153). That simply affects the monitor ID bits reported on the switches on the EGA adapter.
The monitor that's connected is still an EGA adapter, as it properly responds according to the different signals and is compatible.
All it does is change the switches: 0x6(off on on off) for enhanced EGA, 0x7(on on on off) for EGA 5154 normal and 0x8(off off off on) for CGA 5153 (remember that bit 0 of the switches is switch #0).
For example, monochrome VGA monitor sets SW2 only (0x2, or 'off on off off'). And monochrome EGA monitor (right now) sets 0x4 (or 'off off on off', so SW3 only on).
Though EGA monochrome (MDA monitor) still seems to have issues with starting on tested BIOSes (Generic Super PC/Turbo XT BIOS latest as well as Compaq Deskpro 386 tested).
Once the XT-IDE BIOS pops up it runs for a bit, but MS-DOS renders incorrectly (wrong memory area for VRAM writes). Cursor seems to still update though?
'C' from 'CLS' command puts the cursor at the position of the 'X' of 'XTIDE Universal BIOS'?
So it looks like cursor position updating still works in monochrome mode. Just nothing is written to the VRAM window correctly (all written to the B800 segment instead of B000 segment when in monochrome mode, except the XT-IDE BIOS itself it seems).
Until I run 'mode mono' that is.
It's almost like it's using the color adapter for output somehow instead of the 'primary' monochrome EGA adapter.
Edit: Also, interesting, running Windows 95 (at least the C version, others probably as well. Though you'd need to emulate a 386 or newer for that) sets the special mask mode on (sets said bit to 1). So that's a good test of that mode. Don't know if older versions of Windows (3.1 etc.) use it as well?
Edit: It makes me wonder though. What actualy DOES special fully nested mode do to a 8259(A) PIC? What really changes in the behaviour of the chip? Normal special mask mode is relatively simple.