WordStar Reborn

Wordstar was the word processor that helped sell the personal computer. At one time, it was ubiquitous, and many authors had a hard time giving it up. Some, like George R. R. Martin, apparently are still refusing to give it up. But most of us have moved on. Thanks to an open-source clone, WordTsar, you may not have to. This is a modern interpretation of our old friend.

Programmers that write were especially fond of WordStar since it had a non-document mode and was often the best text editor you had available for writing code. Being able to do your documentation without switching brain gears is useful, too. Touch typists love the efficiency of easy control of things without resorting to cursor keys or a mouse — the same thing vi and emacs fans enjoy but in a different way.

The software runs on multiple platforms and has some new features. Installation on Linux is easy because it is packaged in an AppImage file. Of course, you can also fire up your best CP/M machine, replica, or emulation and run the real WordStar, but — honestly — WordTsar seems more practical if you wanted to go back to using this kind of wordprocessor or editor for everyday use.

Of course, some word processors were actual hardware. If you want some cheap CP/M hardware, that’s easy enough, too.

A Literate Assembly Language

A recent edition of [Babbage’s] The Chip Letter discusses the obscurity of assembly language. He points out, and I think correctly, that assembly language is more often read than written, yet nearly all of them are hampered by obscurity left over from the days when punched cards had 80 columns and a six-letter symbol was all you could manage in the limited memory space of the computer. For example,  without looking it up, what does the ARM instruction FJCVTZS do? The instruction’s full name is Floating-point Javascript Convert to Signed Fixed-point Rounding Towards Zero. Not super helpful.

But it did occur to me that nothing is stopping you from writing a literate assembler that is made to be easier to read. First, most C compilers will accept some sort of asm statement, and you could probably manage that with compile-time string construction and macros. However, I think there is a better possibility.

Reuse, Recycle

Since I sometimes develop new CPU architectures, I have a universal cross assembler that is, honestly, an ugly hack, but it works quite well. I’ve talked about it before, but if you don’t want to read the whole post about it, it uses some simple tricks to convert standard-looking assembly language formats into C code that is then compiled. Executing the resulting program outputs the desired machine language into a desired file format. It is very easy to set up, and in the middle, there’s a nice C program that emits machine code. It is not much more readable than the raw assembly, but you shouldn’t have to see it. But what if we started the process there and made the format readable?

At the heart of the system is a C program that lives in soloasm.c. It handles command line options and output file generation. It calls an external function, genasm with a single integer argument. When that argument is set to 1, it indicates the assembler is in its first pass, and you only need to fill in label values with real numbers. If the pass is a 2, it means actually fill in the array that holds the code.

That array is defined in the __solo_info instruction (soloasm.h). It includes the size of the memory, a pointer to the code, the processor’s word size, the beginning and end addresses, and an error flag. Normally, the system converts your assembly language input into a bunch of function calls it writes inside the genasm function. But in this case, I want to reuse soloasm.c to create a literate assembly language. Continue reading “A Literate Assembly Language”

PC Classics, Right In Your Browser With EmuOS

[Emupedia]’s work to preserve computer history by way of making classic and abandoned games and software as accessible as possible is being done in a handy way: right in your browser with EmuOS.

A few moments of BIOS startup kicks off EmuOS right in a browser window.

Doing things this way has powerful “Just Works” energy. Visit that link in a modern browser and in no time at all you’ll be looking at a Windows 95 (or Windows 98, or Windows ME) desktop, filled with a ton of shortcuts to pre-installed and ready-to-run classic software. Heck, you can even keep it simple and be playing the original Microsoft Solitaire in no time flat. There is also a whole ton of DOS software waiting to be fired up, just double-click the DOSBox icon, and browse a huge list. The project is still in development, so not everything works, but the stuff that does is awfully slick.

Here’s some additional background that goes into more detail about the project and its capabilities, but if you’d prefer to just click around to explore, here’s the main link again (and here’s a list of mirrors.)

If OS emulation is your thing, don’t miss emulating the IBM PC on an ESP32 microcontroller. And if you’re more into lesser-known vintage operating systems, how about re-inventing PalmOS to run on x86 architecture?

ChatGPT Makes A 3D Model: The Secret Ingredient? Much Patience

ChatGPT is an AI large language model (LLM) which specializes in conversation. While using it, [Gil Meiri] discovered that one way to create models in FreeCAD is with Python scripting, and ChatGPT could be encouraged to create a 3D model of a plane in FreeCAD by expressing the model as a script. The result is just a basic plane shape, and it certainly took a lot of guidance on [Gil]’s part to make it happen, but it’s not bad for a tool that can’t see what it is doing.

