summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2021-02-09 18:18:35 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2021-02-09 18:18:35 +0100
commitce8f2480a505458f4112b62e3f70d5de23b4b669 (patch)
treec05fa7185930724369e8103b113541a641a8f3bf
parent856f17da0376a405aa7219c4d8c86c4e8f413d11 (diff)
excali64, gcpinbal, vpoker: initialized some variables which were causing incorrect behaviours in drvnoclear builds
-rw-r--r--src/mame/drivers/excali64.cpp11
-rw-r--r--src/mame/drivers/vpoker.cpp21
-rw-r--r--src/mame/includes/gcpinbal.h4
3 files changed, 26 insertions, 10 deletions
diff --git a/src/mame/drivers/excali64.cpp b/src/mame/drivers/excali64.cpp
index 56d2afc5406..99f1899245f 100644
--- a/src/mame/drivers/excali64.cpp
+++ b/src/mame/drivers/excali64.cpp
@@ -54,6 +54,8 @@ ToDo:
#include "formats/excali64_dsk.h"
+namespace {
+
class excali64_state : public driver_device
{
public:
@@ -75,9 +77,11 @@ public:
void excali64(machine_config &config);
-private:
+protected:
virtual void machine_reset() override;
virtual void machine_start() override;
+
+private:
void excali64_palette(palette_device &palette);
void ppib_w(u8 data);
u8 ppic_r();
@@ -440,6 +444,8 @@ void excali64_state::machine_start()
save_item(NAME(m_crtc_hs));
save_item(NAME(m_motor));
save_item(NAME(m_centronics_busy));
+
+ m_sys_status = 0;
}
WRITE_LINE_MEMBER( excali64_state::crtc_hs )
{
@@ -667,6 +673,9 @@ ROM_START( excali64 )
ROM_LOAD( "hm7603.ic55", 0x1000, 0x0020, CRC(c74f47dc) SHA1(331ff3c913846191ddd97cacb80bd19438c1ff71) )
ROM_END
+} // Anonymous namespace
+
+
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
diff --git a/src/mame/drivers/vpoker.cpp b/src/mame/drivers/vpoker.cpp
index 3726652a37a..1a1adfd8c61 100644
--- a/src/mame/drivers/vpoker.cpp
+++ b/src/mame/drivers/vpoker.cpp
@@ -106,6 +106,8 @@
#include "speaker.h"
+namespace {
+
class vpoker_state : public driver_device
{
public:
@@ -113,22 +115,26 @@ public:
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette")
+ m_palette(*this, "palette"),
+ m_in0(*this, "IN0")
{ }
void vpoker(machine_config &config);
+protected:
+ virtual void video_start() override;
+
private:
std::unique_ptr<uint8_t[]> m_videoram;
uint8_t m_blit_ram[8];
uint8_t blitter_r(offs_t offset);
void blitter_w(offs_t offset, uint8_t data);
DECLARE_WRITE_LINE_MEMBER(ptm_irq);
- virtual void video_start() override;
uint32_t screen_update_vpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
+ required_ioport m_in0;
void main_map(address_map &map);
};
@@ -136,6 +142,7 @@ private:
void vpoker_state::video_start()
{
m_videoram = std::make_unique<uint8_t[]>(0x200);
+ std::fill(std::begin(m_blit_ram), std::end(m_blit_ram), 0);
}
uint32_t vpoker_state::screen_update_vpoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -144,11 +151,9 @@ uint32_t vpoker_state::screen_update_vpoker(screen_device &screen, bitmap_ind16
gfx_element *gfx = m_gfxdecode->gfx(0);
int count = 0x0000;
- int y,x;
-
- for (y=0;y<0x10;y++)
+ for (int y=0;y<0x10;y++)
{
- for (x=0;x<0x20;x++)
+ for (int x=0;x<0x20;x++)
{
int tile = videoram[count];
//int colour = tile>>12;
@@ -164,7 +169,7 @@ uint32_t vpoker_state::screen_update_vpoker(screen_device &screen, bitmap_ind16
uint8_t vpoker_state::blitter_r(offs_t offset)
{
if(offset == 6)
- return ioport("IN0")->read();
+ return m_in0->read();
return 0;
}
@@ -707,6 +712,8 @@ ROM_START( 5acespkr )
ROM_LOAD16_BYTE( "bjok1.bin", 0x2001, 0x1000, CRC(20cdda67) SHA1(6c631b09e3da5f6660aa1c018fc0ff3004f7fe85) )
ROM_END
+} // Anonymous namespace
+
// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS
GAME( 198?, vpoker, 0, vpoker, vpoker, vpoker_state, empty_init, ROT0, "Videotronics, Inc.", "Videotronics Draw Poker", MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/includes/gcpinbal.h b/src/mame/includes/gcpinbal.h
index 87bfeb48dfb..9c9c98813ed 100644
--- a/src/mame/includes/gcpinbal.h
+++ b/src/mame/includes/gcpinbal.h
@@ -54,11 +54,11 @@ private:
u16 m_bg0_gfxset;
u16 m_bg1_gfxset;
#ifdef MAME_DEBUG
- uint8_t m_dislayer[4];
+ u8 m_dislayer[4] = { 0, 0, 0, 0 };
#endif
/* sound-related */
- uint32_t m_msm_bank;
+ u32 m_msm_bank;
/* devices */
required_device<cpu_device> m_maincpu;