summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/pc100.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/pc100.cpp')
-rw-r--r--src/mame/drivers/pc100.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/mame/drivers/pc100.cpp b/src/mame/drivers/pc100.cpp
index 5faf9330f26..c4c446ed822 100644
--- a/src/mame/drivers/pc100.cpp
+++ b/src/mame/drivers/pc100.cpp
@@ -634,7 +634,8 @@ static void pc100_floppies(device_slot_interface &device)
#define MASTER_CLOCK 6988800
-MACHINE_CONFIG_START(pc100_state::pc100)
+void pc100_state::pc100(machine_config &config)
+{
/* basic machine hardware */
I8086(config, m_maincpu, MASTER_CLOCK);
m_maincpu->set_addrmap(AS_PROGRAM, &pc100_state::pc100_map);
@@ -642,10 +643,10 @@ MACHINE_CONFIG_START(pc100_state::pc100)
m_maincpu->set_vblank_int("screen", FUNC(pc100_state::pc100_vblank_irq));
m_maincpu->set_irq_acknowledge_callback("pic8259", FUNC(pic8259_device::inta_cb));
- MCFG_TIMER_DRIVER_ADD_PERIODIC("600hz", pc100_state, pc100_600hz_irq, attotime::from_hz(MASTER_CLOCK/600))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("100hz", pc100_state, pc100_100hz_irq, attotime::from_hz(MASTER_CLOCK/100))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("50hz", pc100_state, pc100_50hz_irq, attotime::from_hz(MASTER_CLOCK/50))
- MCFG_TIMER_DRIVER_ADD_PERIODIC("10hz", pc100_state, pc100_10hz_irq, attotime::from_hz(MASTER_CLOCK/10))
+ TIMER(config, "600hz").configure_periodic(FUNC(pc100_state::pc100_600hz_irq), attotime::from_hz(MASTER_CLOCK/600));
+ TIMER(config, "100hz").configure_periodic(FUNC(pc100_state::pc100_100hz_irq), attotime::from_hz(MASTER_CLOCK/100));
+ TIMER(config, "50hz").configure_periodic(FUNC(pc100_state::pc100_50hz_irq), attotime::from_hz(MASTER_CLOCK/50));
+ TIMER(config, "10hz").configure_periodic(FUNC(pc100_state::pc100_10hz_irq), attotime::from_hz(MASTER_CLOCK/10));
i8255_device &ppi1(I8255(config, "ppi8255_1"));
ppi1.out_pa_callback().set(FUNC(pc100_state::rtc_porta_w));
@@ -671,21 +672,21 @@ MACHINE_CONFIG_START(pc100_state::pc100)
m_fdc->intrq_wr_callback().set(FUNC(pc100_state::irqnmi_w));
m_fdc->drq_wr_callback().set(FUNC(pc100_state::drqnmi_w));
- MCFG_DEVICE_ADD("rtc", MSM58321, XTAL(32'768))
- MCFG_MSM58321_D0_HANDLER(WRITELINE(*this, pc100_state, rtc_portc_0_w))
- MCFG_MSM58321_D1_HANDLER(WRITELINE(*this, pc100_state, rtc_portc_1_w))
- MCFG_MSM58321_D2_HANDLER(WRITELINE(*this, pc100_state, rtc_portc_2_w))
- MCFG_MSM58321_D3_HANDLER(WRITELINE(*this, pc100_state, rtc_portc_3_w))
+ MSM58321(config, m_rtc, XTAL(32'768));
+ m_rtc->d0_handler().set(FUNC(pc100_state::rtc_portc_0_w));
+ m_rtc->d1_handler().set(FUNC(pc100_state::rtc_portc_1_w));
+ m_rtc->d2_handler().set(FUNC(pc100_state::rtc_portc_2_w));
+ m_rtc->d3_handler().set(FUNC(pc100_state::rtc_portc_3_w));
- MCFG_FLOPPY_DRIVE_ADD("upd765:0", pc100_floppies, "525dd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("upd765:1", pc100_floppies, "525dd", floppy_image_device::default_floppy_formats)
+ FLOPPY_CONNECTOR(config, "upd765:0", pc100_floppies, "525dd", floppy_image_device::default_floppy_formats);
+ FLOPPY_CONNECTOR(config, "upd765:1", pc100_floppies, "525dd", floppy_image_device::default_floppy_formats);
/* video hardware */
- MCFG_SCREEN_ADD("screen", RASTER)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
/* TODO: Unknown Pixel Clock and CRTC is dynamic */
- MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK*4, 1024, 0, 768, 264*2, 0, 512)
- MCFG_SCREEN_UPDATE_DRIVER(pc100_state, screen_update_pc100)
- MCFG_SCREEN_PALETTE("palette")
+ screen.set_raw(MASTER_CLOCK*4, 1024, 0, 768, 264*2, 0, 512);
+ screen.set_screen_update(FUNC(pc100_state::screen_update_pc100));
+ screen.set_palette(m_palette);
GFXDECODE(config, "gfxdecode", m_palette, gfx_pc100);
PALETTE(config, m_palette).set_format(palette_device::xBGR_333, 16);
@@ -693,7 +694,7 @@ MACHINE_CONFIG_START(pc100_state::pc100)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beeper, 2400).add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
/* ROM definition */
ROM_START( pc100 )