Hacker News new | past | comments | ask | show | jobs | submit login
SymbOS: preemptive multitasking OS that can play mp3s, video on 8-bit Z80 PCs (symbos.de)
106 points by sedachv on Dec 17, 2015 | hide | past | favorite | 36 comments



I never came across any MSX machines when I was a kid and collecting weird computers. Did they ever make it across the pond to the US market? eBay has a few at the moment, but all are Japanese imports, I think. Likewise, the Amstrad seemed to have an interesting history, but I never found one and guess they never sold in the US.

Not that I need more computers...I live in a travel trailer, and already have a C64, a modern desktop, a modern laptop, a netbook, two tablets, and probably other crap I'm not thinking of. But, whenever I see stuff like this, I really want to tinker with it, on the real hardware (somehow emulation isn't quite the same). I wonder if there are any FPGA recreations of these machines that would run SymbOS? That's been a subject I've started getting interested in, since one can have a "real" Amiga, Atari ST, and C64, in a single hardware package just by loading new images.

Edit: So, I did some googling, and the Replay FPGA computer has begun shipping to pre-orders, and it currently has support for Amiga and a few others. The developer seems to be planning support for MSX (as well as the BBC machine, which was also on my "I wish I could play with one" list). So, the MiST, the MiniMig, and the Replay are all options for retro computing nerds who want to not fill their closet with old machinery. That's pretty cool.

http://www.fpgaarcade.com/platforms/


> I never came across any MSX machines when I was a kid and collecting weird computers. Did they ever make it across the pond to the US market?

No, they didn't. Despite being a Microsoft standard. They were big in Europe, Japan and Brazil.

The MSX were wonderful machines. The even had "plug and play" hardware – cartridges were designed for software, but they could have basically anything. Companies created disk drive interface, hard drive, lightpen, you name it. And they would all setup automatically, due to the included ROM.

Also had great audio and video capabilities for the time. Eg. from 1989 (during the IBM PS/2 era, with VGA and the pc speaker for sound) https://www.youtube.com/watch?v=gcZJ64PgtgA That's for MSX2(which still used the Z-80). An example for the original MSX in 1986: https://www.youtube.com/watch?v=sk5C2E90dGY

It is amazing what a <4 Mhz processor can do. It did have a GPU, which helped due to the sprites (see the zanac example above). However, much later, people discovered that the GPU was actually a bottleneck and the CPU would have been able to push pixels (patterns, actually) at a much faster rate if it had access to the video memory directly.


I believe that the Yamaha CX5M (an MSX1 fitted with the same FM chip as the FB-01, marketed as a music workstation) was released in the U.S., and "across the pond" in general, I think it gained some traction in central and south america, though I'm not sure if the models used there were actually released domestically or imported by enthusiasts.


Actually both MSX1 & 2 had only the same basic sound chip (PSG https://en.wikipedia.org/wiki/General_Instrument_AY-3-8910 MSX2+ & Turbo R also had it for backwards compatibility).

The reason why Space Manbow there sounds so much better than Zanac A.I. is that Konami started to put their own sound chip (SCC https://en.wikipedia.org/wiki/Konami_SCC) in the cartridges of their later games, which would improve the sound capabilities of the MSX. This is one example of the "plug and play" hardware you mentioned.


The MSX Standard was based on the Spectravideo design which was an American company (SV-318 and SV-328).

The Colecovision was also pretty close to the MSX and many games has been ported between both systems including some classic Konami games.

The only real MSX sold in USA as a far I know was made by Yamaha, CX5M, and sold as midi sequencer bundle in music stores.


My understanding is that a variant of the same architecture became the Sega 8-bit consoles (which was repeated again in the portable Game Gear). There's some hobbyist ports between the systems floating around the internet.

Sega for a while also had a policy of incrementing architecture by adding more "power" to their original architecture. So the Sega Genesis/MegaDrive is essentially still compatible with the Master System (the SMS adapter was pretty much just a pin adapter)...which means that the Spectravideo/MSX architecture lived on in some form for a very long while.


A few MSX made it to the UK, they looked pretty fly, nice keyboards, but very few software titles compared to their peers, the vision of a shared OS with multiple hardware manufacturers was a great idea though and has persisted ;)


Besides the MSX suffered from lots of lazy ports from the ZX Spectrum, what is really a shame because they didn't use the full potential of the machines (kind of like happened with the Amstrad CPC, but that's a different story).


