/
Visual Guide to Flashing Slot 0 without JTAG

Visual Guide to Flashing Slot 0 without JTAG

Warning: if you don’t own a JTAG, we recommend removing all peripherals from your MEGA65 and to use only the internal SD card slot, as a precaution to any interference while flashing.

First read the whole procedure! If you have questions, contact us on discord.

1. Copy the COR file from your PC to the SD card

In my example I use a freshly formatted SD card (formatted with MEGA65 Release 0.95 FDISK). From the archive I copy the *.cor file to the SD cards root directory. Note: this is using Release 0.96 Build #12, it might be a different version for you.

After the copy finished, unmount the SD card, so the files are really all written and then transfer the SD card to your MEGA65. In my example I used the external slot, the internal slot was empty.

01-copy-core-to-sd.png
Image might differ depending on the OS you are using

2. Hold down NO SCROLL and power on your MEGA65

It is important to first hold down NO SCROLL and then power your MEGA65 on, while holding NO SCROLL. Release the key after MEGAFLASH shows up.

02-power-on-nosccroll.jpg
You may use two hands!
03-mflash-old-1.png
Note the bottom bar and the 4 spaces on the left of the screen
04-mflash-old-2.png
Press HELP to identify the version of MEGAFLASH

The above images show the screens you get from your Release 0.95 factory core MEGAFLASH. Note that the “MEGAFLASH/Core hash” and the “Slot 0 Version” show the same hash (93d55f0, first 7 characters). This may be different if you have some other factory core.

3. Flash the release core file into slot 1

The next step is to flash the core we copied in step 1 into our core slot 1 using the old MEGAFLASH. You initiate this by pressing CTRL-1. In the file selector you choose the one core we put on the SD card (if you have more then one core, you need to pick the right one – if not sure, try to rename the core on the SD card to something 8.3 UPPERCASE).

Attention: Don’t restart yet, you need to stay in MEGAFLASH for step 4!

05-mflash-slot-1.png
only one core to choose…
06-mflash-slot-1.png
confirm with RETURN
07-mflash-slot-1.png
loading…
08-mflash-slot-1.png
flashing…
09-mflash-slot-1.png
done!
10-mflash-slot-1.png
Release 0.96 in slot 1

4. Start MEGAFLASH of the newly flashed core

Now we want to start the new MEGAFLASH that is within the core we just flashed to slot 1. To archive this we need a little trick and we need to be fast! While still in MEGAFLASH, we start slot 1 with a press of 1. But then we would be in BASIC65… not if we are fast! We need to press 1 and then directly hold down NO SCROLL!

11-press-1-and-then-noscroll.jpg

5. Confirm that you are in the new MEGAFLASH

After this we should be greeted by the new MEGAFLASH! You can see that it is the new one because the left space is smaller (2 instead of 4 – see old pictures above) and you can again check HELP. You can find the hash of the core file you are using in the filename of the core and the release archive.

13-started-slot-1-flasher.png
less space, different footer
14-started-slot-1-flasher.png
more info, Slot 0 hash and MEGAFLASH hash differ

6. Start flashing slot 0

Now we can flash slot 0. But we can’t press Ctrl-0 to do that, we need to press MEGA-COMMA instead.

15-mega-comma-slot0.jpg

Then we will be greeted by a huge disclaimer. You need to read and C O N F I R M + RETURN it! After this you get the new “Edit Slot” screen.

16-flash-slot-0.png
really read this
17-flash-slot-0.png
this is currently in slot 0

7. Choose core file to flash

To flash slot 0 with the new core file, we need to first load a core. The menu tells us to press F3 to do that. From the file selector we choose our core (note that we now see the long filename, and after a short while we get some information about the core). Pressing RETURN selects the core.

Note: we could also use F5 to switch between the external and the internal SD card, and we can use F7 to change the directory, but only between the top level directory (root) and the special sub-directory CORE (all caps!), but only if it exists (actually the new MEGAFLASH will default to CORE if it is found!).

18-press-f3.jpg
19-flash-slot-0.png
file selector shows whats inside after a short delay
20-flash-slot-0.png
after pressing RETURN we se what we would flash

8. Start flashing

As you can see from the menu, the next key we need to press is F8 to flash the core we just selected. The core file is first loaded into attic ram, and then the CRC32 checksum is calculated. If this succeeds, the progress turns green and flashing starts. Then first all sectors are erased that would hinder the start of slot 1 for recovery (if flashing is interrupted).

Note: you can interrupt the loading and the checksum calculation by pressing STOP, but as soon as flashing begins, there is no way back! Don’t interrupt the actual flashing in any way!

21-press-f8.jpg
22-flash-slot-0.png
core is loaded into attic ram
23-flash-slot-0.png
CRC32 checksum is calculated
24-flash-slot-0.png
security erase of certain sectors
25-flash-slot-0.png
flashing…

Extra background: Recovery to slot one works be removing all the sync words from the flash, so the FPGA will continue searching for one until it hits slot 1. The core in slot 0 has integrated a list of such sectors, which is used to erase those first. For release 0.95 core there is a build in list in MEGAFLASH, release 0.9 does not need one.

Warning: if you interrupt slot 0 flashing before those first (few) sectors are erased, then slot 1 recovery will fail. So make sure to not interrupt power nor touch the device while flashing! We also recommend to remove all peripherals.

9. Done!

After flashing finished, we get a confirmation screen. Back in the menu you can check the Slot 0 Version hash by pressing HELP. You can now reboot your system.

26-flash-slot-0.png
27-flash-slot-0.png

 

Related content