At Last! CP/M For Protected Mode

If you used a serious computer pre-IBM PC, there was a fair chance its operating system was CP/M. CP/M was a staple among 8080 and Z80 computers and while there were other versions, we’ll always associate CP/M with the Z-80. There was a CP/M made for the PC which used an 8088 (a hybrid 8-bit bus with a 16-bit 8086 core), but it was overwhelmed by MSDOS. However, there was another interesting version made for the 68000, and now [johnsonjh] has ported that over to create an early version of CP/M for 80386 protected mode.

The Z-80 only had a 16-bit address bus, so it could only handle 64K of memory. It was common to “bank switch” some memory, and CP/M Plus could be made to understand that (for example, you might have 32K of common memory and three banks of 32K memory; you could address one bank at a time). However, the 386 had a full-blown memory management unit that could remap physical 4K memory pages to anywhere in a program’s virtual address space.

Ordinary CP/M couldn’t handle that, but the Motorola 68000 had a similar page management model, so it makes sense it might be easier to port CP/M-68K to the 80386 than starting from the original, even though the instruction set for the Z-80 is conceptually more similar to the 80386.

What can you do with it? We don’t know. Presumably, it will allow you to use lots of memory. Historically, CP/M software from one variant would not run on another, so you’ll have to build anything you want to use. Of course, the real killer for lots of CP/M memory was multitasking, but that takes MP/M, and only about half of that is currently working. But we won’t be surprised to see it completed soon.

While CP/M skills won’t land you many jobs these days, it is a pretty good way to get mentioned on Hackaday.

An Unlikely Host For An 8080 Emulator

To emulate vintage microprocessor hardware, it’s normal to find a modern host that provides alongside the number-crunching grunt, sufficient physical connections to interface with its support hardware. Thus if you were shopping around it might be reasonable to pick something with a powerful core and plenty of pins. Yet to emulate an 8080, [Ted Fried] has eschewed both of these — opting for an ATtiny85, a microcontroller deficient in both pins and processing power.

This seemingly impossible feat is achieved by reducing the physical connection to an SPI bus and offloading the support functions to a Teensy. The emulation code is significantly optimized C, and includes a 128 byte cache to speed up matters. This delivers a speed claimed to be only very slightly slower than a real 8080 when booting CP/M, which is quite a feat.

We’re sure that CP/M enthusiasts will have fun with this project, and we especially like the full write-up. Going to the effort of making fake 1975 electronics magazine covers for the project really is going the extra mile, and we appreciate that. Meanwhile if you’d like one of your own, the whole thing can be found in a GitHub project.

If you’re not familiar with the 8080, maybe we can get you started.

CP/M Gently

If you are interested in retrocomputers, you might be like us and old enough to remember the old systems and still have some of the books. But what if you aren’t? No one is born knowing how to copy a file with PIP, for example, so [Kraileth] has the answer: A Gentle Introduction to CP/M.

Of course, by modern standards, CP/M isn’t very hard. You had disks and they had a single level of files in them. No subdirectories. We did eventually get user areas, and the post covers that near the end. It was a common mod to treat user 0 as a global user, but by default, no.

Continue reading “CP/M Gently”

CP/M On An Eight Line Display

How many lines do you need on a CP/M terminal? More is usually better, of course, but the MicroOffice RoadRunner managed with an 8-row, 80-column LCD screen. That may sound anemic, but in 1983, it was high-tech, as was the RoadRunner, and [Tech Time Traveller] tells us about them in a recent video you can see below.

The intro to the video shows some really strange old laptops before it gets to the RoadRunner. The machine used a Z80 work-alike CPU and a form of CP/M with some organizer functions. The machine didn’t have floppies or other disk storage, but did have four cartridge slots that could hold more memory, a spreadsheet, BASIC, or a text editor. The memory cartridges were static RAM with battery backup, so they retained data when you pulled them from the slot. Assuming the battery didn’t die.

Inside a RoadRunner cartridge.

