summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/cat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/cat.cpp')
-rw-r--r--src/mame/drivers/cat.cpp42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/mame/drivers/cat.cpp b/src/mame/drivers/cat.cpp
index 8fb88335a64..f56118d5591 100644
--- a/src/mame/drivers/cat.cpp
+++ b/src/mame/drivers/cat.cpp
@@ -773,7 +773,7 @@ void cat_state::cat_mem(address_map &map)
map(0x80000c, 0x80000d).r(FUNC(cat_state::cat_0080_r)).mirror(0x18FFE0); // Open bus?
map(0x80000e, 0x80000f).rw(FUNC(cat_state::cat_battery_r), FUNC(cat_state::cat_printer_control_w)).mirror(0x18FFE0); // Centronics Printer Control, keyboard led and country code enable
map(0x800010, 0x80001f).r(FUNC(cat_state::cat_0080_r)).mirror(0x18FFE0); // Open bus?
- map(0x810000, 0x81001f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff).mirror(0x18FFE0);
+ map(0x810000, 0x81001f).rw("duartn68681", FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0x00ff).mirror(0x18FFE0);
map(0x820000, 0x82003f).rw(FUNC(cat_state::cat_modem_r), FUNC(cat_state::cat_modem_w)).mirror(0x18FFC0); // AMI S35213 Modem Chip, all access is on bit 7
map(0x830000, 0x830001).r(FUNC(cat_state::cat_6ms_counter_r)).mirror(0x18FFFE); // 16bit 6ms counter clocked by output of another 16bit counter clocked at 10mhz
map(0x840000, 0x840001).rw(FUNC(cat_state::cat_2e80_r), FUNC(cat_state::cat_opr_w)).mirror(0x18FFFE); // GA2 Output port register (video enable, invert, watchdog reset, phone relays)
@@ -1054,44 +1054,42 @@ WRITE_LINE_MEMBER(cat_state::prn_ack_ff) // switch the flipflop state on the ris
#endif
}
-void cat_state::cat(machine_config &config)
-{
+MACHINE_CONFIG_START(cat_state::cat)
+
/* basic machine hardware */
- M68000(config, m_maincpu, XTAL(19'968'000)/4);
- m_maincpu->set_addrmap(AS_PROGRAM, &cat_state::cat_mem);
- m_maincpu->set_irq_acknowledge_callback(FUNC(cat_state::cat_int_ack));
+ MCFG_DEVICE_ADD("maincpu",M68000, XTAL(19'968'000)/4)
+ MCFG_DEVICE_PROGRAM_MAP(cat_mem)
+ MCFG_DEVICE_IRQ_ACKNOWLEDGE_DRIVER(cat_state,cat_int_ack)
MCFG_MACHINE_START_OVERRIDE(cat_state,cat)
MCFG_MACHINE_RESET_OVERRIDE(cat_state,cat)
/* video hardware */
- screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
- screen.set_refresh_hz(50);
- screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
- screen.set_size(672, 344);
- screen.set_visarea_full();
- screen.set_screen_update(FUNC(cat_state::screen_update_cat));
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_REFRESH_RATE(50)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
+ MCFG_SCREEN_SIZE(672, 344)
+ MCFG_SCREEN_VISIBLE_AREA(0, 672-1, 0, 344-1)
+ MCFG_SCREEN_UPDATE_DRIVER(cat_state, screen_update_cat)
MCFG_VIDEO_START_OVERRIDE(cat_state,cat)
- MC68681(config, m_duart, (XTAL(19'968'000)*2)/11); // duart is normally clocked by 3.6864mhz xtal, but cat seemingly uses a divider from the main xtal instead which probably yields 3.63054545Mhz. There is a trace to cut and a mounting area to allow using an actual 3.6864mhz xtal if you so desire
- m_duart->irq_cb().set(FUNC(cat_state::cat_duart_irq_handler));
- m_duart->a_tx_cb().set(FUNC(cat_state::cat_duart_txa));
- m_duart->b_tx_cb().set(FUNC(cat_state::cat_duart_txb));
- m_duart->outport_cb().set(FUNC(cat_state::cat_duart_output));;
+ MCFG_DEVICE_ADD( "duartn68681", MC68681, (XTAL(19'968'000)*2)/11 ) // duart is normally clocked by 3.6864mhz xtal, but cat seemingly uses a divider from the main xtal instead which probably yields 3.63054545Mhz. There is a trace to cut and a mounting area to allow using an actual 3.6864mhz xtal if you so desire
+ MCFG_MC68681_IRQ_CALLBACK(WRITELINE(*this, cat_state, cat_duart_irq_handler))
+ MCFG_MC68681_A_TX_CALLBACK(WRITELINE(*this, cat_state, cat_duart_txa))
+ MCFG_MC68681_B_TX_CALLBACK(WRITELINE(*this, cat_state, cat_duart_txb))
+ MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(*this, cat_state, cat_duart_output))
CENTRONICS(config, m_ctx, centronics_devices, "printer");
m_ctx->ack_handler().set(FUNC(cat_state::prn_ack_ff));
- m_ctx->busy_handler().set(m_duart, FUNC(mc68681_device::ip4_w)).invert();
-
- OUTPUT_LATCH(config, m_ctx_data_out);
- m_ctx->set_output_latch(*m_ctx_data_out);
+ m_ctx->busy_handler().set("duartn68681", FUNC(mc68681_device::ip4_w)).invert();
+ MCFG_CENTRONICS_OUTPUT_LATCH_ADD("ctx_data_out", "ctx")
SPEAKER(config, "mono").front_center();
SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 1.00);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
-}
+MACHINE_CONFIG_END
ROM_START( cat )
ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASEFF )