硬件仿真项目
问候。
我有兴趣为一些旧计算机编写模拟器。不过,我想选择一些简单的东西作为开始,一些不太复杂且相对知名的架构,这样很容易找到文档。你能建议一下吗? 也欢迎:建议平台的技术规格/文档、ROM 档案等的链接。:)
Greetings.
I am interested in writing an emulator for some old computer. However, I'd like to pick something simple for a start, some architecture that is not too complicated and relatively well-known, so that its easy to find documentation. Could you suggest something?
Also welcome: links to technical specs/documentation of the suggested platform, rom archives, etc. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
老式的 Commodore 64 将是一个不错的选择。文档齐全,有大量可用的 ROM 档案,并且有大量的社区支持。
它在 8 位微处理器(MOS 6510)上运行,该微处理器运行 RISC 指令集,并且应该模拟起来相当简单(任何硬件模拟都可以称为“简单”:)
处理器 数据表甚至可用!
The good old Commodore 64 would be a good choice. Well-documented, lots of ROM archives available, and a fair amount of community support available.
It runs on on 8-bit microprocessor (the MOS 6510) which operates a RISC instruction set and should be fairly straightforward to simulate (in as much as any hardware emulation can be called "simple" :)
The processor datasheet is even available!
已经做过类似的事情后,我会同意 e.James 的观点,并选择 6502 之类的东西。6502 是可以管理的,我认为少于 256 条指令。例如,z80 复用了一些操作码,需要做更多的工作。使用 6502,您可以追随 vic20、commodore64 等,以及 Asteroids、lunar lander、breakout 等单人节目。 apple Iie 和 atari vcs (2600) 等也是基于 6502 的。
最好使用已经被模拟过的类似的东西(并且有开源的)。您可以在自己制作时同时检查数据表和实现。请注意,并非所有的都没有错误,它们可能会很好地模拟一件事,也许是因为那一件事永远不会使用这个损坏的指令或那个标志。您可能还会发现数据表有不同的解释。
感谢 mame 和其他人,现在有很多视频游戏(一般不一定是基于 6502 的),也许您有最喜欢的。 mame 中的处理器模拟器以及其他处理器模拟器通常是为了执行速度而编写的,并且可能很难理解。当然不是教育代码,而是针对性能进行了大量手工调整(486 平台需要,但现在不一定需要这种调整)。
如果 6502 太大而难以消化,或者当您查看必须模拟的外设时,您可能只使用处理器或微控制器,例如 12 位微芯片 pic 或 msp430 指令集。非常容易理解,仍在生产中,因此可以使用工具,例如都有 C 编译器。不会运行性感的众所周知的程序或类似的东西,但同样具有教育意义。
Having already done something like this I would agree with e.James and go with something like the 6502. The 6502 is manageable, I think less than 256 instructions. The z80 for example multiplexes some of the opcodes and is a lot more work. With the 6502 you can go after the vic20 the commodore64, etc as well as standups like Asteroids, lunar lander, breakout and some others. The apple Iie and atari vcs (2600) and others are also 6502 based.
It is good to go with something like this that has already been emulated (and there is open source). Something, that you can examine both datasheets and implementations together when making your own. Beware not all are bug free, they may emulate one thing well perhaps because that one thing never uses this broken instruction or that flag. You may also find there are different interpretations of the datasheet.
Thanks to mame and others there are a lot of video games (not necessarily 6502 based, in general) out there, perhaps you have a favorite. The processor emulators in mame as well as others out there are often written for execution speed, and can be difficult to follow. Certainly not educational code, but heavily hand tuned for performance (was needed for a 486 platform but dont necessarily need that tuning today).
If the 6502 is too big to digest, or when you look at the peripherals you have to emulate, you might go with just the processor or a microcontroller like the 12 bit microchip pic or msp430 instruction set. very digestible, still in production so tools are available, both have c compilers for example. Not going to have sexy well known programs running or anything like that but no less educational.