Taxman – a BASIC game from 1973

Back in 1973, the future definitely wasn’t equally distributed. While in Scotland we had power cuts, the looming three-day week and Miners’ Strike I, in California, the People’s Computer Company (PCC) was giving distributed computer access, teaching programming and publishing computer magazines. I don’t think we got that kind of access until (coincidentally) Miners’ Strike II a little over 10 years later.

taxman drawn image from People's Computer Company magazine (1973) , with "1 for you 19 for me" quote from The Beatles song "Taxman"
flares? platforms? centre parting? bow tie? It was 1973 after all

But the People’s Computer Company magazine archive is a sunny thing, overfilled with joyful amateur enthusiasm and thousands of lines of code fit to make Edsger Dijkstra explode. Of course it was written for the local few who had access to mainframes and terminals, but it hardly seems to come from the same world as the dark evenings in Scotland spent cursing the smug neighbours’ house with all the lights on, their diesel generator putt-putting into the night.

Lots of these games from the PCC era are forgettable now. The raw challenge of guessing a number on a text screen has paled somewhat in the face of 4K photo-realistic rendering. One game I found is still a little challenging, at least until you work out the trick of it: Taxman (or as the authors tried to rename it later, Factor Monster). Here’s a tiny sample game transcript:

Hi, I'm the taxman
Do you want the regulations?
(1=Yes, 0=No)? 0

How many numbers do you want
in the list? 6

The list is: 1  2  3  4  5  6 

You take? 5
Your total is  5 
I get  1 
My total is  1 

New list:  2  3  4  6 

You take? 6
Your total is  11 
I get  2  3 
My total is  6 

New list:  4 
I get  4 
because no factors of any number
are left.
My total is  10 

You  11  Taxman  10 
You win !!!

Again (1=yes, 0=no)?

Seems I sneaked a lucky win there, but it’s harder than it looks. The rules are simple:

  • Start with a list of consecutive numbers
  • You choose a number, but it has to have some factors in the list
  • The taxman (or the factor monster, a concept I much prefer as it doesn’t reinforce the Helmsley Doctrine) takes all the remaining factors of your number from the list
  • You get to choose a number from the list, which is now missing your previous choice and all of its factors, and repeat
  • Once the list has no multiples of any other number, the taxman/FM takes the rest
  • The winner is whoever has the largest sum.

For such a simple game (or perhaps, such a simple me) the computer wins surprisingly often. Since I find it fun to play, I thought I’d share the 1973 love as much as possible by porting to all of the BASIC dialects that I knew.

Plain text BASICtaxman.bas —runs under interpreters such as bas. Almost verbatim from the 1973 publication. May not allow you to play again on some interpreters; you might want to try my slightly rearranged 40 column version that should run on systems that don’t allow a variable to be dimensioned twice.

taxman on Amstrad CPC: starting with numbers 1-6, player has taken 4, so taxman takes 1 & 2, leaving 3, 5 and 6
taxman on Amstrad CPC: how BASIC programs look to me, yellow on blue 4 lyfe

Amstrad CPC Locomotive BASICtaxman.dsk — or as I call it, BASIC. 40 columns yellow on blue is how BASIC should look.

taxman on BBC Micro, showing games tart for 1-6. Adjacent numbers are a full column apart
taxman on BBC, Mode 7: dig the weird spacing

BBC BASICtaxman.ssd — for all the boopBeep fans out there. You can actually play this one in your browser, too. Yes, the number formatting is weird, but BBC BASIC was always its own master.

taxman: Commodore 64 showing the instructions
taxman on C64

Commodore 64taxman.prg — very very upper case for this dinosaur of a BASIC.

taxman running on Apple II: loaded from disk, started with 6 numbers
taxman running on Apple II

Apple II AppleSoft BASICTAXMAN.DSK — lots of fiddling with import tools and dialect weirdness because Apple.

taxman: end of game on ZX spectrum
taxman: end of game on ZX spectrum

ZX Spectrum (Sinclair BASIC)taxman.tap — 32 columns plus a very special dialect (no END, GOTO and GOSUB are GO TO and GO SUB, …) meant this took a while, but it was quite rewarding to get going.

taxman - BASIC program listing on ZX-81 running under sz81 emulator, Linux window borders visible
Taxman on ZX81: more SCROLLs than the Dead Sea

Sinclair ZX81 (16 K) — taxman.p — this one was a fight. The ZX81 didn’t scroll automatically, so you have to invoke SCROLL before every newline-generating PRINT or else your program will stop. For some reason this version gets unbearably slow near the end of long games, but it does complete.

TPUG Library CD – disk image contents, mostly

TPUG – Toronto PET Users Group still publishes its software library for Commodore computers. You can buy it for $20.00 (Cdn) plus shipping and handling. Yes, it still makes TPUG money to sell it this way. No, it’s not available online.

The scanned library catalogues are available as PDF: About the TPUG Library. They’re searchable via web search engines:
Google: site:tpug.ca amiga “puzzle maker”. The search is only as good as the OCR in the scan, but is better than nothing.

What you can’t do is search inside the disk images themselves. The files I made below might help with that, especially once search engines get hold of them:

Each line has the disk name and then the name of the file in that disk image, something like:

TPUG C64/A-Monthly Disks/(c)aaa.d64 : 0 "tpug may86(c)aaa" ac 2a
TPUG C64/A-Monthly Disks/(c)aaa.d64 : 23 "autoload" prg
TPUG C64/A-Monthly Disks/(c)aaa.d64 : 119 "infusr/2.0.txt" seq
TPUG C64/A-Monthly Disks/(c)aaa.d64 : 13 "infbot/2.1" prg
 …

Note that I haven’t uploaded any of the disk images. Please don’t ask me for them.

FifteenTwenty: now on Fontlibrary and github

FifteenTwenty-demo

Use it / download it here: FifteenTwenty on fontlibrary.org
Download it / fork it here: scruss/FifteenTwenty on github
Local copy: FifteenTwenty-master.zip (268K; includes FontForge sources)

FifteenTwenty: Commodore 1520 plotter font

FifteenTwentyFor the impatient: download FifteenTwenty-master.zip FifteenTwenty-Regular-OTF.zip (or more options …)
Updated: now with all ASCII glyphs!

Update, September 2016: this font was officially squee‘d over by Josh “cortex” Millard on the Metafilter Podcast #120: Hard Out There For A Nerd. I had the great pleasure of meeting Josh at XOXO 2016, too.

The Commodore 1520 was a tiny pen plotter sold for the Commodore 64 home computer. It looked like this:

Commodore 1520 printer plotter (adjusted).jpg
Commodore 1520 printer plotter — by Oguenther (Dr.Guenther). – This file was derived from Cbm1520-2.jpg: , Public Domain, https://commons.wikimedia.org/w/index.php?curid=39145769

I never owned one, but it seems it was more of a curiosity than a useful product.

From a nerdy point of view, however, this device was rather clever in that it packed a whole plotter command language, including a usable font, into 2048 bytes of ROM. Nothing is that small any more.

Thanks to the epic efforts of Jim Brain and others, this ROM is now archived on Project 64 Reloaded. Looking at the code, I was struck by the elegance of the encoding: it packs a full X-Y plot instruction in one byte.

Based on my work with the Hershey font collection, I thought it would be fun to extract the coordinates and make a real OpenType font from these data. I’m sure others would sense the urgency in this task, too.

Since Commodore computers used a subset of ASCII, there’s a barely-usable set of characters in this first release. Notable missing characters include:

