From f1bd6a7d2f4ffe3e5263e0254bcf7522ab381264 Mon Sep 17 00:00:00 2001 From: Peter Fors Date: Sat, 5 Apr 2025 08:58:12 +0200 Subject: transform to switch case for ppu_tick() --- mapper_001.c | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 mapper_001.c (limited to 'mapper_001.c') diff --git a/mapper_001.c b/mapper_001.c deleted file mode 100644 index 4704444..0000000 --- a/mapper_001.c +++ /dev/null @@ -1,46 +0,0 @@ - - -static void mapper_001_init(struct nes_state *state) { - // Nothing to initialize for 001 -} - -static uint8_t mapper_001_prg_read(struct nes_state *state, uint32_t addr) { - uint32_t prg_size = state->ines.prg_size; - - uint32_t mask = (state->ines.prg_size == 16384) ? 0x3fff : 0x7fff; - return state->prg_rom[addr & mask]; -} - -static void mapper_001_prg_write(struct nes_state *state, uint32_t addr, uint8_t value) { -} - -static uint8_t mapper_001_chr_read(struct nes_state *state, uint32_t addr) { - return state->chr_rom[addr]; -} - -static void mapper_001_chr_write(struct nes_state *state, uint32_t addr, uint8_t value) { -} - -static uint8_t mapper_001_ciram_read(struct nes_state *state, uint32_t addr) { - if(state->ines.mirroring == 0) { // Horizontal - addr = (addr & 0x800) | (addr & 0x3ff); - } else { // Vertical (default fallback) - addr = addr & 0x7ff; - } - - return state->ciram[addr]; -} - -static void mapper_001_ciram_write(struct nes_state *state, uint32_t addr, uint8_t value) { - if(state->ines.mirroring == 0) { - addr = (addr & 0x800) | (addr & 0x3ff); - } else { - addr = addr & 0x7ff; - } - - state->ciram[addr] = value; -} - -static void mapper_001_tick(struct nes_state *state) { -} - -- cgit v1.2.3