RISCOS.com

www.riscos.com Technical Support:
Programmer's Reference Manual

 

CMOS RAM allocation


Non-volatile memory

240 bytes of non-volatile memory are provided. The majority of these bytes are reserved for, or used by Acorn. Some bytes are reserved for each expansion card; before using these, see the chapter entitled CMOS RAM. There are also bytes reserved for the user; you must not use these in any distributed product. Finally, there are bytes reserved for applications; for an allocation, contact Acorn in writing, but see first the CMOS RAM bytes.

CMOS usage is subject to change in different versions of RISC OS, and your application should not assume the location of any particular information.

OS_Byte 161 allows you to read the CMOS memory directly, while OS_Byte 162 can write to it.

RISC OS 3.6 allocation

The full usage of CMOS RAM in RISC OS 3.6 is given below. Locations marked '†' were reserved for Acorn use in RISC OS 3.5, unless noted otherwise. Locations marked '‡' were not used, or were used for a different purpose under RISC OS 3.1. For details of CMOS RAM usage in RISC OS 3.1 and RISC OS 2, see Non-volatile memory (CMOS RAM).

Location Function
0 Econet station number (not directly configurable)
1 Econet file server station id (0 => name configured)
2 Econet file server net number (or first character of name - rest in bytes 158 - 172)
3 Econet printer server station id (0 => name configured)
4 Econet printer server net number (or first character of name - rest in bytes 153 - 157)
5 Default filing system number
6 - 7 *Unplug for ROM modules: 16 bits for up to 16 modules
8 Reserved for Acorn use
9 † *Unplug for ROM modules: 8 bits for up to 8 modules
10 Screen info:
Bits 0 - 3 reserved for Acorn use
Bit 4 TV interlace (first *TV parameter)
Bits 5 - 7 TV vertical adjust (signed three-bit number)
11 Misc configuration:
Bits 0 - 2 ‡ ADFS drive
Bits 3 - 5 1 => SHCAPS_ 2 => NOCAPS_ 4 => Caps
Bit 6 0 => DIR_ 1 => NoDir
Bit 7 reserved for Acorn use
12 Keyboard auto-repeat delay
13 Keyboard auto-repeat rate
14 Printer ignore character
15 Printer information:
Bit 0 reserved for Acorn use
Bit 1 0 => IGNORE_ 1 => NoIgnore
Bits 2 - 4 serial baud rate (0 => 75_..._7 => 19200)
Bits 5 - 7 printer type
16 Miscellaneous flags:
Bit 0 reserved for Acorn use
Bit 1 0 => QUIET_ 1 => Loud
Bit 2 reserved for Acorn use
Bit 3 0 => SCROLL_ 1 => NoScroll
Bit 4 0 => NOBOOT_ 1 => Boot
Bits 5 - 7 serial data format (0...7)
17 NetFiler:
Bit 0 FS list sorting mode: 0 => BY NAME_ 1 => by number
Bit 1 library type: 0 => DEFAULT LIBRARY RETURNED BY FILE SERVER_ 1 => $.ArthurLib
Bits 2 - 3 FS list display mode: 0 => LARGE ICONS_ 1 => SMALL ICONS_ 2 => full info, 3 reserved
Bits 4 - 7 reserved for Acorn use
18 - 19 *Unplug for ROM modules: 16 bits for up to 16 modules
20 - 21 *Unplug for extension ROM modules: 16 bits for up to 16 modules
22 WimpDoubleClickMove limit
23 WimpAutoMenuDelay time
24 Territory
25 Printer buffer size
26 IDE disc auto-spindown delay
27 Wimp menu drag delay
28 FileSwitch options:
Bit 0 truncate names: 0 => GIVE ERROR_ 1 => truncate no error
Bit 1 DragASprite and DragAnObject: 0 => DON'T USE_ 1 => use
Bit 2 interactive file copy: 0 => USE_ 1 => don't use
Bit 3 Wimp's use of dither patterns on desktop: 0 => DON'T USE_ 1 => use
Bit 4 †‡ type of click on toggle size icon that doesn't obscure icon bar: 0 => CLICK_ 1 => Shift-click
Bit 5 reserved for Acorn use
Bits 6 - 7 state of last shutdown: 0 => DON'T CARE_ 1 => FAILED_ 2 => DUE TO POWER LOSS_ 3 => undefined
29 ‡ Mouse type:
0 => standard quadrature mouse,
1 => Microsoft compatible serial mouse,
2 => Mouse Systems Corporation compatible serial mouse,
3 => PS/2 compatible serial mouse †,
4 - 255 reserved for Acorn use
30 - 45 Reserved for the user
46 - 59 Reserved for applications
60 - 79 ‡ Reserved for expansion card use
80 Freeway net number in Acorn Access, or reserved for RISC iX
81 &0F for Access to prevent RISC iX booting, or reserved for RISC iX
82 - 105 ShareFS disc names in Acorn Access, or reserved for RISC iX
106 ADFSFiler disc sharing for Acorn Access:
Bit 0 share drive 4 if set
Bit 1 protect drive 4 if set
Bit 2 share drive 5 if set
Bit 3 protect drive 5 if set
Bit 4 share drive 6 if set
Bit 5 protect drive 6 if set
Bit 6 share drive 7 if set
Bit 7 protect drive 7 if set
Or reserved for RISC iX
107 - 111 Reserved for RISC iX
112 - 127 Reserved for expansion card use
128 - 129 Current year
130 - 131 † *Unplug for ROM modules: 16 bits for up to 16 modules
132 DumpFormat, 16 bit sound control and quality:
Bits 0 - 1 control character print control:
0 => print in GSTrans format,
1 => print as a dot,
2 => print decimal inside angle brackets,
3 => print hex inside angle brackets
Bit 2 treat top-bit-set characters as valid if set
Bit 3 AND character with &7F in *Dump
Bit 4 treat TAB as print 8 spaces
Bits 5 - 6 16 bit sound control:
0 => STANDARD [MU]-law sound (ie no 16 bit sound output)
1 => DAC clock is slave, 11.2896MHz external clock, standard VIDC20 or 44.1kHz×4/(4...45) rates (as on ESP card)
2 => DAC clock is slave, no external clock, standard VIDC20 rates only
3 => DAC clock is master, external clock, suitable sound clock driver installed
Bit 7 16 bit sound quality:
0 => use specified sample rate
1 => perform sample interpolation to keep sample rate over 25kHz
133 Sync, monitor type, some mode information:
Bits 0, 7 0 => VERTICAL SYNC_ 1 => COMPOSITE SYNC_ 3 => auto sync)
Bit 1 † 0 => ENABLE LOADMODEFILE IN !BOOT_ 1 => disable LoadModeFile in !Boot
Bits 2 - 6 monitor type: 0 => 0_ 1 => 1_ ..._ 31 => auto
134 FontSize in units of 4K
135 Number of ADFS drives:
Bits 0 - 2 floppy disc drives
Bits 3 - 5 ‡ no longer used (was ST506) - reserved for Acorn use
Bits 6 - 7 IDE disc drives
136 ADFS floppy disc drive step rates:
Bits 0 - 1 floppy disc drive 0
Bits 2 - 3 floppy disc drive 1
Bits 4 - 5 floppy disc drive 2
Bits 6 - 7 floppy disc drive 3
137 ADFSbuffers
138 CDFS number of discs and buffer size:
Bits 0 - 4 number of CD-ROM drives
Bits 5 - 7 buffer size: 0 => 0K_ 1 => 8K_ 2 => 16K_ 3 => 32K_ 4 => 64K_ 5 => 128K_ 6 => 256K_ 7 => 512K
139 TimeZone in 15min offsets from UTC, stored as signed 2's complement number (RISC OS 3 version 3.10 onwards)
140 Desktop features:
Bit 0 3D: 0 => 2D LOOK_ 1 => 3D look
Bits 1 - 4 ‡ desktop font setting:
0 => use Wimp$Font... variables,
1 => use System font
2 - 15 => use font from ResourceFS
Bits 5 - 6 reserved for Acorn use
Bit 7 ‡ window background tiling: 0 => USE TILE_1_ 1 => not tiled (i.e. grey 1)
141 - 142 †‡ *Unplug for ROM modules: 16 bits for up to 16 modules
143 Screen size, in pages
144 RAM disc size, in pages
145 System heap size to add after initialisation, in pages
146 RMA size to add after initialisation, in pages
147 Sprite size, in pages
148 SoundDefault parameters:
Bits 0 - 3 channel 0 default voice
Bits 4 - 6 loudness (0 - 7 => &01, &13, &25, &37, &49, &5B, &6D, &7F)
Bit 7 loudspeaker enable, if hardware supports it
149 - 152 Allocated to BASIC Editor
153 - 157 Printer server name characters 2 - 6 (character 1 at location 4)
158 - 172 File server name characters 2 - 16 (character 1 at location 2)
173 - 176 *Unplug for ROM modules: 32 bits for up to 32 modules
177 - 184 *Unplug for expansion card modules: 8 × 8 bits for up to 8 modules per card
185 Configured language
186 Configured country
187 *Unplug for network card modules: 8 bits for up to 8 modules
188 Miscellaneous:
Bits 0 - 1 ROMFS Opt 4 state
Bit 2 cache icon enable state: 0 => NO CACHE ICON STATE_ 1 => caches icon
Bits 3 - 5 screen blanker time: 0 => OFF_ 1 => 30S_ 2 => 1MIN_ 3 => 2MINS_ 4 => 5MINS_ 5 => 10MINS_ 6 => 15MINS_ 7 => 30mins
Bit 6 screen blanker/Wrch interaction: 0 => IGNORE WRCH_ 1 => Wrch unblanks screen
Bit 7 hardware test disable: 0 => FULL TESTS_ 1 => disable long tests at power-up
189 - 192 Winchester size
193 Protection state for immediate Econet commands:
Bit 0 Peek
Bit 1 Poke
Bit 2 JSR
Bit 3 User RPC
Bit 4 OS RPC
Bit 5 Halt
Bit 6 GetRegs
Bit 7 reserved for Acorn use
194 Mouse multiplier
195 Miscellaneous:
Bit 0 AUN BootNet: 0 => DISABLED_ 1 => enabled
Bit 1 AUN dynamic station numbering: 0 => DISABLED_ 1 => enabled
Bit 2 type of last reset: 0 => ORDINARY_ 1 => CMOS reset
Bit 3 power saving: 0 => DISABLED_ 1 => enabled
Bit 4 mode and wimp mode: 0 => USE BYTE 196_ 1 => auto
Bit 5 cache enable for ARM: 0 => ENABLED_ 1 => disabled
Bit 6 broadcast loader enable: 0 => ENABLED_ 1 => disabled
Bit 7 colour hourglass enable: 0 => DISABLED_ 1 => enabled
196 Mode and Wimp mode
197 WimpFlags
198 Desktop state:
Bits 0, 1 Filer display mode: 0 => LARGE ICONS_ 1 => SMALL ICONS_ 2 => full info, 3 reserved
Bits 2, 3 Filer sorting mode: 0 => SORT BY NAME_ 1 => SORT BY TYPE_ 2 => SORT BY SIZE_ 3 => sort by date
Bit 4 force option (1 => force)
Bit 5 confirm option (1 => confirm)
Bit 6 verbose option (1 => verbose)
Bit 7 newer option (1 => newer)
199 ADFS directory cache size
200 - 205 FontMax, FontMax1 - FontMax5
206 - 207 Reserved for Acorn use
208 SCSIFS flags
Bits 0 - 2 number of discs (0 - 4)
Bits 3 - 5 default drive - 4
Bits 6 - 7 reserved
209 SCSIFS file cache buffers (must be 0)
210 SCSIFS directory cache size
211 - 214 SCSIFS disc sizes (their maps' sizes / 256)
215 - 216 Reserved for Acorn use
217 - 219 *Unplug for ROM modules: 24 bits for up to 24 modules
220 Alarm and time byte
Bits 0 - 2 format state:
0 => illegal (!Alarm checks for first run),
1 => analogue with seconds,
2 => analogue without seconds,
3 => HH:MM,
4 => format is '%24:%mi:%se',
5 => format is '%z12:%mi:%se %am %zd %zmn %yr',
6 & 7 reserved
Bit 3 deletion: 0 => DO NOT CONFIRM_ 1 => confirm
Bit 4 auto save: 0 => NO AUTO SAVE_ 1 => auto save
Bit 5 5 day weeks: 0 => DISABLED_ 1 => enabled
Bit 6 alarm noise: 0 => NOT SILENT_ 1 => silent
Bit 7 Daylight Saving Time: 0 => NORMAL TIME_ 1 => Daylight Saving Time (DST)
221 WimpDragDelay time
222 WimpDragMove limit
223 WimpDoubleClickDelay time
224 - 229 Local print server's name, stored by printer server software, or reserved for RISC iX
230 † LCD panel brightness and contrast, or reserved for RISC iX (was solely reserved for RISC iX under RISC OS 3.5)
231 †‡ *Unplug for ROM modules: 8 bits for up to 8 modules
232 ‡ Reserved for Acorn use
233 - 238 ‡ FSLock
239 CMOS RAM checksum

The checksum must be correct for some of the above locations to have effect. See the documentation of OS_Byte 162 for more details.

This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015