Fix TRAP restore PC
This commit is contained in:
parent
db966c8cb8
commit
eef255b507
|
@ -1636,7 +1636,7 @@ static void cpuSUBF_S(VB *sim) {
|
|||
|
||||
/* TRAP */
|
||||
static void cpuTRAP(VB *sim) {
|
||||
sim->cpu.clocks += cpuClocks(15);
|
||||
cpuAdvance(sim, cpuClocks(15));
|
||||
cpuThrow(sim, 0xFFA0 + cpuGetImm5U(sim));
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ static void tmrWriteControl(VB *sim, uint8_t value) {
|
|||
if (
|
||||
!sim->tmr.t_clk_sel &&
|
||||
(value & 0x10) && /* T-Clk-Sel */
|
||||
sim->tmr.tick20 != 4
|
||||
sim->tmr.tick20 != 0
|
||||
) {
|
||||
tmrUpdate(sim, sim->tmr.counter == 0 ?
|
||||
sim->tmr.reload : sim->tmr.counter - 1);
|
||||
|
|
Loading…
Reference in New Issue