First post, by superfury
Anyone knows the exact difference between VGA's mode 7h and modes 0-3h? Modes 0-3h seem to be giving correct output (at least display wise, all characters turn out fine, including the 40x25 mode 8088 MPH returns to after execution, except it's jumping left and right every row, like the rows are being moved left and right half a row each time a new row is added. Is it maybe messing with the display RAM start address register?).
Only mode 7h gives:
- Wrong colors? It doesn't seem to use the correct pallette or pallette entries (Attribute Controller / DAC colors)
- Problem with the row size (The Offset register, CRTC index 13h)? Either this has the wrong value, or the Byte/Word/DWord mode is set wrong (unlikely, because sequential characters give correct input without gaps or wrong/duplicated(x2/x4) characters horizontally)?
- Horizontal CRTC display characters is used incorrectly? If it only displays half the horizontal characters at half rows (40 characters instead of 80 characters, as in this case), would it generate this display?
Old screen capture (but still relevant):
download/file.php?id=21902&mode=view
Anyone knows what's exactly being done here? It's the verification screen of the checkit diagnostics program mode 7h.
Edit: Here's the dump of the VGA registers (See FreeVGA documentation for the official documented register order. It also contains the undocumented VGA registers in the dumps):
Edit: Changed the upload and application to include two bitmap files in the dump containing the DAC table (as a 16x16 grid of 16x16 squares representing the color of each pallette entry).
The VGA_DAC.bmp contains the DAC colors itself in the same format as https://upload.wikimedia.org/wikipedia/common … borders.svg.png .
The VGA_ATT contains the Attribute Controller translations according to the following format:
Font pixel, background pixel, font pixel, background pixel etc., so interleaved font/background pixels for each entry horizontally.
The top half of the image are the colors when the blink status of the VGA is off, The second half is when the blink status is on (cursor displayed).
Each of the half of the image contains 256 color entries that can be translated from VRAM(8-bit color index, whose format is dependant on the 8-bit color mode being set or other pallette settings combined with a 4-bit color index(4-bit pallette entry value, bit 6-7 setting, bit 4-5 setting to form the 8-bit lookup value in this table)).
The current mode is a text mode, so it should use the normal 4-bit value combined with 4-5 setting and/or bit 6-7 setting for the lookup (which it looks like it doesn't use those), thus resulting in DAC entries 0, 0x8 and 0x18 for the four colors to display(with attribute 0x8 using DAC entry 0).
The colors in the pallette seem a bit strange though. Anyone can confirm this pallette?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io