From 50703ce60bf04f0ea3c4961d4712b2cecddbee35 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sat, 13 Oct 2018 16:49:09 +1100 Subject: [PATCH] (nw) sm8500: fix line accidently deleted; z8 : when pc adjusted, move yellow bar --- src/devices/cpu/sm8500/sm8500.cpp | 1 + src/devices/cpu/sm8500/sm8500.h | 2 +- src/devices/cpu/z8/z8.cpp | 15 ++++++++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/devices/cpu/sm8500/sm8500.cpp b/src/devices/cpu/sm8500/sm8500.cpp index 9196dc77ac9..d5ad5050063 100644 --- a/src/devices/cpu/sm8500/sm8500.cpp +++ b/src/devices/cpu/sm8500/sm8500.cpp @@ -272,6 +272,7 @@ void sm8500_cpu_device::process_interrupts() m_IR0 = m_program->read_byte(0x12); m_IR1 = m_program->read_byte(0x13); m_PS0 = m_program->read_byte(0x1e); + m_PS1 = m_program->read_byte(0x1f); switch( irqline ) { case WDT_INT: diff --git a/src/devices/cpu/sm8500/sm8500.h b/src/devices/cpu/sm8500/sm8500.h index 247a283685f..bd18a889bee 100644 --- a/src/devices/cpu/sm8500/sm8500.h +++ b/src/devices/cpu/sm8500/sm8500.h @@ -14,7 +14,7 @@ enum { /* "main" 16 bit register */ - SM8500_PC=1, SM8500_SP, SM8500_PS, SM8500_SYS16, SM8500_RR0, SM8500_RR2, SM8500_RR4, SM8500_RR6, SM8500_RR8, SM8500_RR10, + SM8500_PC=1, SM8500_SP, SM8500_PS, SM8500_SYS16, SM8500_RR0, SM8500_RR2, SM8500_RR4, SM8500_RR6, SM8500_RR8, SM8500_RR10, SM8500_RR12, SM8500_RR14, /* additional internal 8 bit registers */ SM8500_IE0, SM8500_IE1, SM8500_IR0, SM8500_IR1, SM8500_P0, SM8500_P1, SM8500_P2, SM8500_P3, SM8500_SYS, SM8500_CKC, diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp index 3efd3b8b2bc..52c2ee4627e 100644 --- a/src/devices/cpu/z8/z8.cpp +++ b/src/devices/cpu/z8/z8.cpp @@ -792,9 +792,9 @@ void z8_device::device_start() /* set up the state table */ { - state_add(Z8_PC, "PC", m_pc); - state_add(STATE_GENPC, "GENPC", m_pc).noshow(); - state_add(STATE_GENPCBASE, "CURPC", m_ppc).noshow(); + state_add(Z8_PC, "PC", m_pc).callimport(); + state_add(STATE_GENPC, "GENPC", m_pc).callimport().noshow(); + state_add(STATE_GENPCBASE, "CURPC", m_ppc).callimport().noshow(); state_add(Z8_SP, "SP", m_fake_sp).callimport().callexport(); state_add(STATE_GENSP, "GENSP", m_fake_sp).callimport().callexport().noshow(); state_add(Z8_RP, "RP", m_r[Z8_REGISTER_RP]); @@ -1051,6 +1051,15 @@ void z8_device::state_import(const device_state_entry &entry) { switch (entry.index()) { + case STATE_GENPC: + case Z8_PC: + m_ppc = m_pc; + break; + + case STATE_GENPCBASE: + m_pc = m_ppc; + break; + case Z8_SP: case STATE_GENSP: m_r[Z8_REGISTER_SPH] = m_fake_sp >> 8;