diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-11-02 13:54:50 +0100 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-11-02 13:54:50 +0100 |
| commit | 46d0f6aeb1588b85852487e581a8b4c9c2401646 (patch) | |
| tree | ca93ed439b297fe8f59841b6885ba65ded81f9a3 /mappers/mapper_005_0.h | |
| parent | fc41466fe825eae4e5c2e2f4764482c53c687679 (diff) | |
Add MMC5, not in a working state, but can start castlevania iii, this is a horrible mapper to implement.
Diffstat (limited to 'mappers/mapper_005_0.h')
| -rw-r--r-- | mappers/mapper_005_0.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mappers/mapper_005_0.h b/mappers/mapper_005_0.h new file mode 100644 index 0000000..f9b9851 --- /dev/null +++ b/mappers/mapper_005_0.h @@ -0,0 +1,27 @@ + + +struct mapper_005_0 { + uint8_t *prg_banks[5]; // banks at $6000, $8000, $a000, $c000, $e000 + uint8_t *chr_banks_bg[8]; // 1kb banks at $0000-$1fff for background + uint8_t *chr_banks_sp[8]; // 1kb banks at $0000-$1fff for sprites + + uint8_t prg_mode; + uint8_t chr_mode; + uint8_t prg_bank_regs[5]; // $5113-$5117 + uint8_t chr_bank_regs[12]; // $5120-$512b (0-7=bg, 8-11=sprites) + uint8_t chr_upper; // $5130 + + uint8_t nametable_mapping; // $5105 + uint8_t fill_tile; // $5106 + uint8_t fill_attr; // $5107 + + uint8_t exram_mode; + uint8_t exram[1024]; + + uint8_t irq_scanline; // $5203 + uint8_t irq_status; // $5204 + uint8_t irq_pending; + + uint8_t in_frame; + uint16_t scanline_counter; +} __attribute__((packed, aligned(64))); |
