         SUBT    CMOS RAM Allocations for RISC OS => &.Hdr.CMOS

OldOpt  SETA    {OPT}
        OPT     OptNoList+OptNoP1List

; ***********************************
; ***    C h a n g e   L i s t    ***
; ***********************************

; Date       Name  Description
; ----       ----  -----------
; 23-Jan-89  BC    Started file by removing from Hdr.System
; 23-Jan-89  BC    Added Simtron's Archway byte
; 23-Jan-89  BC    Included asignments for the RISCiX parts
; 25-Jan-89  Nick  Claimed 7 bytes for SCSIFS
; 26-Jan-89  Nick  Added missing END directive
; 01-Jun-89  BC    Added RhiannonCMOS (&36) for Lisp
; 12-Jun-89  JSR   Move NetFiler bits to ANFSCMOS, renaming that
;                    to NetFilerCMOS, and allocate the free bits
;                    in DesktopCMOS to two more Filer options
; 12-Jun-89  NDR   Changed NetFiler CMOS bit 4 to bit 2
; 12-Jun-89  NDR   Comments about NetFilerCMOS altered to match the truth
; 24-Aug-89  NDR   Added DeskbootCMOS byte
; 26-Sep-89  BC    Changed sense of cache enable bit, added cache icon bit
; 02-Oct-89  BC    Deallocate Catalog/Examine bytes (4)
; 02-Oct-89  BC    Allocate one byte for CDROMFS (&8A) for Next Technology
; 19-Oct-89  NDR   Added Deskboot2CMOS byte
; 18-Jan-90  GJS   Added ScreenBlankerCMOS byte
; 26-Jan-89  BC    Compressed ScreenBlanker requirements and moved to Misc1 (&BC)
; 09-May-90  KR    Added RISCiXBootEther (&E6)
; 18-Jul-90  BC    Added a bit in Misc1 for disabling test code
; 23-Aug-90  BC    Allocated to bits in &C3 for !Alarm
; 23-Aug-90  BC    Allocated to bits in &8B..&8D for printer drivers
; 27-Nov-90  TMD   Allocated 3 more bytes for unplugging main ROM modules
; 25-Jan-91  TMD   Allocated 2 more bytes for unplugging main ROM modules,
;                   and 2 bytes for unplugging extension ROMs
; 29-Jan-91  BC    Allocated Misc2CMOS for the Broadcast Loader (two bits)
; 05-Feb-91  RM    Allocated &16,17 , &DD..&DF for various wimp timeouts.
; 05-Feb-91  RM    Allocated &18 For TerritoryCMOS
; 06-Feb-91  RM    Allocated bit in Misc2CMOS For DST
; 14-Feb-91  TMD   Added MonitorTypeAuto and sync type variables including Sync_Auto
; 18-Feb-91  BC    Moved Broadcast loader bits to where the !Alarm bits were
; 18-Feb-91  BC    Extended the !Alarm bits, and moved the DST bit
; 19-Feb-91  TMD   Added ModeAutoBit and extra Configure Mode bits, removed RAM/ROM speed bits (not used)
; 20-Feb-91  DDV   Added DeviceCMOS (for parallel + serial device drivers)
; 22-Feb-91  TMD   Corrected MonitorTypeAuto - should be &7C not &7F
; 27-Feb-91  DDV   Corrected typo in DeviceCMOS allocation.
; 01-Mar-91  TMD   United Mode and WimpMode, and removed redundant bits
; 04-Mar-91  OSS   Changed PrinterDP CMOS RAM description to match the actual usage of the bytes.
; 07-Mar-91  TMD   Removed DeviceCMOS, put in PrinterBufferCMOS
; 20-Mar-91  CDP   Added ADFSSpinDownCMOS.
; 22-Mar-91  TMD   Added power-saving enable bit
; 07-May-91  ARTG  Added CMOSxseed definition
; 09-May-91  JSR   Added FileSwitchCMOS
; 17-Jun-91  RM    Added Interactive filer copy bit in above byte.
; 21-Nov-91  TMD   Added CMOSResetBit in SystemSpeedCMOS.
; 25-Nov-91  BC    Added a bit in SystemSpeedCMOS for MNS AutoConfig
; 02-Dec-91  DDV   Added bit for dithering the Wimp
; 18-Jan-92  DDV   Added a couple of bits for the Switcher in FileSwitch CMOS
; 23-Jan-92  SAH   Added a comment explaining allocation of bits within Deskboot[2]CMOS
; 12-May-92  BC    Changed the meaning of MNS AutoConfig to AUN ROMBoot
; 26-May-92  DDV   Added 3rd party monitor type for James Bye
; 26-Jun-92  DDV   Added new bit for Window Manager (shift toggle state)
; 13-Jul-92  PC    Allocate one byte (&37) for PEP Associates' serial mouse driver
; 28-Jul-92  RM    Added new bit for PFS port selection.
;

