Mark Wharton Moonbase, 1985–1995

Tools

Mark's own work that is not a title.

The tools and graphics library

1986 · Commodore 64 and Apple IIe

Mark's own 6502, written once for both machines: a run-length packer and unpacker, line drawing, circle drawing, and LZW compression, which he wrote from the pseudocode in an article in Dr. Dobb's Journal. Goldfields' title screen is a packed picture, drawn by its unpacker.

I wrote my tools and graphics library once, and used them on two machines that looked nothing alike. Their disks, memory and screens were all different, but the lines and fills, and the compression, packed and LZW, ran the same on both.Mark Wharton, 2026

The vector engine and its editor

1989 · Apple IIe

Mark's work alone: he designed the engine and wrote all of it in 6502, and he wrote the vector editor the pictures were drawn in, which is not on the disks.

A picture is a named list of shapes, each a fill colour, an outline colour and its points, on the 140 by 192 double hi-res screen. The engine fills each shape by counting where its edges cross each row and filling between the crossings in pairs, then outlines it.

The Concept Keyboard driver

1989 · Apple II

A driver, in 6502, for the Concept Keyboard, the flat overlay tablet used in special education. It finds the keyboard's interface card by its slot, on the IIe and the IIgs, by watching its status tick and its data hold still.

Through Applesoft's ampersand it takes a key from the keyboard or a press from the tablet, read as a cell of 128 and turned into the key the program expects by a table that is the overlay itself.

A child pressing a Concept Keyboard's overlay of large numbers
The Concept Keyboard, a child pressing its overlay, 1987. Mark wrote its driver for a Jacaranda title on the Apple II.
; finding the card1243  AC FE 12   LDY $12FE      ; the slot's registers      …124B  B9 81 C0   LDA $C081,Y    ; its status must tick      …125B  B9 80 C0   LDA $C080,Y    ; and its data hold still125E  D9 80 C0   CMP $C080,Y      … ; a key, or a press1200  20 29 12   JSR $1229      ; the keyboard first1205  20 32 12   JSR $1232      ; else the tablet      …1225  20 2B EB   JSR $EB2B      ; into the program's variable      …123A  BD 81 C0   LDA $C081,X    ; a press waiting?      …123E  BD 80 C0   LDA $C080,X    ; which cell      …1246  BD 4F 12   LDA $124F,X    ; its key, from the overlay
Finding the card, then reading it: a key from the keyboard first, or a press from the tablet, its cell looked up in the overlay's table and put in the program's variable.
0123456789101112131415
0PPP↑↑↑
1PPP↑↑↑↵↵↵↵↵↵
2SSS←←←→→→↵↵↵↵↵↵
3SSS←←←→→→
4LLL↓↓↓␣␣␣␣␣␣
5LLL↓↓↓␣␣␣␣␣␣
6UUDDSSLLPP
7UUDDSSLLPP
The table at $124F is the overlay itself: 128 cells, 16 across and 8 down.