Difference between revisions of "MODE 8"

From BeebWiki
Jump to: navigation, search
m (1 revision)
m (Slight tweeks.)
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:MODE 8 (BBC) demonstration.png|right|Demonstration of 'MODE 8' (BBC)]]
+
[[Category:Display]]__NOTOC__
'''MODE 8''' is the unofficial title of an ultra-low resolution screen [[MODE]], a program for which appears on page 383 of ''The Advanced User Guide for the BBC Microcomputer'' (Bray ''et al.'', 1983?)  Another program, attributed to Ian Robertson, was published in ''The Micro User'' magazine (November 1985, p.123).  It works on the BBC Micro but not the Electron or Master, or the Archimedes (where MODE 8 is officially a 4-colour version of [[MODE 0]]).
+
==MODE 8 - 80x32x4==
 +
[[Image:MODE 8 (BBC) demonstration.gif|right|Demonstration of 'MODE 8' (BBC)]]
 +
'''MODE 8''' is a high-resolution screen [[MODE]], selectable with the *MODE
 +
command or the NewModes sideways ROM module, that replicates the functionality
 +
of the native RISC OS MODE 8.<ref name="newmodes">[http://mdfs.net/Apps/Graphics/NewModes/ NewModes]</ref>
  
The MODE 8 code modifies the [[MODE 5]] screen to provide a 80 &times; 256 display in 16 colours. The MOS does not allow complete support of this MODE and some bugs can be seen: for instance, graphics drawn off the right-hand edge of the screen wrap around to the left, shifted down one text row; and [[VDU 28|text windows]] do not work correctly.
+
The MODE 8 code adapts the [[MODE 1]] screen to provide a 4-colour version
 +
of MODE 0, 80 &times; 32 characters in 4 colours. It does this by redefining
 +
the character set to provide thin characters.
 +
 
 +
{| class="wikitable" style="text-align:left"
 +
|+'MODE 8'
 +
| Type
 +
| colspan="2" | Bitmapped
 +
|- style="vertical-align:top"
 +
| rowspan="2" | Resolution
 +
| Text
 +
| 80 &times; 32 characters
 +
|- style="vertical-align:top"
 +
| Graphics
 +
| 160 &times; 256
 +
|- style="vertical-align:top"
 +
| Character size
 +
| colspan="2" | 4 &times; 8 pixels
 +
|- style="vertical-align:top"
 +
| Pixel aspect
 +
| colspan="2" | 1:2 (tall)
 +
|- style="vertical-align:top"
 +
| Bits per pixel
 +
| 2
 +
|- style="vertical-align:top"
 +
| rowspan="5" | Default palette
 +
! Logical colour
 +
! Actual colour
 +
|- style="vertical-align:top"
 +
| 0
 +
| 0 (black)
 +
|- style="vertical-align:top"
 +
| 1
 +
| 1 (red)
 +
|- style="vertical-align:top"
 +
| 2
 +
| 3 (yellow)
 +
|- style="vertical-align:top"
 +
| 3
 +
| 7 (white)
 +
|- style="vertical-align:top"
 +
| rowspan="2" | Memory
 +
| allocated
 +
| 20480 bytes
 +
|- style="vertical-align:top"
 +
| on screen
 +
| 20480 bytes
 +
|- style="vertical-align:top"
 +
| rowspan="1" | Address range
 +
| Model B ''etc.''
 +
| &3000..&7FFF
 +
|- style="vertical-align:top"
 +
| rowspan="3" | Configuration
 +
| [[Video ULA]] control register
 +
| &98
 +
|- style="vertical-align:top"
 +
| Video ULA palette register file
 +
| &07 &17 &26 &36<br> &47 &57 &66 &76<br> &84 &94 &A0 &B0<br> &C4 &D4 &E0 &F0
 +
|- style="vertical-align:top"
 +
| [[CRTC]] register file
 +
| &3F &28 &31 &24<br> &26 &00 &20 &22<br> &01 &07 &67 &08
 +
|}
 +
 
 +
MODE 8 can be created manually with the following code running in the I/O
 +
processor.
 +
 
 +
    BASIC:
 +
    MODE 1    :REM Base MODE
 +
    ?&30A=79  :REM Characters per line
 +
    ?&34F=8    :REM Bytes per character
 +
    *FX154,152
 +
   
 +
    6502:
 +
    LDA #22:JSR OSWRCH
 +
    LDA #01:JSR OSWRCH          \ Base MODE
 +
    LDA #&4F:STA &30A            \ Characters per line
 +
    LDA #&08:STA &34F            \ Byte per character
 +
    LDA #154:LDX #152:JSR OSBYTE \ Cursor width
 +
 
 +
The character set needs to be redefined to be four pixels wide, such as with
 +
the one used with [http://mdfs.net/Apps/Graphics/NewModes/ NewModes].
 +
 
 +
 
 +
==MODE 8 - 10x32x16==
 +
[[Image:MODE 8 BBC demonstration.png|right|Demonstration of 'MODE 8' (BBC)]]
 +
'''MODE 8''' is also the unofficial title of an ultra-low resolution screen
 +
[[MODE]], a program for which appears on page 383 of
 +
''The Advanced User Guide for the BBC Microcomputer'' (Bray ''et al.'',
 +
1983) Another program, attributed to Ian Robertson, was published in ''The
 +
Micro User'' magazine (November 1985, p.123). It works on the BBC and Master
 +
but not the Electron, or the Archimedes/RISC OS (where MODE 8 is the
 +
official the 4-colour version of [[MODE 0]]).
 +
 
 +
The MODE 8 code modifies the [[MODE 5]] screen to provide a 80 &times; 256
 +
display in 16 colours. The MOS does not allow complete support of this MODE
 +
and some bugs can be seen: for instance, graphics drawn off the right-hand
 +
edge of the screen wrap around to the left, shifted down one text row; and
 +
[[VDU 28|text windows]] do not work correctly.
  
 
{| class="wikitable" style="text-align:left"
 
{| class="wikitable" style="text-align:left"
Line 93: Line 194:
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| Video ULA palette register file
 
| Video ULA palette register file
| &07 &16 &25 &34<br> &43 &52 &61 &70<br> &8F &9E &AD &BC<br> &CB &DA &E9 &F8
+
| &07 &16 &25 &34 &43 &52 &61 &70<br> &8F &9E &AD &BC &CB &DA &E9 &F8
 
|- style="vertical-align:top"
 
|- style="vertical-align:top"
 
| [[CRTC]] register file
 
| [[CRTC]] register file
| &3F &28 &31 &24<br> &26 &00 &20 &22<br> &01 &07 &67 &08<br> (from table in [[MOS 1.20]] at &C486..&C491)
+
| &3F &28 &31 &24 &26 &00<br> &20 &22 &01 &07 &67 &08<br> (from table in [[MOS 1.20]] at &C486..&C491)
 
|}
 
|}
  
-- [[User:Beardo|beardo]] 01:39, 13 December 2006 (GMT)
+
MODE 8 can be created manually with the following code running in the I/O
[[Category:Display]]
+
processor.
 +
 
 +
    BASIC:
 +
    MODE 5    :REM Base MODE
 +
    ?&30A=9    :REM Characters per line
 +
    ?&34F=32  :REM Bytes per character
 +
    ?&360=15  :REM Number of colours
 +
    ?&361=1    :REM Pixels per byte
 +
    ?&362=&AA  :REM Pixel left mask
 +
    ?&363=&55  :REM Pixel right mask
 +
    VDU 20    :REM Reset palette
 +
    *FX154,224
 +
   
 +
    6502:
 +
    LDA #22:JSR OSWRCH
 +
    LDA #05:JSR OSWRCH          \ Base MODE
 +
    LDA #&09:STA &30A            \ Characters per line
 +
    LDA #&20:STA &34F            \ Byte per character
 +
    LDA #&0F:STA &360            \ Number of colours
 +
    LDA #&01:STA &361            \ Pixels per byte
 +
    LDA #&AA:STA &362            \ Pixel left mask
 +
    LDA #&55:STA &363            \ Pixel right mask
 +
    LDA #20:JSR OSWRCH          \ Reset palette
 +
    LDA #154:LDX #224:JSR OSBYTE \ Cursor width
 +
 
 +
==See Also==
 +
* [http://mdfs.net/Apps/Graphics/NewModes/ NewModes]
 +
 
 +
==References==
 +
<references/>
 +
 
 +
{{MODE}}
 +
[[User:Jgharston|Jgharston]] ([[User talk:Jgharston|talk]]) 17:25, 12 October 2016 (UTC)
 +
[[User:Beardo|beardo]] 01:39, 13 December 2006 (GMT)

Revision as of 13:28, 17 October 2020

MODE 8 - 80x32x4

Demonstration of 'MODE 8' (BBC)

MODE 8 is a high-resolution screen MODE, selectable with the *MODE command or the NewModes sideways ROM module, that replicates the functionality of the native RISC OS MODE 8.[1]

The MODE 8 code adapts the MODE 1 screen to provide a 4-colour version of MODE 0, 80 × 32 characters in 4 colours. It does this by redefining the character set to provide thin characters.

'MODE 8'
Type Bitmapped
Resolution Text 80 × 32 characters
Graphics 160 × 256
Character size 4 × 8 pixels
Pixel aspect 1:2 (tall)
Bits per pixel 2
Default palette Logical colour Actual colour
0 0 (black)
1 1 (red)
2 3 (yellow)
3 7 (white)
Memory allocated 20480 bytes
on screen 20480 bytes
Address range Model B etc. &3000..&7FFF
Configuration Video ULA control register &98
Video ULA palette register file &07 &17 &26 &36
&47 &57 &66 &76
&84 &94 &A0 &B0
&C4 &D4 &E0 &F0
CRTC register file &3F &28 &31 &24
&26 &00 &20 &22
&01 &07 &67 &08

MODE 8 can be created manually with the following code running in the I/O processor.

   BASIC:
   MODE 1     :REM Base MODE
   ?&30A=79   :REM Characters per line
   ?&34F=8    :REM Bytes per character
   *FX154,152
   
   6502:
   LDA #22:JSR OSWRCH
   LDA #01:JSR OSWRCH           \ Base MODE
   LDA #&4F:STA &30A            \ Characters per line
   LDA #&08:STA &34F            \ Byte per character
   LDA #154:LDX #152:JSR OSBYTE \ Cursor width

The character set needs to be redefined to be four pixels wide, such as with the one used with NewModes.


MODE 8 - 10x32x16

Demonstration of 'MODE 8' (BBC)

MODE 8 is also the unofficial title of an ultra-low resolution screen MODE, a program for which appears on page 383 of The Advanced User Guide for the BBC Microcomputer (Bray et al., 1983) Another program, attributed to Ian Robertson, was published in The Micro User magazine (November 1985, p.123). It works on the BBC and Master but not the Electron, or the Archimedes/RISC OS (where MODE 8 is the official the 4-colour version of MODE 0).

The MODE 8 code modifies the MODE 5 screen to provide a 80 × 256 display in 16 colours. The MOS does not allow complete support of this MODE and some bugs can be seen: for instance, graphics drawn off the right-hand edge of the screen wrap around to the left, shifted down one text row; and text windows do not work correctly.

'MODE 8'
Type Graphical ('ASCII')
Resolution Text 10 × 32 characters
Graphics 80 × 256 pixels
Character size 8 × 8 pixels, user definable
Pixel aspect 4:1 (wide)
Bits per pixel 4
Default palette Logical colour Actual colour
0 0 (black)
1 1 (red)
2 2 (green)
3 3 (yellow)
4 4 (blue)
5 5 (magenta)
6 6 (cyan)
7 7 (white)
8 8 (flashing black/white)
9 9 (flashing red/cyan)
10 10 (flashing green/magenta)
11 11 (flashing yellow/blue)
12 12 (flashing blue/yellow)
13 13 (flashing magenta/green)
14 14 (flashing cyan/red)
15 15 (flashing white/black)
Memory allocated 10240 bytes
on screen 10240 bytes
Address range Model B etc. &5800..&7FFF
Configuration Video ULA control register &E0
Video ULA palette register file &07 &16 &25 &34 &43 &52 &61 &70
&8F &9E &AD &BC &CB &DA &E9 &F8
CRTC register file &3F &28 &31 &24 &26 &00
&20 &22 &01 &07 &67 &08
(from table in MOS 1.20 at &C486..&C491)

MODE 8 can be created manually with the following code running in the I/O processor.

   BASIC:
   MODE 5     :REM Base MODE
   ?&30A=9    :REM Characters per line
   ?&34F=32   :REM Bytes per character
   ?&360=15   :REM Number of colours
   ?&361=1    :REM Pixels per byte
   ?&362=&AA  :REM Pixel left mask
   ?&363=&55  :REM Pixel right mask
   VDU 20     :REM Reset palette
   *FX154,224
   
   6502:
   LDA #22:JSR OSWRCH
   LDA #05:JSR OSWRCH           \ Base MODE
   LDA #&09:STA &30A            \ Characters per line
   LDA #&20:STA &34F            \ Byte per character
   LDA #&0F:STA &360            \ Number of colours
   LDA #&01:STA &361            \ Pixels per byte
   LDA #&AA:STA &362            \ Pixel left mask
   LDA #&55:STA &363            \ Pixel right mask
   LDA #20:JSR OSWRCH           \ Reset palette
   LDA #154:LDX #224:JSR OSBYTE \ Cursor width

See Also

References

Screen display MODEs

MODE 0 | MODE 1 | MODE 2 | MODE 3 | MODE 4 | MODE 5 | MODE 6 | MODE 7
MODE 8 | MODE 9 | MODE 10 | MODE 11 | MODE 12 | MODE 13 | MODE 14
MODE &60 | MODE &61 | MODE &63 | MODE &64 | MODE &66
MODE &68 | MODE &69 | MODE &6B | MODE &6C | MODE &6E
MODE | VDU 22

Jgharston (talk) 17:25, 12 October 2016 (UTC) beardo 01:39, 13 December 2006 (GMT)