In this file I will list things that are not in most documentations you find online, these oversights will lead to hours of innecesary debugging.
- Before start implementing the opcodes, check that your
fetch_opcode()
function is giving you the right opcode. - Initialize your
PC
with0x200
0x00E0 - CLS
: If you don't refresh your image every cpu cycle, set your redraw texture to true when calling this function0x00EE - RET
: Increase your Program counter after this call, or you will get infinite loops0xB000 - JP
: Dont increment the program counter after any jump0x8004 - ADD
: Check for carry before adding