Could you write more about living in a trailer? Sounds very interesting, especially considering that you have a lot of tech. If not a problem, couple pics would be nice too.

Thanks! I'm interested because I'm considering doing the same.


I used to blog about it when I lived in a motorhome (I traveled full-time for four years). I'll update my travel blog when I get more time. I just noticed it didn't even make it over to new servers the last time I did a server migration, so it's been down for a couple of years. Hopefully I've got a backup; if not, the Wayback Machine seems to have all of the posts and images (if not all of the data from outside sources like Google maps and Calendar).

The "lot of tech" is actually a problem. I'm traveling with a girlfriend and her two cats this time, and it's pretty cramped in the trailer, even though I opted for a large-ish one (a 1984 34.5' Avion; one of the classic aluminum ones). We still need to downsize our belongings a bit before we really hit the road in earnest. Most stuff is boxed up in the back of the truck, so it's not realistically usable, so it probably ought to go into storage.


Link to the wayback machine's snap of your blog please?


I couldn't even play MP3s on my Amiga 500 without doing seriously degraded decoding (skipping high-frequency components and reducing playback resolution from 44kHz to 11kHz).

If someone can make a Z80 play MP3s, in any form, I'm impressed.


MP3 support requires a decoder card according to the page; I remember running into the same issues on my 486.


Yes, I had a 133-mhz 486 and had comparable or better performance than the Pentium-60s and 90s, but mp3 was a big exception (at least until someone made a non-floating-point decoder library). Doing that on a z80 would either mean some in-name-only z80 contemporary clone or external decode hardware.

Or maybe a Fabrice Bellard project.


I remember the lp3 [1], a LPT printer port dongle / sound card. It was a DSUB-25 parallel port passthrough with a headphone jack on the side. You piped an undecoded mp3 stream into it via a Winamp plugin and any machine running Win95 or higher could "play mp3s".

[1]: https://web.archive.org/web/20000311130535/http://lp3music.c...


That sounds awesome, like an update to the old Covox Speech Thing. I sometimes miss my parallel port (or the even weirder BeBox thingamajig).


Basically, if you plug an entirely separate new computer into your Z80-based computer, you can play MP3s on your Z80-based computer.


So you make your computer into one of those mp3 playing thumbdrives then...

( If I remember right, some of them are basically Z80 cpu with MP3 decoding DSP built it. )


Yes, those were called S1 players. You could build your own custom firmware for them:

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


I want a z80 with a nanogpu, for glorious, flicker free, 8bit UI compositing.



Thank you so much !


Wow, this project has been going since Nov 2000, so the 15th yr anniversary just went past. But the genesis is much older. When the release in 2006 occurred, its history mentioned the dream was 20 yrs old.

From an idea to now, an effort that is going for 36 years so far! Incredible persistency.


Where do people find the time to get involved this this? This project is so impressive I don't even have words for it. As a person who started with a Vic 20 and a former collector of old computers I know how hard that must have been to do.


Maybe I'm missing something, but I can't see where it states that SymbOS provides preemptive multitasking. The facts page [1] states that "I want to give everything to SymbOS what a modern OS needs. Real preemptive Multitasking, a dynamic memory-management for up to 576K and more.", but thats not the same as it actually having it. I can't actually see how preemption would be possible on a Z80. Have I missed something?

CLiPS (on the same site) appears to support preemption [2], but that requires a C64. I don't know how that is achieved.

Very impressive work nevertheless.

[1] http://www.symbos.de/facts.htm

[2] http://www.symbos.de/mirrors/www.clips64.de/details.htm


Page http://www.symbos.de/facts.htm, end of the third paragraph "Real preemptive Multitasking, a dynamic memory-management for up to 576K and more and a totaly MS-Windows-like GUI are the three most important things."

I'm also a little puzzled about real preemption on a Z80, but http://www.cpcwiki.eu/index.php/SymbOS#Technical_background states

"Even the Z80 8-bit CPU is able to run a pre-emptive multitasking environment. Missing mechanisms like memory protection, which are often called as a condition for multitasking, are system stability issues only. The MP/M operating system already proved, that multitasking on Z80 computers is possible.

While the MOS Technology 6502 can not move the stack, the Z80 can freely replace it to any position in the memory, which is more or less a condition for pre-emptive multitasking. The existance of an alternative register set accelerates the content switching between the tasks dramatically. The restriction of Z80 systems to a 64 kB address space can be solved with bank switching. In this way computers like the Amstrad CPC and PCW, MSX, Enterprise or SAM Coupé are able to access hundred or thousand of kilobytes of memory. "


Page http://www.symbos.de/facts.htm, end of the third paragraph "Real preemptive Multitasking, a dynamic memory-management for up to 576K and more and a totaly MS-Windows-like GUI are the three most important things."

The previous sentence is "I want to give everything to SymbOS what a modern OS needs.", so I read that as being a statement of what the developer wants the OS to have in the future.

Further down the page, in the details section, it states "Priority based preemptice [sic] and cooperative multitasking" is done. Wikipedia mentions that a combination of preemptive and cooperative task management is used [1]. I'm confused.

(And just to be clear: I'm not trying to be negative. I'm very impressed with the technology and tenacity of the author.)


I'm not sure preemptive multitasking is a good idea for a Z80 anyway. You can either run one program slowly, or two at a snail's pace.

At least it can address enough memory to make it not a complete waste.


Preemption just means the task is stopped when its timeslice elapses, and a new task selected. You can do this on any CPU with a regular timer interrupt. On something like the ZX Spectrum you'll need to use the vblank interrupt; on something with a programmable timer, you can make the timing tighter.

(In either case, you'll probably want some mechanism for tasks to relinquish their timeslice early; no reason not to make multitasking run better when tasks cooperate, even if it doesn't absolutely require that.)

To do the actual task switch, do exactly what you do on any system:

- save register state in tasks's register area (the state will be available on entry to the interrupt routine, in the usual fashion. The task pointer will be a system global at a fixed address)

- set timer for one timeslice hence (timers probably count down to zero, so this will just be a question of putting a value somewhere into an I/O register)

- resumes task by jumping to the program counter value from the task's register area

- GOTO 10...

(The complications come on something like the 6502, which has a fixed-size, fixed-address stack - but this it hard task-switching difficult, not the preemption! How I imagine CLIPS gets around this: it requires CMD SuperCPU, which is a 65816. Like the Z80 and 6809, but unlike the 6502, the 65816 has a relocatable stack. So it will probably behave as I describe above.)


816 has a relocatable stack and direct(nee zero) page, so that's good. Unfortunately both of those still have to be in the lower 64k bank. So that's a bit frustrating for trying to write OS support for multitasking larger memory systems.


I don't know how symbios does it but I don't think it's that hard to create something pretty close to preemptive multitasking on a z80. You have the vsync interrupt (50 times per second). Add to that some stack manipulation, some bookkeeping and a register store/restore procedure and you're done. It wouldn't be fast though, and it would also limit what a process is allowed to do (disable interrupt, write outside of its own memory region). The z80 provides no mechanism to enforce this, of course. But technically, it's a primitive kind of preemptive multitasking.


After finding about pico8, I got interested in low res, low color depth UX, this couldn't come at a better time.

Beside the flickering, it's pretty neat.

https://www.youtube.com/watch?v=2-oBNh0UkQc


So they support computers that have a Z80 in them, does that mean that a C128 port is possible in the future?


Not exactly a Z80 (more of a 8080/Z80 hybrid), but I'd love to see how a Gameboy port turns out.


Or maybe a ti84+ port? :D


Think of how much more gratifying hacking on this would be than working with bloat-ware frameworks. Maybe it's time for another buzzword? "dignity driven development" perhaps? Oh where did it all go so wrong...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: