4 ms·
Just started on a fun educational project to emulate a Z80 processor in C. Trying not to look at any existing work, only documentation. Thinking I'll need to ex
by laxd 7y ago
Just started on a fun educational project to emulate a Z80 processor in C. Trying not to look at any existing work, only documentation.
Thinking I'll need to expand the project (emulating the rest of an actual, vintage computer) in order to run existing software and get the full
kick out of it though. Suggestions? Looking for simplicity as I don't need another forever-project.
Edit: asking because there's so many to choose from
https://en.wikipedia.org/wiki/Category:Z80-based_home_computers https://en.wikipedia.org/wiki/Category:Z80-based_home_comput...
- swiley 7y agoBe careful, if you haven't done this before or done much network programming it's easy to get weird issues with endienness. Check out the ntohs etc. macros. IMO you should try to find a really simple computer to do first. The advantage here is you have other people's software to run which makes for a nice integration test. My first time I did the original apple and had it run the monitor program (which is nice you can just keep adding opcodes going up from the beginning of the program until it works.) For the Z80 I think maybe the ZX80 is the one where it was pretty much just a Z80, a ROM and SDRAM chip and some glue logic?
- codetrotter 7y agoSpeaking of simple computers to emulate, Advent of Code 2019 featured an imaginary computer that you gradually implement. (But do note that not all of the days are about said imaginary computer.) I am still catching up with it because I didn’t put so much time into it yet but so far I have completed up to and including day 5 of AoC 2019. For me, this is the first time I have implemented an emulator, and what I like about this imaginary computer is that it is so simple that I was able to build what I have built so far without relying on any external resources. The fun part of it is working through it yourself of course, so even though I am tempted to link to my implementation on my GitHub I will instead only leave a link for AoC 2019. https://adventofcode.com/2019 https://adventofcode.com/2019
- rantwasp 7y agothe one people try at first is CHIP8. Really simple and even with that you can not get it right on the first try