有没有人有关于 GameBoy Color ROM 如何布局的引用或来源 - 数据和代码在哪里,使用什么机器代码指令,时钟如何工作等?我可能有兴趣自己构建一个模拟器,但除了在十六进制编辑器中查看之外,我找不到有关 ROM 设置的任何信息。我对 .gbc
中的 rom 感兴趣文件格式。
我当然可以查看source of a working emulator ,但当我开始时,我对比这更高层次的东西感兴趣。
<小时/>编辑:以下是我发现的大量非常好的资源:
- A Emulator being built in javascript与 more up to date source .
- "The PAN documents" a detailed spec of the gameboy
- A more up to date and better version of the previous item, with loads of stuff. Best resource .
- Standard Z80 opcodes
- All the opcodes in the Gameboy Z80
- A list of opcodes changed/removed in the Gameboy
- Z80 user manual (useful for flags)
- Discussion of differences between Gameboy Color Z80 and 8080/Z80
- Massive site dedicated to gameboy architecture (+GBA)
- Another document on GBSpec, with timings
此外,see the source for my currently developing project和 this finished one in C# for the Gameboy Classic (more docs)
最佳答案
ROM header 从 0x100 到 0x14F。 其他一切都是“ROM”,意思是与数据或其他东西交错的指令。
https://web.archive.org/web/20141105020940/http://problemkaputt.de/pandocs.htm
操作码是定制设计的,类似于 Zilog Z80,但并不完全相同,因为 CPU 芯片本身与 Z80 不同,时钟周期和寄存器 F 标志也完全不同。
窥探我的代码以找出操作。 https://github.com/grantgalitz/GameBoy-Online/blob/master/js/GameBoyCore.js 查看第 525 行及以下行。 GameBoy Color 模拟器采用 javascript FTW 编写。
Imran 的模拟器对于查找操作码如何工作来说是一个糟糕的来源,因为他的模拟器在正确操作码方面仍然存在许多问题。查看 gambatte 的源代码,以最准确(准确且“更多”)地描述控制台的工作原理。
关于emulation - GameBoy Color ROM 的布局和结构引用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3690919/