commit 47fe5386204c8c3299341a5b4a813d183ad7ae96
parent fbf1de0925e14397eae524abba98913bea52903b
Author: Léo Villeveygoux <leo.villeveygoux@u-bordeaux.fr>
Date: Thu, 25 Apr 2019 14:18:16 +0200
Fix register save/load
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chip8.c b/chip8.c
@@ -318,11 +318,11 @@ void step(){
RAM[I] = (V[I_X(instr)]/100)%10;
break;
case 0x55:
- for(int i=0 ; i<I_X(instr) ; i++)
+ for(int i=0 ; i<=I_X(instr) ; i++)
RAM[I+i] = V[i];
break;
case 0x65:
- for(int i=0 ; i<I_X(instr) ; i++)
+ for(int i=0 ; i<=I_X(instr) ; i++)
V[i] = RAM[I+i];
break;
default: /*unknown instruction*/