The font comes from a chip, not from RAM that remembers
videoReset zeroed video memory and then wrote the font and the sixteen colour schemes into it, and the comment above that said out loud what was wrong with it: "everything here is ordinary video memory". RAM does not wake up with anything in it. That was the last piece of magic in this device, and it looked harmless until something wanted the font BACK - a program that redefines a glyph had destroyed the only copy there was. So the device has a character generator, the way the machines this one is pretending to be really did, and the copy into RAM is a thing it DOES rather than a state it mysteriously starts in. Command port 0x39: bit 0 for the font, bit 1 for the schemes. THE RAM IS STILL RAM. A program may overwrite every glyph and every colour and should be able to, which is what makes this a tile engine rather than a text display. What changed is that it is no longer a one way door. NEITHER COMMAND CLEARS WHAT IT DOES NOT OWN. The font used to clear the whole of tile memory before writing itself, which was harmless while it happened only at reset and is wrong the moment a program can ask: a program that defined a tile of its own and then wanted its text back would have paid for it with the tile. The reason it is a chip rather than a file on the disk, which was the other candidate: the boot chain prints before CosmOS exists. Stage one prints "?" when there is nothing to boot, and if the font came off the disk then the message about the disk having failed would be the one thing that could not be drawn. A system that wants its own font still loads one over the top - the ROM is the floor, not the policy. Two things that had been worked around now simply work. The shell asks for both whenever a program exits, so a program that redefined a letter no longer leaves it unable to spell, and Grid no longer needs to have saved the screen to avoid handing back green text on blue. And the fault screen asks for the glyphs first, because a message spelled in somebody's tile graphics is no message at all. Five video checks. Two runs each for the font and the schemes, since the map holds a tile NUMBER and the glyph is looked up when the frame is drawn - so restoring changes every cell using it, including ones drawn before, and what the two runs differ by is the command. The third guards the decision not to clear: tile 200 has to survive the font coming back. 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
925388c2f2
commit
f97d15de08
@@ -37,6 +37,10 @@
|
||||
|
||||
#Program
|
||||
|
||||
#Include services.asm
|
||||
|
||||
#Base 0x4000
|
||||
|
||||
start:
|
||||
|
||||
; ---- The instrument ----
|
||||
@@ -182,7 +186,7 @@ lastRing:
|
||||
CIF
|
||||
RSTA
|
||||
OUTA 0x35
|
||||
HALT
|
||||
SWI osExit
|
||||
|
||||
; Sixty times a second, and it has nothing to do. WAIT only needs something to have happened,
|
||||
; and this is the something. A handler still has to exist: an interrupt with nothing installed
|
||||
@@ -192,6 +196,8 @@ frame:
|
||||
|
||||
#Data
|
||||
|
||||
#Base 0x2000
|
||||
|
||||
; ---- Notes and how long they last ----
|
||||
;
|
||||
; Pairs: a MIDI note, then a count of frames. 60 is middle C and every 12 is an octave. A zero
|
||||
|
||||
Reference in New Issue
Block a user