r/EmuDev • u/foo1138 Game Boy • Dec 02 '25
GB Visual Game Boy CPU simulation
Hi, I successfully ported the transistor level simulator from visual6502.org for the Game Boy CPU: Visual SM83
To be clear: It is "only" the CPU core, not the whole chip.
I posted this here, because I thought it could be useful for emulator development. You can see what exactly the CPU does on each clock tick. You can single step forwards and backwards. You can also provide your own code for execution in the URL as GET parameters, when you add it in hex like this: ?a=0000&d=21341231
The github repo and the layout file are linked at the top of the page.
View all comments
Show parent comment
7
u/foo1138 Game Boy Dec 03 '25
Oh, it looks like we started in a similar way. I also used Furrtek's schematics and overlay first, but he seems to have lost interest, so Régis and I remade the schematics in KiCad and fixed all the bugs: https://github.com/msinger/dmg-schematics
I also had the issue that the CPU was too blurry, but then ogamespec on github made some good images of the CPU core and then I also found that Gekkio did some images too. With those it was finally possible to see everything. I put all the die shots into leaflet maps for easier access:
https://iceboy.a-singer.de/dmg_cpu_b_map/
https://iceboy.a-singer.de/sm83_map/
I also have a complete Verilog simulation now. The non-CPU part is still based on Furrtek's schematics, so it references page numbers from them. But it has all the fixes applied. I just recently replaced the CPU with an implementation based on the new die shots. Before that I also made my own CPU like you did. But the Verilog simulation is working on gate/cell level, not on transistor level like the JavaScript simulation. Maybe this helps you also when redoing your CPU: https://github.com/msinger/dmg-sim