GetAll 28.9 KB
Newer Older
Neil Turton's avatar
Neil Turton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
; Copyright 1996 Acorn Computers Ltd
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; > GetAll

        GET     Hdr:ListOpts
        GET     Hdr:Macros
        GET     Hdr:System
        GET     Hdr:Machine.<Machine>
        GET     Hdr:ImageSize.<ImageSize>
        $GetCPU
        $GetIO
        $GetMEMC
        $GetMEMM
        $GetVIDC

Neil Turton's avatar
Neil Turton committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
; amg 7/12/96 Renaissance
; Forcibly ensure that options only intended for one class of platform
; stay there. Generally this involves combining switches with the STB
; switch. The exception is processor architectural stuff. 7500FE is
; included always, and StrongARM has an independed switch.
;
; When you want to migrate features from one platform to another you'll
; find that every occurence of feature switches has been qualified with
; the appropriate sense of the STB switch. This is to remind you to think
; about what you're about to do! Check whether the code actually will work
; at all on something that is or is not a STB class product.
;
; Using the STB switch this aggressively also help ensure that there's
; no unexpected code crossover in the initial merge.

;whether compiling to run on (Risc PC) emulator
                GBLL    RunningOnEmul
45
RunningOnEmul   SETL    {FALSE} :LAND::LNOT: STB
Neil Turton's avatar
Neil Turton committed
46

Neil Turton's avatar
Neil Turton committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; now the conditional flags for the version we want
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

; TMD 29-Apr-93: Fix1 conditioning removed for simplicity of code - always true

     [ {TRUE}
     ! 0, "Fix1: interrupts re-enabled in ChangeDynamicArea"
     ]

     GBLL Fix2
Fix2 SETL {TRUE}
     [ Fix2
     ! 0, "Fix2: TMD optimisations of heap manager"
     ]

     GBLL Fix3
Fix3 SETL {TRUE}
     [ Fix3
     ! 0, "Fix3: ExtendHeap stack balanced"
     ]

     GBLL Fix4
Fix4 SETL {TRUE}
     [ Fix4
     ! 0, "Fix4: ExtendBlock IRQ latency improved"
     ]

     GBLL Fix5
Fix5 SETL {TRUE}
     [ Fix5
     ! 0, "Fix5: SpriteOp made re-entrant"
     ]

     GBLL Fix6
Fix6 SETL {TRUE}
     [ Fix6
     ! 0, "Fix6: OS_Byte &87 restores caller's IRQ state"
     ]

     GBLL Fix7
Fix7 SETL {TRUE}
     [ Fix7
     ! 0, "Fix7: OS_Word &0E,0 enables IRQs"
     ]

     GBLL Fix8
Fix8 SETL {TRUE}
     [ Fix8
     ! 0, "Fix8: OS_Word &15,0 enables IRQs"
     ]

     GBLL Fix9
Fix9 SETL {TRUE}
     [ Fix9
     ! 0, "Fix9: Incarnation names not terminated by 1st character"
     ]

     GBLL Fix10
Fix10 SETL {TRUE}
     [ Fix10
     ! 0, "Fix10: *Unplug terminated by address bug fixed"
     ]

     GBLL Fix11
Fix11 SETL {TRUE}
     [ Fix11
     ! 0, "Fix11: Podule IRQ despatcher doesn't corrupt R0"
     ]

     GBLL Fix12
Fix12 SETL {TRUE}
     [ Fix12
     ! 0, "Fix12: Rename incarnation fixed"
     ]

; TMD 04-Sep-89: Fix bug in prefer incarnation - corrupted error pointer if
; module or incarnation didn't exist

     GBLL Fix13
Fix13 SETL {TRUE}
     [ Fix13
     ! 0, "Fix13: Prefer incarnation fixed"
     ]

; TMD 06-Sep-89: Fix bug in CallAfter/Every - the error pointer was corrupted
; (errors caused by supplying non-positive time interval, or by being unable to
; claim a node from the system heap)

     GBLL Fix14
Fix14 SETL {TRUE}
     [ Fix14
     ! 0, "Fix14: CallAfter/Every error pointer not corrupted"
     ]

; TMD 11-Sep-89: Fix bug in AddCallBack - freed wrong heap node when chaining
; down the vector

     GBLL Fix15
Fix15 SETL {TRUE}
     [ Fix15
     ! 0, "Fix15: AddCallBack frees correct heap node"
     ]

; TMD 25-Sep-89: Fix bug in GSRead quoted termination - started skipping spaces
; from the wrong character, and didn't adjust for post increment after loading
; first non-space.

     GBLL Fix16
Fix16 SETL {TRUE}
     [ Fix16
     ! 0, "Fix16: GSRead quoted termination fixed"
     ]

; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; essential global variables
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                GET   Version
                GBLS  VersionNo
Kevin Bracey's avatar
Kevin Bracey committed
167
                [ Module_MinorVersion = ""
Neil Turton's avatar
Neil Turton committed
168
VersionNo       SETS  "$VString ($Date)"
Neil Turton's avatar
Neil Turton committed
169
                |
Kevin Bracey's avatar
Kevin Bracey committed
170
VersionNo       SETS  "$VString ($Date) $Module_MinorVersion"
Neil Turton's avatar
Neil Turton committed
171
                ]
Neil Turton's avatar
Neil Turton committed
172

Kevin Bracey's avatar
Kevin Bracey committed
173 174
; SystemName moved to Machine.* header files.

Neil Turton's avatar
Neil Turton committed
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
                GBLS  MosTitle
MosTitle        SETS  "$SystemName $VersionNo"

                GBLL  AddTubeBashers
AddTubeBashers  SETL  {FALSE}

Tube_Normal     *       1
Tube_Simulator  *       2

                GBLA    TubeType
TubeType        SETA    Tube_Simulator

UserMemStart    * &8000

                GBLL  ExceptionsAreErrors
ExceptionsAreErrors SETL  1=1

AssemblingArthur SETL  {TRUE}
; defined in hdr.system to allow conditionals in macros

                GBLL    DoingVdu
DoingVdu        SETL    {FALSE}         ; so can get KeyWS!
                GBLL    Module
Module          SETL    {FALSE}

                GBLL    IncludeTestSrc  ; whether test code is included
201
                ! 0, "Modified code"
Neil Turton's avatar
Neil Turton committed
202
 [ MorrisSupport
203
IncludeTestSrc  SETL    {TRUE}
Neil Turton's avatar
Neil Turton committed
204 205
 |
IncludeTestSrc  SETL    :LNOT: (MEMM_Type = "MEMC2") ; not on internal test versions
Neil Turton's avatar
Neil Turton committed
206 207 208 209
 ]

 [ RunningOnEmul
IncludeTestSrc  SETL    {FALSE} :LAND: :LNOT: STB
Neil Turton's avatar
Neil Turton committed
210 211
 ]

212 213 214 215 216 217
;RISC OS 3.71 onwards assumed bus timings - if true, then ROM speeds atc are assumed according to IOMD ID regs. as follows:
;     if IOMD (Risc PC)     ROM ticks 5-3 (assumed bus 32 MHz)
;     if 7500 (A7000)       ROM ticks 5-3 (assumed bus 32 MHz), all clocks divide-by-1
;     if 7500FE (A7000+)    ROM ticks 5-3,half speed (asssumed bus 64 MHz), EDO memory, divide-by-2 I/O, divide-by-1 CPU and memory
;
                GBLL    RO371Timings
Kevin Bracey's avatar
Kevin Bracey committed
218
RO371Timings    SETL    :LNOT: STB
219

220 221 222
; For development on Customer M hardware only
                GBLL    ParallelFlashUpgrade
ParallelFlashUpgrade SETL {FALSE}
223 224 225

  [ :LNOT: RO371Timings

Neil Turton's avatar
Neil Turton committed
226
                GBLL    NormalSpeedROMS
Neil Turton's avatar
Neil Turton committed
227 228 229 230 231 232 233 234
 [ STB
NormalSpeedROMS SETL    {TRUE}           ;use FALSE for slow EPROMS
 |
NormalSpeedROMS SETL    {FALSE}          ;use FALSE for slow EPROMS
 ]

                GBLL    AutoSpeedROMS
AutoSpeedROMS   SETL    {TRUE} :LAND: :LNOT: STB
Neil Turton's avatar
Neil Turton committed
235 236 237 238 239 240 241

                GBLL    RISCPCBurstMode
RISCPCBurstMode SETL    {FALSE}
;>>>RCM says if the FRM approves the use of burst mode ROMS for
;>>>RISC PC (no reason why it shouldn't) all references to RISCPCBurstMode
;>>>could be replaced by NormalSpeedROMS

242 243
  ] ; :LNOT:RO371Timings

244 245
                GBLL    DoInitialiseMode
DoInitialiseMode SETL   {TRUE} :LAND: STB
Neil Turton's avatar
Neil Turton committed
246 247

 [ STB
248 249
                GBLL    Select16BitSound        ; STBs and pre-IOMD systems don't have this link
Select16BitSound SETL   {FALSE}
Neil Turton's avatar
Neil Turton committed
250
 |
Neil Turton's avatar
Neil Turton committed
251 252
                GBLL    Select16BitSound
Select16BitSound SETL   {TRUE}
Neil Turton's avatar
Neil Turton committed
253
 ]
254 255
                GBLL    Japanese16BitSound
Japanese16BitSound SETL {TRUE} :LAND: STB
Neil Turton's avatar
Neil Turton committed
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298

                GBLL    Simulator               ; running on simulator?
Simulator       SETL    {FALSE}

                  GBLL   ChopOffTheGoolies
ChopOffTheGoolies SETL  {FALSE}

                GBLL   ChecksumCMOS
ChecksumCMOS    SETL  {TRUE}

                GBLL    ResetIndirected ; new flag to say if instruction at start of ROM does LDR PC, [PC, #x]
ResetIndirected SETL    {TRUE}

                GBLL    SqueezeMods     ; whether squeezed modules are allowed
SqueezeMods     SETL    {TRUE}

                GBLL    DriversInKernel ; whether serial/parallel drivers are in the kernel
DriversInKernel SETL    {FALSE}

                GBLL    International   ; whether text and error messages come from  messaeges file.
International   SETL    {TRUE}

                GBLL    MouseBufferManager      ; Whether mouse uses buffer manager
MouseBufferManager      SETL    {TRUE}

                GBLL    IrqsInClaimRelease      ; Whether OS_Claim/Release restore IRQ's before releasing heap node
IrqsInClaimRelease      SETL  {TRUE}

                GBLL    TickIrqReenter          ; Whether TickEventChain processing re-enables IRQ's
TickIrqReenter  SETL    {TRUE}

                GBLL    SoftResets              ; If false, always force a hard reset
SoftResets      SETL    {FALSE}

                GBLL    AlwaysClearRAM          ; If true, clear RAM on every break/reset
AlwaysClearRAM  SETL    {TRUE}

                GBLL    CacheCMOSRAM            ; Whether to keep a RAM copy of CMOS RAM for faster access
CacheCMOSRAM    SETL    MEMM_Type = "ARM600"    ; (Space only allocated on ARM600 versions)

                GBLL    GammaCorrection
GammaCorrection SETL    (VIDC_Type = "VIDC20") :LAND: {TRUE}

Neil Turton's avatar
Neil Turton committed
299 300 301
                GBLL    LCDInvert
LCDInvert       SETL    (VIDC_Type = "VIDC20") :LAND: {TRUE} :LAND: :LNOT: STB

Neil Turton's avatar
Neil Turton committed
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
                GBLL    VIDCListType3
VIDCListType3   SETL    (VIDC_Type = "VIDC20") :LAND: {TRUE}

                GBLL    ExpandedCamMap          ; two words per entry instead of one
ExpandedCamMap  SETL    MEMM_Type = "ARM600"    ; NB ARM600 code assumes expanded map

                GBLL    UseFreePool             ; whether OS_ChangeDynamicArea puts and gets memory to and from free pool
UseFreePool     SETL    MEMM_Type = "ARM600" :LAND: {TRUE}

                GBLL    NewCDA                  ; new change dynamic area code
NewCDA          SETL    MEMM_Type = "ARM600" :LAND: {TRUE}    ; let's give it a try!

                GBLL    ModeSelectors           ; whether mode selectors are understood
ModeSelectors   SETL    (VIDC_Type = "VIDC20") :LAND: {TRUE}

                GBLL    MakeModeSelectorsForModeNumbers
MakeModeSelectorsForModeNumbers SETL    ModeSelectors :LAND: {FALSE}    ; not actually needed after all

                GBLL    IgnoreVRAM              ; if true, don't add VRAM to the RAM list (+ don't use for screen)
IgnoreVRAM      SETL    {FALSE}

                GBLL    LateAborts              ; if true, use late abort mode on ARM600 (compulsory on ARM700)
LateAborts      SETL    MEMM_Type = "ARM600" :LAND: {TRUE}

326 327
                GBLL    ShrinkableDAs           ; if true, support Shrinkable Dynamic Areas (eg. CacheFS)
ShrinkableDAs   SETL    {TRUE}
Neil Turton's avatar
Neil Turton committed
328

329 330 331 332 333 334 335 336 337
                GBLL    Interruptible32bitModes
Interruptible32bitModes SETL {TRUE}             ;if true, limited 32-bit mode code support (interrupt handler does not assume
                                                ; 26-bit foreground), also allows faster, 32-bit APCS version of FPEmulator

                GBLL    OnlyKernelCanAccessHardwareVectors
OnlyKernelCanAccessHardwareVectors SETL {TRUE}  ; if true, only the Kernel is permitted to write to the hardware vectors
                                                ; while in 26-bit mode. If false, the whole ROM can (including BASIC
                                                ; and the Shared C Library - eg any memcpy!)

Neil Turton's avatar
Neil Turton committed
338 339 340
                GBLL    StrongARM
                GBLL    SAWBbroken              ;whether StrongARM Write Buffer is broken (pass 1 silicon only)
                GBLL    SAcleanflushbroken      ;whether StrongARM single MCR for DC clean+flush broken (is always for SA110)
341 342 343 344 345 346 347 348 349
                GBLL    SASTMhatbroken          ;whether ROM must support SA110's with broken STM^ (revision 3 should fix this)
                GBLL    StrongARM_POST          ;whether to run POST for StrongARM (and possibly ARM8)

                GBLL    ARM810support           ;StrongARM must also be true for this to be useful
                GBLL    ARM810bpbroken          ;whether branch predict is broken
                GBLL    ARM810cleanflushbroken  ;whether single MCR for IDC clean+flush broken (a la StrongARM!)
                GBLL    ARM810fastclock         ;whether to attempt to use fast clock (false means bus clock)
                GBLL    ARM810usePLL            ;whether to use PLL for fast clock (else RefClk pin)
                GBLL    ARM810_POST             ;whether to run POST for ARM810 (StrongARM_POST must also be true)
Neil Turton's avatar
Neil Turton committed
350 351 352 353

StrongARM          SETL {TRUE}
SAWBbroken         SETL {FALSE} :LAND: StrongARM
SAcleanflushbroken SETL {TRUE}  :LAND: StrongARM
354 355 356 357 358 359 360 361 362 363
SASTMhatbroken         SETL {TRUE}  :LAND: StrongARM
StrongARM_POST         SETL {TRUE}  :LAND: StrongARM

ARM810support          SETL {FALSE} :LAND: StrongARM
ARM810bpbroken         SETL {TRUE}  :LAND: ARM810support
ARM810cleanflushbroken SETL {TRUE}  :LAND: ARM810support
ARM810fastclock        SETL {FALSE} :LAND: ARM810support
ARM810usePLL           SETL {TRUE}  :LAND: ARM810fastclock
ARM810_POST            SETL {FALSE} :LAND: ARM810support

364 365 366 367 368
                ;mjs
                ;Chocolate flavours implemented for Ursula, but they are generally useful performance enhancements
                ;(not all Ursula performance improvements are flagged with Chocolate - eg. simple changes such as slicker SWI
                ;despatch and wider SWI hashing)
                ;
369 370 371
                ;any ARM
                GBLL    ChocolateSysHeap        ;whether to save cost of SysHeap block claim/release for common cases (eg. callback blocks)
                                                ;also reduces SysHeap stress by using fewer blocks in total
372
                GBLL    ChocolateOSMod          ;whether to reduce SysHeap stress in module handling
373 374
                GBLL    ChocolateSysVars        ;whether to do performance improvements in system variable handling
                GBLL    ChocolateOscli          ;whether to do performance improvements in Oscli command stuff
375 376 377
                GBLL    ChocolateService        ;whether to implement fast module service call distribution (uses table introduced
                                                ;into module format by Ursula API

378
ChocolateSysHeap       SETL {TRUE}
379
ChocolateOSMod         SETL {TRUE}
380 381
ChocolateSysVars       SETL {TRUE}
ChocolateOscli         SETL {TRUE}
382
ChocolateService       SETL {TRUE}
383 384 385 386 387 388 389 390 391 392 393 394 395 396
  [ ChocolateSysHeap
                       GBLA  MaxChocolateCBBlocks  ;max quick CallBack blocks available at any one time (else ordinary heap nodes used)
                       GBLA  MaxChocolateSVBlocks  ;max quick Software Vector blocks available at any one time (else ordinary heap nodes used)
                       GBLA  MaxChocolateTKBlocks  ;max quick Ticker blocks available at any one time (else ordinary heap nodes used)
                       GBLA  MaxChocolateMRBlocks  ;max module ROM blocks before ordinary heap nodes are used (reduces total no. nodes in SysHeap)
                       GBLA  MaxChocolateMABlocks  ;max module Active blocks before ordinary heap nodes are used
                       GBLA  MaxChocolateMSBlocks  ;max module SWI Hash blocks before ordinary heap nodes are used
MaxChocolateCBBlocks   SETA   32
MaxChocolateSVBlocks   SETA  128
MaxChocolateTKBlocks   SETA   32
MaxChocolateMRBlocks   SETA  150
MaxChocolateMABlocks   SETA  150
MaxChocolateMSBlocks   SETA  150
  ]
397 398


399 400 401 402
                GBLL    VCOstartfix              ;code in early kernel to fix VCO start problem on A7000 (esp. 7500FE)
VCOstartfix     SETL    {TRUE}


403 404 405 406 407 408
                     GBLL    mjsServiceTrace          ;for statistics gathering on service calls only
mjsServiceTrace      SETL    {FALSE}
                     GBLL    mjsSysHeapNodesTrace     ;for statistics gathering on some SysHeap nodes only
mjsSysHeapNodesTrace SETL    {FALSE}


Neil Turton's avatar
Neil Turton committed
409 410 411 412 413 414 415
 [ StrongARM
 ! 0," ______________________________________________________"
 ! 0,"|                                                      |"
 ! 0,"| Building a StrongARM capable kernel for this machine |"
 ! 0,"|______________________________________________________|"
 ]

Neil Turton's avatar
Neil Turton committed
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
                GBLL    CheckProtectionLink     ; if true, disallow CMOS RAM changes if link in protected position
CheckProtectionLink SETL (IO_Type = "IOMD") :LAND: {TRUE}       ; NB affects Delete/Copy/R/T and 0-9/.

                GBLL    RMTidyDoesNowt          ; if true, RMTidy does nothing
RMTidyDoesNowt  SETL    (MEMC_Type = "IOMD") :LAND: {TRUE} ; should really be "machine has FSLock in ROM"

                GBLL    RogerEXEY               ; if true, use Roger's new algorithm for XEigFactor, YEigFactor
RogerEXEY       SETL    {FALSE}                 ; Marketing don't like it!

                GBLL    DAF_SpecifyBit          ; enable use of dynamic area flag which says an area may need specific pages
DAF_SpecifyBit  SETL    {TRUE}

                GBLL    DebugROMInit
DebugROMInit    SETL    (MEMC_Type = "IOMD") :LAND: {FALSE}

                GBLL    DebugROMErrors
DebugROMErrors  SETL    (MEMC_Type = "IOMD") :LAND: {FALSE}

                GBLL    DebugHeaps              ; initialise claimed and freed blocks
DebugHeaps      SETL    {FALSE}                 ; (may slow things down unacceptably)

; ChangeDynamicArea and related options

        GBLL    DebugCDA
DebugCDA SETL {FALSE}

        GBLL    DebugCDA2
DebugCDA2 SETL {FALSE}

        GBLL    NewCDA2                 ; whether all the new CDA code is in there
NewCDA2 SETL NewCDA :LAND: {TRUE}

        GBLL    NewStyle_RMA            ; whether RMA is a new style area
NewStyle_RMA    SETL NewCDA :LAND: {TRUE}

        GBLL    NewStyle_SpriteArea     ; whether sprite area is a new style area
NewStyle_SpriteArea     SETL    NewCDA :LAND: {TRUE}

        GBLL    NewStyle_RAMDisc        ; whether RAM disc is a new style area
NewStyle_RAMDisc        SETL    NewCDA :LAND: {TRUE}

        GBLL    NewStyle_FontArea       ; whether font cache is a new style area
NewStyle_FontArea       SETL    NewCDA :LAND: {TRUE}

        GBLL    NewStyle_SysHeap        ; whether system heap is a new style area (node faked up)
NewStyle_SysHeap        SETL    NewCDA :LAND: {TRUE}

        GBLL    NewStyle_Screen         ; whether screen is a new style area
NewStyle_Screen         SETL    NewCDA :LAND: {TRUE}

        GBLL    NewStyle_All            ; whether all old-style areas have been converted to new-style
NewStyle_All    SETL    NewStyle_RMA :LAND: NewStyle_SpriteArea :LAND: NewStyle_RAMDisc :LAND: NewStyle_FontArea :LAND: NewStyle_SysHeap :LAND: NewStyle_Screen

                GBLL    StorkPowerSave  ;True => power saving for Stork AND A4
StorkPowerSave  SETL    MorrisSupport   ;False=> older A4 code only

Neil Turton's avatar
Neil Turton committed
472 473 474 475
                GBLL    LCDSupport      ;Whether LCD Support is assembled in or not
LCDSupport      SETL    {TRUE} :LAND: :LNOT: STB
                                        ;(First intro'd for Stork)

Neil Turton's avatar
Neil Turton committed
476 477 478
                GBLL    FixR9CorruptionInExtensionSWI   ; whether R9 corruption by ExtensionSWI handler is fixed
FixR9CorruptionInExtensionSWI   SETL    {FALSE}         ; currently FALSE as CC's !SpellMod (possibly others) rely on it being broken

479 480
                GBLL    InterlacedPointer
InterlacedPointer SETL {TRUE} :LAND: STB                ; enable code to do proper interlaced pointer
Neil Turton's avatar
Neil Turton committed
481

482 483
                GBLL    ValidateCMOS            ; Apply special CMOS-corruption detection code, and do minimal default settings.
ValidateCMOS    SETL    {TRUE} :LAND: STB
Neil Turton's avatar
Neil Turton committed
484

Neil Turton's avatar
Neil Turton committed
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536
              [ DebugHeaps
                ! 0, "*** WARNING *** Heap debugging assembled in"
              ]

                GBLS    GetMessages
              [ International
GetMessages     SETS    "GET s.MsgCode"
              |
GetMessages     SETS    ""
              ]

                GBLL    DebugForcedReset        ; debug forced hard resets
DebugForcedReset SETL   {FALSE}

                GBLA    ConfiguredLang
ConfiguredLang  SETA    10                      ; default configured language

                GBLA    FirstUnpluggableModule
FirstUnpluggableModule SETA 8                   ; Podule, FileSwitch, ResourceFS, Messages, MessageTrans,
                                                ; TerritoryManager, UKTerritory

 [ DebugForcedReset
Reset_CannotResetFlag           * 1
Reset_SysHeapCorrupt            * 2
Reset_WrongCamMapAddress        * 3
Reset_WrongNumberOfPages        * 4
Reset_CamMapCorrupt             * 5
Reset_VectorChainCorrupt        * 6
Reset_TickNodesCorrupt          * 7
Reset_DeviceVectorCorrupt       * 8
Reset_PoduleOrCallBackCorrupt   * 9
 ]

; Flags for RISC OS Blue changes
;
                        GBLL    AssembleA1KeyHandler
AssembleA1KeyHandler    SETL    {FALSE}
                        GBLL    AssembleKEYV
AssembleKEYV            SETL    {TRUE}          ; Use KEYV.
                        GBLL    AssemblePointerV
AssemblePointerV        SETL    {TRUE}          ; Use PointerV.
                        GBLL    PollMouse
PollMouse               SETL    {FALSE}         ; Poll mouse.

                        GBLL    ProcessorVectors
ProcessorVectors        SETL    {TRUE}          ; Processor vectors indirected through 0 page.

                    GBLS  GetUnsqueeze
 [ SqueezeMods
GetUnsqueeze        SETS  "GET s.Unsqueeze"
 |
GetUnsqueeze        SETS  ""
537 538 539 540 541 542
 ]
                    GBLS  GetFlashROM
 [ ParallelFlashUpgrade
GetFlashROM         SETS  "GET s.FlashROM"
 |
GetFlashROM         SETS  ""
Neil Turton's avatar
Neil Turton committed
543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586
 ]
                    GBLS  GetPublicWS
                    GBLS  GetWorkspace
                    GBLS  GetKernelMEMC
                    GBLS  GetPalette
                    GBLS  GetMemInfo
 [ MEMM_Type = "ARM600"
GetPublicWS         SETS  "GET Hdr:PublicWS"
GetWorkspace        SETS  "GET Hdr:KernelWS"
GetKernelMEMC       SETS  "GET s.ARM600"
GetMemInfo          SETS  "GET s.MemInfo"
 |
GetPublicWS         SETS  ""
GetWorkspace        SETS  "GET Hdr:Old.NewSpace"
  [ MEMM_Type = "MEMC2"
GetKernelMEMC       SETS  "GET s.MEMC2"
  |
GetKernelMEMC       SETS  "GET s.MEMC1"
  ]
GetMemInfo          SETS  ""
 ]

 [ VIDC_Type = "VIDC20"
GetPalette          SETS  "GET s.Vdu.VduPal20"
 |
GetPalette          SETS  "GET s.Vdu.VduPal10"
 ]


                    GBLS    GetRS423
 [ DriversInKernel
GetRS423            SETS  "GET s.PMF.rs423"
 |
GetRS423            SETS  ""
 ]

                    GBLS  GetKbdDrA1
 [ Keyboard_Type = "A1A500"
GetKbdDrA1          SETS  "GET s.PMF.KbdDrA1"
 |
GetKbdDrA1          SETS  ""
 ]

                    GBLS  GetKbdRes
587
 [ Keyboard_Type = "A1A500"
Neil Turton's avatar
Neil Turton committed
588
GetKbdRes           SETS  "GET s.KbdResA1"
589 590
 |
GetKbdRes           SETS  "GET s.KbdRes" :CC: Keyboard_Type
Neil Turton's avatar
Neil Turton committed
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
 ]

                    GBLS  GetKey2
 [ AssembleA1KeyHandler
GetKey2             SETS  "GET s.PMF.Key2"
 |
GetKey2             SETS  ""
 ]

; control switches for med_00001 (the flood fill routines 1024 line limit).
; Switches have the following effects:
;
; _userma     Will use rma if >48K is free, up to a maximum of 128K. It will
;             try to acheive the latter by growing the rma if possible.
; _twowords   Use two word entries in the queue. This overcomes the limitation
;             of the original packed word format.
; _debug      Store the queue start, end and 'amount to change the rma dynamic
;             area by' in the first three words of OldIRQ1VSpace

                    GBLL  med_00001_userma
                    GBLL  med_00001_twowords
                    GBLL  med_00001_debug

med_00001_userma    SETL  {TRUE}
med_00001_twowords  SETL  {TRUE}
;med_00001_debug     SETL  {TRUE}

;med_00001_userma    SETL  {FALSE}
;med_00001_twowords  SETL  {FALSE}
med_00001_debug     SETL  {FALSE}

 [ med_00001_userma
smallest_rma_size   * (48*1024)                  ; define the low threshold for rma use
largest_rma_size    * (128*1024)                 ; and the ceiling for rma use
 ]

 [ med_00001_debug
 ! 0,""
 ! 0,",-----------------------------------------------------------------,"
 ! 0,"| **** WARNING ****                                               |"
 ! 0,"|                                                                 |"
 ! 0,"| Audit trail debugging for MED-00001 is enabled. This reuses the |"
 ! 0,"| first three words of OldIRQ1Vspace. This should be turned off   |"
 ! 0,"| once MED-00001 has been tested and marked 'fixed'.              |"
 ! 0,"|                                                                 |"
 ! 0,"| Usage:                                                          |"
 ! 0,"|   +0   start of area used by flood fill                         |"
 ! 0,"|   +4   end+1 of area used by flood fill                         |"
 ! 0,"|   +8   amount the rma was grown by                              |"
 ! 0,"'-----------------------------------------------------------------'"
 ! 0,""
 ]

; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; now get the headers
; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

        GET     Hdr:CMOS
        GET     Hdr:Heap
        $GetPublicWS
        $GetWorkspace
        GET     Hdr:Services
        GET     Hdr:FSNumbers
        GET     Hdr:HighFSI
        GET     Hdr:NewErrors
        GET     Hdr:Proc
        GET     Hdr:Sprite
        GET     Hdr:KeyWS
        GET     Hdr:RS423
        GET     Hdr:ModHand
        GET     Hdr:Variables
        GET     Hdr:EnvNumbers
        GET     Hdr:UpCall
        GET     Hdr:Sound
        GET     Hdr:Pointer
        GET     Hdr:Podule
        GET     Hdr:VduExt
;        GET     Hdr:Fox
        GET     Hdr:Buffer
        GET     Hdr:Font
        GET     Hdr:DevNos
;        GET     Hdr:IOEB
        GET     Hdr:Territory
        GET     Hdr:Portable
        GET     Hdr:MsgTrans
        GET     Hdr:PaletteV
        GET     Hdr:Wimp
        GET     Hdr:ColourTran
        GET     Hdr:Debug
680
        GET	Hdr:nvram
681
        GET     Hdr:PortMan
Neil Turton's avatar
Neil Turton committed
682 683 684 685 686
        GET     s.PMF.DEF          ; Common with 6502 code in the keyboard
        Protocol

; now the main parts of the MOS

Neil Turton's avatar
Neil Turton committed
687 688
        GET     s.Copro15ops ; some macros

Neil Turton's avatar
Neil Turton committed
689
        GET     s.Kernel
690
        $GetFlashROM
Neil Turton's avatar
Neil Turton committed
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768
        GET     s.NewIRQs
        GET     s.Oscli
        GET     s.SysComms
        GET     s.HeapMan
        GET     s.ModHand
        $GetUnsqueeze
        GET     s.ArthurSWIs
        GET     s.ChangeDyn
        GET     s.Arthur2
        GET     s.Utility
        GET     s.MoreComms
        GET     s.Convrsions
        GET     s.MoreSWIs
        GET     s.ExtraSWIs
        GET     s.HeapSort
        GET     s.Arthur3
        GET     s.SWINaming
        GET     s.TickEvents
        $GetKbdRes
        GET     s.NewReset
        $GetMessages
        GET     s.Middle
        GET     s.Super1
        $GetKernelMEMC
        $GetMemInfo
        ! 0, "Main kernel size = &" :CC: :STR: (.-ROM)
StartOfVduDriver
        GET     s.vdu.VduDriver
        GET     s.vdu.VduSWIs
        GET     s.vdu.VduPalette
        $GetPalette
        GET     s.vdu.VduPlot
        GET     s.vdu.VduGrafA
        GET     s.vdu.VduGrafB
        GET     s.vdu.VduGrafC
        GET     s.vdu.VduGrafD
        GET     s.vdu.VduGrafE
        GET     s.vdu.VduGrafF
        GET     s.vdu.VduGrafG
        GET     s.vdu.VduGrafH
        GET     s.vdu.VduGrafI
        GET     s.vdu.VduGrafJ
        GET     s.vdu.VduGrafK
        GET     s.vdu.VduGrafL
        GET     s.vdu.VduWrch
        GET     s.vdu.Vdu23
        GET     s.vdu.VduPointer
        GET     s.vdu.Vdu5
        GET     s.vdu.VduCurSoft
        GET     s.vdu.VduTTX

        GBLS    GiveMeBfontAnyDay
        [ BleedinDaveBell
GiveMeBfontAnyDay SETS "GET s.vdu.VduFontL1"
        |
GiveMeBfontAnyDay SETS "GET s.vdu.VduFont"
        ]

        $GiveMeBfontAnyDay

        ! 0, "Vdu drivers size = &" :CC: :STR: (.-StartOfVduDriver)

StartOfPMF
        GET     s.PMF.osinit
        GET     s.PMF.oseven
        GET     s.PMF.osbyte
        GET     s.PMF.osword
        GET     s.PMF.realtime
        GET     s.PMF.convdate
        $GetRS423
        GET     s.PMF.i2cutils
        GET     s.PMF.oswrch
        GET     s.PMF.buffer
        $GetKbdDrA1
        GET     s.PMF.key
        $GetKey2
        GET     s.PMF.mouse
        ALIGN
Neil Turton's avatar
Neil Turton committed
769 770 771 772 773 774 775 776

StartOfAMB_beforealign
        ALIGN   4096                    ;align to 4k page boundary, for easy ROMpatch
StartOfAMB
        GET     s.AMBControl.AMB
        DCB     "GROT"                  ;spare words marker
        ALIGN   4096                    ;align to 4k page boundary, for easy ROMpatch

Neil Turton's avatar
Neil Turton committed
777 778 779
EndOfKernel
        &       0                       ; for patching by BigSplit et al

Neil Turton's avatar
Neil Turton committed
780 781 782
        ! 0, "PMF section size = &" :CC: :STR: (StartOfAMB_beforealign - StartOfPMF)
        ! 0, "AMB section (4k aligned) starts at ":CC::STR:(StartOfAMB)
        ! 0, "AMB section size (4k aligned) = &" :CC: :STR: (EndOfKernel - StartOfAMB)
Neil Turton's avatar
Neil Turton committed
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801

 [ med_00001_debug
 ! 0,""
 ! 0,",-----------------------------------------------------------------,"
 ! 0,"| **** WARNING ****                                               |"
 ! 0,"|                                                                 |"
 ! 0,"| Audit trail debugging for MED-00001 is enabled. This reuses the |"
 ! 0,"| first three words of OldIRQ1Vspace. This should be turned off   |"
 ! 0,"| once MED-00001 has been tested and marked 'fixed'.              |"
 ! 0,"|                                                                 |"
 ! 0,"| Usage:                                                          |"
 ! 0,"|   +0   start of area used by flood fill                         |"
 ! 0,"|   +4   end+1 of area used by flood fill                         |"
 ! 0,"|   +8   amount the rma was grown by                              |"
 ! 0,"'-----------------------------------------------------------------'"
 ! 0,""
 ]

        END