U+005C    \    REVERSE SOLIDUS
U+005E    ^    CIRCUMFLEX ACCENT
U+0060    `    GRAVE ACCENT
U+007B    {    LEFT CURLY BRACKET
U+007C    |    VERTICAL LINE
U+007D    }    RIGHT CURLY BRACKET
U+007E    ~    TILDE

I’ll get to those later, perhaps.

Huge thanks to all who helped get the data, and make the bits of software I used to make this outline font.

(Note: although the Project 64 Reloaded contains some extraction code to nominally produce an SVG font, it doesn’t work properly — and SVG fonts are pretty much dead anyway. I didn’t base any of my work on their Ruby code.)

Building the Stick of Joy

Update, 2017-06: I’ve updated the plans so you shouldn’t need to spend  time sanding things to fit.

Not-even-remotely over-engineered retrogaming joystickTracking down old Atari-style joysticks for retrogaming can expensive, and it’s hard to tell if you’ll get something reliable. So I made one for less than the cost of a used stick on eBay.

To build this, you will need:

  • 8-way joystick , or any stick compatible with the industry standard Sanwa JLF-P1 mounting plate. This has M4 holes at 84 × 40 mm.
  • Two concave momentary arcade push buttons. In my built, I used an older design that’s much taller. You could make the joystick box shorter if you used these snap-in buttons.
  • DE-9 (DB-9) Female Socket Connector
  • Terminal block, with at least seven connectors. You’ll likely want more, so this 12 position screw terminal block should work.
  • 4× M4 countersunk (oval head) machine screws with nuts and lots of washers. You’ll need washers to act as spacers between the box and the joystick mounting plate. This allows the joystick’s dust washer to move freely.
  • a couple of metres of 8-core stranded signal cable
  • hookup wire and spade connectors for building the button harness.

The case is made from 6.4 mm high quality plywood, using a template generated by BoxMaker.  The external dimensions of the box are 163 mm x 143 mm x 83 mm. I haven’t included any kerf width in the design, so the edges should fit together easily for gluing.

joystick-box
Joystick box plan for download: joystick-box-201706.svg (SVG: best in Inkscape); joystick-box-201706.pdf (PDF).

If you want to make your own design, here’s the top plate plan: joystick-box-top-201706.svg (SVG); joystick-box-top-201706.pdf (PDF).

The basic DE-9 pin wiring for Atari-style joysticks goes like this:

1 — Up
2 — Down
3 — Left
4 — Right
6 — Button
8 — Ground

There are many variants that add features to this scheme, however. If you’re building for a specific computer, Tomi Engdahl’s Joystick information page has the details.

Many thanks to Andrew Horsburgh for the use of Protolab‘s laser cutter.

amiga: blank hdf images

I’m trying to get running an Amiga again, to see if I can remember what was rocking my computer world twenty years ago. I want to run that code, swim with the Fish disks, and generally muck about with what was my life back then.

Emulation is interesting. Variants of UAE (which came with an Amiga Forever CD set I bought in 1997 or so) rule the roost. Quality is variable – on Windows, WinUAE is very comprehensive, even making grink-gronk noises as the floppy spins. On Mac, E-UAE is really not worth the bother kinda okay – it doesn’t want to emulate anything above a 68000, and falls over quite often but has decent sound. On Linux, it’s plain and stable, and I happen to have an old Thinkpad going spare I can dedicate to emulation.

I would have expected all the old disk images to be readily available for download. It seems that the current owners of the Amiga name (this week, at least) still cling on to the old IP as if it has real value. The Amiga games market (which was the market) basically collapsed with Commodore in 1994. I really wonder who is buying the PowerPC based, vastly overpriced new hardware? For now, I’m relying on good old-fashioned torrent sites for my data.

I want to emulate two machines; the A500 I had for all my cringe-worthy magazine writing running Workbench 1.3, and a fast thing maxed out with all the processors and RAM I never had, probably running 3.1. While I did have Amiga[D]os 2.04 (can’t remember if they’d dropped the D by then), it wasn’t the main focus of my interest by then.

The biggest problem I have is getting hard disk image, even blank ones. UAE is picky. Here are a couple I formatted under WinUAE, both blank.

I wonder if they’ll work under 1.3?

Update: yes, they should. I formatted them FFS under AmigaDos 1.3.