From 9dd3f11c30f095fafd4a59c37d9c5d56dcc8387e Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 23 Feb 2016 10:23:57 +0100 Subject: [PATCH] mcr: small cleanup --- src/mame/drivers/finalizr.cpp | 8 ++------ src/mame/drivers/mcr68.cpp | 2 +- src/mame/includes/finalizr.h | 1 - src/mame/includes/mcr.h | 13 ++++++------- src/mame/includes/mcr3.h | 17 +++++++++++++---- src/mame/includes/mcr68.h | 15 +++++++++++---- src/mame/machine/mcr68.cpp | 18 +++++++----------- 7 files changed, 40 insertions(+), 34 deletions(-) diff --git a/src/mame/drivers/finalizr.cpp b/src/mame/drivers/finalizr.cpp index d962c81ebc7..e52e22420c3 100644 --- a/src/mame/drivers/finalizr.cpp +++ b/src/mame/drivers/finalizr.cpp @@ -350,10 +350,6 @@ ROM_START( finalizrb ) ROM_END -DRIVER_INIT_MEMBER(finalizr_state,finalizr) -{ -} - -GAME( 1985, finalizr, 0, finalizr, finalizr, finalizr_state, finalizr, ROT90, "Konami", "Finalizer - Super Transformation", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, finalizrb, finalizr, finalizr, finalizrb, finalizr_state, finalizr, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, finalizr, 0, finalizr, finalizr, driver_device, 0, ROT90, "Konami", "Finalizer - Super Transformation", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, finalizrb, finalizr, finalizr, finalizrb, driver_device, 0, ROT90, "bootleg", "Finalizer - Super Transformation (bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/mcr68.cpp b/src/mame/drivers/mcr68.cpp index 1736a5fb1f5..0377f173246 100644 --- a/src/mame/drivers/mcr68.cpp +++ b/src/mame/drivers/mcr68.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles, Bryan McPhail /*************************************************************************** Midway MCR-68k system diff --git a/src/mame/includes/finalizr.h b/src/mame/includes/finalizr.h index b308af73ad5..08d765c428e 100644 --- a/src/mame/includes/finalizr.h +++ b/src/mame/includes/finalizr.h @@ -57,7 +57,6 @@ public: DECLARE_READ8_MEMBER(i8039_T1_r); DECLARE_WRITE8_MEMBER(i8039_T0_w); DECLARE_WRITE8_MEMBER(finalizr_videoctrl_w); - DECLARE_DRIVER_INIT(finalizr); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); virtual void machine_start() override; diff --git a/src/mame/includes/mcr.h b/src/mame/includes/mcr.h index ff7937f669c..e789c198a8e 100644 --- a/src/mame/includes/mcr.h +++ b/src/mame/includes/mcr.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles /************************************************************************* - Driver for Midway MCR games + Midway MCR system **************************************************************************/ @@ -38,9 +38,8 @@ public: m_dpoker_hopper_timer(*this, "dp_hopper"), m_samples(*this, "samples"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_sio_txda(0), - m_sio_txdb(0) { } + m_palette(*this, "palette") + { } // these should be required but can't because mcr68 shares with us // once the sound boards are properly device-ified, fix this @@ -62,6 +61,9 @@ public: required_device m_gfxdecode; required_device m_palette; + int m_sio_txda; + int m_sio_txdb; + DECLARE_WRITE8_MEMBER(mcr_control_port_w); DECLARE_WRITE8_MEMBER(mcr_ipu_laserdisk_w); DECLARE_READ8_MEMBER(mcr_ipu_watchdog_r); @@ -129,9 +131,6 @@ public: void render_sprites_91399(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void render_sprites_91464(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int primask, int sprmask, int colormask); void mcr_init(int cpuboard, int vidboard, int ssioboard); - - int m_sio_txda; - int m_sio_txdb; }; /*----------- defined in machine/mcr.c -----------*/ diff --git a/src/mame/includes/mcr3.h b/src/mame/includes/mcr3.h index 8f4bf006bc7..dbfcb3529e9 100644 --- a/src/mame/includes/mcr3.h +++ b/src/mame/includes/mcr3.h @@ -1,12 +1,22 @@ // license:BSD-3-Clause // copyright-holders:Aaron Giles +/************************************************************************* + + Midway MCR-3 system + +**************************************************************************/ + class mcr3_state : public mcr_state { public: mcr3_state(const machine_config &mconfig, device_type type, const char *tag) : mcr_state(mconfig, type, tag), - m_spyhunt_alpharam(*this, "spyhunt_alpha"), - m_screen(*this, "screen") { } + m_spyhunt_alpharam(*this, "spyhunt_alpha"), + m_screen(*this, "screen") + { } + + optional_shared_ptr m_spyhunt_alpharam; + required_device m_screen; UINT8 m_input_mux; UINT8 m_latched_input; @@ -18,11 +28,11 @@ public: INT8 m_maxrpm_p2_shift; UINT8 m_spyhunt_sprite_color_mask; INT16 m_spyhunt_scroll_offset; - optional_shared_ptr m_spyhunt_alpharam; INT16 m_spyhunt_scrollx; INT16 m_spyhunt_scrolly; tilemap_t *m_bg_tilemap; tilemap_t *m_alpha_tilemap; + DECLARE_WRITE8_MEMBER(spyhuntpr_paletteram_w); DECLARE_WRITE8_MEMBER(mcr3_videoram_w); DECLARE_WRITE8_MEMBER(spyhunt_videoram_w); @@ -75,5 +85,4 @@ public: DECLARE_WRITE8_MEMBER(spyhuntpr_port04_w); DECLARE_WRITE8_MEMBER(spyhuntpr_fd00_w); - required_device m_screen; }; diff --git a/src/mame/includes/mcr68.h b/src/mame/includes/mcr68.h index 56f4f10a94e..bc92e7fc83e 100644 --- a/src/mame/includes/mcr68.h +++ b/src/mame/includes/mcr68.h @@ -1,5 +1,11 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles, Bryan McPhail +/*************************************************************************** + + Midway MCR-68k system + +***************************************************************************/ + #include "machine/6821pia.h" #include "audio/midway.h" #include "audio/williams.h" @@ -23,12 +29,13 @@ public: m_sounds_good(*this, "sg"), m_turbo_chip_squeak(*this, "tcs"), m_cvsd_sound(*this, "cvsd"), - m_videoram(*this, "videoram"), - m_spriteram(*this, "spriteram") , + m_videoram(*this, "videoram"), + m_spriteram(*this, "spriteram") , m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_palette(*this, "palette") + { } optional_device m_chip_squeak_deluxe; optional_device m_sounds_good; diff --git a/src/mame/machine/mcr68.cpp b/src/mame/machine/mcr68.cpp index 823e2a2d721..8290c6d3141 100644 --- a/src/mame/machine/mcr68.cpp +++ b/src/mame/machine/mcr68.cpp @@ -1,8 +1,8 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:Aaron Giles, Bryan McPhail /*************************************************************************** - Midway MCR system + Midway MCR-68k system ***************************************************************************/ @@ -49,9 +49,7 @@ READ8_MEMBER(mcr68_state::zwackery_port_3_r) MACHINE_START_MEMBER(mcr68_state,mcr68) { - int i; - - for (i = 0; i < 3; i++) + for (int i = 0; i < 3; i++) { struct counter_state *m6840 = &m_m6840_state[i]; @@ -75,17 +73,15 @@ MACHINE_START_MEMBER(mcr68_state,mcr68) void mcr68_state::mcr68_common_init() { - int i; - /* reset the 6840's */ - m_m6840_counter_periods[0] = attotime::from_hz(30); /* clocked by /VBLANK */ - m_m6840_counter_periods[1] = attotime::never; /* grounded */ - m_m6840_counter_periods[2] = attotime::from_hz(512 * 30); /* clocked by /HSYNC */ + m_m6840_counter_periods[0] = attotime::from_hz(30); /* clocked by /VBLANK */ + m_m6840_counter_periods[1] = attotime::never; /* grounded */ + m_m6840_counter_periods[2] = attotime::from_hz(512 * 30); /* clocked by /HSYNC */ m_m6840_status = 0x00; m_m6840_status_read_since_int = 0x00; m_m6840_msb_buffer = m_m6840_lsb_buffer = 0; - for (i = 0; i < 3; i++) + for (int i = 0; i < 3; i++) { struct counter_state *m6840 = &m_m6840_state[i];