Sign in to follow this  
philipptr

chip8 emulation

Recommended Posts

philipptr    260
I have some Problems with interpreting chip8 code. Here's an example of a problem of understanding what the code wants to do: from the game Pong: 0x6A02 //Register A=02 0x6B0C //Register B=0C 0x6C3F //Register C=3F 0x6D0C //Register B=0C 0xA2EA //Instruction Pointer = 2EA since the code is 245(decimal) characters long and the memory of the chip8 starts at adress 0x200 I would say I should continue at character EA (and interpret the instruction pointer as bytes), since else it would point somewhere out of the code. so when i look there the code goes like follows: 0x8080 //Register 0 = Register 8 0x8080 //Register 0 = Register 8 0x8080 //Register 0 = Register 8 doesnt make any sence, does it? 0x0000 so is there someone who knows about chip8 and can tell me what im interpreting wrong here? EDIT: im incrementing the instruction pointer by 2 after every instruction since one instruction is 2 bytes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this