
SymbOS: Graphical Z80 Multitasking Operating System - Paul_S
http://www.symbos.de/
======
Sir_Cmpwn
Symbos is pretty cool but it's a crying shame that it's closed source. A lot
of people in the z80 community don't understand the value of open source, but
will give away binaries for free.

~~~
anigbrowl
_A lot of people in the z80 community don 't understand_

Don't be so patronizing. Of course they _understand_ it, but what they want is
something different from what you want: status in the demo scene. If they open
source it they're likely to end up as a footnote in their own projects rather
than basking on difficult-to-scale peaks among their peers.

It's not like open-sourcing it is going to enrich them in some more concrete
fashion than social currency; in fact, authors of very popular open-source
projects regularly find themselves in the humiliating position of having to
beg for money.

~~~
userbinator
_status in the demo scene_

...and since the demoscene is closely associated with the cracking/warez
scene, the implicit message is always "if you want to know how it works, get a
disassembler and figure it out yourself."

~~~
ddingus
This

------
randomerr
If the OS is open sources here are a few Machines it could be ported to with
the Z80 processor:

[https://en.wikipedia.org/wiki/Category:Z80-based_home_comput...](https://en.wikipedia.org/wiki/Category:Z80-based_home_computers)

Also the Z80 was in a lot of game systems and arcade machines. Imagine Sonic
and Pac Man multitasking:

[http://www.z80.info/z80gm.htm](http://www.z80.info/z80gm.htm)

[http://kmuw.org/post/z80-most-prolific-cpu-all-
time](http://kmuw.org/post/z80-most-prolific-cpu-all-time)

------
bluejekyll
The Z80 will always have a place in my heart. Mostly because we used it in
college to build a computer from scratch on a wire board. That was an awesome
project, and one of the classes that I remember fondly from nearly 18 years
ago.

~~~
wolfgke
What year was that?

~~~
delinka
2018 - 18 = 2000

Maybe 1999 since the fact that it's 2018 is still maybe too fresh to have
imprinted on many minds.

Maybe 2001 since GP says "nearly 18 years."

------
randomerr
It reminds me of the Contiki OS. I wish the project was still going. It seems
to have slowed down to crawl.

[http://www.contiki-os.org/](http://www.contiki-os.org/)

~~~
tincholio
Adam Dunkels, the main guy behind contiki (and just an awesome dude, all
around), went on to found thingsquare. I guess that's probably where new
development is happening...

------
jandrese
The specs on this are kind of weird.

Z80, 1MB memory, 2TB HDD.

Is this some kind of super Z80 clocked at 50+Mhz? I tend to think of Z80
systems as having 32-128kB of memory and 400k floppies for storage.

~~~
fwilliams
I think it means 1024 kB of addressable virtual memory.

~~~
rwmj
The Amstrad CPC had 64K or 128K of RAM + 32K of ROM (in a total addressable
space of 64K) using "RAM banking". The Amstrad PCW was the same but with even
more RAM (up to 512K). This worked very differently from what we now think of
as virtual memory.

On the CPC it worked as follows: There were two 16K ROMs, located at 0-16K and
48K-64K. The 16K-48K middle area contained 32K of fixed RAM.

The upper and lower ROM areas were shadowed by RAM. By writing to an IO port
you could switch in either the ROM or a 16K bank of RAM individually into each
of those two 16K areas. There was an elaborate system of trampolines to allow
the ROM functions to be called, or for the ROMs to read/write to the bank of
RAM "hidden" under them.

Edit:
[https://news.ycombinator.com/item?id=16079674](https://news.ycombinator.com/item?id=16079674)
explains how RAM banking works in Symbos.

~~~
stuaxo
Indeed, you could plug extra RAM in the back of the CPC, and even stack these.

------
dang
Discussed in 2015:
[https://news.ycombinator.com/item?id=10749206](https://news.ycombinator.com/item?id=10749206).

------
qwerty456127
Cool! Why exactly did it take so long BTW? (not complaining, just curious
about the hard parts). Although the first computer I've used was a ZX Spectrum
I was too young to program it at the time and have never had time to actually
revisit it later. About a decade later (that was the epoch of Windows XP and
Ubuntu already) I had a dream of running Visual Basic 1.0 for DOS on it,
developing text-mode pseudographical winforms-like apps (clones of Total
Commander and Excel :-)). Ever since then I have been passively curious about
whether it actually is hard or not and why nobody actually tries this (isn't
the GUI alone actually a fairly easy thing every computer can manage as long
as we give up all the eye-candy effects and accept the fact actual
calculations on data are going to be fairly slow?). Cool to see people have
implemented something like this actually and have even done it in graphics
rather than in just pseudo. Also, why can't we use modern languages like
Python or their subsets to write Z80 programs, at least very simple ones?

------
api
These sorts of things are great reminders of just how bloated modern software
is and what is possible if you can avoid the bloat. These systems are less
powerful than a typical modern washing machine or refrigerator.

~~~
digi_owl
Much of the bloat is from higher resolution graphics, and all the layers of
mitigation of various security issues that comes with multitasking.

~~~
icedchai
But orders of magnitude more bloat? I had full multitasking in the late 80's,
on an Amiga 500 with 512K of RAM. There was no memory protection, but there
was a GUI.

I remember running Linux (kernel 1.0 and earlier) with X11, in 8 megs of RAM
or less, back on an old 486. I could compile kernels. Running emacs was a bit
painful, however.

What we have today is more bloated than I could have possibly imagined 20
years ago...

~~~
sedachv
> I could compile kernels.

Compiler bloat is definitely an issue. There has been a lot of work that goes
into intermediate representations and all sorts of optimizations that results
in very diminishing or no returns for many use cases.

Runtime bloat is a much bigger issue. You have multi-stage runtimes that have
an interpreter, a bytecode compiler, and a JIT. Huge amounts of RAM use and
very CPU intensive. This makes sense for webGL games, but totally pointless
for the common case of running tracking adware on websites whose only real
content is a page or two of text.

The main problem are applications with poorly written event loops and memory
leaks. That is why modern computing feels bloated. Slightly better compiler
output or another 5% improvement in JS runtimes cannot solve this problem. It
is a type of induced demand - the more RAM and CPU you have, the more
accessible computer programming becomes to people who have very little idea of
what they are doing and how to do it properly.

------
j45
Nice to see GEOS referenced in this article - it also was the underpinning for
the Atari ST line of computers that did well Europe and swung well above their
weight.

If only I could find an ST 1040 again to appreciate Revenge of the Mutant
Camels on a machine that was as good at desktop publishing, animating,
creating sprite based games and and making music.

~~~
reaperducer
I thought the ST line was all about GEM.

If you're looking for an ST, they pop up from time to time on Goodwill's
auction site.

~~~
j45
I might be mistaken and it might be GEM. There was the base os and then
another window manager it would go into.

~~~
zero_iq
I think you probably confused GEOS (C64 OS/GUI) with the Atari ST's GEM,
GEMDOS, or GDOS. Lots of similar names!

------
anigbrowl
Oh wow, I'm getting Amstrad craving all over again.

~~~
duncan_bayne
They're still around. I've put one together over the course of years, a) for
nostalgia value, and b) for my children to at least be able to use the system
I learned to program on.

Mine is a 464 w/ DDI interface, 64KiB RAM expansion, SDcard based "floppy"
drive, mouse, and RS232 serial port. Still only a green screen, though, and
I've yet to make a ROM box.

Also see:

[https://github.com/Octoate/cpc-sdcc-rom/](https://github.com/Octoate/cpc-
sdcc-rom/)

~~~
pkaye
I had one of those Amstrad with green screen in the US. Sold mainly as a word
processing system. My dad bought it since we couldn't afford a PC at that
time. It did its job as a word processor well plus I had a great time digging
into the guts of the CP/M operating system. What I really hated was that it
had a 3" floppy which were hard to find.

~~~
duncan_bayne
Ah, you probably had a PCW:

[https://blog.twitter.com/official/en_us/topics/company/2017/...](https://blog.twitter.com/official/en_us/topics/company/2017/world-
leaders-and-twitter.html)

Don't let the 3" drives put you off. These days SDcard based "floppy drives"
make life a lot easier:

[https://hackaday.com/2016/02/28/floppy-drive-hides-sd-
card-r...](https://hackaday.com/2016/02/28/floppy-drive-hides-sd-card-reader/)

I have one for my CPC. Note that in the particular case of the CPC464 (not the
664 or 6128) you'll still need the Amstrad DDI disk interface unit, as the
base 464 has no disk controller built in.

~~~
pkaye
Yeah that is the one. It eventually failed after many years. I remember typing
up the Eliza program in BASIC for it and one of our neighbors kids still has
fond memories of playing with it.

------
zapperdapper
17 years in development! Now that's what I call a side project. It's an
amazing endeavour - a kind of K2 of Z80 programming.

------
AnnoyingSwede
A bit late? ;)

------
toxican
So could this be ported to anything with a Z80? Like, for example, a TI-83+
graphing calc?

~~~
teh_klev
I think you'll need a Z80 machine with bank switched RAM, that's how the
multi-tasking side of things works.

~~~
Sir_Cmpwn
The TI-83+ does not have bank switched RAM, but it's sister products the 83+
SE, 84+, and 84+ SE do. Regardless, you can achieve preemptive multitasking on
z80 without banked RAM, you just need PIC.

~~~
teh_klev
Sure, but I think SymbOS specifically requires bank switching capability:

[http://www.symbos.de/symmodul.htm?0](http://www.symbos.de/symmodul.htm?0)

(relevant sections passed through google translate de->en)

 _Memory Management_

 _SymbOS supports up to 1024 KB of RAM, depending on what was connected to a
memory expansion. The memory manager splits the entire RAM into individual
blocks of 256 bytes, which can be assigned completely dynamically. A big
feature here is the fact that SymbOS applications are always executed in a
secondary 64K ram bank. Thus, each program is allowed to allocate and address
up to 63KB in one piece. Screen memories and operating system routines are all
in the first, severed ram bank. They are virtually invisible and do not stand
in the way of the application. Of course, an application can also reserve more
than 63KB for itself._

 _Banking Management_

 _If an 8-bit CPU is to manage a memory of up to one megabyte (which is
theoretically at least 20 bits for the address bus), then it can possibly
become very complicated. This is where the bank switching administration of
SymbOS comes in, which regulates everything independently and transparently.
Completely unaffected, e.g. System routines located in a completely different
bank are called by programs as if they were in the same 16-bit address range.
Using the so-called transfer ram area (the top 16KB of a ram bank) both the
operating system and the application can access the same memory from two
different 64K banks. Copying memory areas between any two RAM banks is also
possible without any problems._

~~~
Sir_Cmpwn
Yeah, fair enough. You could probably get it running on one of the models I
mentioned above.

------
kruhft
Where can a machine be got to run this system?

~~~
stuaxo
Off ebay, An Amstrad CPC 6128 will do.

Though you may want an SD Card adapter to get the files onto it.

As the banner on the site mentions, it works on Amstrad CPC, MSX, Amstrad PCW
and Enterprise 64/128 (I'm not sure what this last one is).

~~~
qualitytime
The Enterprise was a British dream 80s computer that most people could not
afford.

[https://en.wikipedia.org/wiki/Enterprise_(computer)](https://en.wikipedia.org/wiki/Enterprise_\(computer\))

~~~
watmough
For me this started the trend of the render being much nicer than the final
product.

[https://www.theregister.co.uk/2013/10/24/elan_flan_enterpris...](https://www.theregister.co.uk/2013/10/24/elan_flan_enterprise_micro_is_30_years_old/)

------
jksmith
Ok, this project is precious and makes me wistful for the old days. Need a
golang port for this.

------
crocal
(Sorry, I can’t resist) ... Is it vulnerable to Meltdown and Spectre?

~~~
rbanffy
Sadly, no. No memory protection, you see.

~~~
ianhowson
Back in my day, when we saw something in RAM that we liked, we just _read_ it.

~~~
Exras
My BBC Micro (6502) even had a memory viewer in ROM that ran at ~50fps and I
remember the fun looking at running timers and keyboard/joystick ports getting
activated and such.

Years ago I wanted to do that on windows and found out that there was
something called protected memory, now it finally looks like I can experience
that fun again, although at a slower pace it seams ;-)

------
lallysingh
Why does every OS screenshot (not from a big company) always have to have a
few pictures of women in it?

It's ridiculously unprofessional in my book.

~~~
efnx
You would rather only have men? I’m not sure what kind of anti you are.

~~~
tomsmeding
If you need to have pictures, take landscapes.

~~~
CyberDildonics
Is this really where we are at now? Don't demonstrate any software using
pictures of people, even in a niche hobbyist OS for a retro CPU architecture,
just in case someone gets offended.

~~~
tomsmeding
I dunno, apparently. I personally like landscapes anyway, but am not offended
by pictures of people... Just naming what might please others. :)

