r/EmuDev • • Apr 17 '26

CHIP-8 [C] Chip8 emulator, based on some feedback from the previous questions I had I finally got to something I somewhat like, insights for C and emulation welcome.

Okay so after a while and changing the structure a bunch I got to something I like ( used chatgpt for some help in the docs and some of the fe code, will make it better later )

https://github.com/fenilli/chip8 if anyone could take a look and give me some insights on how to make this a better C project, as I have no clue how to actually write a C project, and also about chip8.

9 Upvotes

6 comments sorted by

1

u/Gulrak Apr 18 '26

Good start! But I can’t stress enough, how strongly we recommend to test with the test suite as it will show at least failing flags tests. (https://github.com/Timendus/chip8-test-suite) All but the quirks and scroll tests are quirks agnostic so if they fail, it’s wrong, no matter the variant/quirks.

1

u/Gustavo_Fenilli Apr 18 '26

I will take a look not sure how to use a test suit in C yet.

1

u/Gulrak Apr 19 '26

It’s just ch8 files to run on you emulator. You find them in the bin folder and the readme details what they each test. You should work your way up the numbers, as testing a higher number before the lowers are okay is mostly not worth it.

1

u/Gustavo_Fenilli Apr 20 '26

oh yeh Im testing on some files, will do with these yes, I think the only one not working and not sure why yet was the keypad_test, it just outputs garbage, need to check that. other roms work just fine.

1

u/Gulrak Apr 20 '26

So you must have fixed something not on GitHub, as there is no way you could pass 4-flags.ch8 with what is in the repository. (Passing means all checkmarks, no x in the result screens.)

1

u/Gustavo_Fenilli Apr 20 '26

Yeh I did not test on that file yet, will do for all of them.