; SWI OS_Byte values for manipulating the CMOS RAM

ReadCMOS        * &A1   ; The OS_Byte call to read CMOS
WriteCMOS       * &A2   ; The OS_Byte call to write CMOS

; The actual allocations

NetStnCMOS      * &00   ; One byte
NetFSIDCMOS     * &01   ; Two bytes
NetPSIDCMOS     * &03   ; Two bytes
FileLangCMOS    * &05   ; One byte; All eight bits used for configured filing system number
FrugalCMOS      * &06   ; Two bytes
EDITCMOS        * &08   ; One byte
TelcomCMOS      * &09   ; One byte
MODETVCMOS      * &0A   ; One byte ; no longer used for configure mode
StartCMOS       * &0B   ; One byte
KeyDelCMOS      * &0C   ; One byte
KeyRepCMOS      * &0D   ; One byte
PigCMOS         * &0E   ; One byte
PSITCMOS        * &0F   ; One byte
DBTBCMOS        * &10   ; One byte
NetFilerCMOS    * &11   ; One byte
 ; Bit  0   = NetFiler FS list sorting mode
 ;        0 = sort by name
 ;        1 = sort by number
 ; Bit  1   = NetFS library type
 ;        0 = Use default library as returned by fileserver
 ;        1 = Use $.ArthurLib
 ; Bits 2,3 = NetFiler FS list display mode
 ;       00 = large icons
 ;       01 = small icons
 ;       10 = full info
 ;       11 = Reserved
Unplug10CMOS    * &12   ; 2 more bytes for unplugging main ROM modules
Unplug11CMOS    * &13
ExtnUnplug1CMOS * &14   ; and 2 for unplugging extension ROM modules
ExtnUnplug2CMOS * &15
WimpDoubleClickMoveLimitCMOS *  &16
WimpAutoSubMenuTimeCMOS      *  &17
TerritoryCMOS   * &18
PrinterBufferCMOS * &19 ; 1 byte to describe printer buffer size
                        ; in units of 4K (claimed out of RMA); 0 => use default
                        ; buffer (1K in usual area)
ADFSSpinDownCMOS * &1A  ; 1 byte to hold IDE disc autospindown delay
WimpMenuDragDelayCMOS * &1B ; Amount of time menus are inactive after auto submenu opeining. 
FileSwitchCMOS * &1C    ; 1 byte for FileSwitch options:
FileSwitchTruncateNamesCMOSBit * 1:SHL:0
DragASpriteCMOSBit             * 1:SHL:1
InteractiveCopyCMOSBit         * 1:SHL:2
WimpDitherDesktopCMOSBit       * 1:SHL:3
WimpShiftToggleCMOSBit         * 1:SHL:4
PFSCMOSBit                     * 1:SHL:5
SwitcherShutdownCMOSBits       * 3:SHL:6

 ; Bit  0 0 = Give error rather than truncate names
 ;        1 = truncate names rather than give error
 ;
 ; Bit  1 0 = Don't use DragASprite
 ;        1 = Use DragASprite
 ;
 ; Bit  2 0 = Use interactive file copy (Filer_Action)
 ;        1 = Don't use interactive file copy.
 ; 
 ; Bit  3 0 = Wimp won't use dither patterns on desktop
 ;        1 = Wimp will use dither patterns  
 ;
 ; Bit  4 0 = shift toggle works as in RISC OS 3.1 (toggle not to cover icon bar)
 ;        1 = shift toggle never obscures icon bar, unless shift depressed
 ;
 ; Bits 5 0 = Use parallel port
 ;        1 = Use serial port
 ; Bits 6-7 = state of last shutdown, 0=don't care, 1=failed, 2=due to power loss, 3 =undefined

UserCMOS        * &1E   ; Sixteen bytes for the user

FreeCMOS        * &2E   ; Third Party Software houses
                ^ FreeCMOS

AshdownCMOS     # 1     ; &2E     one byte for Ashdown software Ltd.
TermulatorCMOS  # 3     ; &2F-&31 three bytes for termulator
AlliedInterCMOS # 2     ; &32-&33 two bytes for Allied Interactive Ltd.
PlutArchCMOS    # 1     ; &34     one byte for Pluto via 1MHz bus (Lendac Data)
ArchwayCMOS     # 1     ; &35     one byte for Simtron's Archway DIY kit
RhiannonCMOS    # 1     ; &36     one byte for Rhiannon's Lisp
PEPAssocCMOS    # 1     ; &37     one byte for PEP Associates' serial mouse driver

 [ @ > &50
 ! 1,"Third party CMOS allocation overflowed"
 ]

                 ^ &50  ; The next 32 bytes are allocated to RISCiX
RISCiXCMOS       # 1    ; Local checksum simple addition of bytes
                 # 1
; Bits 0..3   =>  Current format version number (8)
; Bits 4..7   =>  Number of bytes used in each of the following five records (5)
                 # 5*5  ; Five 40 bit records, record zero is for the
                        ; default console, records 1..4 are for ttyv0..3
; Bits 0..2   =>  Screen mode
; Bit  3      =>  Video polarity; 0=White on Black, 1=Black on White
; Bits 4..7   =>  Border level or pattern
; Bit  8      =>  Cursor; 0=Off, 1=On
; Bits 9..10  =>  Cursor blink speed; 0=Slow, 1=Fast, 2=Steady
; Bit  11     =>  Cursor type; 0=Block, 1=Line
; Bit  12     =>  Keyboard repeat; 0=Off, 1=On
; Bits 13..15 =>  Keyboard delay (in ms); 0=60, 1=100, 2=150, 3=200, 4=300,
;                 5=400, 6=600, 7=800
; Bits 16..19 =>  Keyboard repeat rate (in ms);0=10, 1=20, 2=30, 3=40, 4=50,
;                 5=75, 6=100, 7=150, 8=200, 9=300, 10=400, 11=500
; Bits 20..21 =>  Cursor keys mode; 0=VT220, 1=EMACS, 2=BBC, 3=BBC/EMACS
; Bits 22..23 =>  Left arrow key action (Normal/Shift); 0=BS/BS, 1=BS/DEL
;                 2=DEL/DEL, 3=DEL/BS
; Bit  24     =>  Auto wrap mode; 0=Off, 1=On
; Bit  25     =>  Backspace wrap mode; 0=Off, 1=On
; Bits 26..28 =>  Bell character sound level; 0=Off, 1=Faint, 2=Quiet,
;                 3=Medium, 4=Loud 
; Bits 29..31 =>  Bell time (in ms); 0=40, 1=70, 2=100, 3=150, 4=200, 5=300
; Bit  32     =>  Font type; 0=Basic, 1=Fine
; Bits 33..34 =>  Screen blanking control; 0=Off, 1=1min, 2=3min, 3=10min
; Bits 35..39 =>  Reserved


                 ^ &70
PoduleCMOS       # 4*4  ; &70 Four bytes to each of four podules
YearCMOS         # 2    ; &80 Two bytes of year info (HEX)
MonthCMOS        # 1    ; &82 The last month we were in (HEX)
LeapCMOS         # 1    ; &83 we've-had-the-29th-of-feb-this-year-already flag
TutuCMOS         # 1    ; &84
 ; Bits 1,0 = Control character print control (examples using ASCII 13)
 ;       00 = Print in GSTrans format: |M (as on Master)
 ;       01 = Print '.'
 ;       10 = Print decimal: <13>
 ;       11 = Print hex: <&0D>
 ; Bit  2   = Treat tbs characters as valid, else as control characters
 ; Bit  3   = AND character with &7F in *Dump
 ; Bit  4   = Treat TAB as print 8 spaces (not implemented)
 ; Bit  5   = Tube podule enable
 ; Bits 6,7 = Tube podule slot (0..3)
