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:
co-authored by
Claude Opus 5
parent
ab72443b99
commit
2a29cebc6b
@@ -51,6 +51,9 @@ start:
|
||||
; at exit - and if it says it cannot, this carries on anyway, because it did before there
|
||||
; was anywhere to put it.
|
||||
SWI osTakeScreen
|
||||
MVQA
|
||||
SETD.0 ScreenKept
|
||||
STA.0 ; Nought means the system will put it back.
|
||||
|
||||
CALL putTile
|
||||
CALL putPalette
|
||||
@@ -135,6 +138,58 @@ finished:
|
||||
;
|
||||
; All of it is osTakeScreen's now, and it gives back what was actually there rather than
|
||||
; what a clean machine looks like.
|
||||
;
|
||||
; ---- Unless it said no ----
|
||||
;
|
||||
; A machine with no volatile drive has nowhere to keep a screen, and answers so. Being told
|
||||
; no is not a fault and not a reason to stop: it means doing what this program did before
|
||||
; there was anywhere to put one, which is leaving a blank screen rather than a grid with
|
||||
; somebody's prompt printed into it.
|
||||
SETD.0 ScreenKept
|
||||
LDA.0
|
||||
BRA gridScreenKept
|
||||
|
||||
RSTA
|
||||
OUTA 0x34
|
||||
OUTA 0x36 ; The origins, or the shell looks at a corner of the map.
|
||||
|
||||
INIA 0d4
|
||||
OUTA 0xE3
|
||||
INIA 0x40
|
||||
OUTA 0xE4
|
||||
RSTA
|
||||
OUTA 0xE5
|
||||
OUTA 0xE2 ; Tile nought is the space and attribute nought is plain.
|
||||
INIA 0x80
|
||||
OUTA 0xE6
|
||||
RSTA
|
||||
OUTA 0xE7
|
||||
INIA 0x02
|
||||
OUTA 0xE8 ; Fill the whole map with it.
|
||||
|
||||
; And the colours the machine wakes up in, which is as near as this can get to the ones it
|
||||
; took: grey on black is what plain text has always been here.
|
||||
INIA 0d4
|
||||
OUTA 0xE3
|
||||
INIA 0xFC
|
||||
OUTA 0xE4
|
||||
RSTA
|
||||
OUTA 0xE5
|
||||
OUTA 0xE9
|
||||
OUTA 0xE9
|
||||
OUTA 0xE9
|
||||
OUTA 0xE9
|
||||
INIA 0xD8
|
||||
OUTA 0xE9
|
||||
OUTA 0xE9
|
||||
OUTA 0xE9
|
||||
RSTA
|
||||
OUTA 0xE9
|
||||
|
||||
INIA 0x01
|
||||
OUTA 0x05 ; Cleared, which also puts the cursor home.
|
||||
|
||||
gridScreenKept:
|
||||
RSTA
|
||||
OUTA 0x02 ; Line mode, the way it was found.
|
||||
RSTA ; splitlint[redundant-assignment]: an exit status, not a mode
|
||||
@@ -358,6 +413,8 @@ everyCell:
|
||||
|
||||
#Base 0x2000
|
||||
|
||||
ScreenKept:
|
||||
0x00
|
||||
FineDown:
|
||||
0x00
|
||||
FineAcross:
|
||||
|
||||
Reference in New Issue
Block a user