diff options
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); |
