Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Z-Berry: Z-80 computer (sites.google.com)
90 points by mmastrac on June 15, 2017 | hide | past | favorite | 55 comments


"Z-Berry is the smallest Z80 based computer ever built."

Not to be pedantic, but the Timex Sinclair 1000 of 1981 had a lower chip count than this computer.

Take a look at the board: http://oldcomputers.net/pics/ZX81-mb.jpg

And it even includes the RF modulator.

Of course, the Z-berry is a far more powerful Z80 computer.

Ready to run again all your CP/M 80 programs?

PS: What would have RULED would be to include in the Z-Berry a socket for the SID* sound chip or at the very least two POKEY* chips.

* SID: Commodore 64 sound chip. POKEY: Atari 8-bit (800/400/800XL/etc) sound chip.


Maybe he meant the literal smallest?


If we extend the definition of "Z80 computer" to include those which aren't using the original Zilog Z80 DIP40 CPU, e.g. SoCs, then these may be the smallest:

https://en.wikipedia.org/wiki/S1_MP3_player

https://www.bunniestudios.com/blog/?p=138

https://www.bunniestudios.com/blog/?p=139


Yes, but of the ICs in the Timex Sinclair 1000 is the Ferranti ULA which packs a lot of features.


The obvious way to solve the 'will crash when switching banks because next instruction is from different bank' is to replicate the bank switching code to all banks.


Of course, in order to copy the bank switching code to the other banks you need to switch to them first. Which means that this copying can only be done by the ROM.


No, you'd do that with a little bit of PIC running in one of the other parts of RAM.


Only one bank can be active at a time, so the only RAM you can run the code from is the same bank that you're trying to load code into. Slight chicken-and-egg problem.


No, that's not how these systems work. The bank switched RAM is switched in banks of 16K, so you can keep 48K 'constant' while the other 16K is switched as a window in the 256K.


I think of all the modernish Z80 computers FAP80[1] is my favorite. Of course it is also massively more complex project than this, but that complexity enables FAP80 to function as a proper standalone computer that you could actually use if you were so inclined.

[1] https://news.ycombinator.com/item?id=13438610


I really enjoyed reading the blog posts about the build of this. Gave me so much insight into the inner workings of those machines.


I like it. Compact, supports keyboard and SD card and display. I'd like to read up more on it but the pages are a bit sparse (and I can't view the youtube videos where I am, so I'll have to check those later).


Off the specific topic, but on topic of retro machines, but I feel that the new BBC micro:bit project should actually have been a rebuild of the actual BBC micro, but with an HDMI display/USB/network.


That would have been awesome.

The econet system too, this time with email and web access but still the hackable LAN that was so much fun to navigate and spoof.

?&D22=100 to change my station number to the IT teachers station when he'd left for the day. Thus all logs were from his machine, seemingly.

