diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-03-31 20:31:05 +0200 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-03-31 20:31:05 +0200 |
| commit | a386ef64f6376b3ef8434a6cdf456495287fcbca (patch) | |
| tree | e2da9f72ce0a565b4fac2fc8be19ab3497286b36 /cpu_opcodes.c | |
| parent | d5486a5af100fb37fac08b60d862ac14943853ce (diff) | |
currently 90% working
Diffstat (limited to 'cpu_opcodes.c')
| -rw-r--r-- | cpu_opcodes.c | 4 |
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) { |
