Changes

FlashGordon

326 bytes added, 12 April
==About==
The FlashGordon expansion is a 512KB ROM Expansion. It is a modified version of Bryce's [[MegaFlash]] with a different flash chip and some bugfixes. It allows you to add up to 32 expansion ROMs to your Amstrad/Schneider CPC or Plus computer. Moreover, it uses a flash memory chip, so the programs can be replaced directly from the computer, without having to move chips to a PROM programmer.
The ROMs are allocated numbers from 0 to 1F. The firmware will only initialize ROMs from F to 0 at boot, so it completely ignores half of the available memory. To solve this problem, ROM slot F comes pre-programmed with a boot program that will initialize the 16 remaining ROMs, and also allows more control over them.
 
[[Media:Flashgordon-2021-schema.pdf|FlashGordon 2021 KiCad schematics]]
 
[[File:PulkoTronics - FlashGordon.jpg|500px]]
 
<br>
==Installing the hardware==
==The ROM managers==
* The most comprehensive utility for the management of the ROMs is [[ROManager]] for [[FutureOS]]. For the native OS there are [[ROMANRoman]] and the [[MegaFlashROManager]]. A "booster" is included in both of these, enabling the initialization of ROMs 16-31 which are not scanned by the firmware.
==The rescue disk==
The rescue disk is one of two ways out if you mess up something with the ROMs setup. (The other way would be to use [[Roman]] or [[MegaFlashROManager]]). The rescue disc contains the following files :
* ROMTEST.BIN will print the available ROM numbers. Use it for hardware testing.
* BURN.BAS will help you programming stuff to the FlashGordon when the ROM Manager doesn't work anymore.
* BURN.BIN assembler code used by BURN.BAS
* MANAGER.ROM the ROM manager ROM file so you can repair it.
The source code for the programs provided on the rescue disk and the ROM manager itself are available on the source repository.
==Creating your own ROMs==
The memory chip used is an SST 39SF040. This is a flash memory chip that is smarter than a simple ROM or RAM. You talk to it by sending commands to exectute execute (but reading works as usual).
Also, the MegaFlash will accept write operations both in the C000-FFFF and 8000-BFFF ranges because of an hardware limitation. So, avoid reading and writing to 8000-BFFF while trying to program a ROM. We're sorry for the inconvenience, but fixing that would require an extra chip on the board, a bigger board, and more complex wiring which we tried to avoid.
 
 
The newer batch of the FlashGordon does decode A14, which is an great advantage over the MegaFlash, because you can use the stack at the place where it's usually located.
*Connect ROM number 1 and write 0xAA to address 0xD555
*Connect ROM number 2 and write 0x55 to address 0xEAAA
*At this point, the flahs flash is waiting for a command to execute. The available commands are ERASE (0x80), IDENTIFY (0x90), BYTE PROGRAM (0xA0) and RESET (0xF0)
*To erase a sector, send the ERASE command by writing 0x80 to address 0xD555 in ROM 1. Now write once again 0xAA to address 0xD555 in ROM number 1 and 0x55 to address 0xEAAA in ROM number 2. Then, write 0x30 anywhere in the sector you want to erase. Erasing will take up to 20 milliseconds, so wait to make sure the flash is ready to accept another command.
*To write a byte, write 0xA0 (BYTE PROGRAM) to address 0xD555 in ROM 1. Then, connect the ROM you want to program and write one byte at the needed address. There is a delay of 20 NOPs after a write operation, that should be no problem as you can use them to prepare the write operation for the next byte (by the time you're ready to execute the next write to the ROM, it will be ready to listen).
*If you enter identify mode, you can read two bytes to learn about the manufacturer and model of the flash chip. This can be used to identify FlashGordon versus the MegaFlash (which will return different values), a Ramcard (too late, you already corrupted some data), or a plain old romboard (all your attemps attempts to write are vain and bound to fail).
*There is also a command for a complete chip erase if you want to clear everything.
*Provide documentation for your changes so other people can improve on them as well. I spent several hours reverse engineering the ramcard from PCB to schematics, I hope I won't have to do it again for another device.
[[Category:FutureOS]]
[[Category:Peripherals]]
[[Category:Expansion ROM]]
[[Category:DIY]]
[[Category:Memory_expansions]]
13,173
edits