summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2021-02-10 19:21:56 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2021-02-10 19:21:56 +0100
commit8364e1860827da78796e73e43fd646858c9ef20c (patch)
tree42aadf7ff3afe6f31636dbe0da8135fad4edb5d1
parentcc45dfe9cb7b5fe147310016ea2108517ded2cb5 (diff)
sauro, sliver, speedatk, topspeed: initialized some variables which were causing incorrect behaviours in drvnoclear debug builds
-rw-r--r--src/mame/drivers/sliver.cpp22
-rw-r--r--src/mame/drivers/speedatk.cpp2
-rw-r--r--src/mame/includes/speedatk.h6
-rw-r--r--src/mame/includes/topspeed.h2
-rw-r--r--src/mame/video/sauro.cpp2
5 files changed, 23 insertions, 11 deletions
diff --git a/src/mame/drivers/sliver.cpp b/src/mame/drivers/sliver.cpp
index 13110011ade..a6ad6b876dc 100644
--- a/src/mame/drivers/sliver.cpp
+++ b/src/mame/drivers/sliver.cpp
@@ -11,7 +11,6 @@ hardware JPEG decompression chips.
TODO:
- verify OKI rom banking (bank num inverted or not)
-- DIPS
- fix transparency problems in some stages
@@ -79,6 +78,8 @@ Notes:
#include "jpeglib.h"
+namespace {
+
#define FIFO_SIZE 1024
#define IO_SIZE 0x100
#define COMMAND_SIZE 8
@@ -98,6 +99,11 @@ public:
void sliver(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+ virtual void device_post_load() override;
+
private:
uint16_t m_io_offset;
uint16_t m_io_reg[IO_SIZE];
@@ -132,17 +138,12 @@ private:
TIMER_DEVICE_CALLBACK_MEMBER(obj_irq_cb);
- virtual void machine_start() override;
- virtual void video_start() override;
-
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void plot_pixel_rgb(int x, int y, uint32_t r, uint32_t g, uint32_t b);
void plot_pixel_pal(int x, int y, int addr);
void blit_gfx();
void render_jpeg();
- void postload();
-
void oki_map(address_map &map);
void ramdac_map(address_map &map);
void sliver_map(address_map &map);
@@ -417,10 +418,13 @@ void sliver_state::video_start()
save_item(NAME(m_jpeg_x));
save_item(NAME(m_jpeg_y));
- machine().save().register_postload(save_prepost_delegate(FUNC(sliver_state::postload), this));
+ m_jpeg1 = 0;
+ m_jpeg2 = 0;
+ m_jpeg_x = 0;
+ m_jpeg_y = 0;
}
-void sliver_state::postload()
+void sliver_state::device_post_load()
{
render_jpeg();
}
@@ -598,6 +602,8 @@ ROM_START( slivera )
// no rom 12 on PCB, played through the game and doesn't seem to be required for this gfx set, all girls present.
ROM_END
+} // Anonymous namespace
+
GAME( 1996, sliver, 0, sliver, sliver, sliver_state, empty_init, ROT0, "Hollow Corp", "Sliver (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
GAME( 1996, slivera, sliver, sliver, sliver, sliver_state, empty_init, ROT0, "Hollow Corp", "Sliver (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/speedatk.cpp b/src/mame/drivers/speedatk.cpp
index 3c17d0d0313..067c0871e2f 100644
--- a/src/mame/drivers/speedatk.cpp
+++ b/src/mame/drivers/speedatk.cpp
@@ -93,6 +93,8 @@ void speedatk_state::machine_start()
save_item(NAME(m_km_status));
save_item(NAME(m_coin_settings));
save_item(NAME(m_coin_impulse));
+
+ m_coin_impulse = 0;
}
uint8_t speedatk_state::iox_key_matrix_calc(uint8_t p_side)
diff --git a/src/mame/includes/speedatk.h b/src/mame/includes/speedatk.h
index 87189613e55..0b5c11e4763 100644
--- a/src/mame/includes/speedatk.h
+++ b/src/mame/includes/speedatk.h
@@ -23,6 +23,10 @@ public:
void speedatk(machine_config &config);
+protected:
+ virtual void machine_start() override;
+ virtual void video_start() override;
+
private:
required_device<cpu_device> m_maincpu;
required_device<mc6845_device> m_crtc;
@@ -47,8 +51,6 @@ private:
void m6845_w(offs_t offset, uint8_t data);
void output_w(uint8_t data);
- virtual void machine_start() override;
- virtual void video_start() override;
void speedatk_palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h
index 6a5c418df73..6b35a16e45d 100644
--- a/src/mame/includes/topspeed.h
+++ b/src/mame/includes/topspeed.h
@@ -86,7 +86,7 @@ private:
u8 m_msm2_vck2;
#ifdef MAME_DEBUG
- u8 m_dislayer[5];
+ u8 m_dislayer[5] = { 0, 0, 0, 0, 0 };
#endif
void msm5205_update(int chip);
diff --git a/src/mame/video/sauro.cpp b/src/mame/video/sauro.cpp
index cd228c55fa6..b88de8924db 100644
--- a/src/mame/video/sauro.cpp
+++ b/src/mame/video/sauro.cpp
@@ -166,6 +166,8 @@ VIDEO_START_MEMBER(sauro_state,trckydoc)
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(sauro_state::get_tile_info_bg)), TILEMAP_SCAN_COLS,
8, 8, 32, 32);
+
+ m_palette_bank = 0;
}
void sauro_state::trckydoc_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)