diff options
Diffstat (limited to 'src/devices/bus/snes/sgb.cpp')
-rw-r--r-- | src/devices/bus/snes/sgb.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/devices/bus/snes/sgb.cpp b/src/devices/bus/snes/sgb.cpp index 9556e29ab7b..1a50f504f01 100644 --- a/src/devices/bus/snes/sgb.cpp +++ b/src/devices/bus/snes/sgb.cpp @@ -161,18 +161,19 @@ static void supergb_cart(device_slot_interface &device) } -MACHINE_CONFIG_START(sns_rom_sgb1_device::device_add_mconfig) - MCFG_DEVICE_ADD("sgb_cpu", LR35902, 4295454) /* 4.295454 MHz */ - MCFG_DEVICE_PROGRAM_MAP(supergb_map) - MCFG_LR35902_TIMER_CB(WRITE8(*this, sns_rom_sgb_device, gb_timer_callback)) - MCFG_LR35902_HALT_BUG +void sns_rom_sgb1_device::device_add_mconfig(machine_config &config) +{ + LR35902(config, m_sgb_cpu, 4295454); /* 4.295454 MHz */ + m_sgb_cpu->set_addrmap(AS_PROGRAM, &sns_rom_sgb1_device::supergb_map); + m_sgb_cpu->timer_cb().set(FUNC(sns_rom_sgb_device::gb_timer_callback)); + m_sgb_cpu->set_halt_bug(true); - MCFG_DEVICE_ADD("sgb_ppu", SGB_PPU, "sgb_cpu") + SGB_PPU(config, m_sgb_ppu, m_sgb_cpu); - MCFG_DEVICE_ADD("sgb_apu", DMG_APU, 4295454) + DMG_APU(config, m_sgb_apu, 4295454); - MCFG_GB_CARTRIDGE_ADD("gb_slot", supergb_cart, nullptr) -MACHINE_CONFIG_END + GB_CART_SLOT(config, m_cartslot, supergb_cart, nullptr); +} ROM_START( supergb ) @@ -187,18 +188,19 @@ const tiny_rom_entry *sns_rom_sgb1_device::device_rom_region() const } -MACHINE_CONFIG_START(sns_rom_sgb2_device::device_add_mconfig) - MCFG_DEVICE_ADD("sgb_cpu", LR35902, XTAL(4'194'304)) /* 4.194MHz derived from clock on sgb2 pcb */ - MCFG_DEVICE_PROGRAM_MAP(supergb_map) - MCFG_LR35902_TIMER_CB(WRITE8(*this, sns_rom_sgb_device, gb_timer_callback)) - MCFG_LR35902_HALT_BUG +void sns_rom_sgb2_device::device_add_mconfig(machine_config &config) +{ + LR35902(config, m_sgb_cpu, XTAL(4'194'304)); /* 4.194MHz derived from clock on sgb2 pcb */ + m_sgb_cpu->set_addrmap(AS_PROGRAM, &sns_rom_sgb2_device::supergb_map); + m_sgb_cpu->timer_cb().set(FUNC(sns_rom_sgb_device::gb_timer_callback)); + m_sgb_cpu->set_halt_bug(true); - MCFG_DEVICE_ADD("sgb_ppu", SGB_PPU, "sgb_cpu") + SGB_PPU(config, m_sgb_ppu, m_sgb_cpu); - MCFG_DEVICE_ADD("sgb_apu", DMG_APU, XTAL(4'194'304)) + DMG_APU(config, m_sgb_apu, XTAL(4'194'304)); - MCFG_GB_CARTRIDGE_ADD("gb_slot", supergb_cart, nullptr) -MACHINE_CONFIG_END + GB_CART_SLOT(config, m_cartslot, supergb_cart, nullptr); +} ROM_START( supergb2 ) |