Skip to content

Commit

Permalink
Small simplification of the IM0 code
Browse files Browse the repository at this point in the history
  • Loading branch information
agaxia committed Nov 23, 2023
1 parent 0974580 commit 600ef57
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sources/Z80.c
Original file line number Diff line number Diff line change
Expand Up @@ -2024,9 +2024,9 @@ INSN(hook)
/* 9 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* A */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* B */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* C */ 1, 0, 3, 0, 3, 0, 0, 1, 1, 0, 3, 0, 3, 3, 0, 1,
/* C */ 1, 0, 3, 3, 3, 0, 0, 1, 1, 1, 3, 0, 3, 3, 0, 1,
/* D */ 1, 0, 3, 0, 3, 0, 0, 1, 1, 0, 3, 0, 3, 0, 0, 1,
/* E */ 1, 0, 3, 0, 3, 0, 0, 1, 1, 0, 3, 0, 3, 0, 0, 1,
/* E */ 1, 0, 3, 0, 3, 0, 0, 1, 1, 1, 3, 0, 3, 0, 0, 1,
/* F */ 1, 0, 3, 0, 3, 0, 0, 1, 1, 0, 3, 0, 3, 0, 0, 1};
#endif

Expand Down Expand Up @@ -2558,9 +2558,7 @@ Z80_API zusize z80_run(Z80 *self, zusize cycles)

else {
cycles += 2 + insn_table[ird](self);

/* Restore PC, except for `jp WORD`, `jp (hl)` and `ret` */
if (ird != 0xC3 && (ird & 0xDF) != 0xC9) PC = im0.pc;
PC = im0.pc;
}

im0_finalize:
Expand Down

0 comments on commit 600ef57

Please sign in to comment.