summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/saturn/saturn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/saturn/saturn.cpp')
-rw-r--r--src/devices/cpu/saturn/saturn.cpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/devices/cpu/saturn/saturn.cpp b/src/devices/cpu/saturn/saturn.cpp
index 004c0c09994..3c89c9239ad 100644
--- a/src/devices/cpu/saturn/saturn.cpp
+++ b/src/devices/cpu/saturn/saturn.cpp
@@ -12,8 +12,6 @@
#include "emu.h"
#include "saturn.h"
-#include "debugger.h"
-
//#define VERBOSE 1
#include "logmacro.h"
@@ -46,17 +44,16 @@ saturn_device::saturn_device(const machine_config &mconfig, const char *tag, dev
: cpu_device(mconfig, SATURN, tag, owner, clock)
, m_program_config("program", ENDIANNESS_LITTLE, 8, 20, 0)
, m_out_func(*this)
- , m_in_func(*this)
+ , m_in_func(*this, 0)
, m_reset_func(*this)
, m_config_func(*this)
, m_unconfig_func(*this)
- , m_id_func(*this)
+ , m_id_func(*this, 0)
, m_crc_func(*this)
, m_rsi_func(*this)
, m_pc(0), m_oldpc(0), m_p(0), m_out(0), m_carry(0), m_decimal(0), m_st(0), m_hst(0)
, m_nmi_state(0), m_irq_state(0), m_irq_enable(0), m_in_irq(0), m_pending_irq(0)
, m_sleeping(0), m_monitor_id(0), m_monitor_in(0)
- , m_program(nullptr), m_cache(nullptr)
, m_icount(0)
, m_debugger_temp(0)
{
@@ -95,17 +92,8 @@ std::unique_ptr<util::disasm_interface> saturn_device::create_disassembler()
void saturn_device::device_start()
{
- m_program = &space(AS_PROGRAM);
- m_cache = m_program->cache<0, 0, ENDIANNESS_LITTLE>();
-
- m_out_func.resolve_safe();
- m_in_func.resolve_safe(0);
- m_reset_func.resolve_safe();
- m_config_func.resolve_safe();
- m_unconfig_func.resolve_safe();
- m_id_func.resolve_safe(0);
- m_crc_func.resolve_safe();
- m_rsi_func.resolve_safe();
+ space(AS_PROGRAM).cache(m_cache);
+ space(AS_PROGRAM).specific(m_program);
memset(m_reg, 0, sizeof(m_reg));
memset(m_d, 0, sizeof(m_d));
@@ -335,15 +323,14 @@ void saturn_device::device_reset()
void saturn_device::saturn_take_irq()
{
+ LOG("SATURN takes IRQ ($%04x)\n", m_pc);
+ standard_irq_callback(SATURN_IRQ_LINE, m_pc);
+
m_in_irq = 1; /* reset by software, using RTI */
m_pending_irq = 0;
m_icount -= 7;
saturn_push(m_pc);
m_pc=IRQ_ADDRESS;
-
- LOG("SATURN takes IRQ ($%04x)\n", m_pc);
-
- standard_irq_callback(SATURN_IRQ_LINE);
}
void saturn_device::execute_run()
@@ -401,7 +388,6 @@ void saturn_device::execute_set_input(int inputnum, int state)
if (m_sleeping && state==1)
{
LOG("SATURN set_wakeup_line(ASSERT)\n");
- standard_irq_callback(SATURN_WAKEUP_LINE);
m_sleeping = 0;
}
break;