My CHIP-8 Emulator

What Is This And Why Could One Care?

CHIP-8 is actually an interpreted programing language! It was created back in 1977 by a guy named Joe Weisbecker for the COSMAC VIP with its purpose being a simpler way to write programs for computers. Instead of actual machine code one can chose to use shorter higher level hexadecimal instructions which resemble machine code and are interpreted on the fly.

If it is an interpreted programing language why is it called an emulator?! The interpreter simulates the physical computer's hardware completely and provides a virtual machine in which ones CHIP-8 code can run. This way you have a more abstract representation of a whole bunch of computers with similar characteristics and hardware components thus making coding generally easier.

CHIP-8 Specifications

As a method to provide an easier platform to develop in particular games during the old days, the emulator was made to have the following characteristics:

CHIP-8 programs are assumed to be loaded at memory address 0x200 by convention. This is because the interpreter itself was loaded between 0x000 to 0x1FF and thus roms are historically agreed upon to be loaded at 0x200.The standard font which displays all neccessary keys from 0x0 to 0xF will be loaded into memory at address 0x50.

Implementation

We chose the programing language C to implement this emulator as its the most fun language and in my opinion the most apropriate for the job! We will not however deal with graphics from total scratch and thus use the Simple DirectMedia Layer 2.0 graphics library SDL2.

The most challenging part of this project is getting used to and working with the larger sophisticated library as it provides many APIs and functions one needs to find first. For our emulator to run properly it would make sense to have some kind of window open and display anything in it.

SDL2 Notes