TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Writing my first Gameboy Emulator

55 点作者 RupertWiser超过 4 年前

8 条评论

fwsgonzo超过 4 年前
It&#x27;s super interesting to write your first emulator. I wrote a GBC emulator too once, and I wrote down all the problems I encountered that weren&#x27;t easy to solve:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;fwsGonzo&#x2F;gamebro&#x2F;blob&#x2F;master&#x2F;POSTERITY.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fwsGonzo&#x2F;gamebro&#x2F;blob&#x2F;master&#x2F;POSTERITY.md</a><p>Many of the issues are not documented anywhere, and it is just about guessing what the hardware did - and thus, what the developers back in the day relied on!
评论 #25586340 未加载
评论 #25585193 未加载
评论 #25587275 未加载
Gunax超过 4 年前
I also wrote a gameboy emulator a few years ago... But I disagree about it being fun.<p>The truth is it&#x27;s rather tedious. There are 256 opcodes you will need to create. Each has certain flags you will need to check that change it&#x27;s operation.<p>Some of those flags are undocumented, and several of the opcodes actually have hardware level bugs that make them act differently than the CPU document describes.<p>So after creating every opcode, you will inevitably have bugs which you need to fix.<p>After fixing those you will still not have games running because of so many undocumented&#x2F;buggy opcodes, so now you need to figure out how an actual gameboy operated.<p>At this point I was only able to solve it be getting a working emulator and executing the same program on each until their states diverged.<p>I did find it interesting to learn about low level hardware, but I&#x27;d say the project is 50% reading specs, 10% interesting, and 40% tedious pain-in-the-butt.<p>I never did get sound working, and the graphics are buggy, but I think I got far enough that I learned all there was to learn.
评论 #25588388 未加载
评论 #25588637 未加载
anshargal超过 4 年前
If you want to write a game console emulator, but prefer to start with something simple — I suggest to look into <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;CHIP-8" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;CHIP-8</a> It could be implemented in a couple of evenings in any language.
someperson超过 4 年前
There are dozens of toy GB emulators, but nobody has yet emulated the wildly successful Bandai Digimon Digivice. It&#x27;s based on near-identical technology to Bandai&#x27;s &quot;Tamagotchi&quot; virtual pet though Digimon was marketed mostly towards at boys and Tamagotchi was marketed mostly towards girls.<p>It&#x27;s from the same era as the Game Boy Color and has some interesting features (serial communications between devices, and the infamous &quot;tab cheat&quot; that momentarily disconnecting the battery with a plastic tab to randomize the memory contents).<p>Interesting how Pokemon is widely emulated, but nobody ever bothered with Digimon. There has been multiple generations of Digivice hardware, so best start at the original.<p>I&#x27;d like to see somebody take on the reverse-engineering challenge. I don&#x27;t think there&#x27;s even a ROM dump yet.<p>They&#x27;ve actually started selling new stock recently (20th Anniversary Digivice), including at retail stores for around $30 each.
评论 #25591474 未加载
luxurytent超过 4 年前
Thank you for sharing! One of my very slow (two kids one new born makes life slow) but deliberate projects is to write a Gameboy emulator and every new article or write-up provides more context into this confusing world.
CyberRabbi超过 4 年前
Excited to see his next gameboy emulator
TheChaplain超过 4 年前
Very interesting article but a bit short. If anyone have links to more in-depths journals of writing emulators, please let me know. I&#x27;m very interested in learning.
edoceo超过 4 年前
Is it possible to get QEMU to emulate these kinds of hardware? Assuming one knows enough C to make the machine and bus emulator that fits into QEMU?
评论 #25587839 未加载