Skip to content

Commit

Permalink
[#15] Combine on_decode_jp_irp().
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Aug 29, 2021
1 parent f715732 commit dce2229
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions z80.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@ class internals::decoder_base : public B {
fast_u16 nn = self().on_imm16_read();
self().on_read_cycle_extra_1t();
self().on_xcall_nn(op, nn); }
void on_decode_jp_irp() {
if(!self().on_is_z80())
self().on_fetch_cycle_extra_1t();
self().on_jp_irp(); }

void on_decode_cb_prefix() {
if(!self().on_is_z80())
Expand Down Expand Up @@ -1201,9 +1205,6 @@ class i8080_decoder : public internals::decoder_base<B> {
void on_decode_halt() {
self().on_fetch_cycle_extra_3t();
self().on_halt(); }
void on_decode_jp_irp() {
self().on_fetch_cycle_extra_1t();
self().on_jp_irp(); }

protected:
using base::self;
Expand Down Expand Up @@ -1254,8 +1255,6 @@ class z80_decoder : public internals::decoder_base<B> {
return self().on_jr_cc(cc, self().on_disp_read()); }
void on_decode_halt() {
self().on_halt(); }
void on_decode_jp_irp() {
self().on_jp_irp(); }

protected:
using base::self;
Expand Down

0 comments on commit dce2229

Please sign in to comment.