From 89e0ce6d8ea6b4305394516da0f787e92d345a74 Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Tue, 18 Aug 2009 14:59:56 +0000 Subject: [PATCH] [SNES]: Fixed serial port for player 2 as well --- src/mame/machine/snes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c index 52c9118b2ce..0b0ff772ec3 100644 --- a/src/mame/machine/snes.c +++ b/src/mame/machine/snes.c @@ -572,7 +572,9 @@ READ8_HANDLER( snes_r_io ) { return 0 | 0x1c | (snes_open_bus_r(space,0) & 0xe0); //correct? } - value = ((joypad[1].low | (joypad[1].high << 8) | 0x10000) >> (15 - (joypad[1].oldrol++ % 16))) & 0x1; + value = ((joy2l | (joy2h << 8) | 0x10000) >> (16 - (joypad[1].oldrol & 0xf))) & 0x1; + joypad[1].oldrol++; + joypad[1].oldrol&=0xf; if( !(joypad[1].oldrol % 17) ) value = 0x1; //value |= 0x1c; // bits 4, 3, and 2 are always set