summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/cpu/patinhofeio/patinho_feio.cpp4
-rw-r--r--src/devices/cpu/unsp/unsp.cpp4
-rw-r--r--src/lib/netlist/devices/nlid_system.h4
-rw-r--r--src/mame/drivers/homelab.cpp2
-rw-r--r--src/mame/drivers/vii.cpp4
-rw-r--r--src/mame/machine/z80bin.cpp2
6 files changed, 12 insertions, 8 deletions
diff --git a/src/devices/cpu/patinhofeio/patinho_feio.cpp b/src/devices/cpu/patinhofeio/patinho_feio.cpp
index 08a17ebd802..47cb41b0deb 100644
--- a/src/devices/cpu/patinhofeio/patinho_feio.cpp
+++ b/src/devices/cpu/patinhofeio/patinho_feio.cpp
@@ -358,14 +358,14 @@ void patinho_feio_cpu_device::execute_instruction()
case 0x92:
//ST 1 = "Se T=1, Pula"
// If T is one, skip the next instruction
- if ((FLAGS & T) == 1)
+ if ((FLAGS & T) == T)
INCREMENT_PC_4K; //skip
return;
case 0x93:
//STM 1 = "Se T=1, Pula e muda"
// If T is one, skip the next instruction
// and toggle T.
- if ((FLAGS & T) == 1){
+ if ((FLAGS & T) == T){
INCREMENT_PC_4K; //skip
FLAGS &= ~T; //set T=0
}
diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp
index 3916505fd90..c8a4025f5cd 100644
--- a/src/devices/cpu/unsp/unsp.cpp
+++ b/src/devices/cpu/unsp/unsp.cpp
@@ -128,7 +128,7 @@ void unsp_device::WRITE16(uint32_t address, uint16_t data)
void unsp_device::device_start()
{
- memset(m_r, 0, sizeof(uint16_t) * UNSP_GPR_COUNT);
+ memset(m_r, 0, sizeof(uint16_t) * 16);
m_irq = 0;
m_fiq = 0;
m_curirq = 0;
@@ -182,7 +182,7 @@ void unsp_device::state_import(const device_state_entry &entry)
void unsp_device::device_reset()
{
- memset(m_r, 0, sizeof(uint16_t) * UNSP_GPR_COUNT);
+ memset(m_r, 0, sizeof(uint16_t) * 16);
UNSP_REG(PC) = READ16(0xfff7);
m_irq = 0;
diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h
index a5574706569..db324a85834 100644
--- a/src/lib/netlist/devices/nlid_system.h
+++ b/src/lib/netlist/devices/nlid_system.h
@@ -128,6 +128,10 @@ namespace netlist
m_off = netlist_time::from_double(m_offset());
unsigned long pati[32];
+ for (int pI = 0; pI < 32; pI++)
+ {
+ pati[pI] = 0;
+ }
m_size = static_cast<std::uint8_t>(pat.size());
unsigned long total = 0;
for (unsigned i=0; i<m_size; i++)
diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp
index 31e224f3243..0b7ea55aeaf 100644
--- a/src/mame/drivers/homelab.cpp
+++ b/src/mame/drivers/homelab.cpp
@@ -732,7 +732,7 @@ QUICKLOAD_LOAD_MEMBER( homelab_state,homelab)
int j = (quick_addr + i);
if (image.fread(&ch, 1) != 1)
{
- char message[256];
+ char message[512];
snprintf(message, ARRAY_LENGTH(message), "%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j);
image.seterror(IMAGE_ERROR_INVALIDIMAGE, message);
image.message("%s: Unexpected EOF while writing byte to %04X", pgmname, (unsigned) j);
diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp
index 25ee804c67a..3084af4c260 100644
--- a/src/mame/drivers/vii.cpp
+++ b/src/mame/drivers/vii.cpp
@@ -1289,8 +1289,8 @@ void spg2xx_cart_state::machine_start()
void spg2xx_game_state::machine_start()
{
- memset(m_video_regs, 0, 0x100 * sizeof(uint16_t));
- memset(m_io_regs, 0, 0x100 * sizeof(uint16_t));
+ memset(m_video_regs, 0, 0x100 * sizeof(m_video_regs[0]));
+ memset(m_io_regs, 0, 0x200 * sizeof(m_io_regs[0]));
m_current_bank = 0;
m_controller_input[0] = 0;
diff --git a/src/mame/machine/z80bin.cpp b/src/mame/machine/z80bin.cpp
index 6fcf9998a36..5da1dafe9f7 100644
--- a/src/mame/machine/z80bin.cpp
+++ b/src/mame/machine/z80bin.cpp
@@ -15,7 +15,7 @@ image_init_result z80bin_load_file(device_image_interface *image, address_space
uint16_t i=0, j, size;
uint8_t data;
char pgmname[256];
- char message[256];
+ char message[512];
image->fseek(7, SEEK_SET);