summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/bingor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/bingor.cpp')
-rw-r--r--src/mame/drivers/bingor.cpp80
1 files changed, 39 insertions, 41 deletions
diff --git a/src/mame/drivers/bingor.cpp b/src/mame/drivers/bingor.cpp
index e8af5057551..d8b6b5e6e7b 100644
--- a/src/mame/drivers/bingor.cpp
+++ b/src/mame/drivers/bingor.cpp
@@ -691,39 +691,37 @@ static GFXDECODE_START( gfx_bingor )
GFXDECODE_END
-MACHINE_CONFIG_START(bingor_state::bingor)
- MCFG_DEVICE_ADD("maincpu", I80186, XTAL(16'000'000))
- MCFG_DEVICE_PROGRAM_MAP(bingor_map)
- MCFG_DEVICE_IO_MAP(bingor_io)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(bingor_state, nmi_line_pulse, 30)
+void bingor_state::bingor(machine_config &config)
+{
+ I80186(config, m_maincpu, XTAL(16'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &bingor_state::bingor_map);
+ m_maincpu->set_addrmap(AS_IO, &bingor_state::bingor_io);
+ m_maincpu->set_periodic_int(FUNC(bingor_state::nmi_line_pulse), attotime::from_hz(30));
// Other interrupts generated by internal timers
- MCFG_DEVICE_ADD("pic", PIC16C57, 12000000) //?? Mhz
+ PIC16C57(config, "pic", 12000000); //?? Mhz
- MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_bingor)
+ GFXDECODE(config, "gfxdecode", m_palette, gfx_bingor);
// NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(400, 300)
- MCFG_SCREEN_VISIBLE_AREA(0, 400-1, 0, 300-1)
- MCFG_SCREEN_UPDATE_DRIVER(bingor_state, screen_update_bingor)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(400, 300);
+ screen.set_visarea(0, 400-1, 0, 300-1);
+ screen.set_screen_update(FUNC(bingor_state::screen_update_bingor));
- MCFG_PALETTE_ADD("palette", 0x100)
- MCFG_PALETTE_FORMAT(RRRRGGGGBBBBIIII)
+ PALETTE(config, m_palette, 0x100).set_format(PALETTE_FORMAT_RRRRGGGGBBBBIIII);
SPEAKER(config, "mono").front_center();
- MCFG_SAA1099_ADD("saa", 6000000 )
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
-MACHINE_CONFIG_END
+ SAA1099(config, "saa", 6000000).add_route(ALL_OUTPUTS, "mono", 0.50);
+}
-MACHINE_CONFIG_START(bingor_state::bingor2)
+void bingor_state::bingor2(machine_config &config)
+{
bingor(config);
- MCFG_DEVICE_MODIFY("maincpu")
- MCFG_DEVICE_PROGRAM_MAP(bingor2_map)
-MACHINE_CONFIG_END
-
+ m_maincpu->set_addrmap(AS_PROGRAM, &bingor_state::bingor2_map);
+}
void bingor_state::vip2000_map(address_map &map)
{
@@ -780,36 +778,36 @@ void bingor_state::slave_io(address_map &map)
map(0xc000, 0xcfff).ram();
}
-MACHINE_CONFIG_START(bingor_state::vip2000)
- MCFG_DEVICE_ADD("maincpu", I80186, XTAL(10'000'000))
- MCFG_DEVICE_PROGRAM_MAP(vip2000_map)
- MCFG_DEVICE_IO_MAP(vip2000_io)
- MCFG_DEVICE_PERIODIC_INT_DRIVER(bingor_state, nmi_line_pulse, 30)
+void bingor_state::vip2000(machine_config &config)
+{
+ I80186(config, m_maincpu, XTAL(10'000'000));
+ m_maincpu->set_addrmap(AS_PROGRAM, &bingor_state::vip2000_map);
+ m_maincpu->set_addrmap(AS_IO, &bingor_state::vip2000_io);
+ m_maincpu->set_periodic_int(FUNC(bingor_state::nmi_line_pulse), attotime::from_hz(30));
// Other interrupts generated by internal timers
ATMEL_49F4096(config, "flash");
- MCFG_DEVICE_ADD("slavecpu", I80C31, XTAL(11'059'200))
- MCFG_DEVICE_PROGRAM_MAP(slave_map)
- MCFG_DEVICE_IO_MAP(slave_io)
+ I80C31(config, m_slavecpu, XTAL(11'059'200));
+ m_slavecpu->set_addrmap(AS_PROGRAM, &bingor_state::slave_map);
+ m_slavecpu->set_addrmap(AS_IO, &bingor_state::slave_io);
- MCFG_DEVICE_ADD("rtc", MSM6242, XTAL(32'768))
+ MSM6242(config, "rtc", XTAL(32'768));
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
- MCFG_SCREEN_SIZE(400, 300)
- MCFG_SCREEN_VISIBLE_AREA(0, 400-1, 0, 300-1)
- MCFG_SCREEN_UPDATE_DRIVER(bingor_state, screen_update_bingor)
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
+ screen.set_refresh_hz(60);
+ screen.set_vblank_time(ATTOSECONDS_IN_USEC(0));
+ screen.set_size(400, 300);
+ screen.set_visarea(0, 400-1, 0, 300-1);
+ screen.set_screen_update(FUNC(bingor_state::screen_update_bingor));
- MCFG_PALETTE_ADD("palette", 0x100)
- MCFG_PALETTE_FORMAT(RRRRGGGGBBBBIIII)
+ PALETTE(config, m_palette, 0x100).set_format(PALETTE_FORMAT_RRRRGGGGBBBBIIII);
SPEAKER(config, "mono").front_center();
ymz284_device &ymz(YMZ284(config, "ymz", 1250000)); // probably clocked by square wave output of 80186 timer 0
ymz.add_route(ALL_OUTPUTS, "mono", 0.50);
-MACHINE_CONFIG_END
+}
// I doubt we need to load the eeproms