He hated me and my mate. To the point where he had spooled all system privileged activity to actually print out (not to a text file, he wasn't the smartest even to us 14 year olds) to paper.

It was his genius plan to narrow down which room we were logging into from!

The next day we see a locksmith changing the locks to his private computer room.

He never did catch us. Someone snitched in the end. We told a friend who boasted unbeknownst to us to others and the jig was up.

Banned from computers for the rest of school.

A really cool science teacher got us involved with the weather station (it recorded data from NOAA sats to the BBC micro!!) so got the ban amended to 'no computers with network access' so we could use the computer in his lab.

Of course we then learned how to splice cables and made a reeeeeally long econet cable and had a system of lookouts.

Good times.

Thanks Mr. Bush you were a good guy who nurtured our interest. AS for you Mr. Pollard, as an adult I get why you hated us but still, if you'd have asked us to help with the network or the lab or something we could have avoided our war.

Sorry guys, big barely relevant anecdote but hopefully someone else will smile at the fun days of the BBC Micro and remember the econet hacks.


That looks really cool. I built the cpuville kit a few years ago but its I/O decoding was borked, it didn't expose enough control signals through its extension mechanism, and its pin headers were at an odd spacing so you couldn't just plug a prototyping board onto it.

I designed a and built new I/O extender to fix all those problems but PCB design is not fun for me so I never made a PCB for it.

This one looks to have none of those problems.


There's this too: http://sowerbutts.com/socz80/ (100+Mhz)


But does it run Linux?

If not then good luck writing code to page out to that 512k of RAM. I do wonder what the 1980 computer scene would have been like if 512k was there because that was the smallest amount available, instead of the normal 16k. It was only when the PC came along that this amount of memory was available. PC programs took a while to be as concisely optimised as home computer code had to be. So maybe the scarcity of RAM was a good thing.


My Tandy Color Computer 3 had 512K (standard was 128K) and an 8-bit CPU (6809). It did have something akin to a MMU though (the GIME chip) - which paged the RAM in banks of 8K.

As far as what it was used for - people mainly used it for RAM disks; it could also be used for page-flipping for the higher-res graphics modes the CoCo 3 supported.

For the OS-9 Level II operating system, it was used much more efficiently to allow for larger (or more) programs to be multi-tasked, along with other uses.

(for those unaware - OS-9 was a multi-user, multi-tasking operating system for the 6809 and other 8-bit microprocessors of the day - but mainly geared to Motorola CPUs - including later the 68k family)


There's an OpenSource replacement called Nitros9 http://www.nitros9.org/documents.html

Also: https://github.com/nealcrook/multicomp6809/wiki

and finally: https://www.retrobrewcomputers.org/doku.php for more retro goodness.


Since it's a Z-80 which is a primarily 8-bit microprocessor with some 16-bit features and no MMU I'm going to go with no Linux.

However, microcontrollers and game systems have been using more than 64k with it for ages now. It's all done with bank switching. https://www.retrobrewcomputers.org/doku.php?id=boards:sbc:z-... explains how Z-Berry does its bank switching.


You can use the bank switching logic as a minimalistic/sort of MMU, giving each process a full memory bank and nothing else.

To get real protection of programs against other programs and of the kernel against any programs you would have to make the bank switching logic privileged, but I would think that's doable with some external logic that snoops the memory bus and only allows switching to another bank if either the current bank is bank zero or the destination bank is bank zero and the instruction pointer matches that of the kernel's entry point.

You also would have to force a switch to bank zero to preempt processes. I think the easiest approach would be a timer that, when it expires, switches to bank zero and interrupts the CPU.

With this hardware, that could give you 7 processes, max. I think you could have fun with a minimal Unixlike OS in that.

Edit: it will be a bit of a challenge to pass arguments to the kernel if the kernel can't rely on hitting trusted code when it bank-switches back to a process to, say, read a memory buffer, but that can probably be overcome by force-mapping, say, the last kB of RAM to the kernel's memory space.


Well, one can for sure have CP/M.


Not sure if you're being sarcastic or not. But the Z80 is a 8 bit CPU. Linux was never ported to any 8 or 16 bit architectures - for rather obvious reasons.


Linux was never ported to 16- or 8-bit hardware but through the magic of Turing completeness and emulation somebody did actually manage to get an 8-bit micro-controller: http://dmitry.gr/index.php?r=05.Projects&proj=07.%20Linux%20...

(Yes, this is so convoluted, and so unusable, that it basically reinforces, rather than refutes, your point.)


Well, the ELKS[1][2] project has been working on a 16bit port on and off since the late 90s. At one point Alan Cox[3] was an active contributor.

[1] http://elks.sourceforge.net/

[2] https://github.com/jbruchon/elks

[3] https://en.wikipedia.org/wiki/Alan_Cox


ELKS is an excellent example as well as uClinux[1], which has made its way to a few 16-bit platforms[2].

[1] http://www.uclinux.org/

[2] http://elinux.org/images/6/68/Porting_uClinux_CELF2008_Griff...


I had 256K in bankswitched 16K blocks in an 8 bit micro in 1982. Cost a small fortune and it was a bit awkward to use but it worked.


I hope you've got a good story about that.


Nothing all that exciting. A UK company called 'solidisk' made a RAM expansion for the BBC micro that took a bit of fiddling to install but worked quite well.

http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Sol...

I used it for very limited black-and-white 3D animations, pre-compute the edges, then draw the images in real time and for other tricks.

A few months ago when trying to interface a bunch of hardware to a PC I realized how much easier such tasks were in the past, it's funny how we have made it much harder to expand a computer in our own domains (electronics, interface boards, standard ports with immediately usable i/o almost without latency) compared to how much easier it is to expand a computer towards the domains of others (networking).


My dad bought one of these in 1985: http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Opu... - the 256K one. Unsure of price but I think it was around £200?

I used it quite a lot when I got a bit older - the RAM disc's speed made it very useful. Good to play disc Elite (once unprotected...) from, and I remember it being much quicker to assemble stuff with ADE.

(I still have it, but the Opus EPROM erased itself long ago, so the RAM disc part has languished unused for a very long time. The 32 year old disc drive still works fine with my Master 128 though...)


Wow, I've seen a lot of BBC hardware (I had good contact with both Dutch importers of BBC related stuff) and I've never seen one of those.

You probably could re-program that EPROM if you wanted, or replace it with a ROM so you won't have that problem ever again. But this is probably not the most practical system for today :)


The comment about practicality is well made. The Challenger was a good device for the time, but for the modern day I prefer my current setup: Master 128 with 16MHz copro, plus home-made mashup of http://zeridajh.org/software/65link/index.htm and Minimus AVR, letting me can use my Macbook Pro as a file server ;)


Very nice :)

