Skip to content

Commit 38b6774

Browse files
committed
z80.h: fix IM0
1 parent 41715c6 commit 38b6774

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

chips/z80.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2718,7 +2718,7 @@ uint64_t z80_tick(z80_t* cpu, uint64_t pins) {
27182718
case 1637: pins|=(Z80_M1|Z80_IORQ);_step(); // int_im0 T:1
27192719
case 1638: _wait();cpu->opcode=_z80_get_db(pins);_step(); // int_im0 T:2
27202720
case 1639: pins=_z80_refresh(cpu,pins);_step(); // int_im0 T:3
2721-
case 1640: cpu->step=cpu->opcode; cpu->addr=cpu->hl;_step(); // int_im0 T:4
2721+
case 1640: cpu->addr=cpu->hl;_goto(cpu->opcode);_step(); // int_im0 T:4
27222722
case 1641: _fetch(); // int_im0 T:5
27232723
case 1642: cpu->iff1=cpu->iff2=false;_step(); // int_im1 T:0
27242724
case 1643: pins|=(Z80_M1|Z80_IORQ);_step(); // int_im1 T:1

codegen/z80_desc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ int_im0:
685685
- { type: generic, tcycles: 1, action: "_wait();cpu->opcode=_z80_get_db(pins)" }
686686
# combined refresh and branch to loaded instruction cycle
687687
- { type: generic, tcycles: 1, action: "pins=_z80_refresh(cpu,pins)" }
688-
- { type: generic, tcycles: 1, action: "cpu->step=cpu->opcode; cpu->addr=cpu->hl" }
688+
- { type: generic, tcycles: 1, action: "cpu->addr=cpu->hl;_goto(cpu->opcode)" }
689689

690690
int_im1:
691691
flags: { special: true }

0 commit comments

Comments
 (0)