From 4064a88af9eb0b0c2bab1369ffc4590c2e526a72 Mon Sep 17 00:00:00 2001 From: AJR Date: Tue, 19 Jan 2021 21:40:24 -0500 Subject: [PATCH] cosmic.cpp: Cosmic Guerilla is in another driver now --- src/mame/drivers/cosmic.cpp | 3 --- src/mame/drivers/cosmicg.cpp | 12 ++++++------ src/mame/includes/cosmic.h | 3 +-- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/mame/drivers/cosmic.cpp b/src/mame/drivers/cosmic.cpp index d4892f74393..4aa2404dc38 100644 --- a/src/mame/drivers/cosmic.cpp +++ b/src/mame/drivers/cosmic.cpp @@ -4,7 +4,6 @@ Universal board numbers (found on the schematics) -Cosmic Guerilla - 7907A Cosmic Alien - 7910 Magical Spot - 8013 Magical Spot II - 8013 @@ -792,8 +791,6 @@ static const char *const panic_sample_names[] = void cosmic_state::machine_start() { save_item(NAME(m_sound_enabled)); - save_item(NAME(m_march_select)); - save_item(NAME(m_gun_die_select)); save_item(NAME(m_dive_bomb_b_select)); save_item(NAME(m_background_enable)); diff --git a/src/mame/drivers/cosmicg.cpp b/src/mame/drivers/cosmicg.cpp index 4de1a173f01..3f75c579c94 100644 --- a/src/mame/drivers/cosmicg.cpp +++ b/src/mame/drivers/cosmicg.cpp @@ -196,7 +196,7 @@ MC6845_UPDATE_ROW(cosmicg_state::draw_scanline) while (x_count-- != 0) { u16 offs = (~ma & 0x001f) | (~ra & 1) << 5 | (~ma & 0x0fe0) << 1; - u8 data = (offs >= m_videoram.length()) ? 0 : m_videoram[offs]; + u8 data = m_videoram[offs]; u8 color = colors[(~offs & 0x1e00) >> 5 | (~offs & 0x001e) >> 1] >> 4; for (int n = 8; n != 0; n--) { @@ -211,7 +211,7 @@ MC6845_UPDATE_ROW(cosmicg_state::draw_scanline) while (x_count-- != 0) { u16 offs = (ma & 0x001f) | (ra & 1) << 5 | (ma & 0x0fe0) << 1; - u8 data = (offs >= m_videoram.length()) ? 0 : m_videoram[offs]; + u8 data = m_videoram[offs]; u8 color = colors[(offs & 0x1e00) >> 5 | (offs & 0x001e) >> 1] & 0x0f; for (int n = 8; n != 0; n--) { @@ -322,6 +322,10 @@ static const char *const cosmicg_sample_names[] = void cosmicg_state::machine_start() { + m_sound_enabled = 0; + m_march_select = 0; + m_gun_die_select = 0; + save_item(NAME(m_sound_enabled)); save_item(NAME(m_march_select)); save_item(NAME(m_gun_die_select)); @@ -422,10 +426,6 @@ void cosmicg_state::init_cosmicg() rom[offs] = normal; } - - m_sound_enabled = 0; - m_march_select = 0; - m_gun_die_select = 0; } diff --git a/src/mame/includes/cosmic.h b/src/mame/includes/cosmic.h index 7808f9651e4..79cf44b2089 100644 --- a/src/mame/includes/cosmic.h +++ b/src/mame/includes/cosmic.h @@ -26,6 +26,7 @@ public: driver_device(mconfig, type, tag), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), + m_sound_enabled(0), m_in_ports(*this, "IN%u", 0), m_dsw(*this, "DSW"), m_maincpu(*this, "maincpu"), @@ -71,8 +72,6 @@ private: /* sound-related */ int m_sound_enabled; - int m_march_select; - int m_gun_die_select; int m_dive_bomb_b_select; /* misc */