C++ 是否有任何模拟器编程教程或指南?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2118245/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 22:09:36  来源:igfitidea点击:

Is there any emulator programming tutorial or guide?

c++cemulationnintendo

提问by Petruza

Possible duplicate of How do Emulators Work and How are they Written?

模拟器如何工作以及它们是如何编写的可能重复

I want to program an emulator ( may be NES or C64, I haven't decided yet ), I know there are lots of them so many may ask why would someone want to make one from scratch, but I want to include some specific characteristics in it, and also for the sake of building it myself.
I'd like to read a guide from someone who has built one and can transmit the experience, it doesn't have to be platform-specific ( better if it's not ) since I know how to program, what I don't is how to emulate.

我想编写一个模拟器(可能是 NES 或 C64,我还没有决定),我知道有很多这样的人可能会问为什么有人要从头开始制作一个,但我想包括一些特定的特性在里面,也是为了自己构建它。
我想阅读已经建立并可以传播经验的人的指南,它不必特定于平台(如果不是更好),因为我知道如何编程,我不知道如何编程效仿。

采纳答案by Richard Pennington

Both the NES and C64 are based on the 8 bit 65xx processor. Writing an instruction set emulator for that chip is pretty trivial since the instruction set is small.

NES 和 C64 都基于 8 位 65xx 处理器。为该芯片编写指令集仿真器非常简单,因为指令集很小。

The larger issue is to emulate the other support hardware, video controller, etc. It's been a long time since I programmed a C64, and I never programmed an NES, so my memory is foggy. As I recall the C64 had a one or two chip solution for video and interfaces.

更大的问题是模拟其他支持硬件、视频控制器等。我已经很长时间没有编写 C64 了,而且我从来没有编写过 NES,所以我的记忆很模糊。我记得 C64 有一个用于视频和接口的一两个芯片解决方案。

回答by fingerprint211b

Well, you can google lots of articles, but there's one resource I found particularly useful :
http://www.nesdev.com
Here you'll find pretty much all you need to know to write a working NES emu, from complete hardware specifications, to the instruction set, and test roms. Have fun.

嗯,你可以在谷歌上搜索很多文章,但我发现有一个资源特别有用:
http: //www.nesdev.com
在这里你会找到几乎所有你需要知道的,从完整的硬件规格来编写一个有效的 NES 动车组, 到指令集,并测试 rom。玩得开心。