Hello everyone, first time posting
I just wanted to share a cli chip8 emulator I have been working on recently.
It’s very minimal and it’s still missing some things (sound and fonts), but I felt like it was good enough to show it here. Any feedback is welcome
Also, is there any example or tutorial on how to use the AudioStream from Raylib? or how it works? I tried doing something based on the raw stream c example but it didn’t work and I’m not sure why. I didn’t really understood it very well so I’ll just leave the audio stuff for now until I know what I’m doing
The build script failed since I did not have the expected directory for output. I changed it to be “odin build src -out:chip-8din” so that it would drop in the root of the cloned directory from github.
When I failed to provide an argument, all I got was “No file provided”, which was mostly enough for me, but may not be for others. Usage output would be a good idea. It took me about a minute to realize I needed to clone the test suite also. Then another minute to work out the difference between “chip8-test-suite/src/tests/” and “chip8-test-suite/bin/”. When I gave it a .ch8 file from bin, I got a nice little display of a graphical test.
Once successful, and the window is displayed, I get lots of text in the terminal. IMHO is best only for debug purposes. I recommend placing that in a “when ODIN_DEBUG {}” statement. Then you can turn it on with “odin build src -out:chip-8din -debug”.
For the Raylib AudioSteam thing, I recommend first doing a one-to-one conversion from the c example into Odin. Make that work first. Then pick out the parts you want or don’t want, and when it breaks, you’ll have better idea why. If you have trouble with the conversion, post a link to it, and I’ll make a pass at it.
Thanks for the tips! I already managed to add audio to the emulator. I also finished implemented all the opcodes and quirks from the original Chip-8, so most roms should work now in theory. And yeah, I was thinking about improving the cli and adding a README with instructions. I think I will do that before working on supporting the other variants.
Anyway, thanks for the feedback and merry Christmas