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
@@ -633,6 +633,13 @@ returned to the prompt, and the program is recorded as having stopped rather tha
|
||||
A fault *below* where programs load is the system's own code, and there is nothing to go back
|
||||
to. That one says so and stops.
|
||||
|
||||
**The glyphs and the colours come back too.** A program is as free to redefine a letter as
|
||||
any other tile, so one that did has left the shell unable to spell, and one that wrote its
|
||||
own palette used to hand back green text on blue. Both were permanent until the video device
|
||||
grew a character generator to ask. The shell asks for both whenever a program exits, before
|
||||
restoring a saved screen, so a program that saved one still gets back what was actually on
|
||||
it and a program that saved nothing at least leaves something readable.
|
||||
|
||||
**The screen is put back into a mode text can be seen in first**, and that is the part that
|
||||
matters most rather than the part that is prettiest. A program that faulted in bitmap mode
|
||||
left the console with no text rows at all, so it draws nothing - the message about what went
|
||||
|
||||
Reference in New Issue
Block a user