The use of flash instead of actual ROM and what it implies for aging cameras - General Chat - CHDK Forum
supplierdeeply

The use of flash instead of actual ROM and what it implies for aging cameras

  • 1 Replies
  • 336 Views
*

Offline koshy

  • *****
  • 1003
Advertisements
As some might have followed I came across a camera in recent tests that just crashed on switch to Rec mode. With or without CHDK. For a consumer this camera would have been gone for good. With our capabilities here I knew I had dumped the cameras Firmware in 2014 and I re-dumped it today. srsa_4c helped identify the bit that had faded and quickly provided a Canon Basic script to re-instate said byte. Miraculous healing and a camera back from the dead.

Still this was revealing. Wow. I thought does that happen this often? I mean I have like 100 cameras, well maybe two but they advertised the 100 millionth Ixus Camera few years back. So what - a million dead cameras due to using Flash to store the Firmware? What in 5, 10, 15, 20 or 25 years from now? More broken than working? That is not data storage built to last. Even the buried ATARI E.T. game catridges (allegedly worst game of the age in a collapsing market and so forth) should easily outlast this.

Anyway, I figured I'd start this lounge thread on the subject. Right now what I wonder is along the lines of what makes this more likely to happen. Does the Flash have to be cut off from power for a long time, as in a camera on a shelf without a battery? Would re-availability of power re-cycle the flash memory so that the degrading cycle would be stopped? or does it actually need to be re-written? Can anything be done about it in form of a maintenance script that reads a position a number of times and if it does not change under reading re-writes it? Etc... I'll add some quotes as post No. 2 below...

Curious on what y'all think about this.
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

*

Offline koshy

  • *****
  • 1003
My guess is bit fade in flash ROM. There's a chance it can be restored. Can you make a firmware dump?
Yes sure can. It does differ from what we have on file. I loooked it up I dumped the FW of this very camera in 2014. That dump went into the general FW collection, what is there is identical in timestamp and file content to the dump I saved in my own FW dumps file structure. So you seem to be right. How does one restore this?


It does differ from what we have on file. I loooked it up I dumped the FW of this very camera in 2014. That dump went into the general FW collection, what is there is identical in timestamp and file content to the dump I saved in my own FW dumps file structure. So you seem to be right. How does one restore this? Bit by bit?
There is only one bit of obvious difference, at offset 0x2439d3.
The following Canon Basic script should restore the original byte (0x2d -> 0x25).
Code: [Select]
private sub Initialize()
    adr = 0xFFE439D3
    SystemEventInit()
    buf = AllocateMemory(16)
    Poke8(buf, 0x25)
    byte = Peek8(adr)
    if byte = 0x2d then
        dangerous_eventproc(adr, buf, 1)
    end if
    FreeMemory(buf)
end sub
This could be turned into a CHDK script too, but anyway. I hope I've done everything right...
If the camera turns on after, dump the firmware again.

edit:
It's possible that something isn't done correctly, currently testing on an a410. It does not change the ROM.
edit2:
If anyone needs to know what "dangerous_eventproc" is, you can ask in PM.
Koshy had a little ELPH which wasn't white as snow but everywhere that Koshy went the ELPH was sure to go. (actually an SD, but that detail ruins the rhyme...)

 

Related Topics