more MCFG_ gone (nw)

This commit is contained in:
Vas Crabb 2018-07-09 06:55:11 +10:00
parent ebc3f6947f
commit 2888fe0eb2
9 changed files with 216 additions and 302 deletions

View File

@ -11,12 +11,6 @@
#define DSBZ80_TAG "dsbz80"
#define MCFG_DSBZ80_ADD(_tag) \
MCFG_DEVICE_ADD(_tag, DSBZ80, 0)
#define MCFG_DSBZ80_RXD_HANDLER(_devcb) \
downcast<dsbz80_device &>(*device).set_rxd_handler(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************

View File

@ -305,8 +305,8 @@ to the same bank as defined through A20.
class coolridr_state : public driver_device
{
public:
coolridr_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
coolridr_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_textBytesToWrite(0x00),
m_blitterSerialCount(0x00),
m_blitterMode(0x00),
@ -3278,17 +3278,17 @@ MACHINE_CONFIG_START(coolridr_state::coolridr)
MCFG_NVRAM_ADD_0FILL("nvram")
MCFG_DEVICE_ADD("io", SEGA_315_5649, 0)
MCFG_315_5649_OUT_PB_CB(WRITE8(*this, coolridr_state, lamps_w))
MCFG_315_5649_IN_PC_CB(IOPORT("IN0"))
MCFG_315_5649_IN_PD_CB(IOPORT("P1"))
MCFG_315_5649_IN_PE_CB(IOPORT("P2"))
MCFG_315_5649_AN0_CB(IOPORT("AN0"))
MCFG_315_5649_AN1_CB(IOPORT("AN1"))
MCFG_315_5649_AN2_CB(IOPORT("AN2"))
MCFG_315_5649_AN4_CB(IOPORT("AN4"))
MCFG_315_5649_AN5_CB(IOPORT("AN5"))
MCFG_315_5649_AN6_CB(IOPORT("AN6"))
sega_315_5649_device &io(SEGA_315_5649(config, "io", 0));
io.out_pb_callback().set(FUNC(coolridr_state::lamps_w));
io.in_pc_callback().set_ioport("IN0");
io.in_pd_callback().set_ioport("P1");
io.in_pe_callback().set_ioport("P2");
io.an_port_callback<0>().set_ioport("AN0");
io.an_port_callback<1>().set_ioport("AN1");
io.an_port_callback<2>().set_ioport("AN2");
io.an_port_callback<4>().set_ioport("AN4");
io.an_port_callback<5>().set_ioport("AN5");
io.an_port_callback<6>().set_ioport("AN6");
MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_coolridr)
@ -3332,10 +3332,9 @@ MACHINE_CONFIG_START(coolridr_state::aquastge)
MCFG_DEVICE_MODIFY("sub")
MCFG_DEVICE_PROGRAM_MAP(aquastge_submap)
MCFG_DEVICE_REMOVE("io")
MCFG_DEVICE_ADD("io", SEGA_315_5649, 0)
MCFG_315_5649_IN_PC_CB(IOPORT("IN0"))
MCFG_315_5649_IN_PD_CB(IOPORT("IN1"))
sega_315_5649_device &io(SEGA_315_5649(config.replace(), "io", 0));
io.in_pc_callback().set_ioport("IN0");
io.in_pd_callback().set_ioport("IN1");
MACHINE_CONFIG_END
ROM_START( coolridr )

View File

@ -789,24 +789,29 @@ void interpro_state::interpro_cdrom(device_t *device)
downcast<nscsi_cdrom_device &>(*device).set_block_size(512);
}
MACHINE_CONFIG_START(interpro_state::ioga)
void interpro_state::ioga(machine_config &config)
{
m_ioga->out_nmi_callback().set_inputline(m_maincpu, INPUT_LINE_NMI);
m_ioga->out_irq_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_ioga->out_irq_vector_callback().set(m_maincpu, FUNC(clipper_device::set_ivec));
// ioga dma and serial dma channels
MCFG_DEVICE_MODIFY(INTERPRO_IOGA_TAG);
//MCFG_INTERPRO_IOGA_DMA_CB(0, unknown) // plotter
MCFG_INTERPRO_IOGA_DMA_CB(1, READ8(INTERPRO_SCSI_DEVICE_TAG, ncr53c90a_device, mdma_r), WRITE8(INTERPRO_SCSI_DEVICE_TAG, ncr53c90a_device, mdma_w))
MCFG_INTERPRO_IOGA_DMA_CB(2, READ8(m_fdc, upd765_family_device, mdma_r), WRITE8(m_fdc, upd765_family_device, mdma_w))
MCFG_INTERPRO_IOGA_SERIAL_DMA_CB(0, READ8(m_scc2, z80scc_device, db_r), WRITE8(m_scc2, z80scc_device, db_w))
MCFG_INTERPRO_IOGA_SERIAL_DMA_CB(1, READ8(m_scc1, z80scc_device, da_r), WRITE8(m_scc1, z80scc_device, da_w))
MCFG_INTERPRO_IOGA_SERIAL_DMA_CB(2, READ8(m_scc1, z80scc_device, db_r), WRITE8(m_scc1, z80scc_device, db_w))
//m_ioga->dma_r_callback<0>().set(unknown); // plotter
m_ioga->dma_r_callback<1>().set(INTERPRO_SCSI_DEVICE_TAG, FUNC(ncr53c90a_device::mdma_r));
m_ioga->dma_w_callback<1>().set(INTERPRO_SCSI_DEVICE_TAG, FUNC(ncr53c90a_device::mdma_w));
m_ioga->dma_r_callback<2>().set(m_fdc, FUNC(upd765_family_device::mdma_r));
m_ioga->dma_w_callback<2>().set(m_fdc, FUNC(upd765_family_device::mdma_w));
m_ioga->serial_dma_r_callback<0>().set(m_scc2, FUNC(z80scc_device::db_r));
m_ioga->serial_dma_w_callback<0>().set(m_scc2, FUNC(z80scc_device::db_w));
m_ioga->serial_dma_r_callback<1>().set(m_scc1, FUNC(z80scc_device::da_r));
m_ioga->serial_dma_w_callback<1>().set(m_scc1, FUNC(z80scc_device::da_w));
m_ioga->serial_dma_r_callback<2>().set(m_scc1, FUNC(z80scc_device::db_r));
m_ioga->serial_dma_w_callback<2>().set(m_scc1, FUNC(z80scc_device::db_w));
// ioga floppy terminal count, ethernet channel attention
MCFG_INTERPRO_IOGA_FDCTC_CB(WRITELINE(m_fdc, upd765_family_device, tc_line_w))
MCFG_INTERPRO_IOGA_ETH_CA_CB(WRITELINE(m_eth, i82586_base_device, ca))
MACHINE_CONFIG_END
m_ioga->fdc_tc_callback().set(m_fdc, FUNC(upd765_family_device::tc_line_w));
m_ioga->eth_ca_callback().set(m_eth, FUNC(i82586_base_device::ca));
}
static INPUT_PORTS_START(interpro)
INPUT_PORTS_END
@ -907,8 +912,8 @@ MACHINE_CONFIG_START(emerald_state::emerald)
MCFG_DEVICE_ADDRESS_MAP(0, interpro_82586_map)
// i/o gate array
MCFG_DEVICE_ADD(m_ioga, EMERALD_IOGA, 0)
MCFG_INTERPRO_IOGA_MEMORY(INTERPRO_CPU_TAG, 0)
EMERALD_IOGA(config, m_ioga, 0);
m_ioga->set_memory(m_maincpu, 0);
ioga(config);
MACHINE_CONFIG_END
@ -959,8 +964,8 @@ MACHINE_CONFIG_START(turquoise_state::turquoise)
MCFG_DEVICE_ADDRESS_MAP(0, interpro_82586_map)
// i/o gate array
MCFG_DEVICE_ADD(m_ioga, TURQUOISE_IOGA, 0)
MCFG_INTERPRO_IOGA_MEMORY(INTERPRO_CPU_TAG, 0)
TURQUOISE_IOGA(config, m_ioga, 0);
m_ioga->set_memory(m_maincpu, 0);
ioga(config);
// cbus and slots
@ -1017,8 +1022,8 @@ MACHINE_CONFIG_START(sapphire_state::sapphire)
MCFG_DEVICE_ADDRESS_MAP(0, interpro_82596_map)
// i/o gate array
MCFG_DEVICE_ADD(m_ioga, SAPPHIRE_IOGA, 0)
MCFG_INTERPRO_IOGA_MEMORY(INTERPRO_CPU_TAG, 0)
SAPPHIRE_IOGA(config, m_ioga, 0);
m_ioga->set_memory(m_maincpu, 0);
ioga(config);
// flash memory

