Disk/network compressed image

This is identical to the previous case, except that we need to decompress the image in the startup:

Here's the step required in the startup:

uncompress (ram_paddr + startup_size, image_paddr + startup_size,
            stored_size - startup_size)

The case of a bank-switched ROM is much like a disk/network boot except you get to write the code that copies the image into RAM using the following steps in the IPL:

bankcopy (image_paddr, ram_paddr, startup_size)
checksum (image_paddr, startup_size)
checksum (image_paddr + startup_size, stored_size - startup_size)
jump (startup_vaddr)

Your next step is to go to the disk/network or disk/network compressed scenario above.

You'll need to map the physical addresses and sizes into bank-switching as needed. Have fun and next time don't bank-switch your rom! Make it linear in the address space.