From 55d15e7699d4dd807115699678ccb65952ac528a Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sat, 6 Feb 2021 08:30:05 +0100 Subject: atarigt, quizshow: initialized some variables which were causing incorrect behaviours in drvnoclear builds --- src/mame/drivers/atarigt.cpp | 13 ++++++------- src/mame/drivers/quizshow.cpp | 5 +++++ src/mame/includes/atarigt.h | 33 ++++++++++++++++++++------------- src/mame/video/atarigt.cpp | 8 ++++---- 4 files changed, 35 insertions(+), 24 deletions(-) diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index da3df206077..ea8f845c18d 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -113,6 +113,7 @@ void atarigt_state::machine_start() m_scanline_int_state = false; m_video_int_state = false; + m_ignore_writes = false; save_item(NAME(m_scanline_int_state)); save_item(NAME(m_video_int_state)); @@ -592,13 +593,13 @@ uint32_t atarigt_state::colorram_protection_r(address_space &space, offs_t offse if (ACCESSING_BITS_16_31) { - result = atarigt_colorram_r(address); + result = colorram_r(address); (this->*m_protection_r)(space, address, &result); result32 |= result << 16; } if (ACCESSING_BITS_0_15) { - result = atarigt_colorram_r(address + 2); + result = colorram_r(address + 2); (this->*m_protection_r)(space, address + 2, &result); result32 |= result; } @@ -614,13 +615,13 @@ void atarigt_state::colorram_protection_w(address_space &space, offs_t offset, u if (ACCESSING_BITS_16_31) { if (!m_ignore_writes) - atarigt_colorram_w(address, data >> 16, mem_mask >> 16); + colorram_w(address, data >> 16, mem_mask >> 16); (this->*m_protection_w)(space, address, data >> 16); } if (ACCESSING_BITS_0_15) { if (!m_ignore_writes) - atarigt_colorram_w(address + 2, data, mem_mask); + colorram_w(address + 2, data, mem_mask); (this->*m_protection_w)(space, address + 2, data); } } @@ -846,7 +847,7 @@ void atarigt_state::atarigt(machine_config &config) PALETTE(config, m_palette).set_entries(MRAM_ENTRIES); TILEMAP(config, m_playfield_tilemap, m_gfxdecode, 2, 8,8); - m_playfield_tilemap->set_layout(FUNC(atarigt_state::atarigt_playfield_scan), 128,64); + m_playfield_tilemap->set_layout(FUNC(atarigt_state::playfield_scan), 128,64); m_playfield_tilemap->set_info_callback(FUNC(atarigt_state::get_playfield_tile_info)); TILEMAP(config, m_alpha_tilemap, m_gfxdecode, 2, 8,8, TILEMAP_SCAN_ROWS, 64, 32).set_info_callback(FUNC(atarigt_state::get_alpha_tile_info)); @@ -858,8 +859,6 @@ void atarigt_state::atarigt(machine_config &config) m_screen->set_screen_update(FUNC(atarigt_state::screen_update_atarigt)); m_screen->screen_vblank().set(FUNC(atarigt_state::video_int_write_line)); - MCFG_VIDEO_START_OVERRIDE(atarigt_state,atarigt) - ATARI_RLE_OBJECTS(config, m_rle, 0, modesc); /* sound hardware */ diff --git a/src/mame/drivers/quizshow.cpp b/src/mame/drivers/quizshow.cpp index ef239b6e12d..bda7174559b 100644 --- a/src/mame/drivers/quizshow.cpp +++ b/src/mame/drivers/quizshow.cpp @@ -29,6 +29,8 @@ TODO: #include "quizshow.lh" +namespace { + static constexpr XTAL MASTER_CLOCK = 12.096_MHz_XTAL; static constexpr XTAL PIXEL_CLOCK = MASTER_CLOCK / 2; @@ -395,6 +397,7 @@ void quizshow_state::machine_reset() { m_category_enable = 0; m_tape_head_pos = 0; + m_clocks = 0; } void quizshow_state::quizshow(machine_config &config) @@ -471,5 +474,7 @@ void quizshow_state::init_quizshow() } } +} // Anonymous namespace + GAMEL( 1976, quizshow, 0, quizshow, quizshow, quizshow_state, init_quizshow, ROT0, "Atari (Kee Games)", "Quiz Show", MACHINE_NOT_WORKING, layout_quizshow ) diff --git a/src/mame/includes/atarigt.h b/src/mame/includes/atarigt.h index b72aaaf483b..16764a7fc12 100644 --- a/src/mame/includes/atarigt.h +++ b/src/mame/includes/atarigt.h @@ -38,6 +38,20 @@ public: m_cage(*this, "cage") { } + void atarigt(machine_config &config); + void tmek(machine_config &config); + void primrage20(machine_config &config); + void primrage(machine_config &config); + + void init_primrage(); + void init_tmek(); + +protected: + virtual void machine_start() override; + virtual void video_start() override; + +private: + bool m_is_primrage; required_device m_palette; memory_share_creator m_colorram; @@ -66,7 +80,7 @@ public: uint32_t m_tram_checksum; required_shared_ptr m_mo_command; - optional_device m_cage; + required_device m_cage; void (atarigt_state::*m_protection_w)(address_space &space, offs_t offset, uint16_t data); void (atarigt_state::*m_protection_r)(address_space &space, offs_t offset, uint16_t *data); @@ -96,22 +110,15 @@ public: void cage_irq_callback(uint8_t data); - void atarigt_colorram_w(offs_t address, uint16_t data, uint16_t mem_mask); - uint16_t atarigt_colorram_r(offs_t address); - void init_primrage(); - void init_tmek(); + void colorram_w(offs_t address, uint16_t data, uint16_t mem_mask); + uint16_t colorram_r(offs_t address); + TILE_GET_INFO_MEMBER(get_alpha_tile_info); TILE_GET_INFO_MEMBER(get_playfield_tile_info); - TILEMAP_MAPPER_MEMBER(atarigt_playfield_scan); - virtual void machine_start() override; - DECLARE_VIDEO_START(atarigt); + TILEMAP_MAPPER_MEMBER(playfield_scan); uint32_t screen_update_atarigt(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void atarigt(machine_config &config); - void tmek(machine_config &config); - void primrage20(machine_config &config); - void primrage(machine_config &config); void main_map(address_map &map); -private: + void tmek_update_mode(offs_t offset); void tmek_protection_w(address_space &space, offs_t offset, uint16_t data); void tmek_protection_r(address_space &space, offs_t offset, uint16_t *data); diff --git a/src/mame/video/atarigt.cpp b/src/mame/video/atarigt.cpp index 490e5376ad2..e5b723be46b 100644 --- a/src/mame/video/atarigt.cpp +++ b/src/mame/video/atarigt.cpp @@ -62,7 +62,7 @@ TILE_GET_INFO_MEMBER(atarigt_state::get_playfield_tile_info) } -TILEMAP_MAPPER_MEMBER(atarigt_state::atarigt_playfield_scan) +TILEMAP_MAPPER_MEMBER(atarigt_state::playfield_scan) { return (((col & 0x40) ^ 0x40) << 6) | ((row & 0x3f) << 6) | (col & 0x3f); } @@ -75,7 +75,7 @@ TILEMAP_MAPPER_MEMBER(atarigt_state::atarigt_playfield_scan) * *************************************/ -VIDEO_START_MEMBER(atarigt_state,atarigt) +void atarigt_state::video_start() { /* blend the playfields and free the temporary one */ blend_gfx(0, 2, 0x0f, 0x30); @@ -103,7 +103,7 @@ VIDEO_START_MEMBER(atarigt_state,atarigt) * *************************************/ -void atarigt_state::atarigt_colorram_w(offs_t address, uint16_t data, uint16_t mem_mask) +void atarigt_state::colorram_w(offs_t address, uint16_t data, uint16_t mem_mask) { uint16_t olddata; @@ -127,7 +127,7 @@ void atarigt_state::atarigt_colorram_w(offs_t address, uint16_t data, uint16_t m } -uint16_t atarigt_state::atarigt_colorram_r(offs_t address) +uint16_t atarigt_state::colorram_r(offs_t address) { address &= 0x7ffff; return m_colorram[address >> 1]; -- cgit v1.2.3