went to the gym this morning for the first time in weeks since iv finally recovered enough from two overlapping colds. then lucy and i cycled to the Bargoonga Nganjin - north fitzroy library where we have been working from today. i brought the bits needed to write code for CYPHER project:
the bits:
- my laptop and charger
- a prototype circuitboard with the rp2040-zero attached
- usb-c cable to program the rp2040 from my laptop
- usb-c-dongle for my laptop
- composite-usb dongle and a composite cable to monitior the output of the circuit
the idea is that users can update the font set by connecting the circuit to a computer - where it will mount as a small FAT12 removable drive (64Kb) and they can drag in the binary .font objects (around 5kb each)
my main task for today was to create a bunch of 'bad' font files - basically corrupting a working font file in different ways and then testing and fixing whichever ones break the code.. i made a good start in the morning however quite quickly hit a few tricky issues.
the first one i found while testing these bad fonts - deleting a file on my computer from the removable device caused an error with the font loading.. this error remained even after restarting and reflashing the code.. so it must be in the flash itself. erasing this and rebuilding the partition was only way around but this takes some time so its a pain to debug...
then the other issue was after copying 5 fonts onto the drive it was reporting an error that memory was full - even tho only 20kb of 64kb was used...
after most of the day digging into these (and feeling a bit in over my depth to be honest - this project has quite a lot of moving parts and code examples stuck together when i dont understand everything) i finally found some solutions :
the delete problem is directly related to my os soft delete - it moves it to a folder .trash-1000/files on the drive... and i dont know why but this caused the problem. a full delete is fine. and going back and removing these trash folders resolved the issue. so its not perfect solution and i dont know yet why this causes the issue but atleast there is a workaround to move forward for the mvp..
the other issue proved to be hitting some kind of limit to the number of files or data in the root partition. when i switched to putting everything into a FONTS folder this is no longer an issue. may be some limititon to the FAT12 system - didnt go too deep into it since its an obvious and easy fix!
so after working through these i finally got to test my bad fonts.. and some did cause crashes.. and some others just caused the output to glitch in really interesting ways! i fixed the crashes (and also had to fix one of the interesting visual glitches but the other remains) so feeling pretty ok with how this went. tomorrow will be back in the studio testing hardware prototype i think. going to meet a friend for dinner at a mexican place in carlton on way home