src/mame/machine/snes.c
| r7683 | r7684 | |
| 111 | 111 | const address_space *cpu0space = cpu_get_address_space(state->maincpu, ADDRESS_SPACE_PROGRAM); |
| 112 | 112 | state->io_read(cpu0space->machine); |
| 113 | 113 | snes_ram[HVBJOY] &= 0xfe; /* Clear busy bit */ |
| 114 | |
| 115 | timer_adjust_oneshot(state->io_timer, attotime_never, 0); |
| 114 | 116 | } |
| 115 | 117 | |
| 116 | 118 | static TIMER_CALLBACK( snes_scanline_tick ) |
| r7683 | r7684 | |
| 178 | 180 | } |
| 179 | 181 | |
| 180 | 182 | /* three lines after start of vblank we update the controllers (value from snes9x) */ |
| 181 | | timer_adjust_oneshot(state->io_timer, video_screen_get_time_until_pos(machine->primary_screen, snes_ppu.beam.current_vert + 2, 0), 0); |
| 183 | timer_adjust_oneshot(state->io_timer, video_screen_get_time_until_pos(machine->primary_screen, snes_ppu.beam.current_vert + 2, state->hblank_offset * state->htmult), 0); |
| 182 | 184 | } |
| 183 | 185 | |
| 184 | 186 | // hdma reset happens at scanline 0, H=~6 |