VduCMOS         # 1    ; &85
SyncBits        *       &81     ; bits 0 and 7 for sync type
Sync_Separate   *       &00
Sync_Composite  *       &01
Sync_Reserved   *       &80
Sync_Auto       *       &81

; Bit 1 used to be bit 4 of configured Mode, but no longer used now Configure Mode = Configure WimpMode
MonitorTypeBits *       &7C     ; bits 2..6 for monitor type
                        ;               0 => normal
                        ;               1 => multisync
                        ;               2 => hi res mono
                        ;               3 => VGA
                        ;               4 => Super VGA
                        ;               5 => LCD
                        ;               6 => 3rd party use
                        ;              31 => AUTO
MonitorTypeShift * 2
MonitorType0 * &00
MonitorType1 * &04
MonitorType2 * &08
MonitorType3 * &0C
MonitorType4 * &10
MonitorType5 * &14
MonitorType6 * &18
MonitorType7 * &1C
MonitorType8 * &20
MonitorType9 * &24
MonitorTypeA * &28
MonitorTypeB * &2C
MonitorTypeC * &30
MonitorTypeD * &34
MonitorTypeE * &38
MonitorTypeF * &3C
MonitorTypeAuto * &7C
SyncAutoBit  * &80
FontCMOS         # 1    ; &86 units of 4K
NewADFSCMOS      # 3    ; &87 Three bytes (consult Nick)
CDROMFSCMOS      # 1    ; &8A Next Technology

TimeZoneCMOS     # 1    ; &8B
 ; Indicates the offset from UTC/GMT to the current time zone
 ; The byte is interpreted as a signed twos complement number
 ; this is treated as the number of 15 minutes increments.
 ; E.g. for the UK during winter the value is zero and in the summer
 ; the value is still zero because Summertime is held elsewhere.
 ; In Australia for the eastern states (QLD, NSW, VIC, and TAS) the
 ; value required is +10 hours giving &28, for the central states
 ; (NT and SA) it will be +9.5 hours giving &26, and for WA it is &20.
 ; In the U.S.A. The four zones (Eastern, Central, Mountain, and
 ; Pacific) have the following values; -5 hours, -6 hours, -7 hours,
 ; and -8 hours giving values &EC, &E8, &E4, and &E0 respectively
 ; 
Printer2CMOS     # 1    ; &8C PrinterDP specific state

 ; Bit 0       Print line feeds    0 = don't print, 1 = print line feeds
 ; Bits 1-2    Strip control       0 = monochrome, 1 = grey level, 2 = colour
 ; Bit 3       Paper feed          0 = auto feed, 1 = manual feed
 ; Bit 4       Print quality       0 = draft, 1 = NLQ
 ; Bits 5-6    Halftone type       0 = Small, 1 = Large, 2 = Dithered
 ; Bit 7       Reserved

 ; Note: With Monochrome selected, Dithered is not allowed. With Colour
 ;       selected, Large Halftones are not allowed. This is in addition to
 ;       various printers not being able to support Colour and/or NLQ.

Printer3CMOS     # 1    ; &8D PrinterDP specific state

 ; This entire byte is used to record which printer number within the PrData file is
 ; selected (eg. Epson FX80 120x72, Integrex Colourjet 132 160x126 etc.). Currently
 ; (4-Mar-91) there are 98 printers in the PrData file, and this number is likely to
 ; increase. So unless there is a change of policy, the entire of this byte is in use.

 ; The actual meaning of any given value in this byte only has meaning with reference
 ; to a particular PrData file. If the file changes, then the meanings of the numbers
 ; changes as well. All software must refer to the PrData file to show a string name
 ; for the value in this byte. If the PrData file is not read, then only a number should
 ; be shown. This is likely to affect !Configure.

; Other existing CMOS RAM settings read/set by PrinterDP.
; -------------------------------------------------------

 ; Serial baud rate        (byte 15 bits 2-4)
 ; Printer destination     (byte 15 bits 5-7)
 ; Serial data format      (byte 16 bits 5-7)
 ; Econet printer server   (bytes 3-4 and 153-157)

 ; Note: The ignore character setting and Ignore/NoIgnore state setting are
 ;       not used by PrinterDP. Their purpose is served by the Print Line
 ;       Feeds bit.

