From 6ab729f377678c5682c4adb18a933aaf2385ea16 Mon Sep 17 00:00:00 2001 From: Matthew Laux Date: Tue, 26 Jul 2022 00:10:01 -0500 Subject: [PATCH] it goes off the rails at the gameplay screen on tetris --- src/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cpu.c b/src/cpu.c index 112aeb5..1666d77 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -705,6 +705,9 @@ void cpu_step(struct cpu *cpu) write8(cpu, read_hl(cpu), cpu->a); write_hl(cpu, read_hl(cpu) - 1); break; + case 0x39: // ADD HL, SP + add16(cpu, cpu->sp); + break; case 0xc0: // RET NZ if (!flag_isset(cpu, FLAG_ZERO)) { cpu->pc = pop(cpu);