summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-04-02 06:30:39 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-04-02 06:30:39 +0200
commit7888e1d5408ed5f88cff788c37b942076f6b9c63 (patch)
treef2714ea36ae9ca99536e42b29fd1ea846ad2d583 /memory.c
parent2e2f459ad4f8eb70a1d37f8ba7d620b4c264592e (diff)
skinny_version working horizontally
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c9
1 files changed, 9 insertions, 0 deletions
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;
}
}
+