diff options
Diffstat (limited to 'src/mame/drivers/hec2hrp.cpp')
-rw-r--r-- | src/mame/drivers/hec2hrp.cpp | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/src/mame/drivers/hec2hrp.cpp b/src/mame/drivers/hec2hrp.cpp index 520d5b35120..1d92b4396a1 100644 --- a/src/mame/drivers/hec2hrp.cpp +++ b/src/mame/drivers/hec2hrp.cpp @@ -303,18 +303,21 @@ static INPUT_PORTS_START( hec2hrp ) PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END -void hec2hrp_state::machine_start_hec2hrp() +/*****************************************************************************/ +MACHINE_START_MEMBER(hec2hrp_state,hec2hrp) +/*****************************************************************************/ { hector_init(); } -void hec2hrp_state::machine_reset_hec2hrp() +MACHINE_RESET_MEMBER(hec2hrp_state,hec2hrp) { // Machines init hector_reset(1, 0); } - -void hec2hrp_state::machine_start_hec2hrx() +/*****************************************************************************/ +MACHINE_START_MEMBER(hec2hrp_state,hec2hrx) +/*****************************************************************************/ { uint8_t *RAM = memregion("maincpu" )->base(); // pointer to mess ram //Patch rom possible ! @@ -345,8 +348,9 @@ void hec2hrp_state::machine_start_hec2hrx() hector_init(); } - -void hec2hrp_state::machine_start_hec2mdhrx() +/*****************************************************************************/ +MACHINE_START_MEMBER(hec2hrp_state,hec2mdhrx) +/*****************************************************************************/ //minidisc { uint8_t *RAM = memregion("maincpu" )->base(); // pointer to mess ram @@ -369,8 +373,7 @@ void hec2hrp_state::machine_start_hec2mdhrx() hector_init(); } - -void hec2hrp_state::machine_reset_hec2hrx() +MACHINE_RESET_MEMBER(hec2hrp_state,hec2hrx) { //Hector Memory membank("bank1")->set_entry(HECTOR_BANK_PROG); @@ -382,9 +385,8 @@ void hec2hrp_state::machine_reset_hec2hrx() hector_reset(1, 1); hector_disc2_reset(); } - //minidisc -void hec2hrp_state::machine_reset_hec2mdhrx() +MACHINE_RESET_MEMBER(hec2hrp_state,hec2mdhrx) { //Hector Memory membank("bank1")->set_entry(HECTOR_BANK_PROG); @@ -416,8 +418,8 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hr) MCFG_DEVICE_PROGRAM_MAP(hec2hrp_mem) MCFG_DEVICE_IO_MAP(hec2hrp_io) MCFG_DEVICE_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) /* put on the Z80 irq in Hz*/ - set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_hec2hrp, this)); - set_machine_start_cb(config, driver_callback_delegate(&machine_start_hec2hrp, this)); + MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrp) + MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrp) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -429,7 +431,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hr) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16) - set_video_start_cb(config, driver_callback_delegate(&video_start_hec2hrp, this)); + MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) hector_audio(config); @@ -451,8 +453,8 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrp) MCFG_DEVICE_PROGRAM_MAP(hec2hrp_mem) MCFG_DEVICE_IO_MAP(hec2hrp_io) MCFG_DEVICE_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) /* put on the Z80 irq in Hz*/ - set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_hec2hrp, this)); - set_machine_start_cb(config, driver_callback_delegate(&machine_start_hec2hrp, this)); + MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrp) + MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrp) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -464,7 +466,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrp) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16) - set_video_start_cb(config, driver_callback_delegate(&video_start_hec2hrp, this)); + MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) hector_audio(config); @@ -501,8 +503,8 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx40) MCFG_UPD765_DRQ_CALLBACK(WRITELINE(*this, hec2hrp_state, disc2_fdc_dma_irq)) MCFG_FLOPPY_DRIVE_ADD("upd765:0", hector_floppies, "525hd", floppy_image_device::default_floppy_formats) MCFG_FLOPPY_DRIVE_ADD("upd765:1", hector_floppies, "525hd", floppy_image_device::default_floppy_formats) - set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_hec2hrx, this)); - set_machine_start_cb(config, driver_callback_delegate(&machine_start_hec2hrx, this)); + MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx) + MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -514,7 +516,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx40) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16) - set_video_start_cb(config, driver_callback_delegate(&video_start_hec2hrp, this)); + MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) hector_audio(config); @@ -535,8 +537,8 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrx) MCFG_DEVICE_PROGRAM_MAP(hec2hrx_mem) MCFG_DEVICE_IO_MAP(hec2hrx_io) MCFG_DEVICE_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) // put on the Z80 irq in Hz - set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_hec2hrx, this)); - set_machine_start_cb(config, driver_callback_delegate(&machine_start_hec2hrx, this)); + MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx) + MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx) /* Disc II unit */ MCFG_DEVICE_ADD("disc2cpu",Z80, XTAL(4'000'000)) @@ -558,7 +560,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2hrx) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16) - set_video_start_cb(config, driver_callback_delegate(&video_start_hec2hrp, this)); + MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) hector_audio(config); @@ -580,8 +582,8 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mdhrx) MCFG_DEVICE_PROGRAM_MAP(hec2hrx_mem) MCFG_DEVICE_IO_MAP(hec2mdhrx_io) MCFG_DEVICE_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) // put on the Z80 irq in Hz - set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_hec2mdhrx, this)); - set_machine_start_cb(config, driver_callback_delegate(&machine_start_hec2mdhrx, this)); + MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2mdhrx) + MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2mdhrx) /* Mini Disc */ MCFG_FD1793_ADD("wd179x", XTAL(1'000'000)) @@ -597,9 +599,9 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mdhrx) MCFG_SCREEN_UPDATE_DRIVER(hec2hrp_state, screen_update_hec2hrp) MCFG_SCREEN_PALETTE("palette") - set_video_start_cb(config, driver_callback_delegate(&video_start_hec2hrp, this)); + MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) MCFG_PALETTE_ADD("palette", 16) - set_video_start_cb(config, driver_callback_delegate(&video_start_hec2hrp, this)); // TODO: Perhaps this should be video_reset? + MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) hector_audio(config); @@ -621,8 +623,8 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx80) MCFG_DEVICE_PROGRAM_MAP(hec2hrx_mem) MCFG_DEVICE_IO_MAP(hec2mx80_io) MCFG_DEVICE_PERIODIC_INT_DRIVER(hec2hrp_state, irq0_line_hold, 50) // put on the Z80 irq in Hz - set_machine_reset_cb(config, driver_callback_delegate(&machine_reset_hec2hrx, this)); - set_machine_start_cb(config, driver_callback_delegate(&machine_start_hec2hrx, this)); + MCFG_MACHINE_RESET_OVERRIDE(hec2hrp_state,hec2hrx) + MCFG_MACHINE_START_OVERRIDE(hec2hrp_state,hec2hrx) /* Disc II unit */ MCFG_DEVICE_ADD("disc2cpu",Z80, XTAL(4'000'000)) @@ -644,7 +646,7 @@ MACHINE_CONFIG_START(hec2hrp_state::hec2mx80) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16) - set_video_start_cb(config, driver_callback_delegate(&video_start_hec2hrp, this)); + MCFG_VIDEO_START_OVERRIDE(hec2hrp_state,hec2hrp) hector_audio(config); |