Skip to content

Commit

Permalink
Clean up formatting in Mapper019
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewlacy committed Dec 28, 2022
1 parent b357d34 commit de65a5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions GhidraNes/src/main/java/ghidranes/mappers/Mapper019.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import ghidranes.NesRom;
import ghidranes.util.MemoryBlockDescription;

// TODO: Mapper 019 has some writable registers mapped at 0x8000-0xFFFF
// and I don't know how to handle this situation
// TODO: Mapper 019 has some writable registers mapped at 0x8000-0xFFFF,
// which aren't currently handled

public class Mapper019 extends NesMapper {
@Override
Expand All @@ -23,7 +23,7 @@ public void updateMemoryMapForRom(NesRom rom, Program program, TaskMonitor monit
MemoryBlockDescription.uninitialized(0x6000, 0x2000, "SRAM", sramPermissions, false)
.create(program);

int bank;
int bank = 0;
for (bank = 0; (bank + 1) * 0x2000 < rom.prgRom.length; bank++) {
int romPermissions = MemoryBlockDescription.READ | MemoryBlockDescription.EXECUTE;

Expand All @@ -37,11 +37,11 @@ public void updateMemoryMapForRom(NesRom rom, Program program, TaskMonitor monit
.create(program);
}

// E000-FFFF is fixed at the last bank
int romPermissions = MemoryBlockDescription.READ | MemoryBlockDescription.EXECUTE;
// E000-FFFF is fixed at the last bank
int romPermissions = MemoryBlockDescription.READ | MemoryBlockDescription.EXECUTE;
byte[] rombankBytes = Arrays.copyOfRange(rom.prgRom, bank*0x2000, (bank+1)*0x2000);
MemoryBlockDescription.initialized(0xE000, 0x2000, "Fixed PRG" + bank, romPermissions, rombankBytes, false, monitor)
.create(program);
MemoryBlockDescription.initialized(0xE000, 0x2000, "PRG" + bank + "_FIXED", romPermissions, rombankBytes, false, monitor)
.create(program);
}

}

0 comments on commit de65a5c

Please sign in to comment.