The pad was working; the game was told there was not one

0x64 counted only the RECORDED pads. So a controller plugged into Voyager
reported its buttons perfectly, and every game asking whether there was a
controller was told no - which is exactly what Lunar Porter asked, once,
at startup, before falling back to the console for the rest of the run.

The cause is worth naming: a front end calls padSet every frame for every
pad, so "held nothing" is the commonest thing it says and cannot also mean
"there is no pad here". Connected is said separately now. Pad nought is
always there behind a window, because the keyboard is behind it - which is
the useful answer rather than the literal one.

And Pad.asm, which is what should have existed before any of that guessing
began. It prints a line whenever a pad changes, and tells apart the three
states that look identical from inside a game that will not respond: one
nobody noticed, one mapped to nothing, and a mapping that is wrong.

WHY A PROGRAM AND NOT A PRINT IN THE FRONT END: because the question is
what the MACHINE can see. A front end reporting what it thinks it is
sending answers a different question, and the gap between those two is the
whole of this bug.

It also found that osPrintNumber takes A as the HIGH half - the same way
round as the shift register and every other pair here, and not what a byte
in A wants. Every value came out 256 times too big.

Gravity is one frame in ten rather than six. The ratio between thrust and
gravity is the feel; how often the tick comes round is how fast that feel
arrives, and one in six was still touchy. Same lander, more time to think.

And the verdict waits for a key. It printed and left immediately, taking
the screen with it - so the one thing worth seeing, the lander sitting on
the ground it had just reached, was gone before it could be looked at.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-09-02 22:48:24 -04:00
co-authored by Claude Opus 5
parent 8eb4e4d67e
commit df50c2f0f8
25 changed files with 265 additions and 26 deletions
+19 -1
View File
@@ -769,6 +769,19 @@ touchdownStop:
SWI osPrintString
INIA 0x0A
OUTA 0x00
; ---- And a look at what happened ----
;
; The verdict was printed and the program then left immediately, taking the screen with it -
; so the one thing anybody wanted to see, the lander sitting on the ground it had just
; arrived at, was replaced by a shell prompt before it could be looked at.
touchdownWait:
INA 0x01
INIB 0x01 ; READY
AND
BRQ touchdownWait
INA 0x00
RSTA
SETD.1 Flying
STA.1 ; Which ends the loop, and the program tidies up as it always did.
@@ -893,7 +906,12 @@ SpeedDown:
Gravity:
0x01 0x00
FallEvery:
0d6 ; Gravity one frame in six. Every frame was Jupiter.
0d10 ; ---- Gravity one frame in ten ----
;
; Every frame was Jupiter and one in six was still touchy: the
; ratio between thrust and gravity is the FEEL, and how often the
; tick comes round is how fast that feel arrives. Slower ticks are
; the same lander with more time to think in.
FallTick:
0d1
; A press on a machine with no pad, which has to be a whole burn because it happens once.