Difference between revisions of "Upper ROM Bank Number"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
(Created page with 'Writing to Port DFxxh selects the Upper ROM Bank Number (in range of 00h..FFh) to be mapped to memory at C000h..FFFFh. Whether or not the ROM is enabled (or if RAM is mapped to t…')
 
(ASIC ROM numbering system)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Writing to Port DFxxh selects the Upper ROM Bank Number (in range of 00h..FFh) to be mapped to memory at C000h..FFFFh. Whether or not the ROM is enabled (or if RAM is mapped to that region) is controlled by the Gate Array.
+
Writing to Port DFxxh selects the Upper ROM Bank Number (in range of 00h..FFh) to be mapped to memory at C000h..FFFFh. Whether or not the ROM is enabled (or if RAM is mapped to that region) is controlled by the [[Gate Array]].
 +
 
 +
<br>
  
 
== Technical ==
 
== Technical ==
Line 10: Line 12:
  
 
By default, if there are no peripherals issuing ROMDIS=HIGH, then BASIC is mapped to all ROM banks in range of 00h..FFh.
 
By default, if there are no peripherals issuing ROMDIS=HIGH, then BASIC is mapped to all ROM banks in range of 00h..FFh.
 +
 +
<br>
  
 
== Common ROM Bank Numbers ==
 
== Common ROM Bank Numbers ==
  
   00h BASIC (or AMSDOS, depending on LK1)
+
   00h       BASIC (or AMSDOS, depending on LK1 on the DDI-1 board)
   07h AMSDOS (or BASIC, depending on LK1)
+
   07h       AMSDOS (or BASIC, depending on LK1 on the DDI-1 board)
 
   00h..07h  Bootable ROMs on CPC 464/664/6128 (KL_ROM_WALK)
 
   00h..07h  Bootable ROMs on CPC 464/664/6128 (KL_ROM_WALK)
 
   08h..0Fh  Bootable ROMs on CPC 664/6128 (KL_ROM_WALK)
 
   08h..0Fh  Bootable ROMs on CPC 664/6128 (KL_ROM_WALK)
 
   10h..FFh  Non-bootable ROMs (or secondary banks of Bootable ROMs)
 
   10h..FFh  Non-bootable ROMs (or secondary banks of Bootable ROMs)
 
   FCh..FFh  Can be used, but aren't accessible by BIOS functions
 
   FCh..FFh  Can be used, but aren't accessible by BIOS functions
   FFh BASIC (or ROM with similar ID; for the crude 128K RAM-size detection in CP/M+)
+
   FFh       BASIC (or ROM with similar ID; for the crude 128K RAM-size detection in CP/M+)
 +
  FFh      BASIC (or ROM with similar ID; for the BIOS key scan detection in AMSDOS+)
 +
 
 +
<br>
  
 
== Other Bank Numbers ==
 
== Other Bank Numbers ==
Line 25: Line 32:
 
* You may want to add a list of devices with ROM here, please also include their fixed bank number(s), or selectable range of bank number(s))
 
* You may want to add a list of devices with ROM here, please also include their fixed bank number(s), or selectable range of bank number(s))
 
* Not sure if there are devices with incompletely decoded bank numbers? Eg. a ROM mapped to bank 06h, but also mirrored to 16h, 26h, 36h, etc. If so, these addresses should be listed here, too.
 
* Not sure if there are devices with incompletely decoded bank numbers? Eg. a ROM mapped to bank 06h, but also mirrored to 16h, 26h, 36h, etc. If so, these addresses should be listed here, too.
 +
 +
<br>
 +
 +
== ASIC ROM numbering system ==
 +
 +
On CPC, this port is really simple. It simply accepts any logical ROM number from 0-255.
 +
 +
On Plus, this port behaves in 2 modes, indicated by bit7:
 +
* if bit7 = 0, it accepts a logical ROM number from 0-127
 +
* If bit7 = 1, bits6..5 are ignored and bits4..0 is a physical ROM number from 0-31
 +
 +
 +
On a barebone CPC, the logical ROMs available are:
 +
*ROM 0: BASIC
 +
*ROM 7: AMSDOS (except on CPC464)
 +
 +
 +
On a Plus with factory cartridge, the physical ROMs available are:
 +
*ROM 0: Firmware
 +
*ROM 1: BASIC
 +
*ROM 2: Unused
 +
*ROM 3: AMSDOS
 +
*ROM 4: Burnin' Rubber ROM 0
 +
*ROM 5: Burnin' Rubber ROM 1
 +
*ROM 6: Burnin' Rubber ROM 2
 +
*ROM 7: Burnin' Rubber ROM 3
 +
 +
