diff options
Diffstat (limited to 'mapper_001.c')
| -rw-r--r-- | mapper_001.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mapper_001.c b/mapper_001.c new file mode 100644 index 0000000..8c65367 --- /dev/null +++ b/mapper_001.c @@ -0,0 +1,23 @@ + + +static void mapper_001_init(struct nes_state *state) { + // Nothing to initialize for 001 +} + +static uint8_t mapper_001_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->rom[addr & mask]; +} + +static void mapper_001_write(struct nes_state *state, uint32_t addr, uint8_t value) { + (void)state; + (void)addr; + (void)value; +} + +static void mapper_001_tick(struct nes_state *state) { + (void)state; +} + |
