use c68 for more games, fix what looks like more cam900 damage (luckywld) due to bad ram size assumptions. (#3976)

* use c68 for more games, fix what looks like more cam900 damage (luckywld) due to bad ram size assumptions.

* fix crash I introduced by trying things in a slightly different way

* change comment (nw)

* some cleanup (nw)

* give dirtfox a calibrated default (nw)

* better served with a logerror, not popmessage (nw)
This commit is contained in:
David Haywood 2018-09-09 13:47:13 +01:00 committed by R. Belmont
parent 6153de028a
commit ea7f1e3bd9
9 changed files with 174 additions and 187 deletions

View File

@ -542,6 +542,7 @@ WRITE16_MEMBER(namcos2_state::dpram_word_w)
{
m_dpram[offset] = data&0xff;
// TODO : This is a hack! should be output ports MCU side, not probing into DPRAM content
if( m_gametype==NAMCOS2_GOLLY_GHOST )
{
switch( offset )
@ -1372,57 +1373,6 @@ static INPUT_PORTS_START( sgunner )
NAMCOS2_MCU_DIAL_DEFAULT
INPUT_PORTS_END
static INPUT_PORTS_START( sgunner2 )
PORT_START("MCUB") /* M37450 - PORT 5 (multiplexed) */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("MCUB2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("MCUC") /* M37450 - PORT 6 */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("AN0") /* M37450 - 8 CHANNEL ANALOG - CHANNEL 0 */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("AN1")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("AN2")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("AN3")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("AN4")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(8)
PORT_START("AN5")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(8) PORT_PLAYER(2)
PORT_START("AN6")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(8)
PORT_START("AN7")
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(8) PORT_PLAYER(2)
PORT_START("MCUH") /* M37450 - PORT 3 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Service Button")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
NAMCOS2_MCU_DIPSW_DEFAULT
NAMCOS2_MCU_DIAL_DEFAULT
INPUT_PORTS_END
static INPUT_PORTS_START( dirtfox )
PORT_START("MCUB") /* 63B05Z0 - PORT B */
@ -1688,26 +1638,25 @@ void namcos2_state::configure_c65_standard(machine_config &config)
void namcos2_state::configure_c68_standard(machine_config &config)
{
NAMCOC68(config, m_c68new, C68_CPU_CLOCK);
m_c68new->in_pb_callback().set_ioport("MCUB");
m_c68new->in_pb2_callback().set_ioport("MCUB2");
m_c68new->in_pc_callback().set_ioport("MCUC");
m_c68new->in_ph_callback().set_ioport("MCUH");
m_c68new->in_pdsw_callback().set_ioport("DSW");
m_c68new->di0_in_cb().set_ioport("MCUDI0");
m_c68new->di1_in_cb().set_ioport("MCUDI1");
m_c68new->di2_in_cb().set_ioport("MCUDI2");
m_c68new->di3_in_cb().set_ioport("MCUDI3");
m_c68new->an0_in_cb().set_ioport("AN0");
m_c68new->an1_in_cb().set_ioport("AN1");
m_c68new->an2_in_cb().set_ioport("AN2");
m_c68new->an3_in_cb().set_ioport("AN3");
m_c68new->an4_in_cb().set_ioport("AN4");
m_c68new->an5_in_cb().set_ioport("AN5");
m_c68new->an6_in_cb().set_ioport("AN6");
m_c68new->an7_in_cb().set_ioport("AN7");
m_c68new->dp_in_callback().set(FUNC(namcos2_state::dpram_byte_r));
m_c68new->dp_out_callback().set(FUNC(namcos2_state::dpram_byte_w));
NAMCOC68(config, m_c68, C68_CPU_CLOCK);
m_c68->in_pb_callback().set_ioport("MCUB");
m_c68->in_pc_callback().set_ioport("MCUC");
m_c68->in_ph_callback().set_ioport("MCUH");
m_c68->in_pdsw_callback().set_ioport("DSW");
m_c68->di0_in_cb().set_ioport("MCUDI0");
m_c68->di1_in_cb().set_ioport("MCUDI1");
m_c68->di2_in_cb().set_ioport("MCUDI2");
m_c68->di3_in_cb().set_ioport("MCUDI3");
m_c68->an0_in_cb().set_ioport("AN0");
m_c68->an1_in_cb().set_ioport("AN1");
m_c68->an2_in_cb().set_ioport("AN2");
m_c68->an3_in_cb().set_ioport("AN3");
m_c68->an4_in_cb().set_ioport("AN4");
m_c68->an5_in_cb().set_ioport("AN5");
m_c68->an6_in_cb().set_ioport("AN6");
m_c68->an7_in_cb().set_ioport("AN7");
m_c68->dp_in_callback().set(FUNC(namcos2_state::dpram_byte_r));
m_c68->dp_out_callback().set(FUNC(namcos2_state::dpram_byte_w));
}
// TODO: temp
@ -1716,16 +1665,20 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos2_state::screen_scanline)
int scanline = param;
int cur_posirq = get_pos_irq_scanline();
if (scanline == 200) // triggering this a bit before Vblank allows the Assault Plus mode select screen to work without overclocking the IO MCU, exact timings unknown.
{
if (m_c65)
m_c65->ext_interrupt(HOLD_LINE);
if (m_c68)
m_c68->ext_interrupt(ASSERT_LINE);
}
if(scanline == 240)
{
m_master_intc->vblank_irq_trigger();
m_slave_intc->vblank_irq_trigger();
if (m_c65)
m_c65->ext_interrupt(HOLD_LINE);
if (m_c68new)
m_c68new->ext_interrupt(ASSERT_LINE);
}
if(scanline == cur_posirq)
@ -1737,7 +1690,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos2_state::screen_scanline)
}
}
MACHINE_CONFIG_START(namcos2_state::base)
MACHINE_CONFIG_START(namcos2_state::base_noio)
MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
MCFG_DEVICE_PROGRAM_MAP(master_default_am)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", namcos2_state, screen_scanline, "screen", 0, 1)
@ -1750,8 +1703,6 @@ MACHINE_CONFIG_START(namcos2_state::base)
MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60)
MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120)
configure_c65_standard(config);
MCFG_QUANTUM_TIME(attotime::from_hz(12000)) /* CPU slices per frame */
MCFG_MACHINE_START_OVERRIDE(namcos2_state,namcos2)
@ -1785,6 +1736,17 @@ MACHINE_CONFIG_START(namcos2_state::base)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(namcos2_state::base)
base_noio(config);
configure_c65_standard(config);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(namcos2_state::base_c68)
base_noio(config);
configure_c68_standard(config);
MACHINE_CONFIG_END
/* adjusted machine driver start */
MACHINE_CONFIG_START(namcos2_state::base2)
base(config);
@ -1863,7 +1825,7 @@ MACHINE_CONFIG_END
MACHINE_CONFIG_START(namcos2_state::finallap)
MACHINE_CONFIG_START(namcos2_state::finallap_noio)
MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
MCFG_DEVICE_PROGRAM_MAP(master_finallap_am)
MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", namcos2_state, screen_scanline, "screen", 0, 1)
@ -1876,8 +1838,6 @@ MACHINE_CONFIG_START(namcos2_state::finallap)
MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60)
MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120)
configure_c65_standard(config);
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */
MCFG_MACHINE_START_OVERRIDE(namcos2_state,namcos2)
@ -1916,13 +1876,29 @@ MACHINE_CONFIG_START(namcos2_state::finallap)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.80)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(namcos2_state::finallap)
finallap_noio(config);
configure_c65_standard(config);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(namcos2_state::finallap_c68)
finallap_noio(config);
configure_c68_standard(config);
MACHINE_CONFIG_END
// finalap2 has different mangle
MACHINE_CONFIG_START(namcos2_state::finalap2)
finallap(config);
MCFG_VIDEO_START_OVERRIDE(namcos2_state, finalap2)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(namcos2_state::finalap3)
finallap_c68(config);
MCFG_VIDEO_START_OVERRIDE(namcos2_state, finalap2)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(namcos2_state::sgunner)
MCFG_DEVICE_ADD("maincpu", M68000, M68K_CPU_CLOCK) /* 12.288MHz (49.152MHz OSC/4) */
MCFG_DEVICE_PROGRAM_MAP(master_sgunner_am)
@ -2036,7 +2012,7 @@ MACHINE_CONFIG_START(namcos2_state::luckywld)
MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq0_line_hold, 2*60)
MCFG_DEVICE_PERIODIC_INT_DRIVER(namcos2_shared_state, irq1_line_hold, 120)
configure_c65_standard(config);
configure_c68_standard(config);
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* CPU slices per frame */
@ -2570,6 +2546,9 @@ ROM_START( dirtfoxj )
ROM_REGION( 0x100000, "c140", 0 ) /* Sound voices */
ROM_LOAD( "df1_voi1.bin", 0x000000, 0x080000, CRC(15053904) SHA1(b8ca7e5e53249dbee8284ce1e5c0e6438e64b2cf) )
ROM_REGION( 0x2000, "nvram", 0 ) /* default settings, including calibration */
ROM_LOAD( "nvram", 0x000000, 0x2000, CRC(4b9f7b06) SHA1(384496d2d80a48d31084dc316ebae3a5c1aa1ab9) )
ROM_END
/* DRAGON SABER */
@ -3005,7 +2984,7 @@ ROM_START( finalap2 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) )
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "fl2obj0", 0x000000, 0x80000, CRC(3657dd7a) SHA1(8f286ec0642b09ff42bf0dbd784ae257d4ab278a) )
@ -3061,7 +3040,7 @@ ROM_START( finalap2j )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) )
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "fl2obj0", 0x000000, 0x80000, CRC(3657dd7a) SHA1(8f286ec0642b09ff42bf0dbd784ae257d4ab278a) )
@ -3117,8 +3096,8 @@ ROM_START( finalap3 ) // this set displays MOTION (Ver. 3) in the test mode menu
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) )
@ -3177,8 +3156,8 @@ ROM_START( finalap3a )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) )
@ -3240,8 +3219,8 @@ ROM_START( finalap3j )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) )
@ -3299,8 +3278,8 @@ ROM_START( finalap3jc )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "flt_obj-0.4c", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) )
@ -3357,8 +3336,8 @@ ROM_START( finalap3bl ) // bootleg set
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "fltobj0", 0x000000, 0x80000, CRC(eab19ec6) SHA1(2859e88b94aa873f3b6ba22790f2211f3e172dd1) )
@ -4438,7 +4417,7 @@ ROM_START( sgunner )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) )
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "sn_obj0.8c", 0x000000, 0x80000, CRC(bbae38f7) SHA1(7a40ade13307791f5c5d300882f9a38e18c411d6) )
@ -4488,7 +4467,7 @@ ROM_START( sgunnerj )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) )
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "sn_obj0.8c", 0x000000, 0x80000, CRC(bbae38f7) SHA1(7a40ade13307791f5c5d300882f9a38e18c411d6) )
@ -4645,8 +4624,8 @@ ROM_START( sws )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "ss1_obj0.5b", 0x000000, 0x80000, CRC(9bd6add1) SHA1(34595987670d7f64ba18a840e98667b96ae5e4bf) )
@ -4688,8 +4667,8 @@ ROM_START( sws92 )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "sss_obj0.bin", 0x000000, 0x80000, CRC(375e8f1f) SHA1(b737bcceb498a66593d06ef102958bea90032106) )
@ -4733,8 +4712,8 @@ ROM_START( sws92g )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "sss_obj0.bin", 0x000000, 0x80000, CRC(375e8f1f) SHA1(b737bcceb498a66593d06ef102958bea90032106) )
@ -4780,8 +4759,8 @@ ROM_START( sws93 )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) )
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "sst_obj0.bin", 0x000000, 0x80000, CRC(4089dfd7) SHA1(d37fb08d03a4d3f87b10a8e73bbb1817543396ff) )
@ -4825,8 +4804,8 @@ ROM_START( suzuka8h )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "eh1-obj0.bin", 0x000000, 0x80000, CRC(864b6816) SHA1(72d831b631afb2848578bd49cd7d3e12a78644b4) )
@ -4876,8 +4855,8 @@ ROM_START( suzuka8hj )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c65c.bin", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* not sure */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "eh1-obj0.bin", 0x000000, 0x80000, CRC(864b6816) SHA1(72d831b631afb2848578bd49cd7d3e12a78644b4) )
@ -4927,8 +4906,8 @@ ROM_START( suzuk8h2 )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "ehs1-obj0.3p", 0x000000, 0x80000, CRC(a0acf307) SHA1(6d79d2dd00da4f8f0462245f42a9d88b6ad632b1) )
@ -4985,8 +4964,8 @@ ROM_START( suzuk8h2j )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
ROM_LOAD( "sys2c68.3f", 0x000000, 0x008000, BAD_DUMP CRC(a5b2a4ff) SHA1(068bdfcc71a5e83706e8b23330691973c1c214dc) ) /* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "ehs1-obj0.3p", 0x000000, 0x80000, CRC(a0acf307) SHA1(6d79d2dd00da4f8f0462245f42a9d88b6ad632b1) )
@ -5451,8 +5430,8 @@ ROM_START( luckywld )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "lw1obj0.3p", 0x000000, 0x80000, CRC(21485830) SHA1(e55a1f6df90c17b9c49e2b08c423b9be86996659) )
@ -5516,8 +5495,8 @@ ROM_START( luckywldj )
ROM_CONTINUE( 0x010000, 0x01c000 )
ROM_RELOAD( 0x010000, 0x020000 )
ROM_REGION( 0x8000, "c65mcu:external", ROMREGION_ERASE00 ) /* I/O MCU */
/* should be c68 */
ROM_REGION( 0x8000, "c68mcu:external", ROMREGION_ERASE00 ) /* C68 (M37450) I/O MCU program */
/* external ROM not populated, unclear how it would map */
ROM_REGION( 0x400000, "gfx1", 0 ) /* Sprites */
ROM_LOAD( "lw1obj0.3p", 0x000000, 0x80000, CRC(21485830) SHA1(e55a1f6df90c17b9c49e2b08c423b9be86996659) )
@ -5582,20 +5561,6 @@ void namcos2_state::init_assaultp()
m_gametype = NAMCOS2_ASSAULT_PLUS;
}
void namcos2_state::init_assaultp_hack()
{
// HACK!
// boost the MCU speed to avoid a race condition which causes
// the mode select menu to vanish before you have a chance to use
// it. It probably needs better RAM access timing etc.
//
// This is used in conjunction with the interleave increase in the
// MACHINE_DRIVER
m_mcu->set_clock_scale(4.0f);
init_assaultp();
}
void namcos2_state::init_burnforc()
{
m_gametype = NAMCOS2_BURNING_FORCE;
@ -5812,7 +5777,7 @@ GAMEL( 1987, finallapjb, finallap, finallap, finallap, namcos2_state, init_final
GAME( 1988, assault, 0, base2, assault, namcos2_state, init_assault, ROT90, "Namco", "Assault (Rev B)", 0 )
GAME( 1988, assaultj, assault, base2, assault, namcos2_state, init_assaultj, ROT90, "Namco", "Assault (Japan)", 0 )
GAME( 1988, assaultp, assault, assaultp, assault, namcos2_state, init_assaultp_hack, ROT90, "Namco", "Assault Plus (Japan)", 0)
GAME( 1988, assaultp, assault, assaultp, assault, namcos2_state, init_assaultp, ROT90, "Namco", "Assault Plus (Japan)", 0)
GAME( 1988, metlhawk, 0, metlhawk, metlhawk, namcos2_state, init_metlhawk, ROT90, "Namco", "Metal Hawk (Rev C)", 0 )
GAME( 1988, metlhawkj, metlhawk, metlhawk, metlhawk, namcos2_state, init_metlhawk, ROT90, "Namco", "Metal Hawk (Japan, Rev F)", 0 )
@ -5859,20 +5824,22 @@ GAME( 1990, rthun2j, rthun2, base3, base, namcos2_state, init_rthun
GAME( 1990, sgunner, 0, sgunner, sgunner, namcos2_state, init_sgunner2, ROT0, "Namco", "Steel Gunner (Rev B)", 0 )
GAME( 1990, sgunnerj, sgunner, sgunner, sgunner, namcos2_state, init_sgunner2, ROT0, "Namco", "Steel Gunner (Japan)", 0 )
GAME( 1991, sgunner2, 0, sgunner2, sgunner2, namcos2_state, init_sgunner2, ROT0, "Namco", "Steel Gunner 2 (US)", 0 )
GAME( 1991, sgunner2j, sgunner2, sgunner2, sgunner2, namcos2_state, init_sgunner2, ROT0, "Namco", "Steel Gunner 2 (Japan, Rev A)", 0 )
// The C68 I/O MCU contains a 1991 copyright, so anything after this point is potentially using that instead of C65, games before this point can't be using it
GAME( 1991, sgunner2, 0, sgunner2, sgunner, namcos2_state, init_sgunner2, ROT0, "Namco", "Steel Gunner 2 (US)", 0 )
GAME( 1991, sgunner2j, sgunner2, sgunner2, sgunner, namcos2_state, init_sgunner2, ROT0, "Namco", "Steel Gunner 2 (Japan, Rev A)", 0 )
GAME( 1991, cosmogng, 0, base, base, namcos2_state, init_cosmogng, ROT90, "Namco", "Cosmo Gang the Video (US)", 0 )
GAME( 1991, cosmogngj, cosmogng, base, base, namcos2_state, init_cosmogng, ROT90, "Namco", "Cosmo Gang the Video (Japan)", 0 )
GAME( 1992, bubbletr, 0, gollygho, bubbletr, namcos2_state, init_bubbletr, ROT180, "Namco", "Bubble Trouble (World, Rev B)", MACHINE_REQUIRES_ARTWORK )
GAME( 1992, bubbletrj, bubbletr, gollygho, bubbletr, namcos2_state, init_bubbletr, ROT180, "Namco", "Bubble Trouble (Japan, Rev C)", MACHINE_REQUIRES_ARTWORK )
GAME( 1992, bubbletr, 0, gollygho, bubbletr, namcos2_state, init_bubbletr, ROT180, "Namco", "Bubble Trouble - Golly Ghost 2 (World, Rev B)", MACHINE_REQUIRES_ARTWORK )
GAME( 1992, bubbletrj, bubbletr, gollygho, bubbletr, namcos2_state, init_bubbletr, ROT180, "Namco", "Bubble Trouble - Golly Ghost 2 (Japan, Rev C)", MACHINE_REQUIRES_ARTWORK )
GAMEL( 1992, finalap3, 0, finalap2, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (World, Rev C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3a, finalap3, finalap2, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (World, set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3j, finalap3, finalap2, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3jc, finalap3, finalap2, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (Japan, Rev C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3bl, finalap3, finalap2, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3, 0, finalap3, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (World, Rev C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3a, finalap3, finalap3, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (World, set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3j, finalap3, finalap3, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3jc, finalap3, finalap3, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (Japan, Rev C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAMEL( 1992, finalap3bl, finalap3, finalap3, finalap3, namcos2_state, init_finalap3, ROT0, "Namco", "Final Lap 3 (bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN, layout_finallap )
GAME( 1992, luckywld, 0, luckywld, luckywld, namcos2_state, init_luckywld, ROT0, "Namco", "Lucky & Wild", 0 )
GAME( 1992, luckywldj, luckywld, luckywld, luckywld, namcos2_state, init_luckywld, ROT0, "Namco", "Lucky & Wild (Japan)", 0 )
@ -5880,12 +5847,12 @@ GAME( 1992, luckywldj, luckywld, luckywld, luckywld, namcos2_state, init_lucky
GAME( 1992, suzuka8h, 0, luckywld, suzuka, namcos2_state, init_suzuka8h, ROT0, "Namco", "Suzuka 8 Hours (World, Rev C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN )
GAME( 1992, suzuka8hj, suzuka8h, luckywld, suzuka, namcos2_state, init_suzuka8h, ROT0, "Namco", "Suzuka 8 Hours (Japan, Rev B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN )
GAME( 1992, sws, 0, base, base, namcos2_state, init_sws, ROT0, "Namco", "Super World Stadium (Japan)", 0 )
GAME( 1992, sws, 0, base_c68, base, namcos2_state, init_sws, ROT0, "Namco", "Super World Stadium (Japan)", 0 )
GAME( 1992, sws92, 0, base, base, namcos2_state, init_sws92, ROT0, "Namco", "Super World Stadium '92 (Japan)", 0 )
GAME( 1992, sws92g, sws92, base, base, namcos2_state, init_sws92g, ROT0, "Namco", "Super World Stadium '92 Gekitouban (Japan)", 0 )
GAME( 1992, sws92, 0, base_c68, base, namcos2_state, init_sws92, ROT0, "Namco", "Super World Stadium '92 (Japan)", 0 )
GAME( 1992, sws92g, sws92, base_c68, base, namcos2_state, init_sws92g, ROT0, "Namco", "Super World Stadium '92 Gekitouban (Japan)", 0 )
GAME( 1993, suzuk8h2, 0, luckywld, suzuka, namcos2_state, init_suzuk8h2, ROT0, "Namco", "Suzuka 8 Hours 2 (World, Rev B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN )
GAME( 1993, suzuk8h2j, suzuk8h2, luckywld, suzuka, namcos2_state, init_suzuk8h2, ROT0, "Namco", "Suzuka 8 Hours 2 (Japan, Rev B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NODEVICE_LAN )
GAME( 1993, sws93, 0, base, base, namcos2_state, init_sws93, ROT0, "Namco", "Super World Stadium '93 (Japan)", 0 )
GAME( 1993, sws93, 0, base_c68, base, namcos2_state, init_sws93, ROT0, "Namco", "Super World Stadium '93 (Japan)", 0 )

View File

@ -24,6 +24,7 @@ class namcofl_state : public namcos2_shared_state
public:
namcofl_state(const machine_config &mconfig, device_type type, const char *tag) :
namcos2_shared_state(mconfig, type, tag),
m_mcu(*this, "mcu"),
m_in0(*this, "IN0"),
m_in1(*this, "IN1"),
m_in2(*this, "IN2"),
@ -39,6 +40,7 @@ public:
void init_finalapr();
private:
required_device<cpu_device> m_mcu;
required_ioport m_in0;
required_ioport m_in1;
required_ioport m_in2;

View File

@ -30,6 +30,7 @@ class namconb1_state : public namcos2_shared_state
public:
namconb1_state(const machine_config &mconfig, device_type type, const char *tag) :
namcos2_shared_state(mconfig, type, tag),
m_mcu(*this, "mcu"),
m_eeprom(*this, "eeprom"),
m_p1(*this, "P1"),
m_p2(*this, "P2"),
@ -62,6 +63,7 @@ public:
void init_gslgr94u();
private:
required_device<cpu_device> m_mcu;
required_device<eeprom_parallel_28xx_device> m_eeprom;
required_ioport m_p1;
required_ioport m_p2;

View File

@ -127,9 +127,8 @@ public:
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
, m_slave(*this, "slave")
, m_mcu(*this, "mcu")
, m_c65(*this, "c65mcu")
, m_c68new(*this, "c68mcu")
, m_c68(*this, "c68mcu")
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
@ -147,7 +146,7 @@ protected:
optional_device<namco_c148_device> m_slave_intc;
optional_device<namco_c139_device> m_sci;
optional_device<cpu_device> m_gpu; //to be moved to namco21_state after disentangling
// game type helpers
bool is_system21();
@ -228,6 +227,7 @@ protected:
optional_shared_ptr<uint16_t> m_c169_roz_videoram;
int m_c169_roz_gfxbank;
uint8_t *m_c169_roz_mask;
uint32_t m_c169_roz_rammask;
// C355 Motion Object Emulation
typedef delegate<int (int)> c355_obj_code2tile_delegate;
@ -270,9 +270,8 @@ protected:
required_device<cpu_device> m_maincpu;
optional_device<cpu_device> m_audiocpu;
optional_device<cpu_device> m_slave;
optional_device<cpu_device> m_mcu;
optional_device<namcoc65_device> m_c65;
optional_device<namcoc68_device> m_c68new;
optional_device<namcoc68_device> m_c68;
optional_device<gfxdecode_device> m_gfxdecode;
optional_device<screen_device> m_screen;
@ -300,12 +299,17 @@ public:
void assaultp(machine_config &config);
void sgunner2(machine_config &config);
void base2(machine_config &config);
void finallap_noio(machine_config &config);
void finallap(machine_config &config);
void finallap_c68(machine_config &config);
void finalap2(machine_config &config);
void finalap3(machine_config &config);
void luckywld(machine_config &config);
void base3(machine_config &config);
void sgunner(machine_config &config);
void base_noio(machine_config &config);
void base(machine_config &config);
void base_c68(machine_config &config);
void init_cosmogng();
void init_sgunner2();
@ -336,7 +340,6 @@ public:
void init_sws93();
void init_metlhawk();
void init_sws92g();
void init_assaultp_hack();
void init_assaultp();
void init_ordyne();
void init_marvland();

View File

@ -2,9 +2,9 @@
// copyright-holders:David Haywood, K.Wilkins
/*
TODO:
output support, Golly Ghost is currently hacking this based on DPRAM in the namcos2.cpp driver side!
some of this can likely be moved into the actual MCU core too
output support
*/
@ -17,7 +17,6 @@ namcoc68_device::namcoc68_device(const machine_config &mconfig, const char *tag,
device_t(mconfig, NAMCOC68, tag, owner, clock),
m_mcu(*this, "mcu"),
m_in_pb_cb(*this),
m_in_pb2_cb(*this),
m_in_pc_cb(*this),
m_in_ph_cb(*this),
m_in_pdsw_cb(*this),
@ -30,14 +29,30 @@ namcoc68_device::namcoc68_device(const machine_config &mconfig, const char *tag,
ROM_START( namcoc68 )
ROM_REGION( 0x8000, "mcu", 0 )
ROM_LOAD( "c68.3d", 0x000000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) )
ROM_LOAD( "c68.bin", 0x000000, 0x008000, CRC(ca64550a) SHA1(38d1ad1b1287cadef0c999aff9357927315f8e6b) ) // usually position 3d, but device really needs a way to specify it
ROM_END
// C68 looks like a drop-in replacement for C65, so the port mappings must be scrambled in one instance, since this already has a multiplex on the port, assume here
READ8_MEMBER(namcoc68_device::c68_p5_r)
{
return (m_player_mux) ? m_in_pb2_cb() : m_in_pb_cb();
uint16_t ret = (m_in_ph_cb() << 8) | m_in_pb_cb();
if (m_player_mux)
{
return bitswap<8>(ret, 6, 8, 10, 12, 4, 2, 0, 14);
}
else
{
return bitswap<8>(ret, 7, 9, 11, 13, 5, 3, 1, 15);
}
}
READ8_MEMBER(namcoc68_device::mcuc_r)
{
uint8_t ret = m_in_pc_cb();
ret = bitswap<8>(ret, 3, 2, 1, 0, 7, 6, 5, 4);
return ret;
}
WRITE8_MEMBER(namcoc68_device::c68_p3_w)
@ -61,6 +76,11 @@ WRITE8_MEMBER(namcoc68_device::dpram_byte_w)
m_dp_out(offset,data);
}
READ8_MEMBER(namcoc68_device::unk_r)
{
return 0x00;
}
void namcoc68_device::c68_default_am(address_map &map)
{
/* input ports and dips are mapped here */
@ -79,16 +99,15 @@ void namcoc68_device::device_add_mconfig(machine_config &config)
m3745x_device* device = &M37450(config, m_mcu, DERIVED_CLOCK(1, 1)); // ugly, needs modernizing
MCFG_M3745X_ADC14_CALLBACKS(READ8(*this, namcoc68_device, mcuan0_r), READ8(*this, namcoc68_device, mcuan1_r), READ8(*this, namcoc68_device, mcuan2_r), READ8(*this, namcoc68_device, mcuan3_r))
MCFG_M3745X_ADC58_CALLBACKS(READ8(*this, namcoc68_device, mcuan4_r), READ8(*this, namcoc68_device, mcuan5_r), READ8(*this, namcoc68_device, mcuan6_r), READ8(*this, namcoc68_device, mcuan7_r))
MCFG_M3745X_PORT3_CALLBACKS(READ8(*this, namcoc68_device, mcuh_r), WRITE8(*this, namcoc68_device, c68_p3_w)) // coins/test/service
MCFG_M3745X_PORT3_CALLBACKS(READ8(*this, namcoc68_device, mcuc_r), WRITE8(*this, namcoc68_device, c68_p3_w)) // coins/test/service
MCFG_M3745X_PORT5_CALLBACKS(READ8(*this, namcoc68_device, c68_p5_r), NOOP) // muxed player 1/2
MCFG_M3745X_PORT6_CALLBACKS(READ8(*this, namcoc68_device, mcuc_r), NOOP) // unused in sgunner2
MCFG_M3745X_PORT6_CALLBACKS(READ8(*this, namcoc68_device, unk_r), NOOP) // unused in sgunner2
MCFG_DEVICE_PROGRAM_MAP(c68_default_am)
}
void namcoc68_device::device_resolve_objects()
{
m_in_pb_cb.resolve_safe(0xff);
m_in_pb2_cb.resolve_safe(0xff);
m_in_pc_cb.resolve_safe(0xff);
m_in_ph_cb.resolve_safe(0xff);
m_in_pdsw_cb.resolve_safe(0xff);

View File

@ -18,7 +18,6 @@ public:
namcoc68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
auto in_pb_callback() { return m_in_pb_cb.bind(); }
auto in_pb2_callback() { return m_in_pb2_cb.bind(); }
auto in_pc_callback() { return m_in_pc_cb.bind(); }
auto in_ph_callback() { return m_in_ph_cb.bind(); }
@ -57,7 +56,6 @@ private:
required_device<m37450_device> m_mcu;
devcb_read8 m_in_pb_cb;
devcb_read8 m_in_pb2_cb;
devcb_read8 m_in_pc_cb;
devcb_read8 m_in_ph_cb;
@ -76,12 +74,9 @@ private:
DECLARE_READ8_MEMBER(dpram_byte_r);
DECLARE_WRITE8_MEMBER(dpram_byte_w);
DECLARE_READ8_MEMBER(mcub_r) { return m_in_pb_cb(); }
DECLARE_READ8_MEMBER(mcub2_r) { return m_in_pb2_cb(); }
DECLARE_READ8_MEMBER(unk_r);
DECLARE_READ8_MEMBER(mcuc_r);
DECLARE_READ8_MEMBER(mcuc_r) { return m_in_pc_cb(); }
DECLARE_READ8_MEMBER(mcuh_r) { return m_in_ph_cb(); }
DECLARE_READ8_MEMBER(mcudsw_r) { return m_in_pdsw_cb(); }
DECLARE_READ8_MEMBER(mcudi0_r) { return m_port_dial_in_cb[0](); }

View File

@ -792,11 +792,12 @@ READ16_MEMBER( namcos2_shared_state::c355_obj_ram_r )
* Graphics ROM addressing varies across games.
*/
template<int Which>
TILE_GET_INFO_MEMBER( namcos2_shared_state::c169_roz_get_info )
TILE_GET_INFO_MEMBER(namcos2_shared_state::c169_roz_get_info)
{
int tile, mask;
m_c169_cb( m_c169_roz_videoram[tile_index] & 0x3fff, &tile, &mask, Which );
tileinfo.mask_data = m_c169_roz_mask + 32*mask;
int tile = 0, mask = 0;
m_c169_cb(m_c169_roz_videoram[tile_index&m_c169_roz_rammask] & 0x3fff, &tile, &mask, Which);
tileinfo.mask_data = m_c169_roz_mask + 32 * mask;
SET_TILE_INFO_MEMBER(m_c169_roz_gfxbank, tile, 0/*color*/, 0/*flag*/);
}
@ -809,19 +810,20 @@ void namcos2_shared_state::c169_roz_init(int gfxbank, const char *maskregion, c1
{
m_c169_roz_gfxbank = gfxbank;
m_c169_roz_mask = memregion(maskregion)->base();
m_c169_roz_rammask = (m_c169_roz_videoram.bytes() / 2) - 1; // are the tilemap sizes just too big? if we don't mask with this c169_roz_get_info reads out of bounds.
m_c169_cb = tilemap_cb;
m_c169_roz_tilemap[0] = &machine().tilemap().create(*m_gfxdecode,
tilemap_get_info_delegate(FUNC(namcos2_shared_state::c169_roz_get_info<0>), this),
tilemap_mapper_delegate(FUNC(namcos2_shared_state::c169_roz_mapper), this),
16,16,
256,256);
tilemap_get_info_delegate(FUNC(namcos2_shared_state::c169_roz_get_info<0>), this),
tilemap_mapper_delegate(FUNC(namcos2_shared_state::c169_roz_mapper), this),
16, 16,
256, 256);
m_c169_roz_tilemap[1] = &machine().tilemap().create(*m_gfxdecode,
tilemap_get_info_delegate(FUNC(namcos2_shared_state::c169_roz_get_info<1>), this),
tilemap_mapper_delegate(FUNC(namcos2_shared_state::c169_roz_mapper), this),
16,16,
256,256);
tilemap_get_info_delegate(FUNC(namcos2_shared_state::c169_roz_get_info<1>), this),
tilemap_mapper_delegate(FUNC(namcos2_shared_state::c169_roz_mapper), this),
16, 16,
256, 256);
save_item(NAME(m_c169_roz_control));
}

View File

@ -455,7 +455,8 @@ READ8_MEMBER( namcos1_state::key_type3_r )
if (op == m_key_bottom4) return (offset << 4) | (m_key[m_key_swap4_arg] & 0x0f);
if (op == m_key_top4) return (offset << 4) | (m_key[m_key_swap4_arg] >> 4);
popmessage("%s: keychip read %04x", machine().describe_context(), offset);
// rompers triggers this between certain stages, check if values are used, it might still need the above mapping properly in the game init
logerror("%s: unhandled keychip read %04x", machine().describe_context(), offset);
return 0;
}

View File

@ -107,13 +107,9 @@ WRITE8_MEMBER(namcos2_shared_state::system_reset_w)
void namcos2_shared_state::reset_all_subcpus(int state)
{
m_slave->set_input_line(INPUT_LINE_RESET, state);
if (m_c68new)
if (m_c68)
{
m_c68new->ext_reset(state);
}
else if (m_mcu)
{
m_mcu->set_input_line(INPUT_LINE_RESET, state);
m_c68->ext_reset(state);
}
else if (m_c65)
{