mass:werk / Blog

(Posts 32 … 24.  Jump to newest. RSS feed: Subscribe.)

Stay at Home Edition: Ironic Computer Space Simu­lator (DEC PDP-1, 2016)

RetroChallenge 2016/10: Programming a 60 fps video game for early 1960s hardware.

Ironic Computer Space Simulator (PDP-1, RetroChallenge 2016/10)
What about a classic single player space shooter for the DEC PDP-1?

After all the software archeology on Spacewar! (see below) I was keen to try some programming for the DEC PDP-1 of my own. What about doing my own game? After all, I knew my way pretty well around the PDP-1. So I picked the PDP-1 for the second edition of RetroChallenge 2016 — and managed to write a classic video game running on early 1960s hardware at 60 frames per second!

(No April Fool’s Day Hoax!)

Admittedly, I picked a game, which I knew would fit well the constraints of this particular machine, and I was standing on the shoulders of giants who did Spacewar!, like Steve Russell, Dan Edwards and Peter Samson. More so, the game, I picked, was heavily inspired by Spacewar!, which originated on the PDP-1, so it wasn’t much of a surprise that it should fairly conform to the capabilities of that particular machine. So, closing a never existing circle by a full 360° turn and a somewhat ironic twist in computer history, I ported the very first coin operated video game back to the computer, which inspired it in the first place. Ironically also, because “Computer Space”, despite its cheerful name, doesn’t feature a computer at all, but is rather a complex pattern generator in 74xx-series TTL logic, which we now had to simulate on hardware, which predated its TTL electronics by a decade. And, as a bonus, there’s now a classic single player shooter for the DEC PDP-1. (Eventually, the program ran on the real machine at the CHM.)

Start reading: “Ironic Computer Space Simulator (ICSS)”…

Stay at Home Edition: Maze War for Olivetti M10 and NEC PC-8201A (2016)

Implementing a 3D dungeon crawler in MS BASIC for RetroChallenge 2016/01.

Maze War for Olivetti M10 and NEC PC-8201A
It was to be a networked first person shooter, but it became a 3D dungeon crawler, after all.

In 1983 Kyocera introduced a remarkable portable computing platform, which was marketed by various vendors as by Tandy as the TRS-80 Model 100, by NEC as the PC-8201 and PC-8201A, by Olivetti as the M10, and by Kyocera itself as the Kyotronic 85. These machines, which I like to refer to as the “Kyocera siblings”, were about the same, but not exactly, differing both in hardware specs and in their respective implementation of MS BASIC (the last one, Bill Gates was actually coding for). Quite a success with in-the-field workers like journalists and with about 6 millions units sold for the TRS Model 100 alone, these were about as numerous as nowadays the stockpile of toilet rolls for a family of four. Therefore, these were rather easy to obtain as a retro machine and I got me two of them, namely a an Olivetti M10 and a NEC PC-8201A.

RetroChallenge is a loose, not too serious gathering/competion twice a year, where folks do things with retro computers or consoles over a month and report about this in order to let others participate in their efforts. Eager to play around with the new toys, the choice for my first participation in RetroChallenge was an easy one. And it was also the first time, I got to mess around with BASIC after a pause of about 30 years. While originally intended as a full-fledged, networked implementation of the historical first person shooter, BASIC and the time constraints got me only that far. Eventually, it became a first person dungeon crawler with a pseudo-3D view port and a static map, running — while not exactly in realtime — at reasonable speeds. (This involved both high and low level approches, like JIT compiling display data to byte code for a small runtime to send low level display data over the internal serial port to the LCD controllers, which also overcame differences in the various dialects of MS BASIC found in these machines.)

Have at least a look at episode 1, where we have a closer look at the various incarnations of the Kyocera siblings.

Start reading: “Maze War for Olivetti M10 and NEC PC-8201A”…

Stay at Home Edition: Inside Spacewar!

A Software Archeological Approach to the First Video Game.

Inside Spacewar! teaser.
Some serious software archeology on the first digital video game.

Over the years, before I started this blog, some rather blog-like formats have accumulated on my website, each dedicated to a certain topic or project. Maybe, as many of us are expected to stay at home on their own, this is also an opportunity to point these series of write-ups out and to include them here as links, over the next few days.

For a beginning, there’s a walk through the code of Spacewar!, which is generally considered the first digital video game. We’ll have a look at every single line of code — no instruction is left behind —, learn about the DEC PDP-1 computer, learn how this game was achieved on this early 1960s machine by some ingenious tricks in software. (There are actually some things to be admired, like early object oriented approaches and a JIT compiler.) We’ll even learn about some of the fundamental intrinsics of digital computing, e.g., how basic operations like multiplications and divisions, or integer square roots were solved on this particular machine. Moreover, we’ll have a look at some of the more arcane versions of the game, including a somewhat first person multiplayer version from 1963. — Already intrigued? Then, have a closer look and follow the link, or, maybe, save it for later…

