From 7888e1d5408ed5f88cff788c37b942076f6b9c63 Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Wed, 2 Apr 2025 06:30:39 +0200 Subject: skinny_version working horizontally --- memory.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'memory.c') diff --git a/memory.c b/memory.c index d4d2aa6..baf10e9 100644 --- a/memory.c +++ b/memory.c @@ -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; } } + -- cgit v1.2.3