Thats unnecessary, as we better have 3s-5s manual boot than to force the soc to auto glitch 2k times just to enjoy 1s-2s boot time.I also consider to make the picofly repeatedly reboot until it got maxiumum success programatically.
It can be years of manual boot for that number to burnout.
That should be the way. Optimize the randomizer/divider, also remove any adjustment even a little after succesfull offset found.The algorithm is already good. The improvement might be the OFFSET_DIV change to 1, but it will be slower than using 10.
I also see in the code for every glitch, the offset will be shifted a little bit by a random number. I might remove this code. I once made a government simulation about oil spill. And this random stuff usually forbidden to be used. Since it make the simulation not repeatable. Its less scientific.
But may there is some offset variations, so the recorded offset is not for exact but to narrow down some address range, and with that range we can try to glitch faster.
Any rough calculation ? about what if we search/try every addresses in 32GB emmc , it will take how much time for a 300mhz cpu?