From 03707c72c6d31bcd3d55f0a92f41fb8ddd717540 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 26 Nov 2020 20:05:46 +0100 Subject: [PATCH] adp, chinagat, ddragon, divebomb, gberet, lastbank, lsasquad, m10, mcr68: removed MACHINE_*_MEMBER and VIDEO_START_MEMBER --- src/devices/machine/tc009xlvc.cpp | 1 + src/mame/drivers/adp.cpp | 21 +-- src/mame/drivers/chinagat.cpp | 25 ++- src/mame/drivers/ddragon.cpp | 21 +-- src/mame/drivers/divebomb.cpp | 9 +- src/mame/drivers/gberet.cpp | 12 +- src/mame/drivers/lastbank.cpp | 16 +- src/mame/drivers/lsasquad.cpp | 12 +- src/mame/drivers/m10.cpp | 257 ++++++++++++++---------------- src/mame/drivers/mcr68.cpp | 4 - src/mame/includes/ddragon.h | 27 +--- src/mame/includes/divebomb.h | 8 +- src/mame/includes/gberet.h | 8 +- src/mame/includes/lsasquad.h | 5 +- src/mame/includes/m10.h | 147 ++++++++++------- src/mame/includes/mcr68.h | 18 +-- src/mame/machine/mcr68.cpp | 10 +- src/mame/video/ddragon.cpp | 2 +- src/mame/video/divebomb.cpp | 2 +- src/mame/video/gberet.cpp | 2 +- src/mame/video/m10.cpp | 56 +++---- src/mame/video/mcr68.cpp | 2 +- 22 files changed, 314 insertions(+), 351 deletions(-) diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp index c4a2db2c18d..1b0a779f3fd 100644 --- a/src/devices/machine/tc009xlvc.cpp +++ b/src/devices/machine/tc009xlvc.cpp @@ -244,6 +244,7 @@ void tc0090lvc_device::device_start() bg_tilemap[0]->set_scrolldy(m_tilemap_yoffs, m_tilemap_flipped_yoffs); bg_tilemap[1]->set_scrolldy(m_tilemap_yoffs, m_tilemap_flipped_yoffs); + save_item(NAME(m_bg_scroll)); save_item(NAME(m_irq_vector)); save_item(NAME(m_irq_enable)); save_item(NAME(m_ram_bank)); diff --git a/src/mame/drivers/adp.cpp b/src/mame/drivers/adp.cpp index 0407021c9da..df35b00170e 100644 --- a/src/mame/drivers/adp.cpp +++ b/src/mame/drivers/adp.cpp @@ -109,7 +109,7 @@ Parts: TL7705ACP - Supply Voltage Supervisor TC428CPA - Dual CMOS High-speed Driver L4974A - ST 3.5A Switching Regulator - OO - LEDs (red); "Fehelerdiagnose siehe Fehlertable" + OO - LEDs (red); "Fehlerdiagnose siehe Fehlertable" Connectors: @@ -117,7 +117,7 @@ Connectors: P1 - Türöffnungen [1-6] P2 - PSG In/Out [1-6] P3 - Lautsprecher [1-6] - P6 - Service - Test gerät [1-6] + P6 - Service - Test Gerät [1-6] P7 - Maschine [1-8] P8 - Münzeinheit [1-8] P9 - Akzeptor [1-4] @@ -169,6 +169,8 @@ Quick Jack administration/service mode: #include "speaker.h" +namespace { + class adp_state : public driver_device { public: @@ -190,6 +192,10 @@ public: void funland(machine_config &config); void skattva(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + private: required_device m_microtouch; required_device m_maincpu; @@ -205,8 +211,6 @@ private: /* devices */ uint16_t input_r(); void input_w(uint16_t data); - DECLARE_MACHINE_START(skattv); - DECLARE_MACHINE_RESET(skattv); void adp_palette(palette_device &device) const; void fstation_palette(palette_device &device) const; //INTERRUPT_GEN_MEMBER(adp_int); @@ -253,12 +257,12 @@ void adp_state::fc7_map(address_map &map) map(0xfffff9, 0xfffff9).r(m_duart, FUNC(mc68681_device::get_irq_vector)); } -MACHINE_START_MEMBER(adp_state,skattv) +void adp_state::machine_start() { save_item(NAME(m_mux_data)); } -MACHINE_RESET_MEMBER(adp_state,skattv) +void adp_state::machine_reset() { m_mux_data = 0; } @@ -541,9 +545,6 @@ void adp_state::quickjac(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &adp_state::quickjac_mem); m_maincpu->set_addrmap(m68000_device::AS_CPU_SPACE, &adp_state::fc7_map); - MCFG_MACHINE_START_OVERRIDE(adp_state,skattv) - MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv) - MC68681(config, m_duart, XTAL(8'664'000) / 2); m_duart->irq_cb().set_inputline(m_maincpu, M68K_IRQ_4); m_duart->a_tx_cb().set(m_microtouch, FUNC(microtouch_device::rx)); @@ -705,6 +706,8 @@ ROM_START( fstation ) ROM_LOAD16_BYTE( "spielekoffer_video_9_sp_f1.ii", 0x00001, 0x80000, CRC(64138dcb) SHA1(1b629915cba32f8f6164ae5075c175b522b4a323) ) ROM_END +} // Anonymous namespace + GAME( 1993, quickjac, 0, quickjac, quickjac, adp_state, empty_init, ROT0, "ADP", "Quick Jack", MACHINE_NOT_WORKING ) GAME( 1994, skattv, 0, skattv, skattv, adp_state, empty_init, ROT0, "ADP", "Skat TV", MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/chinagat.cpp b/src/mame/drivers/chinagat.cpp index e5726b28b30..41d1a73d96f 100644 --- a/src/mame/drivers/chinagat.cpp +++ b/src/mame/drivers/chinagat.cpp @@ -179,7 +179,7 @@ ROMs 23J8-0 - gfx2 mask ROM 23J9-0 - gfx2 mask ROM 23JA-0 - gfx2 mask ROM - TJR-100 - gfx3 custom ROM (undump) + TJR-100 - gfx3 custom ROM (undumped) SRAMs (2KBx8bits) Motorola MCM2016HN55, SANYO LC3517? IC7 - ? @@ -257,6 +257,8 @@ M2H - /% \_____/ duty 1:1, 1.5MHz #include "speaker.h" +namespace { + #define MAIN_CLOCK XTAL(12'000'000) #define PIXEL_CLOCK MAIN_CLOCK / 2 @@ -280,6 +282,17 @@ protected: virtual void video_start() override; private: + // for Sai Yu Gou Ma Roku + int m_adpcm_addr; + int m_i8748_P1; + int m_i8748_P2; + int m_pcm_shift; + int m_pcm_nibble; + int m_mcu_command; +#if 0 + int m_m5205_clk; +#endif + TIMER_DEVICE_CALLBACK_MEMBER(chinagat_scanline); void interrupt_w(offs_t offset, uint8_t data); void video_ctrl_w(uint8_t data); @@ -307,8 +320,6 @@ private: void chinagat_state::video_start() { - ddragon_state::video_start(); - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(chinagat_state::get_bg_tile_info)), tilemap_mapper_delegate(*this, FUNC(chinagat_state::background_scan)), 16, 16, 32, 32); m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(chinagat_state::get_fg_16color_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); @@ -484,7 +495,7 @@ void chinagat_state::saiyugoub1_adpcm_control_w(uint8_t data) m_i8748_P2 = data; } -void chinagat_state::saiyugoub1_m5205_clk_w(uint8_t data) +[[maybe_unused]] void chinagat_state::saiyugoub1_m5205_clk_w(uint8_t data) { /* i8748 T0 output clk mode */ /* This signal goes through a divide by 8 counter */ @@ -705,8 +716,6 @@ GFXDECODE_END void chinagat_state::machine_start() { - ddragon_state::machine_start(); - /* configure banks */ membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); @@ -728,8 +737,6 @@ void chinagat_state::machine_start() void chinagat_state::machine_reset() { - ddragon_state::machine_reset(); - m_scrollx_hi = 0; m_scrolly_hi = 0; m_adpcm_sound_irq = 0; @@ -1100,6 +1107,8 @@ void chinagat_state::init_chinagat() membank("bank4")->configure_entries(0, 6, &SUB[0x10000], 0x4000); } +} // Anonymous namespace + // ( YEAR NAME PARENT MACHINE INPUT STATE INIT MONITOR COMPANY FULLNAME FLAGS ) */ GAME( 1988, chinagat, 0, chinagat, chinagat, chinagat_state, init_chinagat, ROT0, "Technos Japan (Taito / Romstar license)", "China Gate (US)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp index 155b040507d..f5c7ab93fe7 100644 --- a/src/mame/drivers/ddragon.cpp +++ b/src/mame/drivers/ddragon.cpp @@ -126,11 +126,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(ddragon_state::ddragon_scanline) /************************************* * - * System setup and intialization + * System setup and initialization * *************************************/ -MACHINE_START_MEMBER(ddragon_state,ddragon) +void ddragon_state::machine_start() { /* configure banks */ if (m_mainbank) @@ -147,7 +147,7 @@ MACHINE_START_MEMBER(ddragon_state,ddragon) } -MACHINE_RESET_MEMBER(ddragon_state,ddragon) +void ddragon_state::machine_reset() { m_scrollx_hi = 0; m_scrolly_hi = 0; @@ -969,9 +969,6 @@ void ddragon_state::ddragon(machine_config &config) config.set_maximum_quantum(attotime::from_hz(60000)); /* heavy interleaving to sync up sprite<->main CPUs */ - MCFG_MACHINE_START_OVERRIDE(ddragon_state,ddragon) - MCFG_MACHINE_RESET_OVERRIDE(ddragon_state,ddragon) - /* video hardware */ GFXDECODE(config, m_gfxdecode, m_palette, gfx_ddragon); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 512); @@ -981,8 +978,6 @@ void ddragon_state::ddragon(machine_config &config) m_screen->set_screen_update(FUNC(ddragon_state::screen_update_ddragon)); m_screen->set_palette(m_palette); - MCFG_VIDEO_START_OVERRIDE(ddragon_state,ddragon) - /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -1051,9 +1046,6 @@ void ddragon_state::ddragon6809(machine_config &config) config.set_maximum_quantum(attotime::from_hz(60000)); /* heavy interleaving to sync up sprite<->main CPUs */ - MCFG_MACHINE_START_OVERRIDE(ddragon_state,ddragon) - MCFG_MACHINE_RESET_OVERRIDE(ddragon_state,ddragon) - /* video hardware */ GFXDECODE(config, m_gfxdecode, m_palette, gfx_ddragon); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 512); @@ -1063,8 +1055,6 @@ void ddragon_state::ddragon6809(machine_config &config) m_screen->set_screen_update(FUNC(ddragon_state::screen_update_ddragon)); m_screen->set_palette(m_palette); - MCFG_VIDEO_START_OVERRIDE(ddragon_state,ddragon) - /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -1103,9 +1093,6 @@ void ddragon_state::ddragon2(machine_config &config) config.set_maximum_quantum(attotime::from_hz(60000)); /* heavy interleaving to sync up sprite<->main CPUs */ - MCFG_MACHINE_START_OVERRIDE(ddragon_state,ddragon) - MCFG_MACHINE_RESET_OVERRIDE(ddragon_state,ddragon) - /* video hardware */ GFXDECODE(config, m_gfxdecode, m_palette, gfx_ddragon); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 512); @@ -1115,8 +1102,6 @@ void ddragon_state::ddragon2(machine_config &config) m_screen->set_screen_update(FUNC(ddragon_state::screen_update_ddragon)); m_screen->set_palette(m_palette); - MCFG_VIDEO_START_OVERRIDE(ddragon_state,ddragon) - /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/divebomb.cpp b/src/mame/drivers/divebomb.cpp index aaf70faceee..a526097dc86 100644 --- a/src/mame/drivers/divebomb.cpp +++ b/src/mame/drivers/divebomb.cpp @@ -428,11 +428,6 @@ void divebomb_state::divebomb(machine_config &config) m_k051316[1]->set_offsets(-88, -16); m_k051316[1]->set_zoom_callback(FUNC(divebomb_state::zoom_callback_2)); - MCFG_MACHINE_START_OVERRIDE(divebomb_state, divebomb) - MCFG_MACHINE_RESET_OVERRIDE(divebomb_state, divebomb) - - MCFG_VIDEO_START_OVERRIDE(divebomb_state, divebomb) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -538,7 +533,7 @@ ROM_END * *************************************/ -MACHINE_START_MEMBER(divebomb_state, divebomb) +void divebomb_state::machine_start() { m_rozbank->configure_entries(0, 16, memregion("rozcpudata")->base(), 0x4000); @@ -547,7 +542,7 @@ MACHINE_START_MEMBER(divebomb_state, divebomb) } -MACHINE_RESET_MEMBER(divebomb_state, divebomb) +void divebomb_state::machine_reset() { for (int chip = 0; chip < 2; chip++) { diff --git a/src/mame/drivers/gberet.cpp b/src/mame/drivers/gberet.cpp index c188ccbb6ed..f01e7c5de1f 100644 --- a/src/mame/drivers/gberet.cpp +++ b/src/mame/drivers/gberet.cpp @@ -394,14 +394,14 @@ GFXDECODE_END * *************************************/ -MACHINE_START_MEMBER(gberet_state,gberet) +void gberet_state::machine_start() { save_item(NAME(m_interrupt_mask)); save_item(NAME(m_interrupt_ticks)); save_item(NAME(m_spritebank)); } -MACHINE_RESET_MEMBER(gberet_state,gberet) +void gberet_state::machine_reset() { m_interrupt_mask = 0; m_interrupt_ticks = 0; @@ -416,9 +416,6 @@ void gberet_state::gberet(machine_config &config) TIMER(config, "scantimer").configure_scanline(FUNC(gberet_state::gberet_interrupt_tick), "screen", 0, 16); WATCHDOG_TIMER(config, "watchdog"); - MCFG_MACHINE_START_OVERRIDE(gberet_state,gberet) - MCFG_MACHINE_RESET_OVERRIDE(gberet_state,gberet) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60.60); @@ -430,7 +427,6 @@ void gberet_state::gberet(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_gberet); PALETTE(config, m_palette, FUNC(gberet_state::gberet_palette), 2*16*16, 32); - MCFG_VIDEO_START_OVERRIDE(gberet_state,gberet) /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -454,9 +450,6 @@ void gberet_state::gberetb(machine_config &config) m_maincpu->set_vblank_int("screen", FUNC(gberet_state::irq0_line_assert)); m_maincpu->set_periodic_int(FUNC(gberet_state::nmi_line_assert), attotime::from_hz(XTAL(20'000'000)/0x8000)); // divider guessed - MCFG_MACHINE_START_OVERRIDE(gberet_state,gberet) - MCFG_MACHINE_RESET_OVERRIDE(gberet_state,gberet) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -468,7 +461,6 @@ void gberet_state::gberetb(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_gberetb); PALETTE(config, m_palette, FUNC(gberet_state::gberet_palette), 2*16*16, 32); - MCFG_VIDEO_START_OVERRIDE(gberet_state,gberet) /* sound hardware */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp index 14378890980..2a63b1f0b04 100644 --- a/src/mame/drivers/lastbank.cpp +++ b/src/mame/drivers/lastbank.cpp @@ -30,6 +30,8 @@ #include "speaker.h" +namespace { + #define MASTER_CLOCK XTAL(14'318'181) class lastbank_state : public driver_device @@ -47,13 +49,15 @@ public: DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r); +protected: + virtual void machine_start() override; + private: required_device m_maincpu; required_device m_vdp; required_device m_oki; required_device m_essnd; - virtual void machine_start() override; DECLARE_WRITE_LINE_MEMBER(screen_vblank); uint8_t m_mux_data; @@ -405,9 +409,6 @@ void lastbank_state::lastbank(machine_config &config) config.set_perfect_quantum(m_maincpu); - //MCFG_MACHINE_START_OVERRIDE(lastbank_state,lastbank) - //MCFG_MACHINE_RESET_OVERRIDE(lastbank_state,lastbank) - /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -421,8 +422,6 @@ void lastbank_state::lastbank(machine_config &config) TC0091LVC(config, m_vdp, 0); m_vdp->set_tilemap_xoffs(0,192); // TODO: correct? -// MCFG_VIDEO_START_OVERRIDE(lastbank_state,lastbank) - /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -469,4 +468,7 @@ ROM_START( lastbank ) ROM_LOAD( "7.u60", 0x00000, 0x80000, CRC(41be7146) SHA1(00f1c0d5809efccf888e27518a2a5876c4b633d8) ) ROM_END -GAME( 1994, lastbank, 0, lastbank, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Last Bank (v1.16)", 0 ) +} // Anonymous namespace + + +GAME( 1994, lastbank, 0, lastbank, lastbank, lastbank_state, empty_init, ROT0, "Excellent System", "Last Bank (v1.16)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/lsasquad.cpp b/src/mame/drivers/lsasquad.cpp index 50071777976..db0d3fbd082 100644 --- a/src/mame/drivers/lsasquad.cpp +++ b/src/mame/drivers/lsasquad.cpp @@ -543,17 +543,13 @@ void lsasquad_state::unk(uint8_t data) { } -MACHINE_START_MEMBER(lsasquad_state,lsasquad) +void lsasquad_state::machine_start() { uint8_t *ROM = memregion("maincpu")->base(); membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x2000); } -MACHINE_RESET_MEMBER(lsasquad_state,lsasquad) -{ -} - /* Note: lsasquad clock values are not verified */ void lsasquad_state::lsasquad(machine_config &config) { @@ -572,9 +568,6 @@ void lsasquad_state::lsasquad(machine_config &config) /* synchronization of the CPUs */ /* main<->sound synchronization depends on this */ - MCFG_MACHINE_START_OVERRIDE(lsasquad_state,lsasquad) - MCFG_MACHINE_RESET_OVERRIDE(lsasquad_state,lsasquad) - GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>)); @@ -637,9 +630,6 @@ void lsasquad_state::daikaiju(machine_config &config) /* synchronization of the CPUs */ /* main<->sound synchronization depends on this */ - MCFG_MACHINE_START_OVERRIDE(lsasquad_state,lsasquad) - MCFG_MACHINE_RESET_OVERRIDE(lsasquad_state,lsasquad) - GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set("soundnmi", FUNC(input_merger_device::in_w<0>)); diff --git a/src/mame/drivers/m10.cpp b/src/mame/drivers/m10.cpp index 7036bac2103..564bce40d46 100644 --- a/src/mame/drivers/m10.cpp +++ b/src/mame/drivers/m10.cpp @@ -139,7 +139,7 @@ WRITE_LINE_MEMBER(m10_state::ic8j1_output_changed) WRITE_LINE_MEMBER(m10_state::ic8j2_output_changed) { - /* written from /Q to A with slight delight */ + // written from /Q to A with slight delight LOG(("ic8j2: %d\n", state)); m_ic8j2->a_w(state); m_ic8j1->a_w(state); @@ -151,7 +151,7 @@ WRITE_LINE_MEMBER(m10_state::ic8j2_output_changed) * *************************************/ -void m10_state::m10_palette(palette_device &palette) const +void m1x_state::palette(palette_device &palette) const { for (int i = 0; i < 0x10; i++) { @@ -160,22 +160,31 @@ void m10_state::m10_palette(palette_device &palette) const } } -MACHINE_START_MEMBER(m10_state,m10) +void m1x_state::machine_start() { - m_interrupt_timer = timer_alloc(TIMER_INTERRUPT); + m_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(interrupt_callback), this)); - save_item(NAME(m_bottomline)); save_item(NAME(m_flip)); save_item(NAME(m_last)); } -MACHINE_RESET_MEMBER(m10_state,m10) +void m10_state::machine_start() +{ + m1x_state::machine_start(); + save_item(NAME(m_bottomline)); +} + +void m1x_state::machine_reset() { - m_bottomline = 0; m_flip = 0; m_last = 0; } +void m10_state::machine_reset() +{ + m1x_state::machine_reset(); + m_bottomline = 0; +} /************************************* * * I/O handling @@ -208,50 +217,50 @@ void m10_state::m10_ctrl_w(uint8_t data) popmessage("ctrl: %02x",data); #endif - /* I have NO IDEA if this is correct or not */ + // I have NO IDEA if this is correct or not m_bottomline = ~data & 0x20; - if (ioport("CAB")->read() & 0x01) + if (m_cab->read() & 0x01) m_flip = ~data & 0x10; - if (!(ioport("CAB")->read() & 0x02)) + if (!(m_cab->read() & 0x02)) machine().sound().system_mute(data & 0x80); - /* sound command in lower 4 bytes */ + // sound command in lower 4 bytes switch (data & 0x07) { case 0x00: - /* no sound mapped */ + // no sound mapped break; case 0x01: - /* MISSILE sound */ + // MISSILE sound m_samples->start(0, 0); break; case 0x02: - /* EXPLOSION sound */ + // EXPLOSION sound m_samples->start(1, 1); break; case 0x03: - /* INVADER HIT sound */ + // INVADER HIT sound m_samples->start(2, 2); break; case 0x04: - /* BONUS BASE sound */ + // BONUS BASE sound m_samples->start(3, 8); break; case 0x05: - /* FLEET MOVE sound */ + // FLEET MOVE sound m_samples->start(3, 3); break; case 0x06: - /* SAUCER HIT SOUND */ + // SAUCER HIT SOUND m_samples->start(2, 7); break; default: popmessage("Unknown sound M10: %02x\n", data & 0x07); break; } - /* UFO SOUND */ + // UFO SOUND if (data & 0x08) m_samples->stop(4); else @@ -285,10 +294,10 @@ void m10_state::m11_ctrl_w(uint8_t data) m_bottomline = ~data & 0x20; - if (ioport("CAB")->read() & 0x01) + if (m_cab->read() & 0x01) m_flip = ~data & 0x10; - if (!(ioport("CAB")->read() & 0x02)) + if (!(m_cab->read() & 0x02)) machine().sound().system_mute(data & 0x80); } @@ -307,15 +316,15 @@ void m10_state::m11_ctrl_w(uint8_t data) * Will be updated only in attract mode */ -void m10_state::m15_ctrl_w(uint8_t data) +void m15_state::ctrl_w(uint8_t data) { #if M10_DEBUG if (data & 0xf0) popmessage("M15 ctrl: %02x",data); #endif - if (ioport("CAB")->read() & 0x01) + if (m_cab->read() & 0x01) m_flip = ~data & 0x04; - if (!(ioport("CAB")->read() & 0x02)) + if (!(m_cab->read() & 0x02)) machine().sound().system_mute(data & 0x08); } @@ -355,19 +364,19 @@ void m10_state::m11_a100_w(uint8_t data) m_last = data; // audio control! - /* MISSILE sound */ + // MISSILE sound if (raising_bits & 0x01) m_samples->start(0, 0); - /* EXPLOSION sound */ + // EXPLOSION sound if (raising_bits & 0x02) m_samples->start(1, 1); - /* Rapidly falling parachute */ + // Rapidly falling parachute if (raising_bits & 0x04) m_samples->start(3, 8); - /* Background sound ? */ + // Background sound ? if (data & 0x10) m_samples->start(4, 9, true); else @@ -375,7 +384,7 @@ void m10_state::m11_a100_w(uint8_t data) } -void m10_state::m15_a100_w(uint8_t data) +void m15_state::a100_w(uint8_t data) { //int raising_bits = data & ~m_last; int falling_bits = ~data & m_last; @@ -397,7 +406,7 @@ void m10_state::m15_a100_w(uint8_t data) if ((m_last & 0x82) != (data & 0x82)) popmessage("A100: %02x\n", data); #endif - /* DOT sound */ + // DOT sound if (falling_bits & 0x40) m_samples->start(0, 0); #if 0 @@ -405,7 +414,7 @@ void m10_state::m15_a100_w(uint8_t data) m_samples->stop(0); #endif - /* EXPLOSION sound */ + // EXPLOSION sound if (falling_bits & 0x08) m_samples->start(1, 1); #if 0 @@ -413,7 +422,7 @@ void m10_state::m15_a100_w(uint8_t data) m_samples->stop(1); #endif - /* player changes lane */ + // player changes lane if (falling_bits & 0x10) m_samples->start(3, 3); #if 0 @@ -421,7 +430,7 @@ void m10_state::m15_a100_w(uint8_t data) m_samples->stop(3); #endif - /* computer car changes lane */ + // computer car changes lane if (falling_bits & 0x20) m_samples->start(4, 4); #if 0 @@ -457,14 +466,14 @@ uint8_t m10_state::m11_a700_r() * *************************************/ -INPUT_CHANGED_MEMBER(m10_state::coin_inserted) +INPUT_CHANGED_MEMBER(m1x_state::coin_inserted) { - /* coin insertion causes an NMI */ + // coin insertion causes an NMI m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE); } -TIMER_CALLBACK_MEMBER(m10_state::interrupt_callback) +TIMER_CALLBACK_MEMBER(m1x_state::interrupt_callback) { if (param == 0) { @@ -480,18 +489,6 @@ TIMER_CALLBACK_MEMBER(m10_state::interrupt_callback) m_maincpu->set_input_line(0, CLEAR_LINE); } -void m10_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) -{ - switch (id) - { - case TIMER_INTERRUPT: - interrupt_callback(ptr, param); - break; - default: - throw emu_fatalerror("Unknown id in m10_state::device_timer"); - } -} - #if 0 INTERRUPT_GEN_MEMBER(m10_state::m11_interrupt) { @@ -505,7 +502,7 @@ INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt) } #endif -INTERRUPT_GEN_MEMBER(m10_state::m15_interrupt) +INTERRUPT_GEN_MEMBER(m15_state::interrupt) { device.execute().set_input_line(0, ASSERT_LINE); m_interrupt_timer->adjust(m_screen->time_until_pos(IREMM10_VBSTART + 1, 80), -1); @@ -519,47 +516,47 @@ INTERRUPT_GEN_MEMBER(m10_state::m15_interrupt) void m10_state::m10_main(address_map &map) { - map(0x0000, 0x02ff).ram().share("memory"); /* scratch ram */ + map(0x0000, 0x02ff).ram(); // scratch ram map(0x1000, 0x2fff).rom(); - map(0x4000, 0x43ff).ram().share("videoram"); - map(0x4800, 0x4bff).ram().w(FUNC(m10_state::m10_colorram_w)).share("colorram"); /* foreground colour */ - map(0x5000, 0x53ff).ram().w(FUNC(m10_state::m10_chargen_w)).share("chargen"); /* background ????? */ + map(0x4000, 0x43ff).ram().share(m_videoram); + map(0x4800, 0x4bff).ram().w(FUNC(m10_state::colorram_w)).share(m_colorram); // foreground colour + map(0x5000, 0x53ff).ram().w(FUNC(m10_state::chargen_w)).share(m_chargen); // background ????? map(0xa200, 0xa200).portr("DSW"); map(0xa300, 0xa300).portr("INPUTS"); - map(0xa400, 0xa400).w(FUNC(m10_state::m10_ctrl_w)); /* line at bottom of screen?, sound, flip screen */ - map(0xa500, 0xa500).w(FUNC(m10_state::m10_a500_w)); /* ??? */ + map(0xa400, 0xa400).w(FUNC(m10_state::m10_ctrl_w)); // line at bottom of screen?, sound, flip screen + map(0xa500, 0xa500).w(FUNC(m10_state::m10_a500_w)); // ??? map(0xa700, 0xa700).r(FUNC(m10_state::m10_a700_r)); - map(0xfc00, 0xffff).rom(); /* for the reset / interrupt vectors */ + map(0xfc00, 0xffff).rom(); // for the reset / interrupt vectors } void m10_state::m11_main(address_map &map) { - map(0x0000, 0x02ff).ram().share("memory"); /* scratch ram */ + map(0x0000, 0x02ff).ram(); // scratch ram map(0x1000, 0x2fff).rom(); - map(0x4000, 0x43ff).ram().share("videoram"); - map(0x4800, 0x4bff).ram().w(FUNC(m10_state::m10_colorram_w)).share("colorram"); /* foreground colour */ - map(0x5000, 0x53ff).ram().share("chargen"); /* background ????? */ - map(0xa100, 0xa100).w(FUNC(m10_state::m11_a100_w)); /* sound writes ???? */ + map(0x4000, 0x43ff).ram().share(m_videoram); + map(0x4800, 0x4bff).ram().w(FUNC(m10_state::colorram_w)).share(m_colorram); // foreground colour + map(0x5000, 0x53ff).ram().share(m_chargen); // background ????? + map(0xa100, 0xa100).w(FUNC(m10_state::m11_a100_w)); // sound writes ???? map(0xa200, 0xa200).portr("DSW"); map(0xa300, 0xa300).portr("INPUTS"); - map(0xa400, 0xa400).w(FUNC(m10_state::m11_ctrl_w)); /* line at bottom of screen?, sound, flip screen */ + map(0xa400, 0xa400).w(FUNC(m10_state::m11_ctrl_w)); // line at bottom of screen?, sound, flip screen map(0xa700, 0xa700).r(FUNC(m10_state::m11_a700_r)); - map(0xfc00, 0xffff).rom(); /* for the reset / interrupt vectors */ + map(0xfc00, 0xffff).rom(); // for the reset / interrupt vectors } -void m10_state::m15_main(address_map &map) +void m15_state::m15_main(address_map &map) { - map(0x0000, 0x02ff).ram().share("memory"); /* scratch ram */ + map(0x0000, 0x02ff).ram(); // scratch ram map(0x1000, 0x33ff).rom(); - map(0x4000, 0x43ff).ram().share("videoram"); - map(0x4800, 0x4bff).ram().w(FUNC(m10_state::m10_colorram_w)).share("colorram"); /* foreground colour */ - map(0x5000, 0x57ff).ram().w(FUNC(m10_state::m15_chargen_w)).share("chargen"); /* background ????? */ + map(0x4000, 0x43ff).ram().share(m_videoram); + map(0x4800, 0x4bff).ram().w(FUNC(m15_state::colorram_w)).share(m_colorram); // foreground colour + map(0x5000, 0x57ff).ram().w(FUNC(m15_state::chargen_w)).share(m_chargen); // background ????? map(0xa000, 0xa000).portr("P2"); - map(0xa100, 0xa100).w(FUNC(m10_state::m15_a100_w)); /* sound writes ???? */ + map(0xa100, 0xa100).w(FUNC(m15_state::a100_w)); // sound writes ???? map(0xa200, 0xa200).portr("DSW"); map(0xa300, 0xa300).portr("P1"); - map(0xa400, 0xa400).w(FUNC(m10_state::m15_ctrl_w)); /* sound, flip screen */ - map(0xfc00, 0xffff).rom(); /* for the reset / interrupt vectors */ + map(0xa400, 0xa400).w(FUNC(m15_state::ctrl_w)); // sound, flip screen + map(0xfc00, 0xffff).rom(); // for the reset / interrupt vectors } /************************************* @@ -616,7 +613,7 @@ static INPUT_PORTS_START( skychut ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_START("FAKE") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state, coin_inserted, 0) CAB_PORTENV INPUT_PORTS_END @@ -657,7 +654,7 @@ static INPUT_PORTS_START( ipminvad ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_START("FAKE") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state, coin_inserted, 0) CAB_PORTENV INPUT_PORTS_END @@ -691,7 +688,7 @@ static INPUT_PORTS_START( spacbeam ) PORT_DIPSETTING ( 0x20, DEF_STR( 1C_2C ) ) PORT_START("FAKE") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state, coin_inserted, 0) CAB_PORTENV INPUT_PORTS_END @@ -746,7 +743,7 @@ static INPUT_PORTS_START( headoni ) // PORT_ADJUSTER( 50, "Master Volume" ) PORT_START("FAKE") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state, coin_inserted, 0) CAB_PORTENV INPUT_PORTS_END @@ -784,7 +781,7 @@ static INPUT_PORTS_START( greenber ) PORT_DIPSETTING ( 0x10, DEF_STR( 1C_2C ) ) PORT_START("FAKE") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state,coin_inserted, 0) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state, coin_inserted, 0) CAB_PORTENV INPUT_PORTS_END @@ -800,13 +797,13 @@ INPUT_PORTS_END static const gfx_layout charlayout = { - 8,8, /* 8*8 characters */ - 256, /* 256 characters */ - 1, /* 1 bits per pixel */ + 8,8, // 8*8 characters + 256, // 256 characters + 1, // 1 bits per pixel { 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 /* every char takes 8 consecutive bytes */ + 8*8 // every char takes 8 consecutive bytes }; @@ -823,16 +820,16 @@ GFXDECODE_END static const char *const m10_sample_names[] = { "*ipminvad", - "1", /* shot/missle */ - "2", /* base hit/explosion */ - "3", /* invader hit */ - "4", /* fleet move 1 */ - "5", /* fleet move 2 */ - "6", /* fleet move 3 */ - "7", /* fleet move 4 */ - "8", /* UFO/saucer hit */ - "9", /* bonus base */ - "0", /* UFO sound */ + "1", // shot/missile + "2", // base hit/explosion + "3", // invader hit + "4", // fleet move 1 + "5", // fleet move 2 + "6", // fleet move 3 + "7", // fleet move 4 + "8", // UFO/saucer hit + "9", // bonus base + "0", // UFO sound nullptr }; @@ -844,46 +841,39 @@ static const char *const m10_sample_names[] = void m10_state::m10(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware M6502(config, m_maincpu, IREMM10_CPU_CLOCK); m_maincpu->set_addrmap(AS_PROGRAM, &m10_state::m10_main); - MCFG_MACHINE_START_OVERRIDE(m10_state,m10) - MCFG_MACHINE_RESET_OVERRIDE(m10_state,m10) - - /* video hardware */ + // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(IREMM10_PIXEL_CLOCK, IREMM10_HTOTAL, IREMM10_HBEND, IREMM10_HBSTART, IREMM10_VTOTAL, IREMM10_VBEND, IREMM10_VBSTART); - m_screen->set_screen_update(FUNC(m10_state::screen_update_m10)); + m_screen->set_screen_update(FUNC(m10_state::screen_update)); m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_m10); - PALETTE(config, m_palette, FUNC(m10_state::m10_palette), 2 * 8); + PALETTE(config, m_palette, FUNC(m10_state::palette), 2 * 8); - MCFG_VIDEO_START_OVERRIDE(m10_state,m10) - - /* 74LS123 */ - - TTL74123(config, m_ic8j1, 0); /* completely illegible */ - m_ic8j1->set_connection_type(TTL74123_NOT_GROUNDED_DIODE); /* the hook up type */ - m_ic8j1->set_resistor_value(RES_K(1)); /* resistor connected to RCext */ - m_ic8j1->set_capacitor_value(CAP_U(1)); /* capacitor connected to Cext and RCext */ - m_ic8j1->set_a_pin_value(1); /* A pin - driven by the CRTC */ - m_ic8j1->set_b_pin_value(1); /* B pin - pulled high */ - m_ic8j1->set_clear_pin_value(1); /* Clear pin - pulled high */ + TTL74123(config, m_ic8j1, 0); // completely illegible + m_ic8j1->set_connection_type(TTL74123_NOT_GROUNDED_DIODE); // the hook up type + m_ic8j1->set_resistor_value(RES_K(1)); // resistor connected to RCext + m_ic8j1->set_capacitor_value(CAP_U(1)); // capacitor connected to Cext and RCext + m_ic8j1->set_a_pin_value(1); // A pin - driven by the CRTC + m_ic8j1->set_b_pin_value(1); // B pin - pulled high + m_ic8j1->set_clear_pin_value(1); // Clear pin - pulled high m_ic8j1->out_cb().set(FUNC(m10_state::ic8j1_output_changed)); TTL74123(config, m_ic8j2, 0); - m_ic8j2->set_connection_type(TTL74123_NOT_GROUNDED_DIODE); /* the hook up type */ - /* 10k + 20k variable resistor */ - m_ic8j2->set_resistor_value(RES_K(22)); /* resistor connected to RCext */ - m_ic8j2->set_capacitor_value(CAP_U(2.2)); /* capacitor connected to Cext and RCext */ - m_ic8j2->set_a_pin_value(1); /* A pin - driven by the CRTC */ - m_ic8j2->set_b_pin_value(1); /* B pin - pulled high */ - m_ic8j2->set_clear_pin_value(1); /* Clear pin - pulled high */ + m_ic8j2->set_connection_type(TTL74123_NOT_GROUNDED_DIODE); // the hook up type + // 10k + 20k variable resistor + m_ic8j2->set_resistor_value(RES_K(22)); // resistor connected to RCext + m_ic8j2->set_capacitor_value(CAP_U(2.2)); // capacitor connected to Cext and RCext + m_ic8j2->set_a_pin_value(1); // A pin - driven by the CRTC + m_ic8j2->set_b_pin_value(1); // B pin - pulled high + m_ic8j2->set_clear_pin_value(1); // Clear pin - pulled high m_ic8j2->out_cb().set(FUNC(m10_state::ic8j2_output_changed)); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); SAMPLES(config, m_samples); @@ -896,32 +886,27 @@ void m10_state::m11(machine_config &config) { m10(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &m10_state::m11_main); } -void m10_state::m15(machine_config &config) +void m15_state::m15(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware M6502(config, m_maincpu, IREMM15_CPU_CLOCK); - m_maincpu->set_addrmap(AS_PROGRAM, &m10_state::m15_main); - m_maincpu->set_vblank_int("screen", FUNC(m10_state::m15_interrupt)); + m_maincpu->set_addrmap(AS_PROGRAM, &m15_state::m15_main); + m_maincpu->set_vblank_int("screen", FUNC(m15_state::interrupt)); - MCFG_MACHINE_START_OVERRIDE(m10_state,m10) - MCFG_MACHINE_RESET_OVERRIDE(m10_state,m10) - - /* video hardware */ + // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(IREMM15_PIXEL_CLOCK, IREMM15_HTOTAL, IREMM15_HBEND, IREMM15_HBSTART, IREMM15_VTOTAL, IREMM15_VBEND, IREMM15_VBSTART); - m_screen->set_screen_update(FUNC(m10_state::screen_update_m15)); + m_screen->set_screen_update(FUNC(m15_state::screen_update)); m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty); - PALETTE(config, m_palette, FUNC(m10_state::m10_palette), 2 * 8); + PALETTE(config, m_palette, FUNC(m15_state::palette), 2 * 8); - MCFG_VIDEO_START_OVERRIDE(m10_state, m15) - - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); SAMPLES(config, m_samples); @@ -930,7 +915,7 @@ void m10_state::m15(machine_config &config) m_samples->add_route(ALL_OUTPUTS, "mono", 1.0); } -void m10_state::headoni(machine_config &config) +void m15_state::headoni(machine_config &config) { m15(config); m_maincpu->set_clock(11730000/16); @@ -1048,9 +1033,9 @@ ROM_START( greenber ) ROM_END GAME( 1979, ipminvad, 0, m10, ipminvad, m10_state, empty_init, ROT270, "IPM", "IPM Invader (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) -GAME( 1979, ipminvad1, ipminvad, m10, ipminvad, m10_state, empty_init, ROT270, "IPM", "IPM Invader (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // incomplete dump -GAME( 1980, andromed, 0, m11, skychut, m10_state, empty_init, ROT270, "Irem", "Andromeda SS (Japan?)", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // incomplete dump, export version known as simply "Andromeda" +GAME( 1979, ipminvad1, ipminvad, m10, ipminvad, m10_state, empty_init, ROT270, "IPM", "IPM Invader (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // incomplete dump +GAME( 1980, andromed, 0, m11, skychut, m10_state, empty_init, ROT270, "Irem", "Andromeda SS (Japan?)", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // incomplete dump, export version known as simply "Andromeda" GAME( 1980, skychut, 0, m11, skychut, m10_state, empty_init, ROT270, "Irem", "Sky Chuter", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) -GAME( 1979, headoni, 0, headoni, headoni, m10_state, empty_init, ROT270, "Irem", "Head On (Irem, M-15 Hardware)", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) -GAME( 1979, spacbeam, 0, m15, spacbeam, m10_state, empty_init, ROT270, "Irem", "Space Beam", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) // IPM or Irem? -GAME( 1980, greenber, 0, m15, greenber, m10_state, empty_init, ROT270, "Irem", "Green Beret (Irem)", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1979, headoni, 0, headoni, headoni, m15_state, empty_init, ROT270, "Irem", "Head On (Irem, M-15 Hardware)", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1979, spacbeam, 0, m15, spacbeam, m15_state, empty_init, ROT270, "Irem", "Space Beam", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) // IPM or Irem? +GAME( 1980, greenber, 0, m15, greenber, m15_state, empty_init, ROT270, "Irem", "Green Beret (Irem)", MACHINE_NO_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/mcr68.cpp b/src/mame/drivers/mcr68.cpp index f343bbd22b5..ea061eda6b0 100644 --- a/src/mame/drivers/mcr68.cpp +++ b/src/mame/drivers/mcr68.cpp @@ -918,8 +918,6 @@ void mcr68_state::mcr68(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &mcr68_state::mcr68_map); WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 8); - MCFG_MACHINE_START_OVERRIDE(mcr68_state,mcr68) - MCFG_MACHINE_RESET_OVERRIDE(mcr68_state,mcr68) PTM6840(config, m_ptm, 7723800 / 10); m_ptm->irq_callback().set_inputline("maincpu", 2); @@ -938,8 +936,6 @@ void mcr68_state::mcr68(machine_config &config) GFXDECODE(config, m_gfxdecode, "palette", gfx_mcr68); PALETTE(config, "palette").set_format(palette_device::xRBG_333, 64); - MCFG_VIDEO_START_OVERRIDE(mcr68_state,mcr68) - /* sound hardware -- determined by specific machine */ SPEAKER(config, "speaker").front_center(); } diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h index 98b0e720947..31b1ef43dcd 100644 --- a/src/mame/includes/ddragon.h +++ b/src/mame/includes/ddragon.h @@ -33,7 +33,6 @@ public: , m_gfxdecode(*this, "gfxdecode") , m_soundlatch(*this, "soundlatch") , m_mainbank(*this, "mainbank") - , m_rambase(*this, "rambase") , m_bgvideoram(*this, "bgvideoram") , m_fgvideoram(*this, "fgvideoram") , m_comram(*this, "comram") @@ -58,6 +57,10 @@ public: DECLARE_READ_LINE_MEMBER(subcpu_bus_free_r); protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + required_device m_maincpu; required_device m_soundcpu; optional_device m_subcpu; @@ -67,7 +70,6 @@ protected: required_device m_soundlatch; optional_memory_bank m_mainbank; - optional_shared_ptr m_rambase; /* video-related */ tilemap_t *m_fg_tilemap; @@ -85,17 +87,6 @@ protected: bool m_adpcm_idle[2]; int m_adpcm_data[2]; - /* for Sai Yu Gou Ma Roku */ - int m_adpcm_addr; - int m_i8748_P1; - int m_i8748_P2; - int m_pcm_shift; - int m_pcm_nibble; - int m_mcu_command; -#if 0 - int m_m5205_clk; -#endif - void ddragon_bgvideoram_w(offs_t offset, uint8_t data); void ddragon_fgvideoram_w(offs_t offset, uint8_t data); @@ -127,14 +118,10 @@ private: void ddragon_interrupt_ack(offs_t offset, uint8_t data); void dd_adpcm_int(int chip); - /* video/ddragon.c */ + /* video/ddragon.cpp */ TILE_GET_INFO_MEMBER(get_fg_tile_info); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - DECLARE_MACHINE_START(ddragon); - DECLARE_MACHINE_RESET(ddragon); - DECLARE_VIDEO_START(ddragon); - TIMER_DEVICE_CALLBACK_MEMBER(ddragon_scanline); void ddragon_bankswitch_w(uint8_t data); @@ -171,6 +158,7 @@ public: : ddragon_state(mconfig, type, tag) , m_mcu(*this, "mcu") , m_darktowr_bank(*this, "darktowr_bank") + , m_rambase(*this, "rambase") , m_mcu_port_a_out(0xff) { } @@ -189,7 +177,8 @@ private: void darktowr_banked_map(address_map &map); required_device m_mcu; - optional_device m_darktowr_bank; + required_device m_darktowr_bank; + required_shared_ptr m_rambase; uint8_t m_mcu_port_a_out; }; diff --git a/src/mame/includes/divebomb.h b/src/mame/includes/divebomb.h index 7c144f67d3b..01beecc17c8 100644 --- a/src/mame/includes/divebomb.h +++ b/src/mame/includes/divebomb.h @@ -43,6 +43,11 @@ public: void divebomb(machine_config &config); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: required_device m_spritecpu; required_device m_fgcpu; @@ -62,9 +67,6 @@ private: uint8_t m_roz_pal; bool m_roz_enable[2]; - DECLARE_MACHINE_RESET(divebomb); - DECLARE_MACHINE_START(divebomb); - DECLARE_VIDEO_START(divebomb); void divebomb_palette(palette_device &palette) const; void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/gberet.h b/src/mame/includes/gberet.h index 09847ce3223..37d795d225b 100644 --- a/src/mame/includes/gberet.h +++ b/src/mame/includes/gberet.h @@ -38,6 +38,11 @@ public: void init_mrgoemon(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: /* memory pointers */ required_shared_ptr m_colorram; @@ -70,9 +75,6 @@ private: void gberet_sprite_bank_w(uint8_t data); void gberetb_scroll_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); - DECLARE_MACHINE_START(gberet); - DECLARE_MACHINE_RESET(gberet); - DECLARE_VIDEO_START(gberet); void gberet_palette(palette_device &palette) const; uint32_t screen_update_gberet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_gberetb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/lsasquad.h b/src/mame/includes/lsasquad.h index c6f38e111f5..ac9680b8c9a 100644 --- a/src/mame/includes/lsasquad.h +++ b/src/mame/includes/lsasquad.h @@ -28,6 +28,9 @@ public: void daikaiju(machine_config &config); void storming(machine_config &config); +protected: + virtual void machine_start() override; + private: /* memory pointers */ required_shared_ptr m_videoram; @@ -54,8 +57,6 @@ private: uint8_t lsasquad_mcu_status_r(); uint8_t daikaiju_mcu_status_r(); void unk(uint8_t data); - DECLARE_MACHINE_START(lsasquad); - DECLARE_MACHINE_RESET(lsasquad); uint32_t screen_update_lsasquad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_daikaiju(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(nmi_callback); diff --git a/src/mame/includes/m10.h b/src/mame/includes/m10.h index 6e900eb7038..1f31eef7a24 100644 --- a/src/mame/includes/m10.h +++ b/src/mame/includes/m10.h @@ -38,101 +38,124 @@ #define IREMM15_VBSTART (240) #define IREMM15_VBEND (16) -class m10_state : public driver_device +class m1x_state : public driver_device { public: - m10_state(const machine_config &mconfig, device_type type, const char *tag) : + m1x_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_memory(*this, "memory"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_chargen(*this, "chargen"), m_maincpu(*this, "maincpu"), - m_ic8j1(*this, "ic8j1"), - m_ic8j2(*this, "ic8j2"), m_samples(*this, "samples"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_cab(*this, "CAB") { } - void m15(machine_config &config); - void headoni(machine_config &config); - void m10(machine_config &config); - void m11(machine_config &config); - - void init_andromed(); - void init_ipminva1(); - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); -private: - enum - { - TIMER_INTERRUPT - }; +protected: + virtual void machine_start() override; + virtual void machine_reset() override; - /* memory pointers */ - required_shared_ptr m_memory; + void colorram_w(offs_t offset, uint8_t data); + + // memory pointers required_shared_ptr m_videoram; required_shared_ptr m_colorram; required_shared_ptr m_chargen; - /* video-related */ - tilemap_t * m_tx_tilemap; - gfx_element * m_back_gfx; - - /* this is currently unused, because it is needed by gfx_layout (which has no machine) */ - uint32_t extyoffs[32 * 8]; - - /* video state */ - uint8_t m_bottomline; - uint8_t m_flip; - - /* misc */ - int m_last; - emu_timer *m_interrupt_timer; - - /* devices */ + // devices required_device m_maincpu; - optional_device m_ic8j1; - optional_device m_ic8j2; required_device m_samples; - optional_device m_gfxdecode; + required_device m_gfxdecode; required_device m_screen; required_device m_palette; - void m10_ctrl_w(uint8_t data); - void m11_ctrl_w(uint8_t data); - void m15_ctrl_w(uint8_t data); - void m10_a500_w(uint8_t data); - void m11_a100_w(uint8_t data); - void m15_a100_w(uint8_t data); - uint8_t m10_a700_r(); - uint8_t m11_a700_r(); - void m10_colorram_w(offs_t offset, uint8_t data); - void m10_chargen_w(offs_t offset, uint8_t data); - void m15_chargen_w(offs_t offset, uint8_t data); + required_ioport m_cab; + + // video-related + tilemap_t * m_tx_tilemap; + + // this is currently unused, because it is needed by gfx_layout (which has no machine) + uint32_t extyoffs[32 * 8]; + + // video state + uint8_t m_flip; + + // misc + int m_last; + emu_timer *m_interrupt_timer; + TILEMAP_MAPPER_MEMBER(tilemap_scan); TILE_GET_INFO_MEMBER(get_tile_info); - DECLARE_MACHINE_START(m10); - DECLARE_MACHINE_RESET(m10); - DECLARE_VIDEO_START(m10); - void m10_palette(palette_device &palette) const; - DECLARE_VIDEO_START(m15); - uint32_t screen_update_m10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_m15(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(m15_interrupt); + void palette(palette_device &palette) const; TIMER_CALLBACK_MEMBER(interrupt_callback); +}; + +class m10_state : public m1x_state +{ +public: + m10_state(const machine_config &mconfig, device_type type, const char *tag) : + m1x_state(mconfig, type, tag), + m_ic8j1(*this, "ic8j1"), + m_ic8j2(*this, "ic8j2") + { } + + void m10(machine_config &config); + void m11(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + +private: + required_device m_ic8j1; + required_device m_ic8j2; + + gfx_element * m_back_gfx; + uint8_t m_bottomline; + + void m10_ctrl_w(uint8_t data); + void m11_ctrl_w(uint8_t data); + void m10_a500_w(uint8_t data); + void m11_a100_w(uint8_t data); + uint8_t m10_a700_r(); + uint8_t m11_a700_r(); + void chargen_w(offs_t offset, uint8_t data); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(ic8j1_output_changed); DECLARE_WRITE_LINE_MEMBER(ic8j2_output_changed); - inline void plot_pixel_m10( bitmap_ind16 &bm, int x, int y, int col ); + inline void plot_pixel( bitmap_ind16 &bm, int x, int y, int col ); void m10_main(address_map &map); void m11_main(address_map &map); - void m15_main(address_map &map); +}; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; +class m15_state : public m1x_state +{ +public: + m15_state(const machine_config &mconfig, device_type type, const char *tag) : + m1x_state(mconfig, type, tag) + { } + + void m15(machine_config &config); + void headoni(machine_config &config); + +protected: + virtual void video_start() override; + +private: + void ctrl_w(uint8_t data); + void a100_w(uint8_t data); + void chargen_w(offs_t offset, uint8_t data); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(interrupt); + + void m15_main(address_map &map); }; #endif // MAME_INCLUDES_M10_H diff --git a/src/mame/includes/mcr68.h b/src/mame/includes/mcr68.h index a780edbe8ba..ce2006f1f0f 100644 --- a/src/mame/includes/mcr68.h +++ b/src/mame/includes/mcr68.h @@ -53,14 +53,22 @@ public: void init_spyhunt2(); void init_archrivlb(); +protected: + virtual void machine_reset() override; + virtual void video_start() override; + private: optional_device m_sounds_good; optional_device m_turbo_cheap_squeak; optional_device m_bg; optional_device m_adc; - required_shared_ptr m_videoram; required_shared_ptr m_spriteram; + required_device m_maincpu; + required_device m_gfxdecode; + required_device m_screen; + required_device m_ptm; + uint16_t m_control_word; uint8_t m_protection_data[5]; attotime m_timing_factor; @@ -85,26 +93,18 @@ private: uint16_t archrivlb_port_1_r(); TILE_GET_INFO_MEMBER(get_bg_tile_info); - DECLARE_MACHINE_START(mcr68); - DECLARE_MACHINE_RESET(mcr68); - DECLARE_VIDEO_START(mcr68); uint32_t screen_update_mcr68(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb); TIMER_CALLBACK_MEMBER(mcr68_493_off_callback); TIMER_CALLBACK_MEMBER(mcr68_493_callback); void mcr68_update_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority); void mcr68_common_init(int clip, int xoffset); - required_device m_maincpu; - required_device m_gfxdecode; - required_device m_screen; std::unique_ptr m_srcdata0; std::unique_ptr m_srcdata2; void mcr68_map(address_map &map); void pigskin_map(address_map &map); void trisport_map(address_map &map); - - required_device m_ptm; }; #endif // MAME_INCLUDES_MCR68_H diff --git a/src/mame/machine/mcr68.cpp b/src/mame/machine/mcr68.cpp index ae00aa8ab90..819508e7ae5 100644 --- a/src/mame/machine/mcr68.cpp +++ b/src/mame/machine/mcr68.cpp @@ -20,14 +20,8 @@ * *************************************/ -MACHINE_START_MEMBER(mcr68_state,mcr68) -{ -} - - -MACHINE_RESET_MEMBER(mcr68_state,mcr68) -{ - /* for the most part all MCR/68k games are the same */ +void mcr68_state::machine_reset() +{ /* for the most part all MCR/68k games are the same */ m_v493_callback = timer_expired_delegate(FUNC(mcr68_state::mcr68_493_callback),this); } diff --git a/src/mame/video/ddragon.cpp b/src/mame/video/ddragon.cpp index 52a77e06239..19781087f13 100644 --- a/src/mame/video/ddragon.cpp +++ b/src/mame/video/ddragon.cpp @@ -95,7 +95,7 @@ TILE_GET_INFO_MEMBER(ddragon_state::get_fg_16color_tile_info) ***************************************************************************/ -VIDEO_START_MEMBER(ddragon_state,ddragon) +void ddragon_state::video_start() { m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ddragon_state::get_bg_tile_info)), tilemap_mapper_delegate(*this, FUNC(ddragon_state::background_scan)), 16, 16, 32, 32); m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ddragon_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); diff --git a/src/mame/video/divebomb.cpp b/src/mame/video/divebomb.cpp index 2fbb8e1bc6b..406f79166a8 100644 --- a/src/mame/video/divebomb.cpp +++ b/src/mame/video/divebomb.cpp @@ -131,7 +131,7 @@ void divebomb_state::divebomb_palette(palette_device &palette) const } -VIDEO_START_MEMBER(divebomb_state,divebomb) +void divebomb_state::video_start() { m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(divebomb_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); m_fg_tilemap->set_transparent_pen(0); diff --git a/src/mame/video/gberet.cpp b/src/mame/video/gberet.cpp index 4bb16392abc..3e09c4626d5 100644 --- a/src/mame/video/gberet.cpp +++ b/src/mame/video/gberet.cpp @@ -109,7 +109,7 @@ TILE_GET_INFO_MEMBER(gberet_state::get_bg_tile_info) tileinfo.set(0, code, color, flags); } -VIDEO_START_MEMBER(gberet_state,gberet) +void gberet_state::video_start() { m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gberet_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); m_bg_tilemap->configure_groups(*m_gfxdecode->gfx(0), 0x10); diff --git a/src/mame/video/m10.cpp b/src/mame/video/m10.cpp index 5cb29654aca..b21d7ccaa52 100644 --- a/src/mame/video/m10.cpp +++ b/src/mame/video/m10.cpp @@ -2,7 +2,7 @@ // copyright-holders:Lee Taylor, Couriersud /*************************************************************************** - video.c + m10.cpp Functions to emulate the video hardware of the machine. @@ -23,40 +23,40 @@ static const uint32_t extyoffs[] = static const gfx_layout backlayout = { - 8,8*32, /* 8*(8*32) characters */ - 4, /* 4 characters */ - 1, /* 1 bit per pixel */ + 8,8*32, // 8*(8*32) characters + 4, // 4 characters + 1, // 1 bit per pixel { 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, EXTENDED_YOFFS, - 32*8*8, /* every char takes 8 consecutive bytes */ + 32*8*8, // every char takes 8 consecutive bytes nullptr, extyoffs }; static const gfx_layout charlayout = { - 8,8, /* 8*8 characters */ - 256, /* 256 characters */ - 1, /* 1 bit per pixel */ + 8,8, // 8*8 characters + 256, // 256 characters + 1, // 1 bit per pixel { 0 }, { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8*8 /* every char takes 8 consecutive bytes */ + 8*8 // every char takes 8 consecutive bytes }; -TILEMAP_MAPPER_MEMBER(m10_state::tilemap_scan) +TILEMAP_MAPPER_MEMBER(m1x_state::tilemap_scan) { return (31 - col) * 32 + row; } -TILE_GET_INFO_MEMBER(m10_state::get_tile_info) +TILE_GET_INFO_MEMBER(m1x_state::get_tile_info) { tileinfo.set(0, m_videoram[tile_index], m_colorram[tile_index] & 0x07, 0); } -void m10_state::m10_colorram_w(offs_t offset, uint8_t data) +void m1x_state::colorram_w(offs_t offset, uint8_t data) { if (m_colorram[offset] != data) { @@ -66,7 +66,7 @@ void m10_state::m10_colorram_w(offs_t offset, uint8_t data) } -void m10_state::m10_chargen_w(offs_t offset, uint8_t data) +void m10_state::chargen_w(offs_t offset, uint8_t data) { if (m_chargen[offset] != data) { @@ -76,7 +76,7 @@ void m10_state::m10_chargen_w(offs_t offset, uint8_t data) } -void m10_state::m15_chargen_w(offs_t offset, uint8_t data) +void m15_state::chargen_w(offs_t offset, uint8_t data) { if (m_chargen[offset] != data) { @@ -86,7 +86,7 @@ void m10_state::m15_chargen_w(offs_t offset, uint8_t data) } -inline void m10_state::plot_pixel_m10(bitmap_ind16 &bm, int x, int y, int col) +inline void m10_state::plot_pixel(bitmap_ind16 &bm, int x, int y, int col) { if (!m_flip) bm.pix(y, x) = col; @@ -95,7 +95,7 @@ inline void m10_state::plot_pixel_m10(bitmap_ind16 &bm, int x, int y, int col) (IREMM10_HBSTART - 1) - (x - IREMM10_HBEND)) = col; // only when flip_screen(?) } -VIDEO_START_MEMBER(m10_state,m10) +void m10_state::video_start() { m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(m10_state::get_tile_info)), tilemap_mapper_delegate(*this, FUNC(m10_state::tilemap_scan)), 8, 8, 32, 32); m_tx_tilemap->set_transparent_pen(0); @@ -104,11 +104,11 @@ VIDEO_START_MEMBER(m10_state,m10) m_back_gfx = m_gfxdecode->gfx(1); } -VIDEO_START_MEMBER(m10_state,m15) +void m15_state::video_start() { m_gfxdecode->set_gfx(0,std::make_unique(m_palette, charlayout, m_chargen, 0, 8, 0)); - m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(m10_state::get_tile_info)), tilemap_mapper_delegate(*this, FUNC(m10_state::tilemap_scan)), 8, 8, 32, 32); + m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(m15_state::get_tile_info)), tilemap_mapper_delegate(*this, FUNC(m15_state::tilemap_scan)), 8, 8, 32, 32); } /*************************************************************************** @@ -117,16 +117,14 @@ VIDEO_START_MEMBER(m10_state,m15) ***************************************************************************/ -uint32_t m10_state::screen_update_m10(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t m10_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs; static const int color[4]= { 3, 3, 5, 5 }; static const int xpos[4] = { 4*8, 26*8, 7*8, 6*8}; - int i; bitmap.fill(0, cliprect); - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) if (m_flip) m_back_gfx->opaque(bitmap,cliprect, i, color[i], 1, 1, 31 * 8 - xpos[i], 0); else @@ -134,13 +132,11 @@ uint32_t m10_state::screen_update_m10(screen_device &screen, bitmap_ind16 &bitma if (m_bottomline) { - int y; - - for (y = IREMM10_VBEND; y < IREMM10_VBSTART; y++) - plot_pixel_m10(bitmap, 16, y, 1); + for (int y = IREMM10_VBEND; y < IREMM10_VBSTART; y++) + plot_pixel(bitmap, 16, y, 1); } - for (offs = m_videoram.bytes() - 1; offs >= 0; offs--) + for (int offs = m_videoram.bytes() - 1; offs >= 0; offs--) m_tx_tilemap->mark_tile_dirty(offs); m_tx_tilemap->set_flip(m_flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); @@ -156,11 +152,9 @@ uint32_t m10_state::screen_update_m10(screen_device &screen, bitmap_ind16 &bitma ***************************************************************************/ -uint32_t m10_state::screen_update_m15(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t m15_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs; - - for (offs = m_videoram.bytes() - 1; offs >= 0; offs--) + for (int offs = m_videoram.bytes() - 1; offs >= 0; offs--) m_tx_tilemap->mark_tile_dirty(offs); //m_tx_tilemap->mark_all_dirty(); diff --git a/src/mame/video/mcr68.cpp b/src/mame/video/mcr68.cpp index 19af9f2d6e3..74c658ae340 100644 --- a/src/mame/video/mcr68.cpp +++ b/src/mame/video/mcr68.cpp @@ -38,7 +38,7 @@ TILE_GET_INFO_MEMBER(mcr68_state::get_bg_tile_info) * *************************************/ -VIDEO_START_MEMBER(mcr68_state,mcr68) +void mcr68_state::video_start() { /* initialize the background tilemap */ m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(mcr68_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 16,16, 32,32);