summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/z180/z180.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/z180/z180.cpp')
-rw-r--r--src/devices/cpu/z180/z180.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/devices/cpu/z180/z180.cpp b/src/devices/cpu/z180/z180.cpp
index 3097427bd69..7d8f0c4c4f3 100644
--- a/src/devices/cpu/z180/z180.cpp
+++ b/src/devices/cpu/z180/z180.cpp
@@ -2,7 +2,6 @@
// copyright-holders:Juergen Buchmueller
/*****************************************************************************
*
- * z180.c
* Portable Z180 emulator V0.3
*
*****************************************************************************/
@@ -13,8 +12,8 @@
- HALT processing is not yet perfect. The manual states that
during HALT, all dma and internal i/o incl. timers continue to
work. Currently, only timers are implemented. Ideally, the
- burn_cycles routine would go away and halt processing be
- implemented in cpu_execute.
+ (currently unused) burn_cycles routine would go away and halt
+ processing be implemented in execute_run.
- Documentation for RXS/CTS1 pin is contradictory.
@@ -67,7 +66,7 @@ Package: P = 64-Pin Plastic SDIP
Environmental Flow: C = Plastic Standard
-Example from Ms.Pac-Man/Galaga - 20 year Reunion hardware (see src/mame/drivers/20pacgal.c):
+Example from Ms.Pac-Man/Galaga - 20 year Reunion hardware (see src/mame/namco/20pacgal.cpp):
CPU is Z8S18020VSC = Z180, 20MHz, 68-Pin PLCC, 0C to +70C, Plastic Standard
@@ -1919,7 +1918,7 @@ again:
if ((m_dstat & Z180_DSTAT_DE0) == Z180_DSTAT_DE0 &&
(m_dmode & Z180_DMODE_MMOD) == Z180_DMODE_MMOD)
{
- debugger_instruction_hook(_PCD);
+ debugger_wait_hook();
/* FIXME z180_dma0 should be handled in handle_io_timers */
curcycles = z180_dma0(m_icount);
@@ -1935,18 +1934,21 @@ again:
handle_io_timers(curcycles);
m_after_EI = 0;
- _PPC = _PCD;
- debugger_instruction_hook(_PCD);
-
if (!m_HALT)
{
+ _PPC = _PCD;
+ debugger_instruction_hook(_PCD);
+
m_R++;
m_extra_cycles = 0;
curcycles = exec_op(ROP());
curcycles += m_extra_cycles;
}
else
+ {
+ debugger_wait_hook();
curcycles = 3;
+ }
m_icount -= curcycles;
@@ -1993,18 +1995,21 @@ again:
handle_io_timers(curcycles);
m_after_EI = 0;
- _PPC = _PCD;
- debugger_instruction_hook(_PCD);
-
if (!m_HALT)
{
+ _PPC = _PCD;
+ debugger_instruction_hook(_PCD);
+
m_R++;
m_extra_cycles = 0;
curcycles = exec_op(ROP());
curcycles += m_extra_cycles;
}
else
+ {
+ debugger_wait_hook();
curcycles = 3;
+ }
m_icount -= curcycles;
handle_io_timers(curcycles);
@@ -2015,7 +2020,7 @@ again:
/****************************************************************************
* Burn 'cycles' T-states. Adjust R register for the lost time
****************************************************************************/
-void z180_device::execute_burn(int32_t cycles)
+void z180_device::burn_cycles(int32_t cycles)
{
int extra_cycles = memory_wait_states();