Fixed SRAM mapping again. Fixed Dragon Knight 4.

This commit is contained in:
jbo_85
2006-04-23 00:55:20 +00:00
parent 34bd5cbac4
commit d7f3efcbf8
2 changed files with 15 additions and 6 deletions

View File

@@ -290,9 +290,7 @@ mrwp obc1bank = { OBC1Read8b, OBC1Write8b, OBC1Read16b, OBC1Write16b };
void SetAddressingModes()
{ // Banks
map_mem(0x00, &regbank, 0x40); // 00 - 3F
map_mem(0x40, &membank, 0x30); // 40 - 6F
map_mem(0x70, &srambank, 0x08); // 70 - 77
map_mem(0x78, &membank, 0x06); // 78 - 7D
map_mem(0x40, &membank, 0x3E); // 40 - 7D
map_mem(0x7E, &wrambank, 0x01); // 7E
map_mem(0x7F, &erambank, 0x01); // 7F
map_mem(0x80, &regbank, 0x40); // 80 - BF

View File

@@ -1970,9 +1970,20 @@ void CheckROMType()
disablespcclr = (memcmp(ROM+Hi, "\0x42\0x53\0x20\0x5A", 4)) ? 0 : 1;
if ((romtype == 1) && (!SDD1Enable))
{ // Non-SDD1 LoROM SRAM mapping, banks F0 - F3
map_mem(0xF0, &srambank, 4);
// LoROM SRAM mapping
if (romtype == 1)
{ // banks 70 - 77
map_mem(0x70, &srambank, 0x08);
if (!BSEnable)
{ // banks 78 - 7D (not for BS)
map_mem(0x78, &srambank, 0x06);
}
if (!SDD1Enable)
{ // banks F0 - FF (not for S-DD1)
map_mem(0xF0, &srambank, 0x10);
}
}
// Setup DSP-X stuff