Question about formating in-cam and ML file backup/restore

Started by Walter Schulz, February 26, 2019, 01:03:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Walter Schulz

Curiosity, again:
ML default option for formating memory cards is "Format card, keep ML". I suppose (IANAP) ML works like this:
Copy files Autoexec.bin and ML-SETUP.FIR and all ML dir contents (*.*) to an allocated memory space, format card using Canon's firmware routines and restore files and directory from RAM to card.
Somehow correct?
If so: Is there an upper limit for number of files that can be stored and/or is there an upper size limit for single files or all files combined? I suppose it might be somehow camera dependent. Numbers available?

I suppose if I do something stupid like storing oversized video tutorials into ML directory it will break the routine resulting in - at least - corrupted and missing files after format.


That's right. It's currently hardcoded to 15MB, but that's simply because it was written before we had large memory allocators working well on most models. If I were to rewrite it, I'd just use fio_malloc for each file, ignoring files larger than some threshold.

In any case, it copies the important files first (autoexec.bin, fonts, modules, user settings, FIR file, everything else from ML dir, any logs from root dir, and some files specific to Toshiba FlashAir cards, if any). If a file is too large, i.e. it doesn't fit into whatever is left from that 15MB buffer, it will be ignored.

Not completely fool-proof, but seems to work well enough in practice.


Trying to fix some other stuff around this I notice that card space used will vary from around 8.50mb when formatted to sometimes around 50mb when restarting camera after a format. Nothing recorded after restart. ALso noticed when simply copying over a new build to the card without installing it through firmware routine could increase card space to around 80mb. Is. Hard to say what´s going on and how it´s affecting recordings. Is memory allocated differently on every restart?