News for hackers. Stuff that matters.
Re:Compiling my own SPARC CPU inside a cheap FPGA by Annatar on Sunday October 20, 2019 @10:31AM (#21304372)
I never was a fan of the Zilog Z80 (its instruction set reminded me too much of the idiotic intel 80x86 family), but seeing someone running the Control Program for Microcomputers on a whopping 25 MHz Z80 is incredibly cool... just imagine what kind of scene demos could be coded on this monster for the next demo party...

I wonder if it would be possible to retrofit an MMU onto a Z80 design and port a real UNIX to it? 25 or even 50 or even a 75 MHz UNIX server on a Z80 processor, that'd be a nice perversion...

Re:Compiling my own SPARC CPU inside a cheap FPGA by tasty_freeze on Sunday October 20, 2019 @02:22PM (#21305987)
> [the Z80's] instruction set reminded me too much of the idiotic intel 80x86 family

That is because the z80 was a (mostly) binary compatible superset of the 8080 instruction set, and the 8086 (while not binary compatible) was intentionally modeled after the 8080 such that there was a program that could take an 8080 program and do the 1:1 instruction mapping from 8080 to 8086 and get a working 8086 program.

> I wonder if it would be possible to retrofit an MMU onto a Z80 design

Zilog made a number of Z80 follow-on CPUs, and some have MMUs. It is amazing how far they took the instruction set; the Z80380 could run Z80 code as-is, but it also extended instructions to support 32b operations and had a mode with a flat 32b linear address space. I don't recall ever hearing any consumer product using it though.

Re:Compiling my own SPARC CPU inside a cheap FPGA by qubex on Sunday October 20, 2019 @08:39PM (#21308394)
Z80380 user’s manual, for those interested: https://www.manualslib.com/manual/1237352/Zilog-Z80380.html
Re:Compiling my own SPARC CPU inside a cheap FPGA by okl on Sunday October 20, 2019 @01:04PM (#21305402)
This guy ran Linux on an ARM emulator on an ATmega. A similar feat should be possible on a Z80.

http://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bit

Re:Compiling my own SPARC CPU inside a cheap FPGA by Annatar on Sunday October 20, 2019 @01:46PM (#21305711)
I remember that. That was emulation and it was not usable the way a 75 MHz Z80 could be, running code directly on the CPU (even if it is an FPGA).
Re:Compiling my own SPARC CPU inside a cheap FPGA by spc476 on Sunday October 20, 2019 @11:50PM (#21309216)
If you want to see a Unix like OS on an 8-bit CPU, get a Motorola 6809. It was designed with high level languages in mind (four 16-bit index registers, two 8-bit accumulators that can act as a single 16-bit accumulator) and can even do position independent code quite easily (PC-relative addressing modes). Quite an underrated CPU.
Re:Compiling my own SPARC CPU inside a cheap FPGA by throwaway5d097 on Sunday October 20, 2019 @05:13PM (#21307197)
You could run something like Inferno without an MMU: "Limbo programs run safely on a machine without memory-protection hardware". It would probably be more efficient than emulating some other architecture. Arguably, it'd be better than Unix :p
Re:Compiling my own SPARC CPU inside a cheap FPGA by caf on Monday October 21, 2019 @12:31AM (#21309362)
FUZIX is a tiny UNIX that runs on a Z80 using memory banking rather than an MMU.

https://github.com/EtchedPixels/FUZIX