The first step was getting ChatGPT to create code for a 10 mm cube, and plug that in FreeCAD to see the results. After that basic workflow was shown to work, [Gil] asked it to create a simple airplane shape. The resulting code had objects for wing, fuselage, and tail, but that’s about all that could be said because the result was almost — but not quite — completely unlike a plane. Not an encouraging start, but at least the basic building blocks were there. Continue reading “ChatGPT Makes A 3D Model: The Secret Ingredient? Much Patience”

Very Slow Movie Player Avoids E-Ink Ghosting With Machine Learning

[mat kelcey] was so impressed and inspired by the concept of a very slow movie player (which is the playing of a movie at a slow rate on a kind of DIY photo frame) that he created his own with a high-resolution e-ink display. It shows high definition frames from Alien (1979) at a rate of about one frame every 200 seconds, but a surprising amount of work went into getting a color film intended to look good on a movie screen also look good when displayed on black & white e-ink.

The usual way to display images on a screen that is limited to black or white pixels is dithering, or manipulating relative densities of white and black to give the impression of a much richer image than one might otherwise expect. By itself, a dithering algorithm isn’t a cure-all and [mat] does an excellent job of explaining why, complete with loads of visual examples.

One consideration is the e-ink display itself. With these displays, changing the screen contents is where all the work happens, and it can be a visually imperfect process when it does. A very slow movie player aims to present each frame as cleanly as possible in an artful and stylish way, so rewriting the entire screen for every frame would mean uglier transitions, and that just wouldn’t do.

Delivering good dithering results despite sudden contrast shifts, and with fewest changed pixels.

So the overall challenge [mat] faced was twofold: how to dither a frame in a way that looked great, but also tried to minimize the number of pixels changed from the previous frame? All of a sudden, he had an interesting problem to solve and chose to solve it in an interesting way: training a GAN to generate the dithers, aiming to balance best image quality with minimal pixel change from the previous frame. The results do a great job of delivering quality visuals even when there are sharp changes in scene contrast to deal with. Curious about the code? Here’s the GitHub repository.

Here’s the original Very Slow Movie Player that so inspired [mat], and here’s a color version that helps make every frame a work of art. And as for dithering? It’s been around for ages, but that doesn’t mean there aren’t new problems to solve in that space. For example, making dithering look good in the game Return of the Obra Dinn required a custom algorithm.

Build Your Own Bootable Emacs Environment

An old joke is that Emacs is a text editor with an operating system included, given that its extensibility and customization often goes far beyond traditional text editors. Part of its well-earned reputation comes from being built in Lisp which allows it to be expanded to do almost anything. Despite this in-joke in the community, though, you will still need an actual operating system to run it, but not much more than that.

This project uses User-Mode Linux (UML) as a foundation to load almost nothing other than an Emacs editor. UML is a virtualization technology that allows running multiple Linux kernel instances as separate virtual machines, so once the Linux environment is started and Emacs is compiled, the virtual machine can essentially boot straight into an Emacs environment. Some tools are needed outside of the Linux kernel like mount which allows the virtual file system to access the files needed to build Emacs, but as far as lightweight or minimalist Linux distributions go this one definitely gets at least an honorable mention.

While UML is virtualization software rather than a full-fledged Linux distribution, we would expect a similarly minimalist build could easily be done with something more hardware-based like Linux From Scratch. Emacs has been around for so long and had such a wide reach that it’s difficult to imagine a world without it. Even in more modern technology like browsers, knowing a little bit about Emacs can be an extremely powerful tool.

Read Comic Books On The Commodore 64 With StripStream

Comic books are traditionally printed on paper, either as regular saddle-bound issues or in hardcover compilations. If you wanted to read them on a low-resolution screen run by an 8-bit computer, you were usually out of luck. Until now! Enter StripStream, the comic book reader for the Commodore 64.

StripStream runs on a stock PAL C64 system, using the Datasette interface. A PC program is used to compose a comic into a suitable format for the C64. It then generates a .TAP file which can either be played in a C64 emulator, or recorded onto an audio tape for loading on real hardware.

According to [janderogee], who created the software, just 34 minutes of tape can store over 300 images and 1200 lines of subtitle text. Cassettes were chosen for the storage method as standard 5 1/2″ C64 disks could only hold 165 kilobytes of data per side, meaning two whole double-sided disks would be needed to store the same amount of data. Plus, the linear nature of tape makes sense for a sequentially-read comic story. Just don’t get any ideas about doing a choose-your-adventure thing here, as StripStream isn’t built for random access.

If you don’t want to read regular comics, you can always use a tool to automatically generate them from existing media. Incidentally, StripStream is a great name, but we would have called it Comicdore 64.

Continue reading “Read Comic Books On The Commodore 64 With StripStream”