Back to News
Advertisement
ttack1234 2 days ago 4 commentsRead Article on github.com

HI version is available. Content is displayed in original English for accuracy.

I'm writing a custom assembler for CHIP-8 and just finished adding support for the DB/.byte directive so I can embed sprites in the ROM and finally get something drawn on the screen. It SHOULD support all OG CHIP-8 instructions, but still a ton of rough edges that I'm ironing out.

This is my first ever C++ project, just like the CHIP-8 emulator was my first ever C (and emudev) project. It's so satisfying to write assembly and have your program spit out a ROM that actually runs in the emulator you wrote.

All code is written by me (a lot of it livestreaming) as evident by the quality, no AI.

Advertisement

⚡ Community Insights

Discussion Sentiment

67% Positive

Analyzed from 92 words in the discussion.

Trending Topics

#emulator#nice#bug#assembler#compared#writing#lot#fun#looked#implementation

Discussion (4 Comments)Read Original on HackerNews

Retr0idabout 3 hours ago
Nice, chip8 is a lot of fun. I looked at your emulator implementation too, and it looks like you have an OOB access bug in the "I" register (it can be incremented beyond the RAM array bounds). This is a very common chip8 emulator bug, which can (in some cases) be exploited to allow a malicious ROM to escape the emulator. I wrote about this here: https://www.da.vidbuchanan.co.uk/blog/bggp3.html
Stevenrojas888about 3 hours ago
Awesome milestone! As someone diving into C and C++ right now, what was the steepest part of the learning curve for you when structuring the assembler compared to writing the emulator in C?
adityamishra241about 2 hours ago
Really cool project. How much harder did the assembler feel compared to writing the emulator?
rfgplkabout 3 hours ago
Nice job!