This directory contains an example !Territory application which was used on
the Risc PC to create a German OS.

There are some points to note about the !Territory application:

1) On a reset, at the end of ROM module initialisation the TerritoryManager
   reads the configured territory and determines whether a territory module
   which supports it is loaded. If the configured territory is not supported
   then the TerritoryManager looks for the following module on the
   configured filesystem and drive:

        &.!Territory.Territory

   If this module is found then the TerritoryManager RMLoads it. The
   TerrritoryManager also expects to find a directory called:

        &.!Territory.Messages

   This must exist but may be empty although any modules found in this
   directory will also be loaded by the TerritoryManager.

2) There must be some tidying up done after the TerritoryManager has loaded
   new modules (particularly a new Messages module). There will also
   inevitably be other actions which must be performed to load the new
   territory eg. loading new sprites. This means that after ROM
   initialisation the !Territory application must then be run as an
   application by the !Boot on the machine being localised.

3) The first thing which the !Territory.!Run file does is run
   !Territory.Utils.ConfigCMOS. This determines whether a power-on Delete
   (CMOS reset) has occured and reconfigures the CMOS for the new territory
   (as if the power-on Delete had done it).

4) The !Run file then determines the configured territory (using
   Utils.SetTerr) and if it is Germany (7) or Switzerland (35) then the
   !Load file is run to load the new territory.

5) The !Load file must be capable of loading the new territory from scratch
   (a power-on Delete would cause the configured territory to return to UK
   so the new Territory module etc. will not have been loaded by the
   TerritoryManager). It will usually be the case that the new Territory
   module etc. will have been loaded by the TerritoryManager so RMLoads in
   !Load are protected by RMEnsures so that modules are not loaded twice.

6) Note that !Load always RMReInits the MessageTrans module. This is because
   loading a new Messages module can get MessageTrans confused.

7) The ColourPicker on the RiscPC registers its own resources so a
   workaround had to be found.

8) The UK territory module in the ROM is killed.

9) The TerritoryManager is also reinitialised.

10) Other resources such as sprites are loaded.

N.B. The !Territory.!Run file could have the following line added after the
RMEnsure of the UtilityModule:

If Wimp$State="desktop" Then Error !Territory can not be run from the Desktop

This would be translated to the appropriate language and prevents the
!Territory application from running when double clicked on.
