From 719d57bea98b37d637f0ef0299a426786cc18e2b Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 26 May 2005 15:25:29 +0000 Subject: [PATCH] sum of videoROM modules 256 = 0 in VGA mode. Fixes a few koei games. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2212 --- src/ints/int10_memory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ints/int10_memory.cpp b/src/ints/int10_memory.cpp index 0ffb3b54..6d391bdf 100644 --- a/src/ints/int10_memory.cpp +++ b/src/ints/int10_memory.cpp @@ -108,6 +108,15 @@ void INT10_SetupRomMemory(void) { phys_writeb(PhysMake(0xf000,0xfa6e)+i,int10_font_08[i]); } RealSetVec(0x1F,int10.rom.font_8_second); + + if (machine == MCH_VGA) { //EGA/VGA. Just to be safe + /* Sum of all bytes in rom module 256 should be 0 */ + Bit8u sum = 0; + for (i = 0;i < 32 * 1024;i++) //32 KB romsize + sum += phys_readb(rom_base + i); //OVERFLOW IS OKAY + sum = 256 - sum; + phys_writeb(rom_base+int10.rom.used++,sum); + } };