diff options
author | 2020-09-04 23:04:10 +0100 | |
---|---|---|
committer | 2020-09-04 18:04:10 -0400 | |
commit | df472dbacf3ec2a01616d4c6e5b3442b0f7e709c (patch) | |
tree | f7148c79ef36fab7dadab41683924953c3648bf5 /src/devices/cpu/unsp/unspdasm_extended.cpp | |
parent | 5b0dd0e54192c7f9e688a16b12ee202b21d9c7bc (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/unspdasm_extended.cpp')
-rw-r--r-- | src/devices/cpu/unsp/unspdasm_extended.cpp | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/devices/cpu/unsp/unspdasm_extended.cpp b/src/devices/cpu/unsp/unspdasm_extended.cpp index 6ec49ec0d13..3caa182b237 100644 --- a/src/devices/cpu/unsp/unspdasm_extended.cpp +++ b/src/devices/cpu/unsp/unspdasm_extended.cpp @@ -133,32 +133,30 @@ offs_t unsp_20_disassembler::disassemble_extended_group(std::ostream& stream, of uint8_t rx = (ximm & 0x0e00) >> 9; if (size == 0) size = 8; - size -= 1; - - if ((rx-size) >= 0) - util::stream_format(stream, "(Extended group) push %s, %s to [%s]", - extregs[rx-size], - extregs[rx], - (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); - else - util::stream_format(stream, "(Extended group) push <BAD>"); + + int start = rx; + int end = (start-(size-1))&7; + + util::stream_format(stream, "(Extended group) push %s, %s to [%s]", + extregs[start], + extregs[end], + (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); } else { uint8_t rb = (ximm & 0x000f) >> 0; uint8_t size = (ximm & 0x7000) >> 12; uint8_t rx = (ximm & 0x0e00) >> 9; - + if (size == 0) size = 8; - size -= 1; - - if ((rx-size) >= 0) - util::stream_format(stream, "(Extended group) pop %s, %s from [%s]", - extregs[7-rx], - extregs[7-(rx-size)], - (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); - else - util::stream_format(stream, "(Extended group) pop <BAD>"); + + int start = (rx + 1)&7; + int end = (start+(size-1))&7; + + util::stream_format(stream, "(Extended group) pop %s, %s from [%s]", + extregs[start], + extregs[end], + (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); } return UNSP_DASM_OK; } |