summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2021-02-03 21:52:01 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2021-02-03 21:52:01 +0100
commit7d64b7cf36708163fe32b8928bfef37257b7e81e (patch)
tree159f0009a28c1e924ea3117825a0b2a81ab0e5ea
parent215d0112d7e602548dae1b9deb61768545196ac6 (diff)
astrcorp, byvid, jungleyo, ksys573, mil4000, mpu4vid, overdriv, umipoker: initialized some variables which were causing asserts \ incorrect behaviours in drvnoclear builds
-rw-r--r--src/mame/drivers/astrcorp.cpp4
-rw-r--r--src/mame/drivers/byvid.cpp74
-rw-r--r--src/mame/drivers/jungleyo.cpp3
-rw-r--r--src/mame/drivers/ksys573.cpp2
-rw-r--r--src/mame/drivers/mil4000.cpp7
-rw-r--r--src/mame/drivers/mpu4vid.cpp20
-rw-r--r--src/mame/drivers/overdriv.cpp1
-rw-r--r--src/mame/drivers/umipoker.cpp5
-rw-r--r--src/mame/includes/mpu4.h1
9 files changed, 80 insertions, 37 deletions
diff --git a/src/mame/drivers/astrcorp.cpp b/src/mame/drivers/astrcorp.cpp
index c760dab5af8..e6a0b2bc31d 100644
--- a/src/mame/drivers/astrcorp.cpp
+++ b/src/mame/drivers/astrcorp.cpp
@@ -204,6 +204,8 @@ void astrocorp_state::video_start()
save_item(NAME(m_bitmap));
save_item(NAME(m_screen_enable));
save_item(NAME(m_sprite_dma));
+
+ m_sprite_dma = 0;
}
/***************************************************************************
@@ -660,6 +662,8 @@ static const u16 showhand_default_eeprom[15] = {0x0001,0x0007,0x000a,0x0003,0x
void astrocorp_state::machine_start()
{
m_lamps.resolve();
+
+ m_screen_enable = 0;
}
void astrocorp_state::showhand(machine_config &config)
diff --git a/src/mame/drivers/byvid.cpp b/src/mame/drivers/byvid.cpp
index 3b1bc3a854f..c6dd2af265f 100644
--- a/src/mame/drivers/byvid.cpp
+++ b/src/mame/drivers/byvid.cpp
@@ -48,6 +48,9 @@ ToDo (granny):
#include "video/tms9928a.h"
#include "speaker.h"
+
+namespace {
+
class by133_state : public driver_device
{
public:
@@ -75,42 +78,17 @@ public:
, m_io_x4(*this, "X4")
{ }
- uint8_t sound_data_r();
- void sound_data_w(uint8_t data);
- uint8_t m6803_port2_r();
- void m6803_port2_w(uint8_t data);
DECLARE_INPUT_CHANGED_MEMBER(video_test);
DECLARE_INPUT_CHANGED_MEMBER(sound_test);
DECLARE_INPUT_CHANGED_MEMBER(activity_test);
DECLARE_INPUT_CHANGED_MEMBER(self_test);
- uint8_t u7_a_r();
- void u7_a_w(uint8_t data);
- uint8_t u7_b_r();
- void u7_b_w(uint8_t data);
- uint8_t u10_a_r();
- void u10_a_w(uint8_t data);
- uint8_t u10_b_r();
- void u10_b_w(uint8_t data);
- uint8_t u11_a_r();
- void u11_a_w(uint8_t data);
- uint8_t u11_b_r();
- void u11_b_w(uint8_t data);
- DECLARE_WRITE_LINE_MEMBER(u7_ca2_w);
- DECLARE_WRITE_LINE_MEMBER(u10_ca2_w);
- DECLARE_WRITE_LINE_MEMBER(u11_ca2_w);
- DECLARE_WRITE_LINE_MEMBER(u7_cb2_w);
- DECLARE_WRITE_LINE_MEMBER(u10_cb2_w);
- DECLARE_WRITE_LINE_MEMBER(u11_cb2_w);
- TIMER_DEVICE_CALLBACK_MEMBER(u10_timer);
- TIMER_DEVICE_CALLBACK_MEMBER(u11_timer);
- void granny_crtc_w(offs_t offset, uint8_t data);
- uint32_t screen_update_granny(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+
void babypac(machine_config &config);
void granny(machine_config &config);
- void granny_map(address_map &map);
- void main_map(address_map &map);
- void sound_map(address_map &map);
- void video_map(address_map &map);
+
+protected:
+ virtual void machine_reset() override;
+
private:
uint8_t m_mpu_to_vid;
uint8_t m_vid_to_mpu;
@@ -123,7 +101,6 @@ private:
uint8_t m_u11_b;
bool m_u10_timer;
bool m_u11_timer;
- virtual void machine_reset() override;
required_device<m6800_cpu_device> m_maincpu;
required_device<mc6809_device> m_videocpu;
required_device<m6803_cpu_device> m_audiocpu;
@@ -144,6 +121,37 @@ private:
required_ioport m_io_x2;
required_ioport m_io_x3;
required_ioport m_io_x4; // Granny
+
+ uint8_t sound_data_r();
+ void sound_data_w(uint8_t data);
+ uint8_t m6803_port2_r();
+ void m6803_port2_w(uint8_t data);
+ uint8_t u7_a_r();
+ void u7_a_w(uint8_t data);
+ uint8_t u7_b_r();
+ void u7_b_w(uint8_t data);
+ uint8_t u10_a_r();
+ void u10_a_w(uint8_t data);
+ uint8_t u10_b_r();
+ void u10_b_w(uint8_t data);
+ uint8_t u11_a_r();
+ void u11_a_w(uint8_t data);
+ uint8_t u11_b_r();
+ void u11_b_w(uint8_t data);
+ DECLARE_WRITE_LINE_MEMBER(u7_ca2_w);
+ DECLARE_WRITE_LINE_MEMBER(u10_ca2_w);
+ DECLARE_WRITE_LINE_MEMBER(u11_ca2_w);
+ DECLARE_WRITE_LINE_MEMBER(u7_cb2_w);
+ DECLARE_WRITE_LINE_MEMBER(u10_cb2_w);
+ DECLARE_WRITE_LINE_MEMBER(u11_cb2_w);
+ TIMER_DEVICE_CALLBACK_MEMBER(u10_timer);
+ TIMER_DEVICE_CALLBACK_MEMBER(u11_timer);
+ void granny_crtc_w(offs_t offset, uint8_t data);
+ uint32_t screen_update_granny(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ void granny_map(address_map &map);
+ void main_map(address_map &map);
+ void sound_map(address_map &map);
+ void video_map(address_map &map);
};
@@ -724,6 +732,8 @@ void by133_state::machine_reset()
m_mpu_to_vid = 0;
m_vid_to_mpu = 0;
m_beep->set_state(0);
+ m_u10_timer = false;
+ m_u11_timer = false;
}
uint32_t by133_state::screen_update_granny(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
@@ -865,6 +875,8 @@ ROM_START(granny)
ROM_LOAD( "cs_u3.764", 0xe000, 0x2000, CRC(0a39a51d) SHA1(98342ba38e48578ce9870f2ee85b553d46c0e35f))
ROM_END
+} // Anonymous namespace
+
GAME( 1982, babypac, 0, babypac, babypac, by133_state, empty_init, ROT90, "Dave Nutting Associates / Bally", "Baby Pac-Man (set 1)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
GAME( 1982, babypac2, babypac, babypac, babypac, by133_state, empty_init, ROT90, "Dave Nutting Associates / Bally", "Baby Pac-Man (set 2)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND )
diff --git a/src/mame/drivers/jungleyo.cpp b/src/mame/drivers/jungleyo.cpp
index 23d66f0016c..d36e38e005e 100644
--- a/src/mame/drivers/jungleyo.cpp
+++ b/src/mame/drivers/jungleyo.cpp
@@ -198,6 +198,9 @@ void jungleyo_state::video_start()
reel->set_scroll_cols(64);
reel->set_transparent_pen(0xff);
}
+
+ m_layer_enable = 0;
+ m_video_priority = 0;
}
uint32_t jungleyo_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 38a70dee9e8..8fa9205db09 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -1034,6 +1034,8 @@ void ksys573_state::driver_start()
save_item( NAME( m_n_security_control ) );
save_item( NAME( m_control ) );
+
+ m_h8_index = 0;
}
void ksys573_state::machine_reset()
diff --git a/src/mame/drivers/mil4000.cpp b/src/mame/drivers/mil4000.cpp
index 93db37c1e1e..c0335a32821 100644
--- a/src/mame/drivers/mil4000.cpp
+++ b/src/mame/drivers/mil4000.cpp
@@ -119,6 +119,8 @@
#include "mil4000.lh"
+namespace {
+
#define MAIN_CLOCK XTAL(12'000'000)
#define SEC_CLOCK XTAL(14'318'181)
@@ -256,6 +258,9 @@ void mil4000_state::video_start()
save_item(NAME(m_vblank));
save_item(NAME(m_hblank));
+
+ m_vblank = 0;
+ m_hblank = 0;
}
uint32_t mil4000_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -771,6 +776,8 @@ ROM_START( chewheel )
ROM_LOAD( "chewheel_nvram.bin", 0x0000, 0x4000, CRC(af73a270) SHA1(3e3e2c0a629bf506830b34d4c5a45ddbece618c3) )
ROM_END
+} // Anonymous namespace
+
// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT
GAMEL( 2000, mil4000, 0, mil4000, mil4000, mil4000_state, empty_init, ROT0, "Sure Milano", "Millennium Nuovo 4000 (Version 2.0)", 0, layout_mil4000 )
diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp
index e92c33a4771..1b1921e5139 100644
--- a/src/mame/drivers/mpu4vid.cpp
+++ b/src/mame/drivers/mpu4vid.cpp
@@ -209,6 +209,8 @@ TODO:
#include "v4strike.lh"
+namespace {
+
class mpu4vid_state : public mpu4_state
{
public:
@@ -267,6 +269,12 @@ public:
void init_cybcas();
void init_v4frfact();
void init_bwbhack();
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+
private:
required_device<m68000_base_device> m_videocpu;
optional_device<scn2674_device> m_scn2674;
@@ -287,9 +295,6 @@ private:
int m_gfx_index;
int8_t m_cur[2];
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
SCN2674_DRAW_CHARACTER_MEMBER(display_pixels);
DECLARE_WRITE_LINE_MEMBER(m6809_acia_irq);
DECLARE_WRITE_LINE_MEMBER(m68k_acia_irq);
@@ -321,6 +326,7 @@ private:
void mpu4_vram(address_map &map);
void mpu4oki_68k_map(address_map &map);
+ void mpu4_6809_map(address_map &map);
void mpu4_6809_german_map(address_map &map);
void vidcharacteriser_4k_lookup_w(offs_t offset, uint8_t data);
@@ -346,7 +352,7 @@ private:
*************************************/
/* The interrupt system consists of a 74148 priority encoder
- with the following interrupt priorites. A lower number
+ with the following interrupt priorities. A lower number
indicates a lower priority:
7 - Game Card
@@ -1886,6 +1892,9 @@ void mpu4vid_state::machine_reset()
m_prot_col = 0;
m_chr_counter = 0;
m_chr_value = 0;
+
+ m_m6840_irq_state = 0;
+ m_m6850_irq_state = 0;
}
void mpu4vid_state::mpu4_68k_map_base(address_map &map)
@@ -2027,7 +2036,7 @@ void mpu4vid_state::bwbvidoki_68k_bt471_map(address_map& map)
}
/* TODO: Fix up MPU4 map*/
-void mpu4_state::mpu4_6809_map(address_map &map)
+void mpu4vid_state::mpu4_6809_map(address_map &map)
{
map(0x0000, 0x07ff).ram().share("nvram");
map(0x0800, 0x0801).rw("acia6850_0", FUNC(acia6850_device::read), FUNC(acia6850_device::write));
@@ -8972,6 +8981,7 @@ ROM_START( v4rencasi )
/* none present */
ROM_END
+} // Anonymous namespace
/* Complete sets */
diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp
index 77e46cda0c9..d8c9e881486 100644
--- a/src/mame/drivers/overdriv.cpp
+++ b/src/mame/drivers/overdriv.cpp
@@ -317,6 +317,7 @@ void overdriv_state::machine_reset()
m_zoom_colorbase[1] = 0;
m_road_colorbase[0] = 0;
m_road_colorbase[1] = 0;
+ m_fake_timer = 0;
/* start with cpu B halted */
m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
diff --git a/src/mame/drivers/umipoker.cpp b/src/mame/drivers/umipoker.cpp
index 912ea0ab92f..c9e907cce5b 100644
--- a/src/mame/drivers/umipoker.cpp
+++ b/src/mame/drivers/umipoker.cpp
@@ -31,6 +31,8 @@
#include "saiyukip.lh"
+namespace {
+
class umipoker_state : public driver_device
{
public:
@@ -121,6 +123,7 @@ void umipoker_state::video_start()
m_tilemap[3]->set_transparent_pen(0);
save_item(NAME(m_scrolly));
+ std::fill(std::begin(m_scrolly), std::end(m_scrolly), 0);
}
uint32_t umipoker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
@@ -716,6 +719,8 @@ ROM_START( saiyukip )
ROM_CONTINUE( 0x000000, 0x040000 )
ROM_END
+} // Anonymous namespace
+
/******************************************
* Game Drivers *
diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h
index 9efefa08ac0..ec7a63849c7 100644
--- a/src/mame/includes/mpu4.h
+++ b/src/mame/includes/mpu4.h
@@ -237,7 +237,6 @@ public:
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- void mpu4_6809_map(address_map &map);
void mpu4_memmap(address_map &map);
void lamp_extend_small(int data);
void lamp_extend_large(int data,int column,int active);