summaryrefslogtreecommitdiff
path: root/mapper.h
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-04-04 01:03:19 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-04-04 01:03:19 +0200
commit8c82be43720d9e221a9e2541c9ff6151015838bb (patch)
tree6ed341720934bbf69a386e254c4e9449f9051616 /mapper.h
parent6274071e3857c1640cc5aef804cb86509ab312f9 (diff)
move read/write prg/chr/cirom data to mapper
Diffstat (limited to 'mapper.h')
-rw-r--r--mapper.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/mapper.h b/mapper.h
index f38b000..46db0a4 100644
--- a/mapper.h
+++ b/mapper.h
@@ -1,2 +1,20 @@
#include "mapper_066.h"
+
+
+
+struct mapper {
+ void (*init)(struct nes_state *state);
+ uint8_t (*prg_read)(struct nes_state *state, uint32_t addr);
+ void (*prg_write)(struct nes_state *state, uint32_t addr, uint8_t value);
+ uint8_t (*chr_read)(struct nes_state *state, uint32_t addr);
+ void (*chr_write)(struct nes_state *state, uint32_t addr, uint8_t value);
+ uint8_t (*ciram_read)(struct nes_state *state, uint32_t addr);
+ void (*ciram_write)(struct nes_state *state, uint32_t addr, uint8_t value);
+ void (*tick)(struct nes_state *state);
+};
+
+union mapper_data {
+ struct mapper_066 m066;
+};
+