Unfortunately, this particular machine suffered some shipping damage. In addition to the cartridges, it also had a removable battery and modem. At around the eight-minute mark, the case comes off, and inside are — surprise — more internal cartridges.

While MicroOffice isn’t a household name today, it was founded by a former Exxon executive and tapped a CEO and investor from Timex. It was funded by the likes of Olivetti. The computer rolled out in late 1983 and lived until Telxon bought MicroOffice in 1985.

Attempts to run Zork were not fruitful. There really wasn’t enough memory, and file transfer was a bit wonky. If you want a modern Z80 laptop, we know of one with 16 cores. As clunky as the RoadRunner looks, it still beats the old suitcase computers.

Continue reading “CP/M On An Eight Line Display”

Z80s From The ’80s Had Futuristic Design

Ever heard of a Dutch company called Holborn (literally, born in Holland)? We hadn’t either, but [Bryan Lunduke] showed us these computers from the early 1980s, and we wondered if they might have appeared in some science fiction movies. They definitely look like something from a 1970s movie space station.

The company started out tiny and only lasted a few years. The Holborn 9100 looked like a minicomputer and, honestly, other than the terminal, looks more like an air conditioner or refrigerator. While it was a Z-80 system, it was clearly aimed at business. The processor ran at 3.5 MHz, there was 72K of RAM that could expand to 220 K — a whopping amount for the early ’80s. They also could accept loads of 8-inch floppies. It even had a light pen, which seems exotic today but was actually fairly common back then.

Continue reading “Z80s From The ’80s Had Futuristic Design”

Obfuscated C 8080 Emulator Ported

[Oscar] is no stranger to writing hard-to-read C code. While most of us do that by accident, there are those who strive to write the most unreadable code and enter it in the IOCCC — the International Obfuscated C Code Contest. One of his winning entries was a single C function that emulates an 8080. With a few support files, the plucky little emulator will run CP/M.

The emulator won best in show, but that was in 2006. Things have changed a bit and [Oscar] has updated the code so that you can continue to try it if you want to give yourself a headache reading code. The portability isn’t a CPU issue — modern CPUs will happily run code from 2006. The problem is the compiler and operating system. Compilers are much stricter these days, and Linux needs a little extra coaxing to give access to the input stream the way the faux computer needs it.

Continue reading “Obfuscated C 8080 Emulator Ported”

Linux Fu: Forward To The Past!

Ok, so the title isn’t as catchy as “Back to the Future,” but my guess is a lot of people who are advanced Linux users have — at least — a slight interest in retrocomputing. You’d like an Altair, but not for $10,000. You can build replicas of varying fidelities, of course. You can also just emulate the machine or a similar CP/M machine in software. There are many 8080 or Z80 emulators out there, ranging from SIMH to MAME. Most of these will run on Linux or — at the least — WINE. However, depending on your goals, you should consider RunCPM. Why? It runs on many platforms, including, of course, Linux and other desktop systems. But it also will work with the Arduino, Teensy, ESP32, or STM32 processors. There is also experimental support for SAM4S and Cyclone II FPGAs.

It’s pretty interesting to have one system that will work across PCs and embedded hardware. What’s more is that, at least on Linux, the file system is directly translated (sort of), so you don’t have to use tricks or special software to transfer files to and from CP/M. It is almost like giving Linux the ability to run CP/M software. You still have to have virtual disks, but they are nothing more than directories with normal files in them.

Goals

Of course, if your goal is to simulate a system and you want to have 180 kB floppies or whatever, then the direct file system isn’t a benefit. But if you want to use CP/M software for education, nostalgia, or cross-development, this is the way to go, in my opinion.

It isn’t just the file system, either. If you need a quick utility inside your bogus CP/M environment, you can write it in Lua, at least on desktop systems. On the Arduino, you can access digital and analog I/O. Theoretically, you could deploy an embedded Altair for some real purpose fairly cheaply. Continue reading “Linux Fu: Forward To The Past!”