BBC Relocatable Sideways ROM Modules ==================================== mdfs.net/ROMs/Modules J.G.Harston Introduction ------------ Many ROMs programs do not use the full 8K or 16K of the ROM, and have unused space in them. Normally you would have to load each of these small ROMs into a seperate bank, wasting the unused space and often resulting in running out of sideways ROM/RAM banks. A sideways ROM can have a relocation table that makes it a relocatable sideways ROM, or a Sideways Module. Multiple relocatable sideways ROMs can be loaded into a single sideways RAM bank, so minimising unused space and reducing the number of total ROM/RAM banks needed. CHAIN "SMJoin" -------------- SMJoin joins a collection of sideways ROM modules into a single file. It does the equivalent of *SMLoad but without loading them into sideways RAM. You can then load the resultant file into sideways RAM in one go, or program it into an EPROM to have present permanently. When SMJoin is run it prompts you for the files to join. You can also enter *commands at this prompt. The first file can be a normal non-relocatable ROM or a ROM with a language entry. All subsequent files must be relocatable modules. When you have entered all the files to join, press . You will then be prompted for the file to save the joined modules as. *SMList ------- Lists all relocatable modules in the following format: No. Position Name Version 1 FFFF8000 TERMINAL 1.00 (C)1984 Acorn 2 FFFC8000 BASIC 4.00 (C)1984 Acorn 3 FFFB8000 Edit 1.00 (C)1984 Acorn 4 FFFA8000 ViewSheet 1.00 (C) 1984 Acornsoft 5 FFF98000 DFS 2.24 (C)1985 Acorn 6 FFF78000 HADFS 5.62 (17 Feb 2012) (C)J.G.Harston 7 FFF7B7E0 NullKeyboard 0.12 (01 Aug 1998) (C)JGH 8 FFF7B80B SoftRTC 0.10 (23 Nov 1992) (C)JGH 9 FFF58000 VIEW 4.00 (C)JGH & Acornsoft 10 FFF5BB79 BootFix 0.00 (10 Oct 2012) (C)J.G.Harston 11 FFF5BBB9 Mouse 1.00 (12 Mar 2006) (C)J.G.Harston The high word of the position is the ROM bank the module is in, the low word is the address within the ROM bank of the start of the module. *SMLoad ------------------ Loads a relocatable module or sideways ROM to the highest available area of sideways RAM large enough. If the loaded file has a relocation table it is relocated and linked into the module chain. If it does not have a relocation table then it will only be enabled if it is loaded to the start of a bank of SRAM at &8000. Possible errors are: 133,Not enough SRAM 214,File not found 220,Syntax: SMLoad *SMFree ------- Displays the amount of free sideways RAM, showing how much is free in each bank. SMLib ----- SMLib contains two library functions to create the relocation table when writing a Sideways Module, with some skeleton source code showing how to lay out the source code.