summaryrefslogtreecommitdiff
path: root/ztestrun.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-07-28 22:59:09 -0700
committerMichael Pavone <pavone@retrodev.com>2016-07-28 22:59:09 -0700
commit406d8bbfacb65eb1a48ab67fc1339546a6f16cc4 (patch)
treeae49c41d91e8e323129766fdc9336e5c64abff2e /ztestrun.c
parent8e8fa1937a768d6558b903c78fe0ea7150b36865 (diff)
Partial support for undocumented flag bits
Diffstat (limited to 'ztestrun.c')
-rw-r--r--ztestrun.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ztestrun.c b/ztestrun.c
index 3e7b5f0..7b4d2a4 100644
--- a/ztestrun.c
+++ b/ztestrun.c
@@ -108,8 +108,11 @@ int main(int argc, char ** argv)
(context.regs[Z80_IXH] << 8) | context.regs[Z80_IXL],
(context.regs[Z80_IYH] << 8) | context.regs[Z80_IYL],
context.sp, context.im, context.iff1, context.iff2);
- printf("Flags: SZHVNC\n"
- " %d%d%d%d%d%d\n", context.flags[ZF_S], context.flags[ZF_Z], context.flags[ZF_H], context.flags[ZF_PV], context.flags[ZF_N], context.flags[ZF_C]);
+ printf("Flags: SZYHXVNC\n"
+ " %d%d%d%d%d%d%d%d\n",
+ context.flags[ZF_S], context.flags[ZF_Z], context.flags[ZF_XY] >> 5 & 1, context.flags[ZF_H],
+ context.flags[ZF_XY] >> 3 & 1, context.flags[ZF_PV], context.flags[ZF_N], context.flags[ZF_C]
+ );
puts("--Alternate Regs--");
printf("A: %X\nB: %X\nC: %X\nD: %X\nE: %X\nHL: %X\n",
context.alt_regs[Z80_A], context.alt_regs[Z80_B], context.alt_regs[Z80_C],