src/mame/machine/snes.c
| r7656 | r7657 | |
| 232 | 232 | if (video_screen_get_vpos(machine->primary_screen) > 0) |
| 233 | 233 | { |
| 234 | 234 | /* Do HDMA */ |
| 235 | | if (state->hdmaen) |
| 235 | if (snes_ram[HDMAEN]) |
| 236 | 236 | snes_hdma(cpu0space); |
| 237 | 237 | |
| 238 | 238 | video_screen_update_partial(machine->primary_screen, (snes_ppu.interlace == 2) ? (snes_ppu.beam.current_vert*snes_ppu.interlace) : snes_ppu.beam.current_vert-1); |
| r7656 | r7657 | |
| 1335 | 1335 | data = 0; /* Once DMA is done we need to reset all bits to 0 */ |
| 1336 | 1336 | break; |
| 1337 | 1337 | case HDMAEN: /* HDMA channel designation */ |
| 1338 | | state->hdmaen = data; |
| 1339 | | if (state->hdmaen) //if a HDMA is enabled, data is inited at the next scanline |
| 1338 | if (data) //if a HDMA is enabled, data is inited at the next scanline |
| 1340 | 1339 | timer_set(space->machine, video_screen_get_time_until_pos(space->machine->primary_screen, snes_ppu.beam.current_vert + 1, 0), NULL, 0, snes_reset_hdma); |
| 1341 | 1340 | break; |
| 1342 | 1341 | case MEMSEL: /* Access cycle designation in memory (2) area */ |
| r7656 | r7657 | |
| 2512 | 2511 | snes_state *state = (snes_state *)machine->driver_data; |
| 2513 | 2512 | int i; |
| 2514 | 2513 | |
| 2514 | state->hdmaen = snes_ram[HDMAEN]; |
| 2515 | 2515 | for (i = 0; i < 8; i++) |
| 2516 | 2516 | { |
| 2517 | 2517 | if (BIT(state->hdmaen, i)) |