diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-05-02 23:15:47 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-05-02 23:15:47 +0200 |
| commit | 5808f00555c48e1cc1cc110af6a5cd73ddf13010 (patch) | |
| tree | dff942b61441bafe297e7a99f0e799f32ae978b1 /mappers/mapper.h | |
| parent | 9463faa436e1b981ef72000568445a83682f2658 (diff) | |
cleanup and rewrite of ppu_registers.c
Diffstat (limited to 'mappers/mapper.h')
| -rw-r--r-- | mappers/mapper.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mappers/mapper.h b/mappers/mapper.h new file mode 100644 index 0000000..0961370 --- /dev/null +++ b/mappers/mapper.h @@ -0,0 +1,29 @@ + +#include "mapper_000_0.h" +#include "mapper_002_2.h" +#include "mapper_003_0.h" +#include "mapper_007_2.h" +#include "mapper_011_0.h" +#include "mapper_066_0.h" + +struct nes_state; + +struct mapper_functions { + 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); +} __attribute__((aligned(64))); + +union mapper_data { + struct mapper_000_0 m000_0; + struct mapper_002_2 m002_2; + struct mapper_003_0 m003_0; + struct mapper_007_2 m007_2; + struct mapper_011_0 m011_0; + struct mapper_066_0 m066_0; +} __attribute__((aligned(64))); + |
