OSDN Git Service

unchanged status reg bug
authorU-ASIAPACIFIC\motooka <motooka@MOTOOKA2.asiapacific.hpqcorp.net>
Fri, 26 Feb 2016 10:37:59 +0000 (19:37 +0900)
committerU-ASIAPACIFIC\motooka <motooka@MOTOOKA2.asiapacific.hpqcorp.net>
Fri, 26 Feb 2016 10:37:59 +0000 (19:37 +0900)
emulator/6502core.c

index a48eba7..90261b3 100644 (file)
@@ -1812,6 +1812,10 @@ int func_PHP(void) {
     int done = FALSE;
     unsigned char st;
     memcpy(&st, &cpu_reg.status, sizeof(struct status_reg));
+    /* researved bit always 1*/
+    cpu_reg.status.researved = 1;
+    /* decimal always 0*/
+    cpu_reg.status.decimal = 0;
     ret = push_op(st, &done);
     exec_done = done;
     return ret;