Lunar Porter moves into a directory of its own
The first application with things of its own, and the first customer for all three rungs before it at once. /Apps/Lander a launcher /Packages/app.Lander/Lander.sbx the program /Packages/app.Lander/splash.tune its tune Typing "Lander" starts the launcher, which needs no new rule: the shell runs what it reads, so a launcher beginning "#!" and Say.sbx beginning "SBEX" go down the same road and neither the shell nor the person has to know which kind of thing they started. It passes on what it was told with $args, and says #quiet, because a launcher is machinery and not narration. The game then asks where it came from and joins its tune's name to that, so nothing anywhere names /splash.tune. Every recorded Lander test still types just "Lander" and knows nothing about any of this, which is exactly the claim. ---- Why the directory is not in /Apps ---- A launcher and a directory of the same name cannot both be there; SBFS refuses the second. And /Apps is the directory the shell walks for every word it does not know and Tab walks for every first word, so doubling what is in it is a cost on the path that runs most. The "app." goes in FRONT rather than behind because Tab matches the start of a name: a prefix is a namespace and a suffix is a collision. Copy.app beside Copy.sbx makes "Copy" and Tab complete to the shared "Copy." and hand you a broken word. The launcher names drive 0, so a game started from a disk of your own is looked for where the game is rather than where you are - its lines run on your disk, which is what makes everything else in a script work. /lander.state stays at the root. A saved position belongs to whoever saved it and is found where they are standing; a tune belongs to the program and is found beside it. That pair is the whole distinction. ---- And what it cost ---- Two hundred thousand cycles, about twelve frames, between the machine starting and the game drawing: a script opened, a deeper path walked. Six video captures moved out by that much. The drift bar needed something else - its pad is counted from the MACHINE starting rather than the game, so the burn is now twelve frames shorter from the game's point of view, and the recording holds the button longer instead. 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
2defbb49e2
commit
94bdf71356
+22
-4
@@ -153,12 +153,22 @@ for i in 1 2 3 4 5 6 7 8; do "$TOOL" put "$DISKS/sbfs.img" "filler$i.txt" >/dev/
|
||||
"$ROOT/Assembler" -I "$ROOT/Programs/CosmOS/Source" \
|
||||
"$ROOT/Programs/CosmOS/Apps/Depth.asm" -o "$WORK/Depth.sbx" >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/Depth.sbx" >/dev/null
|
||||
# Lander.sbx is Lunar Porter, and the biggest program on the disk. It takes the screen, the
|
||||
# mode and the map, so it is also the one that says a program can have all three back.
|
||||
# ---- Lunar Porter, which is the first application with a directory of its own ----
|
||||
#
|
||||
# Lander.sbx is the biggest program on the disk. It takes the screen, the mode and the map,
|
||||
# so it is also the one that says a program can have all three back.
|
||||
#
|
||||
# It does NOT go in /Apps any more. A program with assets gets /Packages/app.<name> and a
|
||||
# LAUNCHER in /Apps under the bare name that is typed - so what "Lander" names is a script,
|
||||
# which the shell runs because of what is inside it rather than what it is called. Every
|
||||
# recorded Lander test still types just "Lander" and knows nothing about any of this, which
|
||||
# is exactly the claim being made.
|
||||
"$ROOT/Assembler" -I "$ROOT/Programs/Sounds" -I "$ROOT/Programs/Libraries" \
|
||||
-I "$ROOT/Programs/CosmOS/Source" \
|
||||
"$ROOT/Programs/CosmOS/Apps/Lander.asm" -o "$WORK/Lander.sbx" >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/Lander.sbx" >/dev/null
|
||||
"$TOOL" mkdir "$DISKS/cosmos.img" /Packages >/dev/null
|
||||
"$TOOL" mkdir "$DISKS/cosmos.img" /Packages/app.Lander >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/Lander.sbx" /Packages/app.Lander/Lander.sbx >/dev/null
|
||||
# Pad.sbx says what the controllers are doing, which is the only way to tell a pad nobody
|
||||
# noticed from one that is mapped to nothing.
|
||||
"$ROOT/Assembler" -I "$ROOT/Programs/CosmOS/Source" \
|
||||
@@ -188,9 +198,14 @@ printf '#! script\nfor a in 1 2\n for b in x y\n echo $a$b\n end\nend\nset
|
||||
# Written in the tune language and compiled here, so the music can be changed without
|
||||
# touching the game. Lander reads it off the disk at startup and starts anyway if it is not
|
||||
# there, the way it treats /lander.state.
|
||||
#
|
||||
# BESIDE THE GAME rather than at the root, which is what the game now asks for: it is told
|
||||
# where it was loaded from and joins the tune's name to that. /lander.state stays at the root
|
||||
# on purpose - a saved position is the PERSON's, so it is found where the person is standing,
|
||||
# and the two of them together are the whole distinction between an asset and a document.
|
||||
"$ROOT/SoundPatch" --blob "$ROOT/Programs/Sounds/Oboe.json" Oboe "$WORK/oboe.patch" >/dev/null
|
||||
"$ROOT/TuneC" -I "$WORK" "$ROOT/Programs/Tunes/splash.score" "$WORK/splash.tune" >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/splash.tune" splash.tune >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/splash.tune" /Packages/app.Lander/splash.tune >/dev/null
|
||||
|
||||
# tune.sbx, which used to be a boot image and is now a program like any other. It brings a
|
||||
# vector of its own - the timer's, so that it has a beat to play to - which makes it the
|
||||
@@ -237,6 +252,9 @@ python3 -c "open('twoblocks.txt','w').write('the second disk, at length. ' * 20)
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/Copy.sbx" /Apps/Copy.sbx >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/Say.sbx" /Apps/Say.sbx >/dev/null
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$WORK/Where.sbx" /Apps/Where.sbx >/dev/null
|
||||
# And the launcher for Lunar Porter, under the bare name somebody types. Put here rather than
|
||||
# beside the game above, because /Apps is not made until now.
|
||||
"$TOOL" put "$DISKS/cosmos.img" "$ROOT/Programs/CosmOS/Launchers/Lander" /Apps/Lander >/dev/null
|
||||
# A SCRIPT in the system's place, which is the one thing on this disk that is fetched from
|
||||
# drive 0 a block at a time WHILE it runs. Its own name carries the drive in front of it,
|
||||
# and resolving a name like that moves the machine to that drive - so a script started from
|
||||
|
||||
Reference in New Issue
Block a user