From dd16f5d15f7fd388705fca58f117fe6188b5c30d Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Sun, 11 Apr 2010 14:25:15 +0000 Subject: [PATCH] minor NMITIMEN potential bug-fix, not worth mention --- src/mame/machine/snes.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c index 2609c3b3060..c2a35094dd0 100644 --- a/src/mame/machine/snes.c +++ b/src/mame/machine/snes.c @@ -6,6 +6,8 @@ R. Belmont Anthony Kruize + Angelo Salese + Fabio Priuli Harmony Based on the original code by Lee Hammerton (aka Savoury Snax) Thanks to Anomie for invaluable technical information. @@ -573,7 +575,7 @@ WRITE8_HANDLER( snes_w_io ) // APU is mirrored from 2140 to 217f if (offset >= APU00 && offset < WMDATA) { -// printf("816: %02x to APU @ %d\n", data, offset & 3); +// printf("816: %02x to APU @ %d (PC=%06x)\n", data, offset & 3,cpu_get_pc(space->cpu)); spc_port_in(state->spc700, offset & 0x3, data); cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(20)); return; @@ -651,7 +653,7 @@ WRITE8_HANDLER( snes_w_io ) } break; case NMITIMEN: /* Flag for v-blank, timer int. and joy read */ - if((snes_ram[NMITIMEN] & 0x30) == 0x00) + if((data & 0x30) == 0x00) { cpu_set_input_line(state->maincpu, G65816_LINE_IRQ, CLEAR_LINE ); snes_ram[TIMEUP] = 0; // clear pending IRQ if irq is disabled here, 3x3 Eyes - Seima Korin Den behaves on this @@ -2178,7 +2180,7 @@ static void snes_dma( const address_space *space, UINT8 channels ) /* Number of bytes to transfer */ length = state->dma_channel[i].trans_size; - // 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); +// 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); #ifdef SNES_DBG_DMA 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);