6 ms·
Game Boy emulators are always great for educational or experimental projects, because the Game Boy platform is surprisingly simple, which leads to a very quick
by anyfoo 8y ago
Game Boy emulators are always great for educational or experimental projects, because the Game Boy platform is surprisingly simple, which leads to a very quick payoff, and yet very "real" in that the Game Boy was a great commercial success with thousands of software titles available, so you have plenty of software available to try in your project and actually make use of that payoff.
One example to illustrate how simple the Game Boy is: There is no operating system at all, only a 256 byte boot ROM whose sole purpose is to display the Nintendo logo from the cartridge and halt if it does not checksum correctly (for both cartridge integrity and legal reasons).
This entertaining 33c3 talk manages to describe the Game Boy hardware practically in its entirety (and with some previously unknown details, actually): https://www.youtube.com/watch?v=HyzD8pNlpwI https://www.youtube.com/watch?v=HyzD8pNlpwI
- anyfoo 8y agoHeh, should have read the article before writing my comment, the author mentions the same and even links to the Ultimate Game Boy talk as well. I hope I was able to add some detail.
- bandwitch 8y agoCoincidentally, the "Practice of object-oriented programming" course in EPFL has as a project this semester to build a Game Boy emulator in Java. You can have a look here (https://cs108.epfl.ch/ https://cs108.epfl.ch/). Although it's in French, google translate does a decent job.
- sjrd 8y agoOMG, I had no idea. I TA'ed this course 3 years ago. I wish the project had been the GB emulator at the time ... I would have had so much fun :-p
- near 8y agoThe Game Boy is only simple in the early stages of emulator development. You find quickly that it is full of excruciatingly complex edge cases that aren't documented, and aren't well understood by anyone. We're still making significant progress to this day on it. And even in the early stages, the Z80-like Sharp LR35902 is quite a hassle. If you want an educational project, consider an NES emulator instead. Still has lots of edge cases, but the documentation and reverse engineering work is far ahead of the Game Boy. Some reading if you like: https://mgba.io/2017/05/29/holy-grail-bugs/#pinball-fantasies https://mgba.io/2017/05/29/holy-grail-bugs/#pinball-fantasie... https://mgba.io/2018/03/09/holy-grail-bugs-revisited/#the-phantom-of-pinball-fantasies https://mgba.io/2018/03/09/holy-grail-bugs-revisited/#the-ph...
- brailsafe 8y agoFor an educational project however, wouldn't an opaque platform with broken-ass documentation and edge cases that make you hate yourself be more representative of real software dev in general? ;)
- skate22 8y agoIt depends how many meetings you have first
- zorked 8y agoIsn't the NES graphics chip considerably more complicated than whatever the Game Boy users?
- zeta0134 8y agoAs far as capabilities go, both chips are remarkably similar, with the Gameboy supporting an extra background. They both do a handful of sprites and tiled backgrounds with attributes for things like palette selection. However, the NES has one difference that throws a wrench in things. Unlike the Gameboy, which has VRAM in the console, the NES reads all of its graphics data from the cartridge directly. The NES's PPU is simple in operation, but many cartridge types (MMC3 and MMC5 in particular) relied on the precise behavior of the PPU's reads and writes to time some of their extra features, often something like a scanline counter. This makes the complete system much more difficult to emulate, even though the base features of the console are straightforward to grasp. What makes the NES such an attractive target for a first emulator is that, due to this quirk and the system's popularity, its hardware is just about perfectly understood. Take a look at the Nesdev Wiki's article on rendering, which has an extremely thorough breakdown of the timing, including the bugs in the sprite rendering subsystem and how to correctly emulate them: https://wiki.nesdev.com/w/index.php/PPU_rendering https://wiki.nesdev.com/w/index.php/PPU_rendering
- stormbrew 8y agoI would think the thing that would make the NES unsuitable would actually be the very large number of mapper chips for the platform. The NES seems less like one platform and more like tens of them at that point. AFAIK the Gameboy didn't really have this proliferation of chips that manipulated the system so directly. At the very least, you might be able to badly emulate most gameboy games, but a mapperless NES emulator is only going to even be able to try to run the first generation of games from the console.
- deleted 8y ago[deleted]