mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
z80, fix for cz80 handling of A register
This commit is contained in:
parent
cbc2ca037a
commit
0be9a92e77
4 changed files with 40 additions and 27 deletions
|
@ -200,9 +200,15 @@ OP_LD_mNN_xx:
|
|||
POP
|
||||
-----------------------------------------*/
|
||||
|
||||
OP(0xf1): // POP AF
|
||||
OP_POP_AF:
|
||||
POP_16(res)
|
||||
zA = res >> 8;
|
||||
zF = res & 0xFF;
|
||||
RET(10)
|
||||
|
||||
OP(0xc1): // POP BC
|
||||
OP(0xd1): // POP DE
|
||||
OP(0xf1): // POP AF
|
||||
OP_POP_RR:
|
||||
data = CPU->pzR16[(Opcode >> 4) & 3];
|
||||
|
||||
|
@ -215,9 +221,14 @@ OP_POP:
|
|||
PUSH
|
||||
-----------------------------------------*/
|
||||
|
||||
OP(0xf5): // PUSH AF
|
||||
OP_PUSH_AF:
|
||||
PUSH_16((zA << 8) | zF);
|
||||
RET(11)
|
||||
|
||||
|
||||
OP(0xc5): // PUSH BC
|
||||
OP(0xd5): // PUSH DE
|
||||
OP(0xf5): // PUSH AF
|
||||
OP_PUSH_RR:
|
||||
data = CPU->pzR16[(Opcode >> 4) & 3];
|
||||
|
||||
|
@ -232,9 +243,9 @@ OP_PUSH:
|
|||
|
||||
OP(0x08): // EX AF,AF'
|
||||
OP_EX_AF_AF2:
|
||||
res = zAF;
|
||||
zAF = zAF2;
|
||||
zAF2 = res;
|
||||
res = zFA;
|
||||
zFA = zFA2;
|
||||
zFA2 = res;
|
||||
RET(4)
|
||||
|
||||
OP(0xeb): // EX DE,HL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue