3 ms·
Be 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. IM
by swiley 7y ago
Be 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