TwinCMOS         # 1    ; &8E
ScreenSizeCMOS   # 1    ; &8F units of PageSize
RAMDiscCMOS      # 1    ; &90 units of PageSize
SysHeapCMOS      # 1    ; &91 units of PageSize to add after initialisation
RMASizeCMOS      # 1    ; &92 units of PageSize to add after initialisation
SpriteSizeCMOS   # 1    ; &93 units of PageSize
SoundCMOS        # 1    ; &94
 ; Bits 0..3 = channel 0 default voice (0..15 in CMOS -> voice number 1..16)
 ; Bits 4..6 = loudness (0..7 -> &01, &13, &25, &37, &49, &5B, &6D, &7F)
 ; Bit  7    = loudspeaker enable
ABE              # 4    ; &95 4 Bytes for the BASIC Editor.
PSNameCMOS       # 5    ; &99 5 bytes for 6 char name, one byte in NetPSId + 1
FSNameCMOS       # 15   ; &9E 15 bytes for 16 char name, 1 byte in NetFSId + 1
MosROMFrugalCMOS # 4    ; &AD 32 bits for 32 modules in the system ROM
PoduleFrugalCMOS # 4    ; &B1 4 * 8 bits for modules in podules
WildCardCMOS     # 4    ; &B5 4 bytes of configured wildcard spec.
LanguageCMOS     # 1    ; &B9 1 byte configured language
CountryCMOS      # 1    ; &BA Configured country
VFSCMOS          # 1    ; &BB
Misc1CMOS        # 1    ; &BC
 ; Bits 0-1 => ROMFS Opt4 state
 ; Bit  2   => Cache icon enable state
 ; Bits 3-5 => Screen blank time, 0=>None, 1=>30sec, 2=>1, 3=>2, 4=>5, 5=>10, 6=>15, 7=>30
 ; Bit  6   => Should screen blanking ignore Wrch, 0=>Ignore Wrch, 1=>Wrch un-blanks
 ; Bit  7   => Hardware test disable, 1=>Disable long tests at power up
WinniSizeCMOS    # 4    ; &BD
ProtectionCMOS   # 1    ; &C1 ; Protection state
 ; Bit 0 => &81 Peek
 ; Bit 1 => &82 Poke
 ; Bit 2 => &83 JSR
 ; Bit 3 => &84 User RPC
 ; Bit 4 => &85 OS RPC
 ; Bit 5 => &86 Halt
 ; Note the two missing operations are not able to be protected against
 ; Bit 6 => &89 GetRegs
 ; Bit 7 => &8A ???
MouseStepCMOS   # 1     ; &C2 ; Mouse multiplier, signed 8 bit value
                        ; (but both 0 and 1 mean 1)
SystemSpeedCMOS # 1     ; &C3 ; Various bits which used to be used for RAM/ROM speed etc.
Mode2CMOS * SystemSpeedCMOS
 ; Bit  0    Acorn Universal Network ROMBoot (0=>disabled, 1=>enabled)
 ; Bit  1    Reserved
CMOSResetBit * &04
 ; Bit  2    Set if last reset was a CMOS reset (delete/copy/R/T power-on)
PowerSaveBit * &08
 ; Bit  3    Power-saving (0 => disabled, 1 => enabled, ie reduce speed when idle)
WimpModeAutoBit * &10
 ; Bit  4    Mode/WimpMode Auto bit (0=>use WimpModeCMOS, 1=>auto)
 ; Bit  5    Cache enable for ARM3 (0=>enable, 1=>disable)
 ; Bit  6    Broadcast loading (0=>enable, 1=>disable)
 ; Bit  7    Broadcast loader colours the hourglass (0=>disable, 1=>enable)
WimpModeCMOS    # 1     ; &C4 ; initial Wimp mode on entry
WimpFlagsCMOS   # 1     ; &C5 ; global Wimp flags (for dragging etc.)
DesktopCMOS     # 1     ; &C6 ; some state for Desktop Utils
 ; Bits 0,1 = display mode (Filer)
 ;       00 = large icons
 ;       01 = small icons
 ;       10 = full info
 ;       11 = Reserved
 ; Bits 2,3 = sorting mode (Filer)
 ;       00 = sort by name
 ;       01 = sort by type
 ;       10 = sort by size
 ;       11 = sort by date
 ; Bit  4   = Force option (Filer)
 ;        0 = don't override locked bit
 ;        1 = override locked bit
 ; Bit  5   = confirm option (Filer)
 ;        0 = no confirm
 ;        1 = confirm
 ; Bit  6   = verbose option (Filer)
 ;        0 = no verbose
 ;        1 = verbose
 ; Bit 7    = Newer option (Filer)
 ;        0 = When looking, just look
 ;        1 = When looking, look newer
