summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/unsp/unsp_extended.cpp
diff options
context:
space:
mode:
author David Haywood <28625134+DavidHaywood@users.noreply.github.com>2020-09-04 23:04:10 +0100
committer GitHub <noreply@github.com>2020-09-04 18:04:10 -0400
commitdf472dbacf3ec2a01616d4c6e5b3442b0f7e709c (patch)
treef7148c79ef36fab7dadab41683924953c3648bf5 /src/devices/cpu/unsp/unsp_extended.cpp
parent5b0dd0e54192c7f9e688a16b12ee202b21d9c7bc (diff)
pcp8718 / pcp8728 work, including unsp2.0 fixes [David Haywood] (#7179)
* possible unsp20 fixes * better * tidy ups * reorgainize * force it to run interrupt instead of simulating behavior * more guesses * change how hack works while we figure this out * some kind of external devcice seems to manage the game selection number. * some cleanups of old HLE * modify logging * stop menu crashing, sim code is still very rough tho
Diffstat (limited to 'src/devices/cpu/unsp/unsp_extended.cpp')
-rw-r--r--src/devices/cpu/unsp/unsp_extended.cpp30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/devices/cpu/unsp/unsp_extended.cpp b/src/devices/cpu/unsp/unsp_extended.cpp
index ae60b3afdff..3924f879230 100644
--- a/src/devices/cpu/unsp/unsp_extended.cpp
+++ b/src/devices/cpu/unsp/unsp_extended.cpp
@@ -64,19 +64,10 @@ void unsp_20_device::execute_extended_group(uint16_t op)
if (size == 0) size = 8;
- if ((rx - (size - 1)) >= 0)
+ while (size--)
{
- while (size--)
- {
- push(m_core->m_r[(rx--) + 8], &m_core->m_r[rb]);
- }
+ push(m_core->m_r[((rx--)&7) + 8], &m_core->m_r[rb]);
}
- else
- {
- logerror("(Ext) push <BAD>\n");
- unimplemented_opcode(op, ximm);
- }
-
return;
}
else
@@ -85,25 +76,12 @@ void unsp_20_device::execute_extended_group(uint16_t op)
uint8_t size = (ximm & 0x7000) >> 12;
uint8_t rx = (ximm & 0x0e00) >> 9;
-
if (size == 0) size = 8;
- if ((rx - (size - 1)) >= 0)
+ while (size--)
{
- int realrx = 7 - rx;
-
- while (size--)
- {
- m_core->m_r[(realrx++) + 8] = pop(&m_core->m_r[rb]);
- }
+ m_core->m_r[((++rx)&7) + 8] = pop(&m_core->m_r[rb]);
}
- else
- {
- logerror("(Ext) pop <BAD>\n");
- unimplemented_opcode(op, ximm);
- }
-
-
return;
}
return;