summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2021-02-12 13:57:42 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2021-02-12 13:57:42 +0100
commitdd8ee157d8b249d25ac59ac0922ba16ff6afbfa5 (patch)
treea941a733f4f364f4ad1ae02a2f3d6f39f0c1ac6a
parent9ba8e4a8c8788cadf3746c9fc89f8c77bfc4c432 (diff)
gunpey, hexion, triplhnt, ultratnk: initialized some variables which were causing incorrect behaviours in drvnoclear debug builds
-rw-r--r--src/mame/drivers/gunpey.cpp7
-rw-r--r--src/mame/drivers/triplhnt.cpp2
-rw-r--r--src/mame/includes/hexion.h5
-rw-r--r--src/mame/includes/triplhnt.h8
-rw-r--r--src/mame/includes/ultratnk.h10
-rw-r--r--src/mame/video/hexion.cpp2
-rw-r--r--src/mame/video/ultratnk.cpp2
7 files changed, 27 insertions, 9 deletions
diff --git a/src/mame/drivers/gunpey.cpp b/src/mame/drivers/gunpey.cpp
index b28aabf3e36..714b404274d 100644
--- a/src/mame/drivers/gunpey.cpp
+++ b/src/mame/drivers/gunpey.cpp
@@ -250,6 +250,7 @@ public:
void gunpey(machine_config &config);
protected:
+ virtual void machine_start() override;
virtual void video_start() override;
private:
@@ -309,6 +310,12 @@ private:
};
+void gunpey_state::machine_start()
+{
+ m_irq_cause = 0;
+ m_irq_mask = 0;
+}
+
void gunpey_state::video_start()
{
// assumes it can make an address mask from m_blit_rom.length() - 1
diff --git a/src/mame/drivers/triplhnt.cpp b/src/mame/drivers/triplhnt.cpp
index e3762400373..b26b9cbdbfd 100644
--- a/src/mame/drivers/triplhnt.cpp
+++ b/src/mame/drivers/triplhnt.cpp
@@ -92,6 +92,8 @@ uint8_t triplhnt_state::da_latch_r(offs_t offset)
void triplhnt_state::machine_start()
{
m_lamp.resolve();
+
+ m_hit_code = 0;
}
diff --git a/src/mame/includes/hexion.h b/src/mame/includes/hexion.h
index 8a7d76be4ed..63bead0f64c 100644
--- a/src/mame/includes/hexion.h
+++ b/src/mame/includes/hexion.h
@@ -24,6 +24,9 @@ public:
void hexion(machine_config &config);
void hexionb(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<k053252_device> m_k053252;
@@ -55,8 +58,6 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
inline void get_tile_info(tile_data &tileinfo,int tile_index,uint8_t *ram);
void hexion_map(address_map &map);
diff --git a/src/mame/includes/triplhnt.h b/src/mame/includes/triplhnt.h
index 67a7093cdb1..c182ebbbd55 100644
--- a/src/mame/includes/triplhnt.h
+++ b/src/mame/includes/triplhnt.h
@@ -52,6 +52,11 @@ public:
void init_triplhnt();
+protected:
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
enum
{
@@ -67,15 +72,12 @@ private:
uint8_t da_latch_r(offs_t offset);
TILE_GET_INFO_MEMBER(get_tile_info);
- virtual void video_start() override;
void triplhnt_palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
void set_collision(int code);
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual void machine_start() override;
void triplhnt_map(address_map &map);
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/includes/ultratnk.h b/src/mame/includes/ultratnk.h
index de0c5823f23..1ed8cc35ac5 100644
--- a/src/mame/includes/ultratnk.h
+++ b/src/mame/includes/ultratnk.h
@@ -36,6 +36,12 @@ public:
void ultratnk(machine_config &config);
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:
enum
{
TIMER_NMI
@@ -54,9 +60,6 @@ protected:
void attract_w(uint8_t data);
void explosion_w(uint8_t data);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
void ultratnk_palette(palette_device &palette) const;
TILE_GET_INFO_MEMBER(tile_info);
@@ -64,7 +67,6 @@ protected:
DECLARE_WRITE_LINE_MEMBER(screen_vblank);
TIMER_CALLBACK_MEMBER(nmi_callback);
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
void ultratnk_cpu_map(address_map &map);
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/video/hexion.cpp b/src/mame/video/hexion.cpp
index 0e8842788d0..22bd1910b8c 100644
--- a/src/mame/video/hexion.cpp
+++ b/src/mame/video/hexion.cpp
@@ -53,6 +53,8 @@ void hexion_state::video_start()
m_unkram = m_vram[1] + 0x2000;
membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x2000);
+
+ m_gfxrom_select = 0;
}
diff --git a/src/mame/video/ultratnk.cpp b/src/mame/video/ultratnk.cpp
index d5dc308c3d8..a2d22a6888d 100644
--- a/src/mame/video/ultratnk.cpp
+++ b/src/mame/video/ultratnk.cpp
@@ -50,6 +50,8 @@ void ultratnk_state::video_start()
m_screen->register_screen_bitmap(m_helper);
m_playfield = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(ultratnk_state::tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
+
+ std::fill(std::begin(m_collision), std::end(m_collision), 0);
}