Posts about CHIP-8
All right, 4th (and hopefully last for my CHIP-8 project) post in under 4 days.
I just got done implementing the delay timer by simply subtracting two points in time and doing (difference_in_time % 255). However the sound timer is less straightforward. This guide states that the interpreter should run normally as the sound timer plays.
So that means that the sound should play at the same time as the rest of the program, right? And that would mean that I would have to implement some sort of concurrency. However, implementing concurrency for a CHIP-8 doesn't sound like the best solution.
There's got to be a simpler way to implement the sound timer. The thing is I can't just do the same thing as I did for the delay timer because it needs to play sound at the same time. Can anybody give me a hint about how to implement the sound timer?
Hello again, this subreddit has been very friendly and helpful for me in building my CHIP-8 implementation!
There are a few CHIP-8 instructions such as 8xy5 that involve arithmetic and the VF flag. For example, the just-mentioned instruction requires that the VF flag be set to 0 if the result is underflowed. Now my question is: what to do with the result? Do I simply not write it to the register? This other resource talks about "underflowing" the result, like as in doing something to the result. And AFAIK underflow is a condition, not an operation.
edit: I should have specified that I'm confused about what to do with the result when it is negative.
Hey guys, about a month ago I shared the prototype of my CHIP-8 console here and people seemed pretty interested, so I figured I'd now share the completed project.
Essentially, I ported my CHIP-8 emulator to a STM32 MCU, wrote the firmware to interface with a display, SD reader, buzzer, and buttons, and then designed a simple PCB around the whole thing.
If you are interested in reading about my development of the project, some challenges I faced, and the bone-headed design decisions I made along the way due to my inexperience, check out my dev blog.
You can also check out the build guide if you have any interest in trying to put one together yourself.
It's not perfect, and could definitely use some polish, but I started this as a means of learning more about embedded software development, so I'm pretty happy with how it turned out.
I may revisit this in the future once I have more experience and try to make it way more polished, so if you have any suggestions feel free to let me know!https://i.redd.it/lj2q04okt1c91.jpg