[Z80A] Correct Tw cycles for IO

The Z80 should only be sampling the /WAIT pin during the 3rd cycle T of an IO REQ M Cycle.
Instruction timing tests verified on CPCHawk using WinAPE plustest.dsk.

Note: CPCHawk is the only core to currently use the Z80A /WAIT pin (FlagW), so other core exposure is 0.
This commit is contained in:
Asnivor 2024-10-02 14:24:20 +01:00
parent 2193c0a0e5
commit d513632cf9
3 changed files with 7 additions and 31 deletions

View File

@ -515,7 +515,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
WAIT,
RD_INC, Z, PCl, PCh,
TR, ALU, A,
WAIT,
IDLE,
WAIT,
OUT_INC, Z, ALU, A);
@ -530,7 +530,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
(IDLE,
TR16, Z, W, C, B,
IDLE,
IDLE,
WAIT,
OUT_INC, Z, W, src);
PopulateBUSRQ(0, BIO1, BIO2, BIO3, BIO4);
@ -546,7 +546,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
WAIT,
RD_INC, Z, PCl, PCh,
IDLE,
WAIT,
IDLE,
WAIT,
IN_A_N_INC, A, Z, W);
@ -560,7 +560,7 @@ namespace BizHawk.Emulation.Cores.Components.Z80A
PopulateCURINSTR
(IDLE,
TR16, Z, W, C, B,
WAIT,
IDLE,
WAIT,
IN_INC, dest, Z, W);

View File

@ -461,7 +461,7 @@
(IDLE,
IDLE,
IDLE,
WAIT,
IDLE,
WAIT,
IN, ALU, C, B,
IDLE,
@ -482,7 +482,7 @@
WAIT,
RD, ALU, L, H,
IDLE,
WAIT,
IDLE,
WAIT,
REP_OP_O, C, B, ALU, operation, 3, operation, repeat_instr);

View File

@ -52,31 +52,7 @@ Unknown
#### Test 5: Instruction timing test
| Prefix | OPC | Inst. | Comments |
|:----:|:----:|:-----:|:------------:|
|NONE| D3:4 | OUT A | |
|NONE| DB:4 | IN A | |
|NONE| D3:5 | OUT A | |
|NONE| DB:5 | IN A | |
|ED| 41:3 | OUT (C), B | |
|ED| 49:3 | OUT (C), C | |
|ED| 51:3 | OUT (C), D | |
|ED| 59:3 | OUT (C), E | |
|ED| 61:3 | OUT (C), H | |
|ED| 69:3 | OUT (C), L | |
|ED| 71:3 | OUT (C), 0 | |
|ED| 79:3 | OUT (C), A | |
|ED| A2:6 | INI | |
|ED| A3:6 | OUTI | |
|ED| AA:6 | IND | |
|ED| B2:7/6| INIR | |
|ED| B3:7/6| OTIR | |
|ED| BA:7/6| INDR | |
|ED| BB:7/6| OTDR | |
|DD CB| D3:5| SET 2, (ix+d), e | |
|DD CB| DB:5| SET 3, (ix+d), e | |
Everything else passes. Almost certainly the problems observed relate to IO timing.
All tests passing
#### Test 6: Register 0 test
Unknown