Hacker News new | ask | show | jobs
by korfuri 1344 days ago
I mean, true, but "a whole bunch" is kind of misleading. It's a really clever hack using really a tiny amount of extra gates. It's still a very cool and innovative hack that nobody really had thought about before.
4 comments

Reminds me of the printer interrupt hack Darklite/Offence used for their Tiki-100 demos.

The Tiki-100 is an obscure Norwegian 8-bit computer from 1984, also Z80-based. It had nice graphics for its time, with 16 colours from a 256-colour palette. However, it was very hard to use productively, since the machine had no video sync interrupts.

What the guys in the demogroups figured out, was that it did have parallel port interrupts, and with a tiny hardware mod (just a wire from the expansion port to the parallel port), they could "steal" those for Commodore 64-style raster interrupts.

Heck, one could connect a Commodore 64 to the Tiki and get synced frames.
It certainly has been thought of before. Using external circuitry to remap the address space was common with lots of different processors, and once you have that (and a way to jump to a controlled address from hardware) it's a logical next step.

That it wasn't something usual with microcomputers of the time wasn't because it would have required some uniquely clever design. Rather it had to do with them being single-user/single-task, with simple operating systems where programs were expected to have full access to the machine.

Yes, there were lots of 8-bitters that used bank switching. But I think you have the causality somewhat backwards. 8-bitters didn't lack memory protection because they didn't have operating systems that could use it; rather, their operating systems couldn't use it because it wasn't there. Multitasking was of course useful, then as now, and sometimes people did do multitasking on them despite the generally limited memory; it was just less reliable because programs could crash each other. Multitasking was common in real-time control, which is how THERAC-25 happened (on a non-8-bit machine, but due to a race condition between threads).

A common use for multitasking in the 8-bitter era was print spooling; it was very inconvenient to have to wait for your document to finish printing before you could continue editing! People frequently bought external hardware printer spooler boxes to connect between their computer and printer because of this. Similarly, duplicating floppies was pretty inconvenient because you couldn't do anything else while it was happening, even if you had four floppy drives like I did, with literal megabytes of storage space available to read porn or play video games while the floppies were copying.

Historically on larger machines it was also common to use multitasking to overlap very slow disk I/O with useful computation. (The alternative is to use asynchronous I/O and write your program as an event loop, like a game or Node.js, or to do your I/O from interrupts, which is close to multitasking.) In theory this could have been useful on 8-bit micros as well but I don't think I saw any cases of it actually happening.

Using external signals for some sort of protection isn't innovative. This is a documented feature of the Intel 8086: the S3 and S4 pins expose which memory segment is being accessed: code, data, stack or extra segment.
Yeah, but as the author says, it renders the whole maskable interrupt system useless… so it is not something you would do since it would undermine too many useful parts of the chip.