Start reading: “Inside Spacewar!”…

Lehman Bros., Liquidity, Austerity, COVID-19, and the Inevitable Rise of John Maynard Keynes

Veering off of our usual topics for a bit of political economy.

Hum...
Thresholds — Hum…

Since everything is a bit out of the ordinary recently, here’s a somewhat different post, diverging from our usual path. Yes it’s about the current “Corona” situation, but also about a somewhat broader perspective. Since my educational background is in such things like philosophy, sociology and even a couple of semesters of political science, I can’t help including this perspective. On the other hand, I’m clearly not a medic nor do I have any relations to that honorable profession. So I’m entirely without expertice in this field and relying on what is to be learned from public appearances of epidemiologist who speak on the matter. (In other words, anything regarding the current situation and its epidemiological perspectives is just hearsay and lacking any further foundations. Any inferences and/or conclusions drawn from this kind of awareness are not any better than the foundations on which they are built.)

Trigger Warning
I’m sorry to say, this will not be another pep talk on the subject. If you feel apprehensive about this or do not feel like in the right mood for this, better skip this post.

Continue reading…

PET 2001 Emulator — V. 1.0

Proudly announcing version 1.0 of the PET 2001 online emulator.

Commodore PET 2001 Emulator V.1.0 Announcement
Yet another PET 2001 related title illustration.

Recently, I’ve been posting on Commodore BASIC and more specifically about the PET 2001 quite a bit. While not the sole reason, this was partly because I was adding a few features to the PET 2001 online emulator behind the scenes. I even endeavored into a major reorganization of some of the source code in order to facilitate this and future work. And, last but not least, there’s now even a suitable help file / documentation. — Reason enough to promote the emulator from its previous beta state to version 1.0!

Continue reading…

PETSCII Revealed

A closer look at the logic behind Commodore ASCII, AKA “PETSCII”, and the PET 2001.

PETSCII and the Commodore PET 2001
Investigations into a somewhat mysterious character code.

The flavor of ASCII used by the Commodore 8 bit computers, commonly known as PETSCII, is asking for a bit of an explanation. PETSCII is a peculiar beast, close to ASCII, but not quite, somewhat compatible, but not really, there are duplicate ranges of characters all over the place, and the special characters are lacking any recognizable order… — But look at all these these funny graphics characters!

In order to make sense of this and how the character set is organized, it may be helpful to have a closer look at it with a particular focus on the PET 2001. At least, this is the very machine, this character set originated on and for which it was designed for, with no idea yet that this may become the ancestor of a succesful line of home computers. Here, we may discover logic, in what must remain a puzzling enigma on the more popular and better known machines that followed, like the C64.

Continue reading…

Calm Panic in the Face of Influenza

Learning from history: How to keep calm while panicking and carry on with face masks

Wear a mask or go to jail — California, 1918.
(Raymond Coyne, 1918-11-03)

Influenza and influencers, and a friendly customer information from 1918. Apparently, it’s not the first time, we’re facing an epidemic. Some prefer doing so while wearing a face mask, others may prefer desinfectants. Arguably, masks make the better photographs.

Photo by Raymond Coyne, 1918-11-03 (Mill Valley Public Library, Lucretia Little History Room).
Source: California Revealed.

Writing a PET 2001 Ten-Line Canyon Run Video Game

String exploits and a reasonably paced video game in just 10 lines of Commodore BASIC.

Writing a 10-line canõn run game on the PET 2001
Yee-haw! — A canyon to ride by just 10 lines of BASIC!

In continuation of and as a finale to our mini series on the internal representations of Commodore BASIC, we’ll now put some of our findings to use, especially some possible exploits of string variables.

What we’re going to do, is a classic canyon run game, where a single player rides/flies/drives/navigates a procedurally generated canyon down from the top, trying to progress as far and deeply into the winding depths as possible while avoiding the walls of the canyon. And we’re going to implement it in just 10 lines of BASIC, which puts some serious constraints on our solution. As do some of the intricacies of the PET 2001. Especially, we’ll have to avoid any direct access to the video memory (as in PEEKs and POKEs), meaning, we’ll do it all by print statements. So we’ll have to consult our bag of tricks — and come up with some exploits of the string mechanism.

Spoiler alert: It will be about fast partial strings and fast FIFO queues, while avoiding garbage collection.

Continue reading…