diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index 8962f93f4bb..c2cc7e1a2c3 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -908,7 +908,7 @@ UINT32 mb86233_cpu_device::INDIRECT( UINT32 reg, int source ) } else if ( mode == 2 ) { - UINT32 addr = reg & 0x1f; + UINT32 addr = reg & 0x3f; if ( source ) { @@ -960,6 +960,13 @@ UINT32 mb86233_cpu_device::INDIRECT( UINT32 reg, int source ) else GETGPR(3) += ( reg & 0x1f ); } + if( mode == 7) + { + if ( source ) + GETGPR(2)&=0x3f; + else + GETGPR(3)&=0x3f; + } return addr; } @@ -985,6 +992,8 @@ void mb86233_cpu_device::execute_run() debugger_instruction_hook(this, GETPC()); opcode = ROPCODE(GETPC()); + //if(GETPC() != 0x77) + //printf("%08x %08x\n",GETPC(),opcode); GETFIFOWAIT() = 0; diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index 6d7b53c9404..035ab2f1e37 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -1959,6 +1959,64 @@ static INPUT_PORTS_START( daytona ) PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1) INPUT_PORTS_END +static INPUT_PORTS_START( manxtt ) + PORT_START("1c00000") + PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c00000_r, NULL) + + PORT_START("1c00004") + PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN2") + PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN3") + + PORT_START("1c0000c") + PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("1c00010") + PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN0") + PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN1") + + PORT_START("1c00014") + PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "IN4") + PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("1c0001c") + PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL ) // these must be high + PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state,_1c0001c_r, NULL) + + PORT_START("IN0") + PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW ) + PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("VR") // VR + PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("P1 Start / VR") + PORT_BIT(0x0090, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN1") + PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN2") + PORT_BIT(0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN3") + PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN4") + PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("ANA0") // throttle + PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1) + + PORT_START("ANA1") // brake + PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1) + + PORT_START("ANA2") // bank + PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1) PORT_REVERSE +INPUT_PORTS_END + static INPUT_PORTS_START( srallyc ) PORT_START("1c00000") PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -5867,7 +5925,7 @@ DRIVER_INIT_MEMBER(model2_state,sgt24h) m_protstate = m_protpos = 0; ROM[0x56578/4] = 0x08000004; - ROM[0x5b3e8/4] = 0x08000004; + //ROM[0x5b3e8/4] = 0x08000004; } DRIVER_INIT_MEMBER(model2_state,overrev) @@ -5911,8 +5969,8 @@ GAME( 1994, vcop, 0, model2o, vcop, driver_device, 0, ROT0, GAME( 1994, vcopa, 0, model2o, vcop, driver_device, 0, ROT0, "Sega", "Virtua Cop (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) // Model 2A-CRX (TGPs, SCSP sound board) -GAME( 1995, manxtt, 0, manxttdx,model2, driver_device, 0, ROT0, "Sega", "Manx TT Superbike - DX (Revision D)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) -GAME( 1995, manxttc, 0, model2a, model2, driver_device, 0, ROT0, "Sega", "Manx TT Superbike - Twin (Revision C)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) +GAME( 1995, manxtt, 0, manxttdx,manxtt, driver_device, 0, ROT0, "Sega", "Manx TT Superbike - DX (Revision D)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) +GAME( 1995, manxttc, 0, model2a, manxtt, driver_device, 0, ROT0, "Sega", "Manx TT Superbike - Twin (Revision C)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) GAME( 1995, srallyc, 0, srallyc, srallyc, model2_state, srallyc, ROT0, "Sega", "Sega Rally Championship - TWIN (Revision C)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) GAME( 1995, srallycb, srallyc, srallyc, srallyc, model2_state, srallyc, ROT0, "Sega", "Sega Rally Championship - TWIN (Revision B)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS ) GAME( 1995, srallyca, srallyc, srallyc, srallyc, model2_state, srallyc, ROT0, "Sega", "Sega Rally Championship - DX (Revision A)", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )