diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-11-02 09:16:03 +0100 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-11-02 09:16:03 +0100 |
| commit | ed41715142f419021ed8fef5522ea1f363f16441 (patch) | |
| tree | 9cf0049db6ac5b0da5552bba9e0376b82eaeb2b4 /mknes_memory.c | |
| parent | e137c881d835703d1030746cd7262899de7169c6 (diff) | |
fix multiple mappers
Diffstat (limited to 'mknes_memory.c')
| -rw-r--r-- | mknes_memory.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/mknes_memory.c b/mknes_memory.c index 7280f81..20d77e8 100644 --- a/mknes_memory.c +++ b/mknes_memory.c @@ -73,19 +73,17 @@ static inline void memory_write(struct nes_state *state, uint32_t offset, uint8_ // joypad strobe uint8_t s = value & 1; - // if(s) { - uint8_t prev = state->ppu.input_strobe; - state->ppu.input_strobe = s; - - if(prev == 1 && (s) == 0) { - // state->ppu.input[0] = tas_input[tas_frame_count]; - - state->ppu.input_latch[0] = state->ppu.input[0]; - state->ppu.input_latch[1] = state->ppu.input[1]; - state->ppu.input_bit[0] = 0; - state->ppu.input_bit[1] = 0; - } - // } + uint8_t prev = state->ppu.input_strobe; + state->ppu.input_strobe = s; + + if(prev == 1 && (s) == 0) { + // state->ppu.input[0] = tas_input[tas_frame_count]; + + state->ppu.input_latch[0] = state->ppu.input[0]; + state->ppu.input_latch[1] = state->ppu.input[1]; + state->ppu.input_bit[0] = 0; + state->ppu.input_bit[1] = 0; + } } else if(offset >= 0x4000 && offset <= 0x4017) { apu_write(state, offset, value); |
