diff options
Diffstat (limited to 'memory.c')
| -rw-r--r-- | memory.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -5,6 +5,10 @@ static uint8_t memory_read(struct nes_state *restrict state, uint32_t offset) { state->cycle++; ppu_tick(state); ppu_tick(state); ppu_tick(state); + if(offset > 0xffff) { + printf("%x\n", offset); + } + // state->ram[0x301] = 0x1; if(offset < 0x2000) { return state->ram[offset & 0x07ff]; @@ -29,6 +33,10 @@ static void memory_write(struct nes_state *restrict state, uint32_t offset, uint state->cycle++; ppu_tick(state); ppu_tick(state); ppu_tick(state); + if(offset > 0xffff) { + printf("%x\n", offset); + } + // if(offset == 0x0300) { // printf("WRITE $0300 = %02x @ PC=%04x\n", value, state->cpu.pc); // } @@ -92,3 +100,4 @@ static uint8_t memory_read_dummy(struct nes_state *restrict state, uint32_t offs return 0; } } + |