Also, physical ROM 1 is mapped to logical ROM 0 and physical ROM 3 is mapped to logical ROM 7.
 +
 +
Logical ROMs can be replaced by using a [[ROM board]] while physical ROMs cannot be replaced.
 +
 +
<br>
 +
 +
=== Summary ===
 +
 +
On Amstrad CPC, there is only 1 lower rom, the firmware, and up to 256 upper roms.
 +
 +
On Amstrad Plus, each cartridge contains up to 32 physical roms.
 +
 +
The first 8 physical roms can be accessed as lower roms. And all the 32 physical roms can be accessed as upper roms.
 +
 +
ROM boards are seen as logical roms. They can be accessed only as upper roms and there can be up to 128 logical roms.
 +
 +
[[Category:Programming]][[Category:Memory expansions]][[Category:Peripherals]][[Category:CPC Internal Components]]

Latest revision as of 18:54, 4 July 2024

Writing to Port DFxxh selects the Upper ROM Bank Number (in range of 00h..FFh) to be mapped to memory at C000h..FFFFh. Whether or not the ROM is enabled (or if RAM is mapped to that region) is controlled by the Gate Array.


Technical

The ROM Bank Number is not stored anywhere inside of the CPC. Instead, peripherals must watch the bus for writes to Port DFxxh, check if the Bank Number matches the Number where they want to map their ROM to, and memorize the result by setting/clearing a flipflop accordingly (eg. a 74LS74).

If the flipflop indicates a match, and the CPC outputs A15=HIGH (upper memory half), then the peripheral should set /OE=LOW (on its own ROM chip), and output the opposite level, ROMDIS=HIGH to the CPC (disable the CPC's BASIC ROM).

Additionally the CPC's /ROMEN should be wired to peripheral ROM chip's /CS pin. A14 doesn't need to be decoded since there is no ROM at 8000h..BFFFh, only at C000h..FFFFh.

By default, if there are no peripherals issuing ROMDIS=HIGH, then BASIC is mapped to all ROM banks in range of 00h..FFh.


Common ROM Bank Numbers

 00h       BASIC (or AMSDOS, depending on LK1 on the DDI-1 board)
 07h       AMSDOS (or BASIC, depending on LK1 on the DDI-1 board)
 00h..07h  Bootable ROMs on CPC 464/664/6128 (KL_ROM_WALK)
 08h..0Fh  Bootable ROMs on CPC 664/6128 (KL_ROM_WALK)
 10h..FFh  Non-bootable ROMs (or secondary banks of Bootable ROMs)
 FCh..FFh  Can be used, but aren't accessible by BIOS functions
 FFh       BASIC (or ROM with similar ID; for the crude 128K RAM-size detection in CP/M+)
 FFh       BASIC (or ROM with similar ID; for the BIOS key scan detection in AMSDOS+)


Other Bank Numbers

  • You may want to add a list of devices with ROM here, please also include their fixed bank number(s), or selectable range of bank number(s))
  • Not sure if there are devices with incompletely decoded bank numbers? Eg. a ROM mapped to bank 06h, but also mirrored to 16h, 26h, 36h, etc. If so, these addresses should be listed here, too.


ASIC ROM numbering system

On CPC, this port is really simple. It simply accepts any logical ROM number from 0-255.

On Plus, this port behaves in 2 modes, indicated by bit7:

  • if bit7 = 0, it accepts a logical ROM number from 0-127
  • If bit7 = 1, bits6..5 are ignored and bits4..0 is a physical ROM number from 0-31


On a barebone CPC, the logical ROMs available are:

  • ROM 0: BASIC
  • ROM 7: AMSDOS (except on CPC464)


On a Plus with factory cartridge, the physical ROMs available are:

  • ROM 0: Firmware
  • ROM 1: BASIC
  • ROM 2: Unused
  • ROM 3: AMSDOS
  • ROM 4: Burnin' Rubber ROM 0
  • ROM 5: Burnin' Rubber ROM 1
  • ROM 6: Burnin' Rubber ROM 2
  • ROM 7: Burnin' Rubber ROM 3

Also, physical ROM 1 is mapped to logical ROM 0 and physical ROM 3 is mapped to logical ROM 7.

Logical ROMs can be replaced by using a ROM board while physical ROMs cannot be replaced.


Summary

On Amstrad CPC, there is only 1 lower rom, the firmware, and up to 256 upper roms.

On Amstrad Plus, each cartridge contains up to 32 physical roms.

The first 8 physical roms can be accessed as lower roms. And all the 32 physical roms can be accessed as upper roms.

ROM boards are seen as logical roms. They can be accessed only as upper roms and there can be up to 128 logical roms.