diff --git a/src/hardware/vga_draw.cpp b/src/hardware/vga_draw.cpp index 63cc6773..0843f384 100644 --- a/src/hardware/vga_draw.cpp +++ b/src/hardware/vga_draw.cpp @@ -28,7 +28,7 @@ #define FIXED_CGA_SIZED 1 static void VGA_HERC_Draw(Bit8u * bitdata,Bitu pitch) { - Bit8u * reader=&vga.mem.linear[(vga.herc.mode_control & 0x80) ? 8*1024 : 0]; + Bit8u * reader=&vga.mem.linear[0]; for (Bitu y=0;y> 7); + mask|=0x80; + VGA_SetupHandlers(); } - vga.herc.mode_control=val; + vga.herc.mode_control=(vga.herc.mode_control & ~mask) | (val&mask); break; case 0x3bf: vga.herc.enable_bits=val; @@ -248,8 +251,6 @@ static Bit8u read_hercules(Bit32u port) { void VGA_SetupMisc(void) { -// if (machine==MCH_HERC) EnableHercules(); - vga.herc.enable_bits=0; IO_RegisterWriteHandler(0x3d8,write_p3d8,"VGA Feature Control Register"); IO_RegisterWriteHandler(0x3d9,write_p3d9,"CGA Color Select Register"); @@ -259,6 +260,7 @@ void VGA_SetupMisc(void) { IO_RegisterReadHandler(0x3cc,read_p3cc,"VGA Misc Output"); if (machine==MCH_HERC || machine==MCH_AUTO) { + vga.herc.mode_control=0x8; IO_RegisterWriteHandler(0x3b8,write_hercules,"Hercules"); IO_RegisterWriteHandler(0x3bf,write_hercules,"Hercules"); }