summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/esrip/esrip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/esrip/esrip.cpp')
-rw-r--r--src/devices/cpu/esrip/esrip.cpp44
1 files changed, 15 insertions, 29 deletions
diff --git a/src/devices/cpu/esrip/esrip.cpp b/src/devices/cpu/esrip/esrip.cpp
index d3b8b54e225..7a50020d05d 100644
--- a/src/devices/cpu/esrip/esrip.cpp
+++ b/src/devices/cpu/esrip/esrip.cpp
@@ -2,7 +2,7 @@
// copyright-holders:Philip Bennett
/***************************************************************************
- esrip.c
+ esrip.cpp
Implementation of the Entertainment Sciences
AM29116-based Real Time Image Processor
@@ -13,7 +13,6 @@
#include "esrip.h"
#include "esripdsm.h"
-#include "debugger.h"
#include "screen.h"
@@ -183,17 +182,14 @@ void esrip_device::make_ops()
void esrip_device::device_start()
{
/* Register configuration structure callbacks */
- m_fdt_r.resolve_safe(0);
- m_fdt_w.resolve_safe();
m_lbrm = (uint8_t*)machine().root_device().memregion(m_lbrm_prom)->base();
- m_status_in.resolve_safe(0);
- m_draw.bind_relative_to(*owner());
+ m_draw.resolve();
/* Allocate image pointer table RAM */
m_ipt_ram.resize(IPT_RAM_SIZE/2);
- m_program = &space(AS_PROGRAM);
- m_cache = m_program->cache<3, -3, ENDIANNESS_BIG>();
+ space(AS_PROGRAM).cache(m_cache);
+ space(AS_PROGRAM).specific(m_program);
// register our state for the debugger
state_add(STATE_GENPC, "GENPC", m_rip_pc).noshow();
@@ -1671,9 +1667,10 @@ DEFINE_DEVICE_TYPE(ESRIP, esrip_device, "esrip", "Entertainment Sciences RIP")
esrip_device::esrip_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cpu_device(mconfig, ESRIP, tag, owner, clock)
, m_program_config("program", ENDIANNESS_BIG, 64, 9, -3)
- , m_fdt_r(*this)
+ , m_fdt_r(*this, 0)
, m_fdt_w(*this)
- , m_status_in(*this)
+ , m_status_in(*this, 0)
+ , m_draw(*this)
, m_screen(*this, finder_base::DUMMY_TAG)
, m_lbrm_prom(nullptr)
{
@@ -1724,7 +1721,7 @@ void esrip_device::am29116_execute(uint16_t inst, int _sre)
// cycles it takes for one instruction to execute
//-------------------------------------------------
-uint32_t esrip_device::execute_min_cycles() const
+uint32_t esrip_device::execute_min_cycles() const noexcept
{
return 1;
}
@@ -1735,24 +1732,13 @@ uint32_t esrip_device::execute_min_cycles() const
// cycles it takes for one instruction to execute
//-------------------------------------------------
-uint32_t esrip_device::execute_max_cycles() const
+uint32_t esrip_device::execute_max_cycles() const noexcept
{
return 1;
}
//-------------------------------------------------
-// execute_input_lines - return the number of
-// input/interrupt lines
-//-------------------------------------------------
-
-uint32_t esrip_device::execute_input_lines() const
-{
- return 0;
-}
-
-
-//-------------------------------------------------
// execute_set_input - act on a changed input/
// interrupt line
//-------------------------------------------------
@@ -1764,11 +1750,11 @@ void esrip_device::execute_set_input(int inputnum, int state)
void esrip_device::execute_run()
{
- int calldebugger = (machine().debug_flags & DEBUG_FLAG_ENABLED) != 0;
+ const bool calldebugger = debugger_enabled();
uint8_t status;
/* I think we can get away with placing this outside of the loop */
- status = m_status_in(*m_program, 0);
+ status = m_status_in();
/* Core execution loop */
do
@@ -1801,7 +1787,7 @@ void esrip_device::execute_run()
/* FDT RAM: /Enable, Direction and /RAM OE */
else if (!bl44 && !_BIT(m_l2, 3) && bl46)
- y_bus = m_fdt_r(*m_program, m_fdt_cnt, 0xffff);
+ y_bus = m_fdt_r(m_fdt_cnt);
/* IPT RAM: /Enable and /READ */
else if (!_BIT(m_l2, 6) && !_BIT(m_l4, 5))
@@ -1828,7 +1814,7 @@ void esrip_device::execute_run()
/* FDT RAM */
if (!bl44)
- x_bus = m_fdt_r(*m_program, m_fdt_cnt, 0xffff);
+ x_bus = m_fdt_r(m_fdt_cnt);
/* Buffer is enabled - write direction */
else if (!BIT(m_l2, 3) && !bl46)
@@ -1853,7 +1839,7 @@ void esrip_device::execute_run()
/* Write FDT RAM: /Enable, Direction and WRITE */
if (!BIT(m_l2, 3) && !bl46 && !BIT(m_l4, 3))
- m_fdt_w(*m_program, m_fdt_cnt, x_bus, 0xffff);
+ m_fdt_w(m_fdt_cnt, x_bus);
/* Write IPT RAM: /Enable and /WR */
if (!BIT(m_l2, 7) && !BIT(m_l4, 5))
@@ -1879,7 +1865,7 @@ void esrip_device::execute_run()
m_pl7 = m_l7;
/* Latch instruction */
- inst = m_cache->read_qword(RIP_PC);
+ inst = m_cache.read_qword(RIP_PC);
in_h = inst >> 32;
in_l = inst & 0xffffffff;