Selecting an Expansion ROM
Selecting an Expansion ROM
A expansion ROM is selected by writing a code to the ROM select I/O address.
The ROM select I/O address is not fully decoded, and at a minimum bit 13 of the I/O address must be set to "0" for ROMs to be selected. To avoid conflict with other devices, the remaining bits in the I/O address should be set to "1". The recommended I/O address is &DFxx.
The ROM select I/O address is write only.
An expansion ROM is identified with a code which is in the range 0-255. BASIC is defined with a code of 0 and AMSDOS with a code of 7. BASIC will be selected if an attempt is made to select a ROM which is not connected.
This process will select a ROM, but will not allow access to the ROM data.
To access the ROM data:
- Select the ROM using the method above,
- Enable the upper ROM region using the Gate Array (see the document on the Gate Array for more information)
- The ROM data can be accessed in the Z80 memory range &C000-&FFFF.
Programming Examples
- Selecting an expansion ROM,
To select ROM 7. ( AMSDOS)
ld bc,&7f00 ;Gate Array ld a,%10000100 ;enable upper ROM, disable lower ROM, mode 0 out (c),a ;send it ld bc,&DF00 ;expansion ROM select port ld a,7 ;expansion ROM wanted out (c),a ;select it ret
- Disabling an expansion ROM
ld bc,&7f00 ;Gate Array ld a,%10001100 ;upper and lower ROM disabled, mode 0 out (c),a ;send it ret








