mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-11 07:25:07 +01:00
mapper 26 Madara support
This commit is contained in:
parent
169b853f1b
commit
c385323ce3
@ -2163,17 +2163,13 @@ void readCHR() {
|
|||||||
|
|
||||||
case 26: // 128K/256K
|
case 26: // 128K/256K
|
||||||
banks = int_pow(2, chrsize) * 4;
|
banks = int_pow(2, chrsize) * 4;
|
||||||
write_prg_byte(0xB003, 0); // PPU Banking Mode 0
|
write_prg_byte(0xB003, 0x00);
|
||||||
for (int i = 0; i < banks; i += 8) {
|
for (int i = 0; i < banks; i += 4) {
|
||||||
write_prg_byte(0xD000, i); // CHR Bank 0
|
write_prg_byte(0xD000, i + 0); // CHR Bank 0
|
||||||
write_prg_byte(0xD002, i + 1); // CHR Bank 1
|
write_prg_byte(0xD002, i + 1); // CHR Bank 1
|
||||||
write_prg_byte(0xD001, i + 2); // CHR Bank 2
|
write_prg_byte(0xD001, i + 2); // CHR Bank 2
|
||||||
write_prg_byte(0xD003, i + 3); // CHR Bank 3
|
write_prg_byte(0xD003, i + 3); // CHR Bank 3
|
||||||
write_reg_byte(0xE000, i + 4); // CHR Bank 4 [WRITE RAM SAFE]
|
for (word address = 0x0; address < 0x1000; address += 512) { // 1K Banks
|
||||||
write_reg_byte(0xE002, i + 5); // CHR Bank 5 [WRITE RAM SAFE]
|
|
||||||
write_reg_byte(0xE001, i + 6); // CHR Bank 6 [WRITE RAM SAFE]
|
|
||||||
write_reg_byte(0xE003, i + 7); // CHR Bank 7 [WRITE RAM SAFE]
|
|
||||||
for (word address = 0x0; address < 0x2000; address += 512) { // 1K Banks
|
|
||||||
dumpCHR(address);
|
dumpCHR(address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user