summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/unsp
diff options
context:
space:
mode:
author David Haywood <28625134+DavidHaywood@users.noreply.github.com>2022-02-24 22:45:23 +0000
committer GitHub <noreply@github.com>2022-02-24 17:45:23 -0500
commit65f39f1380be6bd78ef00fddc69ac9734f8328c4 (patch)
tree2c67d2f197e4d40e32f91347fd07c30ac47f360b /src/devices/cpu/unsp
parentb679b65ed88e6ba4d69efd1d2d6842962fac69b2 (diff)
added internal ROM for mapacman [Sean Riddle, stefo, jrideburg, Team Europe, f205v, Osso1] (#9337)
* added internal ROM for mapacman [Sean Riddle, stefo, jrideburg, Team Europe, f205v, Osso1] * stub some accesses so we can get an idea of memory areas
Diffstat (limited to 'src/devices/cpu/unsp')
-rw-r--r--src/devices/cpu/unsp/unsp.cpp7
-rw-r--r--src/devices/cpu/unsp/unsp.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp
index 1239a1075ed..f7de4e79846 100644
--- a/src/devices/cpu/unsp/unsp.cpp
+++ b/src/devices/cpu/unsp/unsp.cpp
@@ -59,6 +59,7 @@ unsp_device::unsp_device(const machine_config &mconfig, device_type type, const
, m_mem_read(nullptr)
, m_mem_write(nullptr)
, m_enable_drc(false)
+ , m_vectorbase(0xfff0)
{
m_iso = 10;
m_numregs = 8;
@@ -317,7 +318,7 @@ void unsp_device::device_reset()
m_core->m_r[i] = 0xdeadbeef;
}
- m_core->m_r[REG_PC] = read16(0xfff7);
+ m_core->m_r[REG_PC] = read16(m_vectorbase + 0x7);
m_core->m_enable_irq = 0;
m_core->m_enable_fiq = 0;
m_core->m_fir_move = 1;
@@ -454,7 +455,7 @@ inline void unsp_device::trigger_fiq()
push(m_core->m_r[REG_PC], &m_core->m_r[REG_SP]);
push(m_core->m_r[REG_SR], &m_core->m_r[REG_SP]);
- m_core->m_r[REG_PC] = read16(0xfff6);
+ m_core->m_r[REG_PC] = read16(m_vectorbase + 0x06);
m_core->m_r[REG_SR] = 0;
standard_irq_callback(UNSP_FIQ_LINE);
}
@@ -476,7 +477,7 @@ inline void unsp_device::trigger_irq(int line)
if (m_core->m_ine)
m_core->m_pri = line;
- m_core->m_r[REG_PC] = read16(0xfff8 + line);
+ m_core->m_r[REG_PC] = read16(m_vectorbase + 0x08 + line);
m_core->m_r[REG_SR] = 0;
standard_irq_callback(UNSP_IRQ0_LINE+line);
}
diff --git a/src/devices/cpu/unsp/unsp.h b/src/devices/cpu/unsp/unsp.h
index cd25d6c55e7..010720adeec 100644
--- a/src/devices/cpu/unsp/unsp.h
+++ b/src/devices/cpu/unsp/unsp.h
@@ -99,6 +99,8 @@ public:
unsp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual ~unsp_device();
+ void set_vectorbase(uint16_t vector) { m_vectorbase = vector; }
+
uint8_t get_csb();
void set_ds(uint16_t ds);
@@ -317,6 +319,7 @@ private:
uml::code_handle *m_mem_write;
bool m_enable_drc;
+ uint16_t m_vectorbase;
void execute_run_drc();
void flush_drc_cache();