ADFSDirCacheCMOS        # 1     ; &C7 0=>default
FontMaxCMOS             # 1     ; &C8
FontMax1CMOS            # 1     ; &C9
FontMax2CMOS            # 1     ; &CA
FontMax3CMOS            # 1     ; &CB
FontMax4CMOS            # 1     ; &CC
FontMax5CMOS            # 1     ; &CD
FontMax6CMOS            # 1     ; &CE
FontMax7CMOS            # 1     ; &CF
ScsiFsCMOS              # 7     ; &D0-&D6
DeskbootCMOS            # 1     ; &D7       (for auto-booting ROM applications)
Deskboot2CMOS           # 1     ; &D8       (for auto-booting ROM applications)
 ; Bits within DeskbootCMOS and Deskboot2CMOS are allocated thus:-
 ; Bit: 0=Alarm, 1=Calc, 2=Chars, 3=Configure, 4=Draw, 5=Edit, 6=Help, 7=Paint, 8=BatMan
Unplug7CMOS             # 1     ; &D9       another 3 bytes for unplugging ROM modules
Unplug8CMOS             # 1     ; &DA
Unplug9CMOS             # 1     ; &DB
AlarmAndTimeCMOS        # 1     ; &DC
 ; Bits 0-2 = Format state
 ;      000 = illegal - used to check for first running of !Alarm
 ;      001 = Analogue with seconds
 ;      010 = Analogue without seconds
 ;      011 = HH:MM
 ;      100 = Format = "%24:%mi:%se"
 ;      101 = Format = "%z12:%mi:%se %am. %zdy/%zmn/%yr"
 ;      110 = Reserved
 ;      111 = Reserved
 ; Bit 3    = Deletion flag (1=Confirm, 0=No confirmation needed)
 ; Bit 4    = Auto save flag (1=Enabled, 0=Disabled)
 ; Bit 5    = 5 day week flag (1=Enabled, 0=Disabled)
 ; Bit 6    = Alarm noise flag (1=Silent, 0=Beep)
 ; Bit 7    = Daylight Saving Time flag (1=DST, 0=Normal time)
DSTCMOSBit              *       1:SHL:7
WimpDragTimeCMOS        # 1     ; &DD
WimpDragMoveLimitCMOS   # 1     ; &DE
WimpDoubleClickTimeCMOS # 1     ; &DF


 ASSERT @ <= &E0

                 ^ &E0  ; The next 15 bytes are allocated to RISCiX booting
RISCiXBoot       # 1
; Bits 0..2  =>  Reserved
; Bits 3..5  =>  System type to boot;
;                0=Does not boot RISCiX,
;                1=Immediate boot to maintenance mode (single user),
;                2=Immediate boot to multi user (standard),
;                3=Immediate boot to maintenance mode (single user),
;                4=Immediate boot to multi user (standard),
;                5=Immediate boot to maintenance mode (single user),
;                6=Immediate boot to multi user (standard),
;                7=Immediate boot to maintenance mode (single user).
; Bit  6     =>  Status flag set by RISCiX boot if the RISCiX bootstrap failed
;                (ie. if the Kernel doesn't get to a login prompt)
;
;                Note that bits 3, 4, and 6 are cleared when the kernel reaches
;                the login prompt.
; Bit  7     =>  Must be zero
RISCiXBootDevice # 3 ; Device, an ASCII string [a..z][a..z][0..9]
RISCiXBootUnit   # 1 ; Unit (drive) number 0..63
RISCiXBootPart   # 1 ; Partition number 0..7
RISCiXBootEther  # 1 ; Dickless boot flag/suffix

 ASSERT @ <= &EF
CheckSumCMOS    * &EF ; One byte for CMOS RAM checksum
CMOSxseed       * &01 ; initial value for checksum

; Note that CMOS RAM ends at F0 where the clock starts

        OPT     OldOpt
        END