View File

@ -2640,11 +2640,11 @@ MACHINE_CONFIG_START(model2a_state::model2a)
MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
MCFG_NVRAM_ADD_1FILL("backup1")
MCFG_DEVICE_ADD("io", SEGA_315_5649, 0)
MCFG_315_5649_OUT_PA_CB(WRITE8(*this, model2a_state, eeprom_w))
MCFG_315_5649_IN_PB_CB(READ8(*this, model2a_state, in0_r))
MCFG_315_5649_IN_PC_CB(IOPORT("IN1"))
MCFG_315_5649_IN_PD_CB(IOPORT("IN2"))
sega_315_5649_device &io(SEGA_315_5649(config, "io", 0));
io.out_pa_callback().set(FUNC(model2a_state::eeprom_w));
io.in_pb_callback().set(FUNC(model2a_state::in0_r));
io.in_pc_callback().set_ioport("IN1");
io.in_pd_callback().set_ioport("IN2");
model2_timers(config);
model2_screen(config);
@ -2653,14 +2653,15 @@ MACHINE_CONFIG_START(model2a_state::model2a)
M2COMM(config, "m2comm", 0);
MACHINE_CONFIG_END
MACHINE_CONFIG_START(model2a_state::manxtt)
void model2a_state::manxtt(machine_config &config)
{
model2a(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("THROTTLE"))
MCFG_315_5649_AN1_CB(IOPORT("BRAKE"))
MCFG_315_5649_AN2_CB(IOPORT("BANK"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("THROTTLE");
io.an_port_callback<1>().set_ioport("BRAKE");
io.an_port_callback<2>().set_ioport("BANK");
}
// Includes a Model 1 Sound board for additional sounds - Deluxe version only
void model2a_state::manxttdx(machine_config &config)
@ -2673,32 +2674,35 @@ void model2a_state::manxttdx(machine_config &config)
m_uart->txd_handler().set(m_m1audio, FUNC(segam1audio_device::write_txd));
}
MACHINE_CONFIG_START( model2a_state::srallyc )
void model2a_state::srallyc(machine_config &config)
{
model2a(config);
sj25_0207_01(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_OUT_PE_CB(WRITE8(*this, model2a_state, drive_board_w))
MCFG_315_5649_AN0_CB(IOPORT("STEER"))
MCFG_315_5649_AN1_CB(IOPORT("ACCEL"))
MCFG_315_5649_AN2_CB(IOPORT("BRAKE"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.out_pe_callback().set(FUNC(model2a_state::drive_board_w));
io.an_port_callback<0>().set_ioport("STEER");
io.an_port_callback<1>().set_ioport("ACCEL");
io.an_port_callback<2>().set_ioport("BRAKE");
}
MACHINE_CONFIG_START( model2a_state::vcop2 )
void model2a_state::vcop2(machine_config &config)
{
model2a(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_SERIAL_CH2_READ_CB(READ8(*this, model2a_state, lightgun_mux_r))
MCFG_315_5649_SERIAL_CH2_WRITE_CB(WRITE8(*this, model2a_state, lightgun_mux_w))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.serial_ch2_rd_callback().set(FUNC(model2a_state::lightgun_mux_r));
io.serial_ch2_wr_callback().set(FUNC(model2a_state::lightgun_mux_w));
}
MACHINE_CONFIG_START( model2a_state::skytargt )
void model2a_state::skytargt(machine_config &config)
{
model2a(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("STICKY"))
MCFG_315_5649_AN2_CB(IOPORT("STICKX"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("STICKY");
io.an_port_callback<2>().set_ioport("STICKX");
}
uint16_t model2_state::crypt_read_callback(uint32_t addr)
{
@ -2722,12 +2726,13 @@ MACHINE_CONFIG_START(model2a_state::model2a_0229)
// MCFG_SET_5838_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
MACHINE_CONFIG_START( model2a_state::zeroguna )
void model2a_state::zeroguna(machine_config &config)
{
model2a_5881(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_IN_PG_CB(IOPORT("DSW"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.in_pg_callback().set_ioport("DSW");
}
/* 2B-CRX */
MACHINE_CONFIG_START(model2b_state::model2b)
@ -2754,11 +2759,11 @@ MACHINE_CONFIG_START(model2b_state::model2b)
MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
MCFG_NVRAM_ADD_1FILL("backup1")
MCFG_DEVICE_ADD("io", SEGA_315_5649, 0)
MCFG_315_5649_OUT_PA_CB(WRITE8(*this, model2b_state, eeprom_w))
MCFG_315_5649_IN_PB_CB(READ8(*this, model2b_state, in0_r))
MCFG_315_5649_IN_PC_CB(IOPORT("IN1"))
MCFG_315_5649_IN_PD_CB(IOPORT("IN2"))
sega_315_5649_device &io(SEGA_315_5649(config, "io", 0));
io.out_pa_callback().set(FUNC(model2b_state::eeprom_w));
io.in_pb_callback().set(FUNC(model2b_state::in0_r));
io.in_pc_callback().set_ioport("IN1");
io.in_pd_callback().set_ioport("IN2");
model2_timers(config);
model2_screen(config);
@ -2783,14 +2788,15 @@ MACHINE_CONFIG_START(model2b_state::model2b_0229)
// MCFG_SET_5838_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
MACHINE_CONFIG_START(model2b_state::indy500)
void model2b_state::indy500(machine_config &config)
{
model2b(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("STEER"))
MCFG_315_5649_AN1_CB(IOPORT("ACCEL"))
MCFG_315_5649_AN2_CB(IOPORT("BRAKE"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("STEER");
io.an_port_callback<1>().set_ioport("ACCEL");
io.an_port_callback<2>().set_ioport("BRAKE");
}
void model2b_state::rchase2_iocpu_map(address_map &map)
@ -2812,41 +2818,44 @@ MACHINE_CONFIG_START( model2b_state::rchase2 )
MCFG_DEVICE_PROGRAM_MAP(rchase2_iocpu_map)
MCFG_DEVICE_IO_MAP(rchase2_ioport_map)
MCFG_DEVICE_ADD("ioexp", CXD1095, 0)
CXD1095(config, "ioexp", 0);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_IN_PD_CB(READ8(*this, model2b_state, rchase2_drive_board_r))
MCFG_315_5649_OUT_PE_CB(WRITE8(*this, model2b_state, rchase2_drive_board_w))
MCFG_315_5649_AN0_CB(IOPORT("P2_X"))
MCFG_315_5649_AN1_CB(IOPORT("P1_X"))
MCFG_315_5649_AN2_CB(IOPORT("P2_Y"))
MCFG_315_5649_AN3_CB(IOPORT("P1_Y"))
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.in_pd_callback().set(FUNC(model2b_state::rchase2_drive_board_r));
io.out_pe_callback().set(FUNC(model2b_state::rchase2_drive_board_w));
io.an_port_callback<0>().set_ioport("P2_X");
io.an_port_callback<1>().set_ioport("P1_X");
io.an_port_callback<2>().set_ioport("P2_Y");
io.an_port_callback<3>().set_ioport("P1_Y");
MACHINE_CONFIG_END
MACHINE_CONFIG_START( model2b_state::gunblade )
void model2b_state::gunblade(machine_config &config)
{
model2b(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("P1_X"))
MCFG_315_5649_AN1_CB(IOPORT("P2_X"))
MCFG_315_5649_AN2_CB(IOPORT("P1_Y"))
MCFG_315_5649_AN3_CB(IOPORT("P2_Y"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("P1_X");
io.an_port_callback<1>().set_ioport("P2_X");
io.an_port_callback<2>().set_ioport("P1_Y");
io.an_port_callback<3>().set_ioport("P2_Y");
}
MACHINE_CONFIG_START( model2b_state::dynabb )
void model2b_state::dynabb(machine_config &config)
{
model2b(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("BAT1"))
MCFG_315_5649_AN1_CB(IOPORT("BAT2"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("BAT1");
io.an_port_callback<1>().set_ioport("BAT2");
}
MACHINE_CONFIG_START( model2b_state::zerogun )
void model2b_state::zerogun(machine_config &config)
{
model2b_5881(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_IN_PG_CB(IOPORT("DSW"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.in_pg_callback().set_ioport("DSW");
}
/* 2C-CRX */
MACHINE_CONFIG_START(model2c_state::model2c)
@ -2869,11 +2878,11 @@ MACHINE_CONFIG_START(model2c_state::model2c)
MCFG_DEVICE_ADD("eeprom", EEPROM_SERIAL_93C46_16BIT)
MCFG_NVRAM_ADD_1FILL("backup1")
MCFG_DEVICE_ADD("io", SEGA_315_5649, 0)
MCFG_315_5649_OUT_PA_CB(WRITE8(*this, model2c_state, eeprom_w))
MCFG_315_5649_IN_PB_CB(READ8(*this, model2c_state, in0_r))
MCFG_315_5649_IN_PC_CB(IOPORT("IN1"))
MCFG_315_5649_IN_PD_CB(IOPORT("IN2"))
sega_315_5649_device &io(SEGA_315_5649(config, "io", 0));
io.out_pa_callback().set(FUNC(model2c_state::eeprom_w));
io.in_pb_callback().set(FUNC(model2c_state::in0_r));
io.in_pc_callback().set_ioport("IN1");
io.in_pd_callback().set_ioport("IN2");
model2_timers(config);
model2_screen(config);
@ -2882,56 +2891,61 @@ MACHINE_CONFIG_START(model2c_state::model2c)
M2COMM(config, "m2comm", 0);
MACHINE_CONFIG_END
MACHINE_CONFIG_START( model2c_state::skisuprg )
void model2c_state::skisuprg(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("SWING"))
MCFG_315_5649_AN1_CB(IOPORT("INCLINING"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("SWING");
io.an_port_callback<1>().set_ioport("INCLINING");
}
MACHINE_CONFIG_START( model2c_state::stcc )
void model2c_state::stcc(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("STEER"))
MCFG_315_5649_AN1_CB(IOPORT("ACCEL"))
MCFG_315_5649_AN2_CB(IOPORT("BRAKE"))
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("STEER");
io.an_port_callback<1>().set_ioport("ACCEL");
io.an_port_callback<2>().set_ioport("BRAKE");
MCFG_DSBZ80_ADD(DSBZ80_TAG)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
DSBZ80(config, m_dsbz80, 0);
m_dsbz80->add_route(0, "lspeaker", 1.0);
m_dsbz80->add_route(1, "rspeaker", 1.0);
m_uart->txd_handler().set(m_dsbz80, FUNC(dsbz80_device::write_txd));
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START( model2c_state::waverunr )
void model2c_state::waverunr(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("HANDLE"))
MCFG_315_5649_AN1_CB(IOPORT("ROLL"))
MCFG_315_5649_AN2_CB(IOPORT("THROTTLE"))
MCFG_315_5649_AN3_CB(IOPORT("PITCH"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("HANDLE");
io.an_port_callback<1>().set_ioport("ROLL");
io.an_port_callback<2>().set_ioport("THROTTLE");
io.an_port_callback<3>().set_ioport("PITCH");
}
MACHINE_CONFIG_START( model2c_state::bel )
void model2c_state::bel(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("P1_X"))
MCFG_315_5649_AN1_CB(IOPORT("P2_X"))
MCFG_315_5649_AN2_CB(IOPORT("P1_Y"))
MCFG_315_5649_AN3_CB(IOPORT("P2_Y"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("P1_X");
io.an_port_callback<1>().set_ioport("P2_X");
io.an_port_callback<2>().set_ioport("P1_Y");
io.an_port_callback<3>().set_ioport("P2_Y");
}
MACHINE_CONFIG_START( model2c_state::hotd )
void model2c_state::hotd(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_SERIAL_CH2_READ_CB(READ8(*this, model2c_state, lightgun_mux_r))
MCFG_315_5649_SERIAL_CH2_WRITE_CB(WRITE8(*this, model2c_state, lightgun_mux_w))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.serial_ch2_rd_callback().set(FUNC(model2c_state::lightgun_mux_r));
io.serial_ch2_wr_callback().set(FUNC(model2c_state::lightgun_mux_w));
}
MACHINE_CONFIG_START(model2c_state::model2c_5881)
model2c(config);
@ -2943,29 +2957,32 @@ MACHINE_CONFIG_START(model2c_state::model2c_5881)
MCFG_SET_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
MACHINE_CONFIG_START( model2c_state::overrev2c )
void model2c_state::overrev2c(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("STEER"))
MCFG_315_5649_AN1_CB(IOPORT("ACCEL"))
MCFG_315_5649_AN2_CB(IOPORT("BRAKE"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("STEER");
io.an_port_callback<1>().set_ioport("ACCEL");
io.an_port_callback<2>().set_ioport("BRAKE");
}
MACHINE_CONFIG_START( model2c_state::segawski )
void model2c_state::segawski(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("SLIDE"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("SLIDE");
}
MACHINE_CONFIG_START( model2c_state::topskatr )
void model2c_state::topskatr(machine_config &config)
{
model2c(config);
MCFG_DEVICE_MODIFY("io")
MCFG_315_5649_AN0_CB(IOPORT("CURVING"))
MCFG_315_5649_AN1_CB(IOPORT("SLIDE"))
MACHINE_CONFIG_END
sega_315_5649_device &io(*subdevice<sega_315_5649_device>("io"));
io.an_port_callback<0>().set_ioport("CURVING");
io.an_port_callback<1>().set_ioport("SLIDE");
}
/* ROM definitions */

View File

@ -5843,11 +5843,13 @@ MACHINE_CONFIG_START(model3_state::model3_15)
MCFG_M3COMM_ADD("comm_board")
MACHINE_CONFIG_END
MACHINE_CONFIG_START(model3_state::scud)
void model3_state::scud(machine_config &config)
{
model3_15(config);
MCFG_DSBZ80_ADD(DSBZ80_TAG)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
DSBZ80(config, m_dsbz80, 0);
m_dsbz80->add_route(0, "lspeaker", 1.0);
m_dsbz80->add_route(1, "rspeaker", 1.0);
I8251(config, m_uart, 8000000); // uPD71051
m_uart->txd_handler().set(m_dsbz80, FUNC(dsbz80_device::write_txd));
@ -5855,7 +5857,7 @@ MACHINE_CONFIG_START(model3_state::scud)
clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate)
uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc));
uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc));
MACHINE_CONFIG_END
}
MACHINE_CONFIG_START(model3_state::model3_20)
MCFG_DEVICE_ADD("maincpu", PPC603R, 166000000)

View File

@ -78,6 +78,7 @@ protected:
void xbox_base_map(address_map &map);
void xbox_base_map_io(address_map &map);
private:
void dump_string_command(int ref, const std::vector<std::string> &params);
void dump_process_command(int ref, const std::vector<std::string> &params);
void dump_list_command(int ref, const std::vector<std::string> &params);

View File

@ -14,89 +14,6 @@
#pragma once
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_315_5649_IN_PA_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_in_port_callback<0>(DEVCB_##_devcb);
#define MCFG_315_5649_OUT_PA_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_out_port_callback<0>(DEVCB_##_devcb);
#define MCFG_315_5649_IN_PB_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_in_port_callback<1>(DEVCB_##_devcb);
#define MCFG_315_5649_OUT_PB_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_out_port_callback<1>(DEVCB_##_devcb);
#define MCFG_315_5649_IN_PC_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_in_port_callback<2>(DEVCB_##_devcb);
#define MCFG_315_5649_OUT_PC_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_out_port_callback<2>(DEVCB_##_devcb);
#define MCFG_315_5649_IN_PD_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_in_port_callback<3>(DEVCB_##_devcb);
#define MCFG_315_5649_OUT_PD_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_out_port_callback<3>(DEVCB_##_devcb);
#define MCFG_315_5649_IN_PE_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_in_port_callback<4>(DEVCB_##_devcb);
#define MCFG_315_5649_OUT_PE_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_out_port_callback<4>(DEVCB_##_devcb);
#define MCFG_315_5649_IN_PF_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_in_port_callback<5>(DEVCB_##_devcb);
#define MCFG_315_5649_OUT_PF_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_out_port_callback<5>(DEVCB_##_devcb);
#define MCFG_315_5649_IN_PG_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_in_port_callback<6>(DEVCB_##_devcb);
#define MCFG_315_5649_OUT_PG_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_out_port_callback<6>(DEVCB_##_devcb);
#define MCFG_315_5649_AN0_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<0>(DEVCB_##_devcb);
#define MCFG_315_5649_AN1_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<1>(DEVCB_##_devcb);
#define MCFG_315_5649_AN2_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<2>(DEVCB_##_devcb);
#define MCFG_315_5649_AN3_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<3>(DEVCB_##_devcb);
#define MCFG_315_5649_AN4_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<4>(DEVCB_##_devcb);
#define MCFG_315_5649_AN5_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<5>(DEVCB_##_devcb);
#define MCFG_315_5649_AN6_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<6>(DEVCB_##_devcb);
#define MCFG_315_5649_AN7_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_an_port_callback<7>(DEVCB_##_devcb);
#define MCFG_315_5649_SERIAL_CH1_READ_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_serial_rd_callback<0>(DEVCB_##_devcb);
#define MCFG_315_5649_SERIAL_CH1_WRITE_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_serial_wr_callback<0>(DEVCB_##_devcb);
#define MCFG_315_5649_SERIAL_CH2_READ_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_serial_rd_callback<1>(DEVCB_##_devcb);
#define MCFG_315_5649_SERIAL_CH2_WRITE_CB(_devcb) \
downcast<sega_315_5649_device &>(*device).set_serial_wr_callback<1>(DEVCB_##_devcb);
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
@ -108,20 +25,29 @@ public:
sega_315_5649_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// configuration
template <int N, class Object> devcb_base &set_in_port_callback(Object &&cb)
{ return m_in_port_cb[N].set_callback(std::forward<Object>(cb)); }
auto in_pa_callback() { return m_in_port_cb[0].bind(); }
auto in_pb_callback() { return m_in_port_cb[1].bind(); }
auto in_pc_callback() { return m_in_port_cb[2].bind(); }
auto in_pd_callback() { return m_in_port_cb[3].bind(); }
auto in_pe_callback() { return m_in_port_cb[4].bind(); }
auto in_pf_callback() { return m_in_port_cb[5].bind(); }
auto in_pg_callback() { return m_in_port_cb[6].bind(); }
template <int N, class Object> devcb_base &set_out_port_callback(Object &&cb)
{ return m_out_port_cb[N].set_callback(std::forward<Object>(cb)); }
auto out_pa_callback() { return m_out_port_cb[0].bind(); }
auto out_pb_callback() { return m_out_port_cb[1].bind(); }
auto out_pc_callback() { return m_out_port_cb[2].bind(); }
auto out_pd_callback() { return m_out_port_cb[3].bind(); }
auto out_pe_callback() { return m_out_port_cb[4].bind(); }
auto out_pf_callback() { return m_out_port_cb[5].bind(); }
auto out_pg_callback() { return m_out_port_cb[6].bind(); }
template <int N, class Object> devcb_base &set_an_port_callback(Object &&cb)
{ return m_an_port_cb[N].set_callback(std::forward<Object>(cb)); }
template <unsigned N> auto an_port_callback() { return m_an_port_cb[N].bind(); }
template <int N, class Object> devcb_base &set_serial_rd_callback(Object &&cb)
{ return m_serial_rd_cb[N].set_callback(std::forward<Object>(cb)); }
auto serial_ch1_rd_callback() { return m_serial_rd_cb[0].bind(); }
auto serial_ch2_rd_callback() { return m_serial_rd_cb[1].bind(); }
template <int N, class Object> devcb_base &set_serial_wr_callback(Object &&cb)
{ return m_serial_wr_cb[N].set_callback(std::forward<Object>(cb)); }
auto serial_ch1_wr_callback() { return m_serial_wr_cb[0].bind(); }
auto serial_ch2_wr_callback() { return m_serial_wr_cb[1].bind(); }
DECLARE_READ8_MEMBER(read);
DECLARE_WRITE8_MEMBER(write);

View File

@ -133,7 +133,7 @@ DEFINE_DEVICE_TYPE(SAPPHIRE_IOGA, sapphire_ioga_device, "ioga_s", "I/O Gate Arra
interpro_ioga_device::interpro_ioga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, type, tag, owner, clock)
, m_memory_tag(nullptr)
, m_memory_device(*this, finder_base::DUMMY_TAG)
, m_memory_space(nullptr)
, m_out_nmi_func(*this)
, m_out_irq_func(*this)
@ -166,14 +166,18 @@ sapphire_ioga_device::sapphire_ioga_device(const machine_config &mconfig, const
{
}
void interpro_ioga_device::device_validity_check(validity_checker &valid) const
{
if (m_memory_device && !m_memory_device->has_space(m_memory_spacenum))
osd_printf_error("Device %s (%s) doen't have memory space %d\n", m_memory_device->device().tag(), m_memory_device->device().name(), m_memory_spacenum);
}
void interpro_ioga_device::device_start()
{
assert_always(m_memory_tag != nullptr, "memory tag and address space number must be configured");
// get the memory space
device_memory_interface *memory;
siblingdevice(m_memory_tag)->interface(memory);
m_memory_space = &memory->space(m_memory_spacenum);
if (!m_memory_device->has_space(m_memory_spacenum))
throw emu_fatalerror("%s: Device %s (%s) doen't have memory space %d\n", tag(), m_memory_device->device().tag(), m_memory_device->device().name(), m_memory_spacenum);
m_memory_space = &m_memory_device->space(m_memory_spacenum);
// resolve callbacks
m_out_nmi_func.resolve();

View File

@ -6,32 +6,6 @@
#pragma once
#define MCFG_INTERPRO_IOGA_NMI_CB(_out_nmi) \
downcast<interpro_ioga_device &>(*device).set_out_nmi_callback(DEVCB_##_out_nmi);
#define MCFG_INTERPRO_IOGA_IRQ_CB(_out_irq) \
downcast<interpro_ioga_device &>(*device).set_out_irq_callback(DEVCB_##_out_irq);
#define MCFG_INTERPRO_IOGA_IVEC_CB(_out_ivec) \
downcast<interpro_ioga_device &>(*device).set_out_irq_vector_callback(DEVCB_##_out_ivec);
#define MCFG_INTERPRO_IOGA_DMA_CB(_channel, _dma_r, _dma_w) \
downcast<interpro_ioga_device &>(*device).set_dma_r_callback(_channel, DEVCB_##_dma_r); \
downcast<interpro_ioga_device &>(*device).set_dma_w_callback(_channel, DEVCB_##_dma_w);
#define MCFG_INTERPRO_IOGA_SERIAL_DMA_CB(_channel, _dma_r, _dma_w) \
downcast<interpro_ioga_device &>(*device).set_serial_dma_r_callback(_channel, DEVCB_##_dma_r); \
downcast<interpro_ioga_device &>(*device).set_serial_dma_w_callback(_channel, DEVCB_##_dma_w);
#define MCFG_INTERPRO_IOGA_FDCTC_CB(_tc) \
downcast<interpro_ioga_device &>(*device).set_fdc_tc_callback(DEVCB_##_tc);
#define MCFG_INTERPRO_IOGA_ETH_CA_CB(_ca) \
downcast<interpro_ioga_device &>(*device).set_eth_ca_callback(DEVCB_##_ca);
#define MCFG_INTERPRO_IOGA_MEMORY(_tag, _spacenum) \
downcast<interpro_ioga_device &>(*device).set_memory(_tag, _spacenum);
class interpro_ioga_device : public device_t
{
protected:
@ -76,15 +50,6 @@ protected:
};
public:
template <class Object> devcb_base &set_out_nmi_callback(Object &&cb) { return m_out_nmi_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irq_callback(Object &&cb) { return m_out_irq_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_out_irq_vector_callback(Object &&cb) { return m_out_irq_vector_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_r_callback(int channel, Object &&cb) { return m_dma_channel[channel].device_r.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_dma_w_callback(int channel, Object &&cb) { return m_dma_channel[channel].device_w.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_serial_dma_r_callback(int channel, Object &&cb) { return m_serial_dma_channel[channel].device_r.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_serial_dma_w_callback(int channel, Object &&cb) { return m_serial_dma_channel[channel].device_w.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_fdc_tc_callback(Object &&cb) { return m_fdc_tc_func.set_callback(std::forward<Object>(cb)); }
template <class Object> devcb_base &set_eth_ca_callback(Object &&cb) { return m_eth_ca_func.set_callback(std::forward<Object>(cb)); }
auto out_nmi_callback() { return m_out_nmi_func.bind(); }
auto out_irq_callback() { return m_out_irq_func.bind(); }
auto out_irq_vector_callback() { return m_out_irq_vector_func.bind(); }
@ -95,9 +60,9 @@ public:
auto fdc_tc_callback() { return m_fdc_tc_func.bind(); }
auto eth_ca_callback() { return m_eth_ca_func.bind(); }
void set_memory(const char *const tag, const int spacenum)
template <typename T> void set_memory(T &&tag, int spacenum)
{
m_memory_tag = tag;
m_memory_device.set_tag(std::forward<T>(tag));
m_memory_spacenum = spacenum;
}
@ -278,10 +243,11 @@ public:
protected:
// device-level overrides
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
const char *m_memory_tag;
required_device<device_memory_interface> m_memory_device;
int m_memory_spacenum;
address_space *m_memory_space;