std::cout<<"After Left shift: "<<(int)reg[X]<<std::endl;
}break;
}
}break;
@ -321,11 +333,19 @@ public:
for(inti=0;i<=X;i++){
memory[index+i]=reg[i];
}
if(USE_ORIGINAL_CHIP8_SET){
/*The original CHIP-8 interpreter for the COSMAC VIP actually incremented the I register while it worked. Each time it stored or loaded one register, it incremented I. After the instruction was finished, I would be set to the new value I + X + 1.*/
index+=X+1;
}
}break;
case0x65:{//Retrieves registers from V0 to VX in memory pointed by index.
for(inti=0;i<=X;i++){
reg[i]=memory[index+i];
}
if(USE_ORIGINAL_CHIP8_SET){
/*The original CHIP-8 interpreter for the COSMAC VIP actually incremented the I register while it worked. Each time it stored or loaded one register, it incremented I. After the instruction was finished, I would be set to the new value I + X + 1.*/