5 ms·
MakerLisp Machine: An EZ80 CPU Card Running Bare-Metal Lisp [video]
- stevekemp 7y agoI'm currently in the process of designing a simple Z80-based computer. At the moment I'm using an Arduino to handle I/O and memory-requests, but the next step is to get a working REPL of some kind on it. I'm torn between lisp and FORTH, though leaning towards the latter. If I can do that the next step will be to drop the Arduino and use real RAM/EPROM + clock to drive it, making it truely standalone.
- mindcrime 7y agoI'm currently in the process of designing a simple Z80-based computer. Same here, although I'm only at the point of trying to get things set up to program a X28C64 eeprom using my Arduino, so I can write the z80 object code to it and boot from that. I also just got the z80 assembler installed on my Linux box, so hopefully I can cross-assemble the z80 code, and copy the bits to the eeprom. As for the actual CPU, my next step is to get the "test circuit", that just executes NOP's and cycles through memory addresses, up and working on a breadboard. Baby steps...
- stevekemp 7y agoFree-running a Z80, standalone, is pretty simple. I found these good videos covering the process: https://www.youtube.com/watch?v=nFIviiwPrLI https://www.youtube.com/watch?v=nFIviiwPrLI https://www.youtube.com/watch?v=AZb4NLXx1aM https://www.youtube.com/watch?v=AZb4NLXx1aM (There are other examples, but both of those videos were nice and clear to me.) I didn't want to start on just an EEPROM, because even if everything worked my diagnostics would be limited to LEDs. Using the arduino to provide the control also allowed me to react to "IN (X), A" and "OUT (X), A" instructions - in my case I use those to perform I/O to the serial console the Arduino is using. I've got a simple monitor running to allow me to enter programs, dump RAM, and call routines. But the next step is something more programmable - as I guess I mentioned. Good luck anyway! It's a fun project for sure. I started coding on a Z80-based home-computer in the 80s, so there's a lot of nostalgia.
- mindcrime 7y agoI didn't want to start on just an EEPROM, because even if everything worked my diagnostics would be limited to LEDs. Using the arduino to provide the control also allowed me to react to "IN (X), A" and "OUT (X), A" instructions - in my case I use those to perform I/O to the serial console the Arduino is using. That's an interesting thought. I may look into doing something like that as the next phase of my project, if I can get as far as booting the z80, having it execute a program off the eeprom, and blink some LED's. :-)
- asguy 7y agoI just implemented an indirect-threaded Forth VM for Cortex-M4. It's acting as the backend interpreter/compiler for an embedded scripting environment. The end user never needs to see Forth in any form they would recognize, but the underpinnings are there making the whole thing work. I'd recommend starting with a simple (non-standard Forth) and get a feeling for the outer and inner "interpreter". It sets a great stage for getting something more advanced (e.g. lisp w/ GC) working.
- bifrost 7y agoooooh cool!
- burfog 7y agoEZ80 processors are commonly available via the TI-84 Plus CE. It costs about the same as the MakerLisp CPU card, but you get a 16-bit 320x240 color screen and a Micro-USB port and a calculator keyboard. There is a freeware C compiler available that can run in Wine. It has character. An "int" data type is 24-bit, with sizeof(int) being 3. The obvious open source compiler would be SDCC, but it needs some work. None of the 24-bit stuff is supported, leaving you with access to less memory.