Saturday, 13 May 2017

FDISK and FORMAT utility for the MEGA65

Preparing SD cards for the MEGA65 can be a bit tricky, as the FAT file system implementation in our Kickstart is rather restrictive.

To make life easier, we are creating an FDISK+FORMAT utility that will be in memory on each first power-on (this is one of the nice things about FPGAs -- RAM contents are not random on power on, but we can put what we like in there).  The idea is that if Kickstart fails to find a valid partition and file system, it will launch this utility to give the option to investigate the problem, and to quickly and easily (re-)partition and format their SD card in a manner that is compatible with the MEGA65.

At the moment the utility is functional, but a bit raw. In particular, if you run it, it WILL completely erase and repartition and reformat your SD card WITHOUT EVEN ASKING.  Consider it a proof-of-concept, rather than a finished product.

Nonetheless, it is nice that we have a simplified combined FDISK+FORMAT utility in less than 9KB.

Screenshot of it running in the MEGA65 emulator where I have been developing it:



Real testing on a MEGA65 will have to wait until I get back from my travels or another of the team has the chance to try it out.  I am not sure if the SD card size detection will work on real hardware or not.

5 comments:

  1. Please please please can mega65.rom be an actual physical rom on the motherboard??! PLEASE!!

    ReplyDelete
    Replies
    1. Hello,

      Sadly this is not really practical. However, like the hard-SIDs, it will very likely be possible to have the ROM in a cartridge if you want SD-card free operation.

      Paul.

      Delete
    2. YYYYYYYYYYYYYYYYEEEEEEEEEEEESSSSSSSSSSSSSSSSSSSSSS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

      Delete
  2. it would be possible to add utility to copy it from SD card to SPI flash.. and then read it from there..

    ReplyDelete
    Replies
    1. Yes, this would also be quite possible. Of course, if we can get copyright permission sorted out for the ROM, we can also include it in the bitstream which is probably the best option if we can manage it. Speaking of which, it would be good to finally work out how to have multiple bitstreams stored in the SPI flash and choose which one to boot from.

      Paul.

      Delete