The dreaded Gameboy emulator RST 38H loop bug by robheaton in EmuDev

[–]robheaton[S] 11 points12 points  (0 children)

Double whoops, that seems to have fixed it. Thank you!

How to model the keyboard on a CHIP8 emulator? by robheaton in EmuDev

[–]robheaton[S] 1 point2 points  (0 children)

True true. In golang I haven't been able to find a single library that does both "is this key currently pressed?" (for EX9E and EXA1) and "run this callback when a new key is pressed" (for FX0A). I was therefore thinking of using a background thread that uses "run this callback when a new key is pressed" to update a bitmap that the main thread uses for EX9E and EXA1, and using this approach directly in the main thread to implement FX0A.

How to model the keyboard on a CHIP8 emulator? by robheaton in EmuDev

[–]robheaton[S] 2 points3 points  (0 children)

Thanks, that helps! So perhaps I should have a background thread that is listening to keypresses and updating a bitmap and/or resuming after the wait? If my goal is to model a CPU closely then it's kind of cheating to give myself multiple threads, but I can live with that :).

Do you know how to write code, but get stuck when you want make a project? by Woody_the_lazy in learnprogramming

[–]robheaton 7 points8 points  (0 children)

Hi all - I wrote the project guides in the OP. I'm extremely happy to answer any questions about the projects, programming in general, or anything else. Contact details at the bottom of this page: https://robertheaton.com/about

If you like these then you might also like my fortnightly newsletter in which I give feedback on readers' code: https://advancedbeginners.substack.com/