MEGA65 System Startup Flow

Basic step by step startup

  1. Power on

  2. FPGA starts searching the QSPI Flash for a Bitstream (see Sync Word) and will normally find the Slot 0 Factory Core

  3. Bitstream is loaded from flash into the FPGA, configuring the chip to the MEGA65 chipset.

  4. Processor starts to run, and executes HYPPO (this has many steps not listed here)

  5. HYPPO reaches the point where it starts MEGAFLASH (which is in initial memory, so it is not loaded from anywhere!)

  6. MEGAFLASH determines if this is the first startup by checking a QSPI register.

  7. If this is not the first startup, and no special keys are pressed, MEGAFLASH exists and system returns to HYPPO soon handing over to core.

  8. If special key was pressed (mostly this is NO-SCROLL, but can vary per platform), MEGAFLASH menu ist displayed and user can interact with it.

  9. Otherwise MEGAFLASH will determine which core to start automatically (not executed if this is not the first FPGA configuration after power on):

    1. check for cartridge by reading EXROM/GAME state and cartridge ROM signatures (MEGAFLASH knows C64, C128 and MEGA65 signatures)

    2. if a cartridge of a certain kind was detected, search for the first core supporting this cartridge type, otherwise search for the first core that has the default flag set.

    3. if no core was found fulfilling this, try to use slot 1 or 2 depending on the setting of dip switch 4

    4. if the core that was selected has a valid core, then tell the FPGA to reconfigure from there

    5. if the core is determined invalid, exit and keep running with active core.

  10. Restart this procedure at 2, but with the start address for the bitstream search changed to the start of the selected slot.

    1. Warning: If this loads a MEGA65 core, step number 6-8 will be executed! This might start a MEGAFLASH from a later slot, if for example the NO-SCROLL key was not pressed while powering on, but only later!

FAQ

Why does a cartridge not result in starting the correct (C64?) core?

This can have multiple reasons. Perhaps the cartridge is special. Or the core setup is not as it should be.

Check if the core you think that should be started has the flag for the cartridge set. You can see this in the MEGAFLASH menu on the right side. If this is not the case, you can EDIT the slot to change the flags. If you want to use a slot for a certain flag that is in a higher slot, make sure to remove the flag from the lower slot!

mega65-screen-000000.png

You can also check what slot MEGAFLASH would have started if it was not interrupted by NO-SCROLL in the HELP screen:

mega65-screen-000001.png

If you press F1 in the HELP screen you get even more debug information (registers and memory). If you don’t know how a cartridge should look like, then ask us on discord.

Â