I'm currently writing a full VGA emulation for my emulator, but I can't get BIOS Video mode 06h working. I think the problem is somewhere in the Address wrap and MAP13/14 bits in the CRTC Mode Control Register. (functions addresswrap() and patch_map1314() in vga/vga_screen/vga_displaygeneration_crtcontroller.c)
The rendering of individual pixels and setting of the scan line address is in vga/vga_screen/vga_sequencer_graphicsmode.c, the setting of the scan line counter is in vga/vga_screen/vga_sequencer.c.
I keep getting a distorted screen with BIOS video mode 06h (All other modes 00h-13h work fine.)
File with full VGA chipset emulation (as far as it's working, although slow):
http://superfury.heliohost.org/cplusplus/vga_20131012_1941.zip
vga/vga_screen/vga_screen.c is the start of the renderer (also the rest of the directory's files)
vga/vga.c contains the main vga allocation/registration.
vga/vga_mmu.c contains all MMU i/o (address 0xA0000-0xBFFFF)
vga/vga_io.c contains all VGA register I/O (using CPU outb/w and inb/w)
Anyone can help me with this?
The flow of rendering is like this:
vga_screen->vga_sequencer ->
->vga_sequencer_textmode->>vga_sequencer_textmode_cursor.c
OR
->vga_sequencer_graphicsmode.c
next:
->vga_attributecontroller.c->vga_dac.c
Finally the rendering from the 1024x1024 buffer is done by the GPU rendering, which is SDL-dependant.