1982 · Commodore and HAL Laboratory

Jupiter Lander

This minisite was curated by air.

Jupiter Lander pays a bonus for a landing that is climbing, and lets a ship land a pixel past the yellow cell of its gauge. Both come from rules the screen never shows.

01 · Scoring

Secret: it's possible to land while going UP

One pad has open air beside it, which means it's possible to sideslip onto it and even push up into a negative speed.

The x2 close-up, view 2. The amber line is world Y $009A, the one line on which the pad test can pass, and the amber bracket is the range of X it accepts, $0160 to $0190. The whole manoeuvre is eight world units of sideways drift, so the inset shows the lander's feet and the pad's edge at eight times the size.

Each pass of the flight loop does four things in a fixed order: it asks the video chip whether the lander has touched rock, it tests the pad, it reads the controls and it moves the ship. The pad test is an exact match on the ship's world Y and a range check on its X, so the velocity that touchdown sees is the one that carried the ship onto the line in the previous pass. Arriving from above, that velocity is positive; a climbing arrival means the ship was below the line the pass before, which on the x5 and x10 pads is inside rock, and the collision test runs first. The x2 plateau is the exception: its flat top is 98 pixels wide with a 45° slope on either side, so a ship hovering on the pad's line just left of it is in clear air, and can drift right onto the pad with any velocity at all.

From above, the smallest speed you can land at is not one either. The main thruster changes the velocity by −12 and gravity by +4 on the first landing, so every velocity the ship can have is a multiple of 4 and the softest arrival is 4, which pays 760, shown as 7600. On the landings where gravity is 5 or 7 the steps are coprime with 12 and a speed of 1 is possible, worth 790. Where gravity is 6 the softest arrival is 6 and the best is 740. The 800 that a perfect stop would pay exists only on the x2 pad, sideways, at zero speed, where the multiplier turns it into 1600.

The bonus line the game draws on screen row 2, rendered from the same character set. Everything on screen is ten times the number the game holds, because the status line has a 0 painted on the end of it. The doubling for the x2 and x10 pads is eight-bit too and loses its carry, which is why a speed of −48 on the x2 pad pays nothing at all.

Every point counted out also puts 70 units back in the tank, one point and 70 units at a time, at about 21 milliseconds each. A good landing on the x10 pad therefore takes roughly seventeen seconds to pay out, and you watch the fuel bar grow the whole time.

02 · The gauge

Secret: the landing gauge lets you go over - by one pixel

The instructions say the vertical velocity has to be inside the yellow area of the scale. There is one yellow cell. It covers downward speeds 0 to 63. The landing test accepts everything up to 71, and accepts every upward speed there is.

the scale the yellow cell lands SORRY NO BONUS

Sixteen character rows, eight needle positions inside each: 128 over the whole scale, one for every eight units of velocity. The needle is a black line cut out of the bar, glyph $18 plus the bottom three bits of the position, and the cell keeps the colour of its row, green or yellow, because the routine never writes colour memory. The strip beside the scale is not on the C64's screen: it is the landing test's verdict at every needle position. The inset is rows 11 to 13 at twelve times the size.

Set the velocity to 63, then 64. The needle leaves the yellow cell, and the landing still works: 64 through 71 all land. Then 71, then 72. The needle moves one pixel, inside the same cell, and the strip beside it turns from lands to SORRY NO BONUS. That pixel is the line between nine hundred points and a destroyed ship, and the scale has no mark for it.

03 · Quirks

Things a pilot would not know

The game never synchronises to the screen

The game enables no raster interrupt, and the timer interrupt is masked for the whole of a game. The game times itself by counting down a register ten times two hundred, which is about 10.3 milliseconds, and waits three of those per update. On an NTSC machine, with a faster clock, the whole game runs about four per cent quicker.

The interrupt exists to flash one line of text

It runs only during the attract sequence. Every twentieth tick it steps the colour of eighteen cells at $DBCA, which is exactly the eighteen characters of PUSH F1 TO START, and on every tick it checks whether F1 is down. That is all it does.

The last 255 units of fuel are unspendable

The tank is called empty when its high byte reaches zero, and that same test clears both thrust flags. Up to 255 units are still sitting in the low byte, and the thrusters will never touch them. It also means the counter can never underflow, which is presumably the point.

Running dry does not end the game

OUT OF FUEL appears, the engines stop, and the ship keeps falling. The game ends at the next impact, when the crash handler finds the tank at zero and there is nothing to charge the crash to.

A crash costs fuel, and the bill is capped

The impact speed shifted right by four comes off the fuel high byte. Above a speed of $01FF the calculation is clamped, so every very fast crash costs the same 7936 units. Hitting the ground at speed 512 and at speed 768 cost exactly the same.

What the counter actually holds

Four packed BCD digits, printed followed by a 0 that is part of the static template. The counter tops out at 9999, which reads as 99990, and a single point is worth ten on screen.

The perfect stop cannot happen

A pad is one world line reached from above, so the velocity the bonus subtracts is never zero: the softest arrival is 4 on the first landing and 1 where gravity is 5 or 7, for 7600 and 7900 on the x10 pad. The only way to be paid for zero, or for a climb, is sideways onto the x2 plateau, where the eight-bit arithmetic pays up to 2540. Section 01 steps through it.

The whole game is 49 bytes of state

Everything the game knows about itself lives in $02 to $32: two positions, two velocities, a tank, a score, a high score, a view number and a handful of flags. Nothing else in memory changes while you fly.