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.

New File Manager Is C64’s Answer To Norton Commander

Norton was always a PC company — Norton Commander, the file manager that launched a thousand clones, was only ever available for DOS, like the rest of the company’s offerings in those days. If they’d decided to port it to the C64, though, it would likely look a lot like [retro3872809] aka [Chicken 64]’s Multi Floppy Commander with Turbo, available on GitLab.

As you might be able to see on the screen shot above or in the demo video below, the application provides an 80-column interface with a split view to show a pair of floppies side-by-side. Not that you’re limited to two floppies, however. The software is happy to swap between all the drives on the bus, to the C64’s maximum of four. All four drives will be usable since the file manager lives on a cartridge.

All drive models are supported, though not all have turbo. As a file manager, it looks like it has the normal functionality you’d expect: renaming, copying, moving and deleting files and directories. You can also launch programs or print disk listings, assuming you have a printer attached to your Commodore.

Said Commodore perhaps needn’t be vintage, as they’re selling new ones again, but if you want a disk drive you may have to fix it yourself.

Continue reading “New File Manager Is C64’s Answer To Norton Commander”

Get A Remote Terminal With One Binary, One URL, And Zero Config

Launch a single static binary executable, send someone a QR code or URL (or failing that, text a numerical code or shout it across a room), and they’ll get an encrypted terminal in their browser. No VPN, no port forwarding, no firewall modifications, and no account setup required. It’s BitBang by [Rich LeGrand], and there is a lot to go through in this one.

The best part? It’s not actually limited to just firing off a terminal. It’s a whole open framework for establishing an encrypted peer-to-peer connection between two systems over WebRTC without needing either a trusted central authority, or any special network configuration.

The signaling server brokers the handshake, then has no further involvement. By design, it couldn’t see application data even if it wanted to. Click to enlarge.

Opening a remote terminal, transferring files, or accessing web apps on a remote machine’s network is done with bitbang-cli, an implementation of BitBang focused on providing simple, zero-config remote access.

Before we go on, we want to mention that BitBang does require a lightweight, trustless signaling server only to broker the initial connection, but more on that in a moment.

On the machine to be shared, one first downloads the binary. Easiest way to do that is to go to bitba.ng and download manually, or copy and paste the one-line installer to auto-detect one’s system, download the correct release, and verify the checksum.

After the binary is downloaded, simply run it in a terminal and receive a QR code to scan, a URL to copy & paste, or a numerical code if those are inconvenient. On the remote side, one accesses the signaling server and the connection is made — one gets a terminal on the target machine open in the browser tab, with added options for file sharing and accessing web applications on the target network.

The signaling server isn’t involved in authentication or encryption, and couldn’t see private data between the two ends even if it wanted to. Prefer not to use someone else’s regardless? Run your own local instance with bitbang-server.

Originally developed as an easy way to securely make telepresence robots reachable over the Internet with nothing more than a QR code, today it’s a whole framework.

It includes not just the remote-access tool mentioned above, but also a BitBang Octoprint plugin for cloud-free remote access to 3D printers, and bitbang-python is a library for turning local Python web applications into a URL that can be opened from anywhere.

We’re sure some of you are getting more than a few ideas from this. If it lets you bring a project over the finish line, let us know on our tips line.

Spotting Emacs In The Wild

Emacs is one of the big classic text editors, right up there next to vi. It’s famous for its interface and its ubiquity across the *nix world. It’s such a core piece of software in the coding world that it has showed up a fair few times in popular culture—and [Ian Y.E. Pan] has collated some of those appearances. 

Emacs played a role in The Social Network, the retelling of the origin story of Facebook (the social network everybody used to use). Notably, Mark Zuckerberg used the tool to slap together a script for scraping a website. It also appears in Tron: Legacy, Arctic Blast, and the tech TV comedy Silicon Valley—more than once, in fact.

Other appearances include comics, Japanese anime series Key The Metal Idol, and a few miniseries and documentaries to boot.

[Ian]’s list is unlikely to be exhaustive. Both because he hasn’t seen every movie or TV show ever made, and because you can make new content featuring Emacs references tomorrow if you so desire. Still, it’s fun to see some of the famous properties that have featured good ol’ Emacs.

Don’t hesitate to let us know if you happen to put together a similar list about vi. The tipsline is waiting.

Browser-based 3D Editor Covers The Basics While Staying Local

Got an idea and want to make a simple 3D model, but don’t want to install a full-fledged CAD modeling suite and queue up a few hours of tutorial videos? Check out SketchForge, a 3D modeling program that runs locally in one’s browser without any need for an account, or external services.

SketchForge takes a more WYSIWYG approach to 3D modeling by making it easy to put an object together with primitive shapes, and making it extra easy to specify dimensions and align parts with one another. There’s also a sketch feature that makes it easier to create more complex shapes by making a 2D drawing, then extruding or revolving it into a solid. We like that it has STEP format export as an option, making it easy to import your creation into another CAD program of your choice later. Most 3D printer slicers natively support the STEP format nowadays, too.

It’s a bit reminiscent of Tinkercad in concept, but entirely local. It’s still new, but there’s a demo online that gives a good idea of its capabilities if you’d like to give it a spin.

We’re reminded of CaDoodle, another project that takes the “Tinkercad, but local” approach but as a standalone executable, instead of browser-based.

Thingino Teaches Cheap IP Cameras New Tricks

I recently found myself in the market for a few IP cameras to keep an eye on my Prusa 3D printers, and quickly found that the options on the market weren’t exactly ideal. Prusa does offer up an official camera, but the price for a pair of them was a bit more than I wanted to spend on the project. Conversely, there’s no shortage of cheap network-connected cameras available online, but they come with expenses of a different sort, namely proprietary software and cloud services I didn’t want or need.

Somewhere in the deep and dark recesses of this particular rabbit hole, I came across a Reddit post mentioning how a camera running the community-developed Thingino firmware could be plugged into Prusa’s remote printer monitoring scheme. It wasn’t a project I’d heard of previously, and sure enough, a search of the Hackaday back catalog showed we’d never come across it before.

My interest was already piqued, but the discovery that I already owned a supported camera sealed the deal. It was time to explore a new entry in one of my absolute favorite project categories: an open source replacement firmware that turns a cheap consumer device into something more than the sum of its parts.

Continue reading “Thingino Teaches Cheap IP Cameras New Tricks”

DOOM Using Regular Expressions

Regular expressions (regexes) are an amazingly powerful way to perform operations on collections of e.g. text. Regexss can also be considered to be a programming language, even a Turing complete one. Ergo it’s perfectly acceptable to thus design a way to use regexes to run and play a game of DOOM, as [Artem Lytkin] recently did.

The GitHub project page can be found here, containing the Python-based code that allows the demonstration to run, as well as the other components, including the C runtime and the 96.6 MB text string that defines a CPU’s registers, RAM, a framebuffer, the DOOM engine compiled to this custom CPU’s instruction set and the WAD file for the game itself.

The C-based driver applies the fixed, ordered list of find-and-replace rules to this string, which after more than ten-thousand of such substitutions later results in a single frame of the game. At about 80,000 substitutions per second on the given test system, that gets you to a sort-of playable framerate, even.

Naturally, the practical value of playing DOOM like this is pretty low, but as a demonstration of why regexes are awesome it’s hard to beat.