Record every pad, not the one that happened to be first
The first recording ever made with this came back 1,766 frames of nothing. It recorded pad NOUGHT and the controller was somewhere else - which pad one lands on is an accident of the host, the same accident that made Lunar Porter read all four in the first place - and a flight flown for the purpose was lost to it. So every pad is or-ed into the byte. A demo is a record of what somebody DID, and on a machine one person is playing the number it arrived on is not part of that. It plays back on pad nought, where --pad puts the first file given, and any program that reads more than one pad reads them or-ed anyway for exactly the same reason. --record-pad takes one file now rather than filling pads in turn, because there is nothing left for the second one to mean. The check for it plays a recording on pad ONE with nought holding nothing and requires the bytes back. That is the case that was missing: the round trip was tested and passed, on pad nought, which is the only pad it could not have gone wrong on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
co-authored by
Claude Opus 5
parent
eb695a3f3b
commit
de1857f5f7
+12
-2
@@ -86,10 +86,20 @@ void padSet(int which, int connected, uint8_t held);
|
||||
// worth testing: play a file while recording it and the same bytes come out.
|
||||
//
|
||||
// It exists because some inputs cannot sensibly be written by hand. Flying a lander from one
|
||||
// base to another is a few hundred frames of steering that has to arrive somewhere four cells
|
||||
// base to another is a few hundred frames of steering that has to arrive somewhere eight cells
|
||||
// wide, and hand-authoring one is a piloting exercise rather than a test. Playing it once and
|
||||
// keeping what happened is the whole answer.
|
||||
void padRecordTo(int which, FILE *file);
|
||||
//
|
||||
// EVERY PAD AT ONCE, or-ed into one byte, and not one pad chosen by number. Which pad a
|
||||
// controller lands on is an accident of the host - the first recording made with this came
|
||||
// back 1,766 frames of nothing, because it recorded pad nought and the controller was
|
||||
// somewhere else. A demo is a record of what somebody DID, and on a machine one person is
|
||||
// playing the number it arrived on is not part of that.
|
||||
//
|
||||
// A recording therefore plays back on pad nought, which is where --pad puts the first file
|
||||
// given. Any program that reads more than one pad reads them or-ed anyway, for exactly the
|
||||
// same reason.
|
||||
void padRecordTo(FILE *file);
|
||||
|
||||
void padTick(unsigned long now);
|
||||
uint8_t padRead(uint8_t port);
|
||||
|
||||
Reference in New Issue
Block a user