From cf1d2eef0ae109c7c648eabbbf5fc460bf9fa8ae Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Sun, 19 Jan 2025 10:12:28 +0100 Subject: konami/zr107.cpp and some related devices: initialized some variables --- src/mame/konami/k001005.cpp | 19 +++++++++++++++++++ src/mame/konami/k054156_k054157_k056832.cpp | 2 +- src/mame/konami/konppc.cpp | 3 +++ src/mame/konami/zr107.cpp | 23 +++++++++++++---------- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/mame/konami/k001005.cpp b/src/mame/konami/k001005.cpp index 46e61427fd8..552ededb3e6 100644 --- a/src/mame/konami/k001005.cpp +++ b/src/mame/konami/k001005.cpp @@ -36,6 +36,25 @@ k001005_renderer::k001005_renderer(device_t &parent, screen_device &screen, devi m_3dfifo = std::make_unique(0x10000); m_3dfifo_ptr = 0; m_fb_page = 0; + m_light_r = 0; + m_light_g = 0; + m_light_b = 0; + m_ambient_r = 0; + m_ambient_g = 0; + m_ambient_b = 0; + m_fog_r = 0; + m_fog_g = 0; + m_fog_b = 0; + m_far_z = 0; + m_fog_start_z = 0; + m_fog_end_z = 0; + m_reg_fog_start = 0; + m_viewport_min_x = 0; + m_viewport_max_x = 0; + m_viewport_min_y = 0; + m_viewport_max_y = 0; + m_viewport_center_x = 0; + m_viewport_center_y = 0; m_cliprect = rectangle(0, width-1, 0, height-1); diff --git a/src/mame/konami/k054156_k054157_k056832.cpp b/src/mame/konami/k054156_k054157_k056832.cpp index 0b70695b9de..dfa835f4ec2 100644 --- a/src/mame/konami/k054156_k054157_k056832.cpp +++ b/src/mame/konami/k054156_k054157_k056832.cpp @@ -211,7 +211,6 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d //m_line_dirty[K056832_PAGE_COUNT][8], //m_all_lines_dirty[K056832_PAGE_COUNT], //m_page_tile_mode[K056832_PAGE_COUNT], - //m_last_colorbase[K056832_PAGE_COUNT], //m_layer_tile_mode[8], m_default_layer_association(0), m_layer_association(0), @@ -224,6 +223,7 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d m_cur_tile_bank(0), m_k055555(*this, finder_base::DUMMY_TAG) { + std::fill(std::begin(m_last_colorbase), std::end(m_last_colorbase), 0); } void k056832_device::create_tilemaps() diff --git a/src/mame/konami/konppc.cpp b/src/mame/konami/konppc.cpp index c372c29e856..331be121e5f 100644 --- a/src/mame/konami/konppc.cpp +++ b/src/mame/konami/konppc.cpp @@ -33,6 +33,9 @@ void konppc_device::device_start() for (i=0; i < num_cgboards; i++) { dsp_comm_ppc[i][0] = 0x00; + dsp_comm_ppc[i][1] = 0x00; + dsp_comm_sharc[i][0] = 0x00; + dsp_comm_sharc[i][1] = 0x00; dsp_shared_ram[i] = std::make_unique(DSP_BANK_SIZE * 2/4); dsp_shared_ram_bank[i] = 0; diff --git a/src/mame/konami/zr107.cpp b/src/mame/konami/zr107.cpp index 607b0e50ec6..037c26f7507 100644 --- a/src/mame/konami/zr107.cpp +++ b/src/mame/konami/zr107.cpp @@ -169,21 +169,24 @@ Check drivers/gticlub.cpp for details on the bottom board. */ #include "emu.h" + +#include "k001005.h" +#include "k001006.h" +#include "k001604.h" +#include "k054156_k054157_k056832.h" +#include "konami_helper.h" +#include "konppc.h" + #include "cpu/m68000/m68000.h" #include "cpu/powerpc/ppc.h" #include "cpu/sharc/sharc.h" #include "machine/adc083x.h" #include "machine/eepromser.h" #include "machine/k056230.h" -#include "konppc.h" #include "machine/watchdog.h" #include "sound/k054539.h" #include "sound/k056800.h" -#include "k001005.h" -#include "k001006.h" -#include "k001604.h" -#include "k054156_k054157_k056832.h" -#include "konami_helper.h" + #include "emupal.h" #include "speaker.h" @@ -238,10 +241,10 @@ protected: required_shared_ptr m_sharc_dataram; required_device m_konppc; - int m_ccu_vcth; - int m_ccu_vctl; - uint8_t m_sound_ctrl; - uint8_t m_sound_intck; + int m_ccu_vcth = 0; + int m_ccu_vctl = 0; + uint8_t m_sound_ctrl = 0; + uint8_t m_sound_intck = 0; uint8_t sysreg_r(offs_t offset); void sysreg_w(offs_t offset, uint8_t data); -- cgit v1.2.3