Add support for Tengai Makyou Zero English patch mapping

This commit is contained in:
qwertymodo 2017-10-23 09:03:19 -07:00
parent a66b88b276
commit 81d287cbd8
3 changed files with 4 additions and 2 deletions

View File

@ -3407,6 +3407,8 @@ void CMemory::Map_SPC7110HiROMMap (void)
map_index(0x00, 0x00, 0x6000, 0x7fff, MAP_HIROM_SRAM, MAP_TYPE_RAM);
map_hirom(0x00, 0x0f, 0x8000, 0xffff, CalculatedSize);
map_index(0x30, 0x30, 0x6000, 0x7fff, MAP_HIROM_SRAM, MAP_TYPE_RAM);
if(Memory.ROMSize >= 13)
map_hirom_offset(0x40, 0x4f, 0x0000, 0xffff, CalculatedSize, 0x600000);
map_index(0x50, 0x50, 0x0000, 0xffff, MAP_SPC7110_DRAM, MAP_TYPE_ROM);
map_hirom(0x80, 0x8f, 0x8000, 0xffff, CalculatedSize);
map_hirom_offset(0xc0, 0xcf, 0x0000, 0xffff, CalculatedSize, 0);

View File

@ -42,7 +42,7 @@ void SPC7110Decomp::write(uint8 data) {
}
uint8 SPC7110Decomp::dataread() {
unsigned size = memory_cartrom_size() - 0x100000;
unsigned size = memory_cartrom_size() > 0x500000 ? memory_cartrom_size() - 0x200000 : memory_cartrom_size() - 0x100000;
while(decomp_offset >= size) decomp_offset -= size;
return memory_cartrom_read(0x100000 + decomp_offset++);
}

View File

@ -91,7 +91,7 @@ void SPC7110::reset() {
}
unsigned SPC7110::datarom_addr(unsigned addr) {
unsigned size = memory_cartrom_size() - 0x100000;
unsigned size = memory_cartrom_size() > 0x500000 ? memory_cartrom_size() - 0x200000 : memory_cartrom_size() - 0x100000;
while(addr >= size) addr -= size;
return addr + 0x100000;
}