diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-04-04 01:03:19 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-04-04 01:03:19 +0200 |
| commit | 8c82be43720d9e221a9e2541c9ff6151015838bb (patch) | |
| tree | 6ed341720934bbf69a386e254c4e9449f9051616 /mapper.h | |
| parent | 6274071e3857c1640cc5aef804cb86509ab312f9 (diff) | |
move read/write prg/chr/cirom data to mapper
Diffstat (limited to 'mapper.h')
| -rw-r--r-- | mapper.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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; +}; + |
