diff --git a/src/emucore/M6502.ins b/src/emucore/M6502.ins index 58cd8d53e..a14a6264b 100644 --- a/src/emucore/M6502.ins +++ b/src/emucore/M6502.ins @@ -619,7 +619,7 @@ case 0x4b: A >>= 1; notZ = A; - N = 0; + N = false; } break; @@ -829,12 +829,12 @@ case 0x6b: if(((value & 0xf0) + (value & 0x10)) > 0x50) { - A = (A + 0x60) & 0xff; - C = 1; + A += 0x60; + C = true; } else { - C = 0; + C = false; } } } @@ -2674,7 +2674,7 @@ case 0x4a: A >>= 1; notZ = A; - N = 0; + N = false; } break; @@ -2693,7 +2693,7 @@ case 0x46: poke(operandAddress, operand, DISASM_WRITE); notZ = operand; - N = 0; + N = false; } break; @@ -2713,7 +2713,7 @@ case 0x56: poke(operandAddress, operand, DISASM_WRITE); notZ = operand; - N = 0; + N = false; } break; @@ -2732,7 +2732,7 @@ case 0x4e: poke(operandAddress, operand, DISASM_WRITE); notZ = operand; - N = 0; + N = false; } break; @@ -2753,7 +2753,7 @@ case 0x5e: poke(operandAddress, operand, DISASM_WRITE); notZ = operand; - N = 0; + N = false; } break; diff --git a/src/emucore/M6502.m4 b/src/emucore/M6502.m4 index dd1ce577e..0f3d859a5 100644 --- a/src/emucore/M6502.m4 +++ b/src/emucore/M6502.m4 @@ -445,12 +445,12 @@ define(M6502_ARR, `{ if(((value & 0xf0) + (value & 0x10)) > 0x50) { - A = (A + 0x60) & 0xff; - C = 1; + A += 0x60; + C = true; } else { - C = 0; + C = false; } } }') @@ -485,7 +485,7 @@ define(M6502_ASR, `{ A >>= 1; notZ = A; - N = 0; + N = false; }') define(M6502_BIT, `{ @@ -695,7 +695,7 @@ define(M6502_LSR, `{ poke(operandAddress, operand, DISASM_WRITE); notZ = operand; - N = 0; + N = false; }') define(M6502_LSRA, `{ @@ -705,7 +705,7 @@ define(M6502_LSRA, `{ A >>= 1; notZ = A; - N = 0; + N = false; }') define(M6502_LXA, `{