src/mame/machine/snes.c
| r7704 | r7705 | |
| 380 | 380 | |
| 381 | 381 | return value | 0x1c | (snes_open_bus_r(space, 0) & 0xe0); //correct? |
| 382 | 382 | case RDNMI: /* NMI flag by v-blank and version number */ |
| 383 | | value = (snes_ram[offset] & 0x8f) | (snes_open_bus_r(space, 0) & 0x70); |
| 384 | | snes_ram[offset] &= 0x7f; /* NMI flag is reset on read */ |
| 385 | | return value; |
| 383 | value = (snes_ram[offset] & 0x80) | (snes_open_bus_r(space, 0) & 0x70); |
| 384 | snes_ram[offset] &= 0x70; /* NMI flag is reset on read */ |
| 385 | return value | 2; //CPU version number |
| 386 | 386 | case TIMEUP: /* IRQ flag by H/V count timer */ |
| 387 | 387 | value = (snes_open_bus_r(space, 0) & 0x7f) | (snes_ram[TIMEUP] & 0x80); |
| 388 | 388 | cpu_set_input_line(state->maincpu, G65816_LINE_IRQ, CLEAR_LINE ); |
| r7704 | r7705 | |
| 2012 | 2012 | if (!length) |
| 2013 | 2013 | length = 0x10000; /* 0x0000 really means 0x10000 */ |
| 2014 | 2014 | |
| 2015 | | // printf( "DMA-Ch %d: len: %X, abus: %X, bbus: %X, incr: %d, dir: %s, type: %d\n", i, length, abus, bbus, increment, state->dma_channel[i].dmap & 0x80 ? "PPU->CPU" : "CPU->PPU", state->dma_channel[i].dmap & 0x07); |
| 2015 | // printf( "DMA-Ch %d: len: %X, abus: %X, bbus: %X, incr: %d, dir: %s, type: %d\n", i, length, abus | abus_bank, bbus, increment, state->dma_channel[i].dmap & 0x80 ? "PPU->CPU" : "CPU->PPU", state->dma_channel[i].dmap & 0x07); |
| 2016 | 2016 | |
| 2017 | 2017 | #ifdef SNES_DBG_DMA |
| 2018 | | mame_printf_debug( "DMA-Ch %d: len: %X, abus: %X, bbus: %X, incr: %d, dir: %s, type: %d\n", i, length, abus, bbus, increment, state->dma_channel[i].dmap & 0x80 ? "PPU->CPU" : "CPU->PPU", state->dma_channel[i].dmap & 0x07); |
| 2018 | mame_printf_debug( "DMA-Ch %d: len: %X, abus: %X, bbus: %X, incr: %d, dir: %s, type: %d\n", i, length, abus | abus_bank, bbus, increment, state->dma_channel[i].dmap & 0x80 ? "PPU->CPU" : "CPU->PPU", state->dma_channel[i].dmap & 0x07); |
| 2019 | 2019 | #endif |
| 2020 | 2020 | |
| 2021 | 2021 | switch (state->dma_channel[i].dmap & 0x07) |