summaryrefslogtreecommitdiff
path: root/cpu_opcodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu_opcodes.c')
-rw-r--r--cpu_opcodes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu_opcodes.c b/cpu_opcodes.c
index 2d308da..5fd5634 100644
--- a/cpu_opcodes.c
+++ b/cpu_opcodes.c
@@ -544,7 +544,9 @@ static void opcode_clc(struct nes_state * restrict state) {
static void opcode_cld(struct nes_state * restrict state) {
struct cpu_state * restrict cpu = &state->cpu;
memory_read_dummy(state, cpu->pc);
+#ifdef ENABLE_DECIMAL_MODE
cpu->d = 0;
+#endif
}
static void opcode_cli(struct nes_state * restrict state) {
@@ -568,7 +570,9 @@ static void opcode_sec(struct nes_state * restrict state) {
static void opcode_sed(struct nes_state * restrict state) {
struct cpu_state * restrict cpu = &state->cpu;
memory_read_dummy(state, cpu->pc);
+#ifdef ENABLE_DECIMAL_MODE
cpu->d = 1;
+#endif
}
static void opcode_sei(struct nes_state * restrict state) {