From 5ffbb7f4759a823c155bfc1aa0f5a561b7eed3e2 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 21 Nov 2020 20:09:41 +0100 Subject: various drivers: got rid of some MACHINE_*_MEMBER and VIDEO_*_MEMBER --- src/mame/drivers/alto2.cpp | 9 +++++++-- src/mame/drivers/calcune.cpp | 17 +++++++++-------- src/mame/drivers/cat.cpp | 34 +++++++++++++++++----------------- src/mame/drivers/elwro800.cpp | 12 ++++++++---- src/mame/drivers/firebeat.cpp | 29 +++++++++++++---------------- src/mame/drivers/konamigq.cpp | 7 +++++-- src/mame/drivers/m63.cpp | 29 +++++++++++++---------------- src/mame/drivers/namcos10.cpp | 6 ++---- src/mame/drivers/speglsht.cpp | 20 +++++++++++--------- src/mame/drivers/tosh1000.cpp | 14 +++++++++----- 10 files changed, 94 insertions(+), 83 deletions(-) (limited to 'src/mame') diff --git a/src/mame/drivers/alto2.cpp b/src/mame/drivers/alto2.cpp index b3cf0d8a09e..0d870659808 100644 --- a/src/mame/drivers/alto2.cpp +++ b/src/mame/drivers/alto2.cpp @@ -14,6 +14,8 @@ #include "rendlay.h" #include "speaker.h" +namespace { + class alto2_state : public driver_device { public: @@ -26,11 +28,13 @@ public: { } void init_alto2(); - DECLARE_MACHINE_RESET(alto2); void alto2(machine_config &config); protected: + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + +private: u16 kb_r(offs_t offset); void utilout_w(u16 data); @@ -40,7 +44,6 @@ protected: optional_ioport m_io_config; static const device_timer_id TIMER_VBLANK = 0; emu_timer* m_vblank_timer; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; /* Input Ports */ @@ -314,6 +317,8 @@ void alto2_state::device_timer(emu_timer &timer, device_timer_id id, int param, } } +} // Anonymous namespace + /* Game Drivers */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS diff --git a/src/mame/drivers/calcune.cpp b/src/mame/drivers/calcune.cpp index f58fbd9f63e..f0585b5e0ec 100644 --- a/src/mame/drivers/calcune.cpp +++ b/src/mame/drivers/calcune.cpp @@ -24,6 +24,8 @@ #include "emupal.h" #include "speaker.h" +namespace { + #define OSC1_CLOCK 53693175 // same as NTSC genesis / mega drive master clock class calcune_state : public driver_device @@ -39,6 +41,10 @@ public: void calcune(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + private: required_device m_maincpu; required_device_array m_vdp; @@ -49,9 +55,6 @@ private: WRITE_LINE_MEMBER(vdp_lv6irqline_callback_genesis_68k); WRITE_LINE_MEMBER(vdp_lv4irqline_callback_genesis_68k); - DECLARE_MACHINE_START(calcune); - DECLARE_MACHINE_RESET(calcune); - IRQ_CALLBACK_MEMBER(genesis_int_callback); uint16_t cal_700000_r(); @@ -197,7 +200,7 @@ uint32_t calcune_state::screen_update_calcune(screen_device &screen, bitmap_rgb3 return 0; } -MACHINE_RESET_MEMBER(calcune_state,calcune) +void calcune_state::machine_reset() { m_vdp[0]->device_reset_old(); m_vdp[1]->device_reset_old(); @@ -241,7 +244,7 @@ WRITE_LINE_MEMBER(calcune_state::vdp_lv4irqline_callback_genesis_68k) m_maincpu->set_input_line(4, CLEAR_LINE); } -MACHINE_START_MEMBER(calcune_state,calcune) +void calcune_state::machine_start() { m_vdp[0]->stop_timers(); m_vdp[1]->stop_timers(); @@ -257,9 +260,6 @@ void calcune_state::calcune(machine_config &config) Z80(config, "z80", OSC1_CLOCK / 15).set_disable(); /* 3.58 MHz, no code is ever uploaded for the Z80, so it's unused here even if it is present on the PCB */ - MCFG_MACHINE_START_OVERRIDE(calcune_state,calcune) - MCFG_MACHINE_RESET_OVERRIDE(calcune_state,calcune) - screen_device &screen(SCREEN(config, "megadriv", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(double(OSC1_CLOCK) / 10.0 / 262.0 / 342.0); // same as SMS? // screen.set_refresh_hz(double(OSC1_CLOCK) / 8.0 / 262.0 / 427.0); // or 427 Htotal? @@ -328,6 +328,7 @@ ROM_START( calcune ) ROM_LOAD( "sound4.4b.27c4001", 0x180000, 0x080000, CRC(61a8510b) SHA1(177e56c374aa5697545ede28140cb42b5a4b737b) ) ROM_END +} // Anonymous namespace GAME( 1996, calcune, 0, calcune, calcune, calcune_state, init_calcune, ROT0, "Yuvo", "Calcune (Japan, prototype)", 0 ) diff --git a/src/mame/drivers/cat.cpp b/src/mame/drivers/cat.cpp index 628fa66569f..18dbf71eb94 100644 --- a/src/mame/drivers/cat.cpp +++ b/src/mame/drivers/cat.cpp @@ -206,6 +206,8 @@ ToDo: #include "speaker.h" +namespace { + // Defines #undef DEBUG_GA2OPR_W @@ -267,6 +269,17 @@ public: m_dipsw(*this, "DIPSW1") { } + void cat(machine_config &config); + + void init_cat(); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + +private: required_device m_maincpu; //optional_device m_nvram; required_device m_duart; @@ -287,11 +300,6 @@ public: emu_timer *m_keyboard_timer; emu_timer *m_6ms_timer; - DECLARE_MACHINE_START(cat); - DECLARE_MACHINE_RESET(cat); - DECLARE_VIDEO_START(cat); - void init_cat(); - uint32_t screen_update_cat(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(cat_duart_irq_handler); @@ -356,12 +364,8 @@ public: //TIMER_CALLBACK_MEMBER(keyboard_callback); TIMER_CALLBACK_MEMBER(counter_6ms_callback); - void cat(machine_config &config); void cat_mem(address_map &map); void cpu_space_map(address_map &map); - -protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; }; // TODO: this init doesn't actually work yet! please fix me! @@ -922,7 +926,7 @@ void cat_state::cpu_space_map(address_map &map) map(0xfffff3, 0xfffff3).lr8(NAME([this]() { m_maincpu->set_input_line(1, CLEAR_LINE); return m68000_device::autovector(1); })); } -MACHINE_START_MEMBER(cat_state,cat) +void cat_state::machine_start() { m_duart_ktobf_ff = 0; // reset doesn't touch this m_duart_prn_ack_prev_state = 1; // technically uninitialized @@ -935,7 +939,7 @@ MACHINE_START_MEMBER(cat_state,cat) subdevice("nvram")->set_base(m_svram, 0x4000); } -MACHINE_RESET_MEMBER(cat_state,cat) +void cat_state::machine_reset() { m_6ms_counter = 0; m_wdt_counter = 0; @@ -943,7 +947,7 @@ MACHINE_RESET_MEMBER(cat_state,cat) m_6ms_timer->adjust(attotime::zero, 0, attotime::from_hz((XTAL(19'968'000)/2)/65536)); } -VIDEO_START_MEMBER(cat_state,cat) +void cat_state::video_start() { } @@ -1060,9 +1064,6 @@ void cat_state::cat(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &cat_state::cat_mem); m_maincpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &cat_state::cpu_space_map); - 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); @@ -1071,8 +1072,6 @@ void cat_state::cat(machine_config &config) screen.set_visarea_full(); screen.set_screen_update(FUNC(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)); @@ -1172,6 +1171,7 @@ ROM_START( cat ) */ ROM_END +} // Anonymous namespace /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ diff --git a/src/mame/drivers/elwro800.cpp b/src/mame/drivers/elwro800.cpp index 59b7d0c53c2..dfb9b0f50e0 100644 --- a/src/mame/drivers/elwro800.cpp +++ b/src/mame/drivers/elwro800.cpp @@ -34,6 +34,8 @@ #include "speaker.h" +namespace { + class elwro800_state : public spectrum_state { public: @@ -54,6 +56,9 @@ public: void elwro800(machine_config &config); +protected: + virtual void machine_reset() override; + private: /* for elwro800 */ /* RAM mapped at 0 */ @@ -66,7 +71,6 @@ private: void elwro800jr_fdc_control_w(uint8_t data); uint8_t elwro800jr_io_r(offs_t offset); void elwro800jr_io_w(offs_t offset, uint8_t data); - DECLARE_MACHINE_RESET(elwro800); INTERRUPT_GEN_MEMBER(elwro800jr_interrupt); uint8_t i8255_port_c_r(); void i8255_port_c_w(uint8_t data); @@ -513,7 +517,7 @@ INPUT_PORTS_END * *************************************/ -MACHINE_RESET_MEMBER(elwro800_state,elwro800) +void elwro800_state::machine_reset() { uint8_t *messram = m_ram->pointer(); @@ -568,8 +572,6 @@ void elwro800_state::elwro800(machine_config &config) m_maincpu->set_addrmap(AS_OPCODES, &elwro800_state::elwro800_m1); m_maincpu->set_vblank_int("screen", FUNC(elwro800_state::elwro800jr_interrupt)); - MCFG_MACHINE_RESET_OVERRIDE(elwro800_state,elwro800) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(14_MHz_XTAL / 2, 448, 0, SPEC_SCREEN_WIDTH, 312, 0, SPEC_SCREEN_HEIGHT); @@ -640,6 +642,8 @@ ROM_START( elwro800 ) ROM_LOAD( "tv_2716.e11", 0x0400, 0x0800, CRC(6093e80e) SHA1(a4972f336490d15222f4f24369f1f3253cfb9516) ) ROM_END +} // Anonymous namespace + /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS diff --git a/src/mame/drivers/firebeat.cpp b/src/mame/drivers/firebeat.cpp index eb7db475138..90b56c3594e 100644 --- a/src/mame/drivers/firebeat.cpp +++ b/src/mame/drivers/firebeat.cpp @@ -160,6 +160,8 @@ Keyboard Mania 2nd Mix - dongle, program CD, audio CD #include "firebeat.lh" +namespace { + struct IBUTTON_SUBKEY { uint8_t identifier[8]; @@ -200,6 +202,11 @@ public: void init_kbm(); void init_ppp(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: required_device m_maincpu; optional_device m_audiocpu; @@ -224,9 +231,6 @@ private: int m_ibutton_read_subkey_ptr; uint8_t m_ibutton_subkey_data[0x40]; - DECLARE_MACHINE_START(firebeat); - DECLARE_MACHINE_RESET(firebeat); - DECLARE_VIDEO_START(firebeat); uint32_t screen_update_firebeat_0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_firebeat_1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(firebeat_interrupt); @@ -283,7 +287,7 @@ private: -VIDEO_START_MEMBER(firebeat_state,firebeat) +void firebeat_state::video_start() { } @@ -821,7 +825,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(firebeat_state::spu_timer_callback) /*****************************************************************************/ -MACHINE_START_MEMBER(firebeat_state,firebeat) +void firebeat_state::machine_start() { /* set conservative DRC options */ m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS); @@ -1053,7 +1057,7 @@ WRITE_LINE_MEMBER(firebeat_state::gcu1_interrupt) m_maincpu->set_input_line(INPUT_LINE_IRQ0, state); } -MACHINE_RESET_MEMBER(firebeat_state,firebeat) +void firebeat_state::machine_reset() { m_layer = 0; } @@ -1082,9 +1086,6 @@ void firebeat_state::firebeat(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &firebeat_state::firebeat_map); m_maincpu->set_vblank_int("screen", FUNC(firebeat_state::firebeat_interrupt)); - MCFG_MACHINE_START_OVERRIDE(firebeat_state,firebeat) - MCFG_MACHINE_RESET_OVERRIDE(firebeat_state,firebeat) - RTC65271(config, "rtc", 0); FUJITSU_29F016A(config, "flash_main"); @@ -1109,8 +1110,6 @@ void firebeat_state::firebeat(machine_config &config) screen.set_screen_update(FUNC(firebeat_state::screen_update_firebeat_0)); screen.set_palette("palette"); - MCFG_VIDEO_START_OVERRIDE(firebeat_state,firebeat) - /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -1138,9 +1137,6 @@ void firebeat_state::firebeat2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &firebeat_state::firebeat2_map); m_maincpu->set_vblank_int("lscreen", FUNC(firebeat_state::firebeat_interrupt)); - MCFG_MACHINE_START_OVERRIDE(firebeat_state,firebeat) - MCFG_MACHINE_RESET_OVERRIDE(firebeat_state,firebeat) - RTC65271(config, "rtc", 0); FUJITSU_29F016A(config, "flash_main"); @@ -1176,8 +1172,6 @@ void firebeat_state::firebeat2(machine_config &config) rscreen.set_screen_update(FUNC(firebeat_state::screen_update_firebeat_1)); rscreen.set_palette("palette"); - MCFG_VIDEO_START_OVERRIDE(firebeat_state,firebeat) - /* sound hardware */ SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); @@ -1725,6 +1719,9 @@ ROM_START( bm3final ) DISK_IMAGE_READONLY( "gcc01jca02", 0, SHA1(823e29bab11cb67069d822f5ffb2b90b9d3368d2) ) ROM_END +} // Anonymous namespace + + /*****************************************************************************/ GAME( 2000, ppp, 0, firebeat, ppp, firebeat_state, init_ppp, ROT0, "Konami", "ParaParaParadise", MACHINE_NOT_WORKING) diff --git a/src/mame/drivers/konamigq.cpp b/src/mame/drivers/konamigq.cpp index aa267fb0c26..ac8710e431e 100644 --- a/src/mame/drivers/konamigq.cpp +++ b/src/mame/drivers/konamigq.cpp @@ -85,6 +85,8 @@ #include "speaker.h" +namespace { + class konamigq_state : public driver_device { public: @@ -121,8 +123,6 @@ private: uint8_t pcmram_r(offs_t offset); uint16_t tms57002_status_word_r(); void tms57002_control_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_MACHINE_START(konamigq); - DECLARE_MACHINE_RESET(konamigq); INTERRUPT_GEN_MEMBER(tms_sync); DECLARE_WRITE_LINE_MEMBER(k054539_irq_gen); @@ -459,4 +459,7 @@ ROM_START( cryptklr ) DISK_IMAGE( "420uaa04", 0, SHA1(67cb1418fc0de2a89fc61847dc9efb9f1bebb347) ) ROM_END +} // Anonymous namespace + + GAME( 1995, cryptklr, 0, konamigq, konamigq, konamigq_state, empty_init, ROT0, "Konami", "Crypt Killer (GQ420 UAA)", 0 ) diff --git a/src/mame/drivers/m63.cpp b/src/mame/drivers/m63.cpp index fd16f60b23a..0d899dea2ea 100644 --- a/src/mame/drivers/m63.cpp +++ b/src/mame/drivers/m63.cpp @@ -129,6 +129,8 @@ Dip locations verified for: #include "speaker.h" #include "tilemap.h" +namespace { + class m63_state : public driver_device { public: @@ -157,6 +159,11 @@ public: void init_wilytowr(); void init_fghtbskt(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: required_shared_ptr m_spriteram; required_shared_ptr m_scrollram; @@ -210,9 +217,6 @@ private: DECLARE_WRITE_LINE_MEMBER(nmi_mask_w); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - DECLARE_MACHINE_START(m63); - DECLARE_MACHINE_RESET(m63); - DECLARE_VIDEO_START(m63); void m63_palette(palette_device &palette) const; uint32_t screen_update_m63(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(snd_irq); @@ -333,7 +337,7 @@ TILE_GET_INFO_MEMBER(m63_state::get_fg_tile_info) tileinfo.set(0, code, 0, m_fg_flag); } -VIDEO_START_MEMBER(m63_state,m63) +void m63_state::video_start() { m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(m63_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(m63_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); @@ -726,7 +730,7 @@ INTERRUPT_GEN_MEMBER(m63_state::snd_irq) m_sound_irq = 1; } -MACHINE_START_MEMBER(m63_state,m63) +void m63_state::machine_start() { save_item(NAME(m_pal_bank)); save_item(NAME(m_fg_flag)); @@ -739,7 +743,7 @@ MACHINE_START_MEMBER(m63_state,m63) save_item(NAME(m_p2)); } -MACHINE_RESET_MEMBER(m63_state,m63) +void m63_state::machine_reset() { m_pal_bank = 0; m_fg_flag = 0; @@ -778,9 +782,6 @@ void m63_state::m63(machine_config &config) m_soundcpu->t1_in_cb().set(FUNC(m63_state::irq_r)); m_soundcpu->set_periodic_int(FUNC(m63_state::snd_irq), attotime::from_hz(60)); - MCFG_MACHINE_START_OVERRIDE(m63_state,m63) - MCFG_MACHINE_RESET_OVERRIDE(m63_state,m63) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -793,8 +794,6 @@ void m63_state::m63(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_m63); PALETTE(config, m_palette, FUNC(m63_state::m63_palette), 256+4); - MCFG_VIDEO_START_OVERRIDE(m63_state,m63) - /* sound hardware */ SPEAKER(config, "mono").front_center(); /* ????? */ @@ -827,9 +826,6 @@ void m63_state::fghtbskt(machine_config &config) m_soundcpu->set_addrmap(AS_IO, &m63_state::i8039_port_map); m_soundcpu->set_periodic_int(FUNC(m63_state::snd_irq), attotime::from_hz(60/2)); - MCFG_MACHINE_START_OVERRIDE(m63_state,m63) - MCFG_MACHINE_RESET_OVERRIDE(m63_state,m63) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -842,8 +838,6 @@ void m63_state::fghtbskt(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_fghtbskt); PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); - MCFG_VIDEO_START_OVERRIDE(m63_state,m63) - /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -1041,6 +1035,9 @@ void m63_state::init_fghtbskt() m_sy_offset = 240; } +} // Anonymous namespace + + GAME( 1984, wilytowr, 0, m63, wilytowr, m63_state, init_wilytowr, ROT180, "Irem", "Wily Tower", MACHINE_SUPPORTS_SAVE ) GAME( 1985, atomboy, wilytowr, atomboy, wilytowr, m63_state, init_wilytowr, ROT180, "Irem (Memetron license)", "Atomic Boy (revision B)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, atomboya, wilytowr, atomboy, wilytowr, m63_state, init_wilytowr, ROT180, "Irem (Memetron license)", "Atomic Boy (revision A)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/namcos10.cpp b/src/mame/drivers/namcos10.cpp index 306c43ed4be..c7dd8a4f708 100644 --- a/src/mame/drivers/namcos10.cpp +++ b/src/mame/drivers/namcos10.cpp @@ -455,6 +455,7 @@ public: protected: virtual void machine_start() override; + virtual void machine_reset() override; private: // memm variant interface @@ -513,7 +514,6 @@ private: void i2c_update(); - DECLARE_MACHINE_RESET(namcos10); void memn_driver_init( ); required_device m_maincpu; optional_device m_exio_mcu; @@ -943,7 +943,7 @@ void namcos10_state::init_konotako() } -MACHINE_RESET_MEMBER(namcos10_state,namcos10) +void namcos10_state::machine_reset() { i2c_dev_clock = i2c_dev_data = 1; i2c_host_clock = i2c_host_data = 1; @@ -964,8 +964,6 @@ void namcos10_state::namcos10_base(machine_config &config) // wipes all handlers after 1fc80000, which kills the system // afterwards - MCFG_MACHINE_RESET_OVERRIDE(namcos10_state, namcos10) - /* video hardware */ CXD8561CQ(config, "gpu", XTAL(53'693'175), 0x200000, subdevice("maincpu")).set_screen("screen"); // 2 54V25632s diff --git a/src/mame/drivers/speglsht.cpp b/src/mame/drivers/speglsht.cpp index 03e67016e09..272225facc2 100644 --- a/src/mame/drivers/speglsht.cpp +++ b/src/mame/drivers/speglsht.cpp @@ -111,6 +111,8 @@ Notes: #include "cpu/mips/mips1.h" #include +namespace { + class speglsht_state : public driver_device { public: @@ -129,6 +131,11 @@ public: void init_speglsht(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: required_device m_palette; required_device m_maincpu; @@ -150,9 +157,6 @@ private: uint32_t cop_r(offs_t offset); uint32_t irq_ack_clear(); - DECLARE_MACHINE_RESET(speglsht); - virtual void machine_start() override; - DECLARE_VIDEO_START(speglsht); uint32_t screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void st0016_rom_bank_w(uint8_t data); @@ -361,15 +365,14 @@ static GFXDECODE_START( gfx_speglsht ) GFXDECODE_END -MACHINE_RESET_MEMBER(speglsht_state,speglsht) +void speglsht_state::machine_reset() { std::fill(&m_shared[0],&m_shared[m_shared.bytes()],0); } -VIDEO_START_MEMBER(speglsht_state,speglsht) +void speglsht_state::video_start() { m_bitmap = std::make_unique(512, 512); -// VIDEO_START_CALL_MEMBER(st0016); } #define PLOT_PIXEL_RGB(x,y,r,g,b) if(y>=0 && x>=0 && x<512 && y<512) \ @@ -425,7 +428,6 @@ void speglsht_state::speglsht(machine_config &config) m_subcpu->set_vblank_int("screen", FUNC(speglsht_state::irq4_line_assert)); config.set_maximum_quantum(attotime::from_hz(6000)); - MCFG_MACHINE_RESET_OVERRIDE(speglsht_state,speglsht) /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -437,8 +439,6 @@ void speglsht_state::speglsht(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfx_speglsht); PALETTE(config, m_palette).set_entries(16*16*4+1); - - MCFG_VIDEO_START_OVERRIDE(speglsht_state,speglsht) } ROM_START( speglsht ) @@ -463,5 +463,7 @@ void speglsht_state::init_speglsht() m_maincpu->set_game_flag(3); } +} // Anonymous namespace + GAME( 1994, speglsht, 0, speglsht, speglsht, speglsht_state, init_speglsht, ROT0, "Seta", "Super Eagle Shot", MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/drivers/tosh1000.cpp b/src/mame/drivers/tosh1000.cpp index 692f2b979f2..36819410383 100644 --- a/src/mame/drivers/tosh1000.cpp +++ b/src/mame/drivers/tosh1000.cpp @@ -57,6 +57,9 @@ //#define LOG_OUTPUT_FUNC printf #include "logmacro.h" + +namespace { + #define LOGKBD(...) LOGMASKED(LOG_KEYBOARD, __VA_ARGS__) #define LOGDBG(...) LOGMASKED(LOG_DEBUG, __VA_ARGS__) @@ -75,9 +78,10 @@ public: void init_tosh1000(); -private: - DECLARE_MACHINE_RESET(tosh1000); +protected: + virtual void machine_reset() override; +private: void romdos_bank_w(uint8_t data); void bram_w(offs_t offset, uint8_t data); @@ -106,7 +110,7 @@ void tosh1000_state::init_tosh1000() { } -MACHINE_RESET_MEMBER(tosh1000_state, tosh1000) +void tosh1000_state::machine_reset() { m_bram_latch = false; m_bram_offset = 0; @@ -261,8 +265,6 @@ void tosh1000_state::tosh1000(machine_config &config) ADDRESS_MAP_BANK(config, "bankdev").set_map(&tosh1000_state::tosh1000_romdos).set_options(ENDIANNESS_LITTLE, 8, 20, 0x10000); - MCFG_MACHINE_RESET_OVERRIDE(tosh1000_state, tosh1000) - ibm5160_mb_device &mb(IBM5160_MOTHERBOARD(config, "mb", 0)); mb.set_cputag(m_maincpu); mb.int_callback().set_inputline(m_maincpu, 0); @@ -302,6 +304,8 @@ ROM_START( tosh1000 ) ROM_LOAD("5788005.u33", 0x00000, 0x2000, CRC(0bf56d70) SHA1(c2a8b10808bf51a3c123ba3eb1e9dd608231916f)) /* "AMI 8412PI // 5788005 // (C) IBM CORP. 1981 // KOREA" */ ROM_END +} // Anonymous namespace + // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 1987, tosh1000, ibm5150, 0, tosh1000, 0, tosh1000_state, init_tosh1000, "Toshiba", "Toshiba T1000", MACHINE_IS_SKELETON ) -- cgit v1.2.3