Make the screen come back on the machine people actually run

Found by running it: Grid exits and the shell prints its prompt into the
grid, with the view up to seven pixels out of alignment. Three faults, and
the first is the one that made the other two visible.

MAKE RUN-VOYAGER HAD NO SCRATCH DRIVE. It gives drive 1 to Disks/personal.img,
which is a file and not volatile, so there was nowhere to keep a screen -
osTakeScreen answered no and the whole feature silently did not happen. It
was tested with --ram-disk and shipped without one, which is as good a
description of testing the wrong machine as I can write. There is now a RAM
disk in drive 2, after the personal disk so that drive 1 stays the one that
is yours.

A PROGRAM TOLD NO MUST COPE. A refusal is not a fault, it means doing what
the program did before there was anywhere to save a screen. Grid deleted
its own tidying up when it started asking, so being refused left the grid
on screen with a prompt written into it. It clears up again when refused,
and only then.

AND THE SYSTEM ALWAYS LEAVES THE SCREEN USABLE. The fine scroll registers
go back to zero at every program exit, whether or not the picture could be
saved: the console draws in whole cells, so a view three pixels into one
puts every character three pixels out for ever. That is not part of saving
a screen and should never have depended on it.

Both paths are checked now. With a scratch drive the screen comes back cell
for cell; without one, no grid is left behind. Breaking either fails one of
them and not the other.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
Anachronaut
2026-08-31 20:31:26 -04:00
co-authored by Claude Opus 5
parent ab72443b99
commit 2a29cebc6b
10 changed files with 123 additions and 11 deletions
+15 -4
View File
@@ -172,6 +172,17 @@ COSMOS_DISK = $(PROG_BUILD)/cosmos.img
# once it exists make never looks at it again.
PERSONAL_DISK = Disks/personal.img
# ---- And a drive made of memory, as drive 2 ----
#
# 2,048 blocks, half a megabyte, gone when the machine stops. The system keeps there whatever
# it wants back later and cannot hold - the screen a program took, and whatever comes after
# that. A machine without one does without: osTakeScreen answers no and a program told no
# carries on.
#
# AFTER the personal disk, so drive 1 stays the one that is yours. A scratch drive that took
# drive 1 would renumber somebody's disk the day it was added.
SCRATCH_BLOCKS = 2048
# VOYAGER IS NOT IN THE HARD LIST. Everything below it - the assembler, the disk tool, the
# linter, the whole test suite - has to build on a machine with no graphics library at all,
@@ -608,13 +619,13 @@ $(PERSONAL_DISK):
@echo " again - not clean, not a rebuild. Delete it by hand if you want a new one."
run-cosmos: $(COSMOS_DISK) $(PERSONAL_DISK)
$(EMU_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK)
$(EMU_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) --ram-disk $(SCRATCH_BLOCKS)
# The same disk with the system handed over directly instead, which is what a debugger does:
# memory is placed from outside and nothing on the disk is consulted about it. Useful when the
# thing being debugged is the boot chain itself, since it skips the boot chain.
run-cosmos-direct: $(COSMOS) $(COSMOS_DISK) $(PERSONAL_DISK)
$(EMU_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) $(COSMOS)
$(EMU_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) --ram-disk $(SCRATCH_BLOCKS) $(COSMOS)
# ---- The same disk, on the machine with a screen ----
#
@@ -626,10 +637,10 @@ run-cosmos-direct: $(COSMOS) $(COSMOS_DISK) $(PERSONAL_DISK)
# an image full of programs written for the old one - and they will draw whatever the old way
# now means. Making the disk a dependency of running it is what stops that being a puzzle.
run-voyager: $(COSMOS_DISK) $(PERSONAL_DISK)
$(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK)
$(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) --ram-disk $(SCRATCH_BLOCKS)
run-voyager-direct: $(COSMOS) $(COSMOS_DISK) $(PERSONAL_DISK)
$(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) $(COSMOS)
$(VOY_RUN) --disk $(COSMOS_DISK) --disk $(PERSONAL_DISK) --ram-disk $(SCRATCH_BLOCKS) $(COSMOS)
# Pull in the dependency rules the assembler wrote with -M, so that touching a library
# reassembles every program that includes it.