The shell scrolls, and the moon was drawn where nobody was looking
Lunar Porter never put the row origin back. The map is a ring 128 rows tall that the screen shows 25 of, and the shell leaves that origin wherever its last command finished - so a moon drawn into rows nought to 24 while the screen is reading from row forty is a moon nobody can see. It came out as terrain missing, or half there, depending on how far down the prompt had got. Running Pad first was enough; so was holding Return. Nothing here is tidiness. It is the difference between the rows a program WRITES and the rows the screen READS, and only one of those is under the program's control. Grid has always known this; Lander did not. The check for it needed writing twice. Forty returns caught nothing, because the shell runs an eighty column screen which is FIFTY rows tall - forty returns fill it and never scroll it, so the origin was still nought and the test passed against a build with the fix taken out. The screenful that matters is the one the shell is using, not the one the program is about to ask for. At eighty it is 28,608 pixels of moon with the fix and none at all without it. break.sh is what said so. The first version of this check looked exactly like a passing test. 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
f7be843ed9
commit
a074a831f0
@@ -51,6 +51,21 @@ start:
|
||||
RSTA
|
||||
OUTA 0x31 ; Forty columns. A moon 320 pixels across reads better than 640.
|
||||
|
||||
; ---- And the view put back to the top of the map ----
|
||||
;
|
||||
; THE SHELL SCROLLS. Its row origin is wherever the last command left it, and the map is a
|
||||
; ring 128 rows tall that the screen shows 25 of - so a moon drawn into rows nought to 24
|
||||
; while the screen is looking at row forty is a moon nobody can see. It came out as terrain
|
||||
; that was missing, or half there, depending on how far down the prompt had got.
|
||||
;
|
||||
; Nothing here is being tidy: this is the difference between the rows this program WRITES
|
||||
; and the rows the screen READS, and only one of them is under its control.
|
||||
;
|
||||
; The column origin and the fine offsets are set every frame by follow, so they need no
|
||||
; help. The row origin is set once, here, because nothing scrolls vertically after this.
|
||||
OUTA 0x34
|
||||
OUTA 0x38 ; No fraction of a cell downwards either.
|
||||
|
||||
CALL putTiles
|
||||
CALL makeMoon
|
||||
CALL drawMoon
|
||||
|
||||
Reference in New Issue
Block a user