JP's Website
You can now load from disk...
2023-05-18
Over the past couple of weeks I've been working on SD Card support for the Neotron Pico. The broad schedule ran like this:
-
Detect when a card is inserted into the slot.
-
Detect when a card is removed from the slot.
-
When a BIOS "List Block Devices" API is called, initialise the SD Card and report its actual capacity.
-
Remember the fact that the card is initialised so we don't initialise it again needlessly.
-
Update the Neotron OS so it can read and write arbitrary blocks from disk. Test this using the Neotron Desktop BIOS and a disk image.
-
On the Pico BIOS, support the "Block Read" and "Block Write" BIOS API calls.
-
On the Neotron OS, implement the BlockDevice trait from the SD Card library over the BIOS API calls, and implement a basic DIR command.
-
Change the OS "load" command to load a file from disk into RAM, instead of reading keyboard input.
-
Profit!
Somewhere in there was a step around "re-write the embedded-sdmmc crate so it makes more sense internally, and so it allows you to create a new driver object (unsafely) without rebooting the SD Card".
Right now, I have branches open on three different projects (Neotron Pico BIOS, Neotron OS and embedded-sdmmc) and I need to close them and push out updated versions in the right order, so the next one in the tree can depend on a published version of the previous one ... but if you have all the right branches checked out, you can do something like this:
Now, it's a real computer!