4 ms·
Emulating a gameboy is a fun project, I highly recommend it. The most patience testing element of it is you won't really see any direct results for quite a whi
by djhworld 7y ago
Emulating a gameboy is a fun project, I highly recommend it.
The most patience testing element of it is you won't really see any direct results for quite a while, but once you get that Nintendo logo scrolling down the screen, achieved from implementing a lot of the core components (cpu, memory, ppu, screen etc) it's almost like magic and extremely satisfying!
- jchw 7y agoSeconded, had a similar experience. I never made it to emulating audio, though, myself...
- simias 7y agoThe Gameboy sound chip is definitely one of the trickiest part of the console, if only because there are a million tutorials out there on how to start a Gameboy emulator but very few go all the way, and generally the sound chip is what you do last. It's also surprisingly quirky and many games will misbehave if you don't implement some weird edge cases. It's also annoying to debug because it's not as obvious as video when something is wrong, especially when you've just spent two hours listening to the same chip tune square waves in a row...
- Andrex 7y agoI'm interested in writing my own GB emulator mostly because sound is so patchy across all existing JavaScript implementations. My entrance into the GB scene coincided with my interest in LSDJ, and I really want to write a web app around it[1], but I'm stymied by outdated implementations and my own lack of domain knowledge. [1] https://github.com/andrewrabon/little-web-dj https://github.com/andrewrabon/little-web-dj ^ Still unfinished. My own emulator will probably have to come first.
- simias 7y agoThe most thorough reference I've found for the Game Boy SPU is unfortunately the Gambatte source code itself since it's a fairly accurate emulator and open source. Unfortunately it's also not the most human-readable code (due to micro-optimizations and lack of comments, plus it's C++ which is already a -10 handicap in readability). In the meantime you can try to dig around my code which is not nearly as accurate but (hopefully) should be easier to understand: https://github.com/simias/gaembuoy/blob/master/spu.c https://github.com/simias/gaembuoy/blob/master/spu.c It seems to work fine with all games I've tested, although of course that's only a tiny subset of the console's library...