>> I.e., for branches, jumps and returns, the stacked PC is "near" the PC
>> of the branch/jump/return instruction, and not the target of this
>> instruction. Sadly, the exact offset is not documented, and probably
>> depends on instruction and addressing mode.
>
>Today, I did some more testing on a real 68000. The stacked PC has the
>following offset to the offending JSR:
I also started fixing this few hours ago, after fixing cputester and
getting the bus error expansion hardware to work (bad connections and
random crashes..) to handle these better. None of these tests were
properly run previously..
Following 68000 jump/branch/return instructions now have correct bus
error stack frame (all addressing modes, except JMP/JSR absolute short
but it seems all of them work mostly identically):
JSR
BSR
JMP
DBcc
Bcc
RTE
RTR
RTS
Both jump to bus error address - 2 (second prefetch causes bus error)
and jump to address that causes bus error (first prefetch causes bus
error) cases tested and confirmed.
Fix is in winuae tree.