From 8c82be43720d9e221a9e2541c9ff6151015838bb Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Fri, 4 Apr 2025 01:03:19 +0200 Subject: move read/write prg/chr/cirom data to mapper --- mapper.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mapper.h') 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; +}; + -- cgit v1.2.3