nes: MMC5: fix exram extended attribute mode for CHR ROMs larger than 256KiB? hard to tell

This commit is contained in:
goyuken 2014-02-23 16:22:30 +00:00
parent 02ea7d360f
commit 17f64cf8f5
1 changed files with 5 additions and 2 deletions

View File

@ -195,9 +195,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
int exram_addr = last_nt_read;
int bank_4k = EXRAM[exram_addr] & 0x3F;
bank_1k = bank_4k * 4;
bank_1k += chr_reg_high<<2;
// low 12 bits of address come from PPU
// next 6 bits of address come from exram table
// top 2 bits of address come from chr_reg_high
bank_1k += chr_reg_high << 8;
ofs = addr & (4 * 1024 - 1);
goto MAPPED;
}