Unfortunately I lost almost everything I ever wrote for 8 bit platforms and a lot of my early PC and Atari stuff. It's a real pity, but then again, it also forced me to cut ties with the past and move on which in a way was a blessing.

But it would have been nice to open up a lifetime of code at some point.


That was USD 300 of RAM, so a small fortune.


In 1982? Pretty sure it was more. Remember that the first Mac, a $2k machine, came with 128kb in 1984, and the IBM PC/AT (costing a wooping $6k in 1984) came with 256kb in the original base variation.


It was a lot more than that. 64K went for about 300 Dutch guilders back then, the 256K board went for almost as much as the entire computer, I spent a very long time saving for it.


The Amstrad PCW was also a Z80 system with 256 or 512 KB RAM accesible using bank switching. Normally it acted as a RAM disk.


Eh? Just write your own bank switching code. The whole setup is different to MMU paging. Not having looked at the specs I'm guessing you do an I/O write to something that sets the bits of the address lines above 15 to select the bank.

You could go two ways:

1. Have some amount of RAM outside the bank switching scheme so code and data living there is always available and bank switch above or below that fixed area.

2. Switch the entire 64k at a time, meaning your code and data has to be copied into the same place in each bank.


MSX (z-80 based) unix; https://github.com/marioaugustorama/uzix-kernel

Much cooler (imho) is http://symbos.de/ though, also for z80 machines.


Unusual, yes, but half a meg wouldn't exactly be an exotic amount of RAM for a 1980s 8-bit.



Not the smallest, not even close.

http://noplabs.com/cpm50/cpm50.html


Why not simply run a Z80 emulator on a raspberry pi?


Why not simply make guacamole in a cement mixer?


Why learn to play an instrument when you can just buy a CD?


Why paint a portrait when you can paint a house?


Sir, you're no fun.

Too bad that you can't order one pre built. I'm not competent enough to solder that.


Why drummers carry those big bass drums and cymbals when they can just use a pocket drum machine?


Because for a certain type of person having your code run on a real Z80 is much cooler.


This is really cool! I've recently been playing around with z80 emulators, but it must be neat to try it on an actual device.


I would love for some one to make something like this but with 286/386 CPUs. Would be great for the retro PC crowd.


Something like this already exists: https://www.linux.com/news/here-come-x86-hacker-boards . I think these should be able to run DOS.

If you want to go full retro, x86 is relatively difficult due to the support circuitry needed. Full ISA, ram, ports, etc. PCs were fairly complex machines back in the day.


The real question is: If you could run CPM on this, what CPM software would you want to use?


Visicalc?

I recall using a PROLOG interpreter on a Kaypro II under CP/M. Worked neat.

Also i used an ALGOL-60 compiler. In fact, just a subset of ALGOL-60. So, in some ways, a limited subset of a subset of Pascal.


you should definitely take a look at Fuzix,

https://github.com/EtchedPixels/FUZIX




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: