User Tools

Site Tools


sd:mode_10

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
sd:mode_10 [2026/09/07 08:24] – external edit 127.0.0.1sd:mode_10 [2026/09/07 10:22] (current) – external edit 127.0.0.1
Line 74: Line 74:
 ==== Why stride is separate from columns ==== ==== Why stride is separate from columns ====
  
-''VIDEO_ROW_STRIDE'' is normally equal to ''VIDEO_COLUMNS''and if you set it +''VIDEO_ROW_STRIDE'' is normally equal to ''VIDEO_COLUMNS'' — every preset mode 
-smaller it is silently raised to the column count. Making it **larger** is the+sets it that way when you select it — and if you set it smaller it is silently 
 +raised to the column count. **Mode 10 is the exception: it leaves the stride 
 +alone**, so a wider buffer survives being selected. Making it **larger** is the
 interesting case: it gives you a text buffer wider than the screen, with the interesting case: it gives you a text buffer wider than the screen, with the
 extra columns sitting off-stage to the right. Advancing ''VIDEO_TEXT_BASE'' by extra columns sitting off-stage to the right. Advancing ''VIDEO_TEXT_BASE'' by
Line 106: Line 108:
   * mode 6 — 80x25, 9x16 cells, 720x400 (see [[#three kinds of mode]])   * mode 6 — 80x25, 9x16 cells, 720x400 (see [[#three kinds of mode]])
  
-From Stellar BASIC, ''MODE 1'', ''MODE 2'' and ''MODE 6'' do the same thing +From Stellar BASIC, ''MODE 1'', ''MODE 2''''MODE 6'' and ''MODE 10'' do the 
-(''MODE 40'' and ''MODE 80'' are accepted as aliases for 1 and 2).+same thing (''MODE 40'' and ''MODE 80'' are accepted as aliases for 1 and 2).
  
 These presets write the whole descriptor for you. Everything below is about These presets write the whole descriptor for you. Everything below is about
Line 114: Line 116:
 ===== Programming mode 10 ===== ===== Programming mode 10 =====
  
-Mode 10 writes no preset. It renders the descriptor exactly as it standsso +Mode 10 writes no preset — geometry, both planes, the row stride and the font 
-the sequence is always the same:+are left exactly as the program set them. Selecting it clears the screenand 
 +that is all it does. The sequence is always the same:
  
   - fill in the descriptor registers   - fill in the descriptor registers
Line 174: Line 177:
 | ''$45'' | pointer to the colour plane | | ''$45'' | pointer to the colour plane |
 | ''$46'' | is this a text mode? | | ''$46'' | is this a text mode? |
-| ''$47''character ROM / glyph base |+| ''$47''ELM = ''VIDEO_FONT_BASE'', AL = ''VIDEO_FONT_KIND'' (clobbers A) |
  
 ===== Character and colour data ===== ===== Character and colour data =====
Line 385: Line 388:
 descriptor registers directly. descriptor registers directly.
  
-===== Current status and limitations ===== +===== Current status =====
- +
-What works today:+
  
   * modes 1, 2 and 10 all run through the descriptor-driven renderer   * modes 1, 2 and 10 all run through the descriptor-driven renderer
-  * mode 10 is reachable from a program: write the registers, then either set +  * mode 10 is selectable from a program (''LDA $400A'' ''INT $10''), from 
-    ''VIDEO_MODE'' to 10 or call INT ''$10'' with ''AL=$0A''+    BASIC (''MODE 10''), and clears the screen like any other mode 
 +  * every preset mode writes ''VIDEO_ROW_STRIDE''; mode 10 preserves it
   * fonts may be relocated and redefined through ''VIDEO_FONT_BASE''   * fonts may be relocated and redefined through ''VIDEO_FONT_BASE''
   * a text mode may draw with a host font file via ''VIDEO_FONT_KIND=1''   * a text mode may draw with a host font file via ''VIDEO_FONT_KIND=1''
 +  * AH=''$47'' reports the real font pointer and its kind, in every mode
  
-What is not finished:+Still to come:
  
-  * **Mode 10 does not clear the screen.** ''int10_set_video_mode'' does not 
-    recognise 10 yet, so it stores the mode number and returns without running 
-    the clear-and-home path. Clear the screen yourself after switching, or the 
-    previous mode's characters will still be sitting there. 
-  * **Only mode 1 writes ''VIDEO_ROW_STRIDE''.** Modes 2 and 6 leave it as they 
-    found it. Every current path still renders correctly because a stride 
-    smaller than the column count is corrected up, but do not rely on it — 
-    write the stride yourself when you write the rest of the descriptor. 
-  * **AH=''$47'' still reports a per-mode fixed address** rather than 
-    ''VIDEO_FONT_BASE'', so it will not tell you the truth in mode 10, and 
-    cannot be used to recover the system font pointer. 
-  * **Mode changes do not restore the font.** Only boot writes 
-    ''VIDEO_FONT_BASE'', so a custom font survives a switch back to mode 1. 
-    Whether presets should reset it is undecided. 
   * There is no single call that installs a whole descriptor. A convenience   * There is no single call that installs a whole descriptor. A convenience
     function (AH=''$4A'') has been proposed but not written; for now, write the     function (AH=''$4A'') has been proposed but not written; for now, write the
-    nine registers.+    registers
 +  * Mode changes do not restore the font. Only boot writes 
 +    ''VIDEO_FONT_BASE'', so a custom font survives a switch back to mode 1. 
 +    Whether presets should reset it is undecided — see [[#the font base is sticky]]. 
 +  * Mode 6 still names its font inside the emulator rather than through the 
 +    descriptor.
  
sd/mode_10.1788769492.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki