Jump to content
  • Advertisement
Sign in to follow this  
philipptr

chip8 emulation

This topic is 4445 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!