diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-04-03 20:02:00 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-04-03 20:02:00 +0200 |
| commit | 6274071e3857c1640cc5aef804cb86509ab312f9 (patch) | |
| tree | 1a4e56b3c3b4bfb4d8f0d2f588487d6e227c3b27 /mapper_001.c | |
| parent | 971e51eebbf088f1ac590da1fc57e803eb1ee8cf (diff) | |
Move to glfw
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; +} + |
