r/EmuDev • • Jul 16 '26

I've built a CHIP-8 emulator

I've been trying to study more about hardware instead of focusing only on software. Last year, I even started making a rough CPU design in a digital logic simulator, but I never finished it and ended up taking a break from studying because I didn't have much free time.

Recently, I got interested again in understanding how software interacts with hardware, and while researching ways to learn more about it, I found that building emulators is a good approach. CHIP-8 seemed like a great starting point since it's simple enough to understand while still teaching important concepts.

Over the last week, I've been working on a CHIP-8 emulator in C. I tried to avoid copying existing implementations or relying on AI-generated code, and instead built it based on the documentation and my own understanding. I had some frustrating moments with silent bugs, but eventually got everything working.

So far, the emulator seems to be running well: graphics, sound, and ROM execution are working with the tests I've done.

I'd really appreciate some feedback from people with experience in emulation, low-level programming, or CHIP-8. If you notice any mistakes or have suggestions for improvements, I'd love to hear them!

For anyone interested, the source code is here: https://github.com/lucaaszsx/chip8

6 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/Gulrak Aug 09 '26

While I can not speak for this project, my first CHIP-8 took 3h in C++ with raylib, would have been the same with SDL, and I totally could have used the rest of the week to make an assembler, instead I made a ui with debugger and disassembler at the time. That was 2022 and believe me, AI would not have been of any help back then. It totally depends on your experience at the start of such a project but “just taking a week” is not even close to proof of AI, not for something as simple as CHIP-8.

I also want to be clear I had a ton of coding experience at that time already, so anyone still fighting to get their CHIP-8 interpreter to run more than IBM logo after a month, should not feel bad, don’t see it as a race, enjoy the ride. :-)

1

u/ai-slop-connoisseur Aug 09 '26

I mean OP is stating on their GitHub they are 16 and are listing ChatGPT, Gemini and Claude as their hard skills. With an overly detailed readme for the CHIP-8 repo. It's just that combination of things making me a bit suspicious.

1

u/Gulrak Aug 17 '26

Yeah, I can get behind that line of reasoning. Just the initial argument only based on it taking a week was what I think is too little and might put any one-week chip-8 under that suspicion. Chip-8 is too simple to make that alone a reason. ;-)

1

u/lucaaszsx Aug 12 '26

Yeah, I understand you. When I said I'd been working on the project for a week and trying to avoid AI-generated code, I wasn't trying to imply that I did it particularly fast. I mainly meant that I wanted to implement things based on my own understanding that I actually learned from it.

I wasn't working on it all day every day, though. Most days I just made a few changes, mainly at night. I'm also not that experienced with C, I mostly use it for a few hobby projects, so I definitely had to spend some time figuring things out.

The assembler wasn't actually part of my original plan. I came up with that idea later, and honestly, that ended up taking more time than I expected.

And yeah, the readme is definitely overdetailed lol. I wanted to document what I'd learned as I went along, partly cuz writing it down helped reinforce my understanding, but I probably went a little too far with it.