Using an AM29F040(B) FLASH ROM on a Harlequin 128K rev 2D

Updated: 7 Feb 2022

If you selected a AM29F040(B) FLASH ROM for your Harlequin 128K rev 2D*, it’s good to know the information presented on this page.
With this FLASH ROM chip you can store 8 different up to 64KB images ROM images, that can be selected by the onboard DIP switch (consult the Harlequin build manual for the DIP switch settings).

Now when using a DivMMC or Spectranet interface combined with the AM29F040(B) FLASH ROM on your Harlequin rev 2D board, there is something that needs to be taken into account, which I will try to explain on this page.

An original toastrack or +2 ROM contains only 32KB of space.
That will work perfectly when a DivMMC or Spectranet interface is attached, since it will always select that single 32KB ROM.
At the moment of writing this, we have a stock of original +2 ROMs available in the webshop!

However, with a AM29F040(B) chip, every ROM bank (out of 8) has a space of 64KB.
Now if you boot a Harlequin 128K board without DivMMC or Spectranet attached, it will actually boot from the lower 32KB half of that ROM bank.
So filling up the ROM bank like this will be fine, for example in ROM bank 0:
#00000 Toastrack / +2 ROM lower 16KB
#04000 Toastrack / +2 ROM upper 16KB
#08000 Empty
#0C000 Empty

But with DivMMC, the selection logic on the Harlequin board will select the UPPER 32KB half of that ROM bank.
If that is empty, as shown in the example above, the machine won’t boot properly (ESXDOS or Spectranet will most probably boot up, but will crash).

The solution is to also have a copy of the 32KB toastrack ROM in the upper half of that ROM bank, like this:
#00000 Toastrack / +2 ROM lower 16KB
#04000 Toastrack / +2 ROM upper 16KB
#08000 Toastrack / +2 ROM lower 16KB
#0C000 Toastrack / +2 ROM upper 16KB

To achieve this, load up the 32KB ROM image on address #00000 (or the start address of another bank of the AM29F040(B) ROM chip), and ALSO into address #08000, and then flash the AM29F040(B) EEPROM.

* Or other board that can use the AM29F040(B)

Here’s a more complete picture of the AM29F040(B) architecture, and how to fill up a ROM bank: