How to Dump Firmware ? - page 8 - Firmware Dumping - CHDK Forum

How to Dump Firmware ?

  • 78 Replies
  • 148286 Views
Re: How to Dump Firmware ?
« Reply #70 on: 12 / December / 2010, 17:40:02 »
Advertisements
Thanks Bernd. That worked using basic (not universal) dumper.

Re: How to Dump Firmware ?
« Reply #71 on: 13 / December / 2010, 03:33:40 »
The source below does on your SX 30 too not work ?
so seem the new dumper does not work on all newer Cams

' dump ROM to A/PRIMARY.BIN
' log to A/CBDUMPER.LOG

DIM startaddr=0
DIM os="unk"
DIM lcdmsg=0
DIM msgstr=0
 
' detect start address and OS
private sub GetStart()
   if memcmp(0xFFC00004,"gaonisoy",8) = 0 then
      startaddr = 0xFFC00000
      os = "dry"
      exit sub
   end if
   if memcmp(0xFFC00008,"Copyrigh",8) = 0 then
      startaddr = 0xFFC00000
      os = "vx"
      exit sub
   end if
   if memcmp(0xFF810004,"gaonisoy",8) = 0 then
      startaddr = 0xFF810000
      os = "dry"
      exit sub
   end if
   if memcmp(0xFF810008,"Copyrigh",8) = 0 then
      startaddr = 0xFF810000
      os = "vx"
      exit sub
   end if
end sub
 
private sub RegisterProcs()
   ' ExecuteEventProcedure does is not registered by default on vx
   ' Newer cams seem to have this as an alias for System.Create()
   SystemEventInit()
   if ExecuteEventProcedure("UI_RegistDebugEventProc") = -1 then
      ExecuteEventProcedure("UI.CreatePublic")
   end if
end sub
 
private sub InitMsg()
   lcdmsg = ExecuteEventProcedure("LCDMsg_Create")
   msgstr = AllocateMemory(80)
   ' truncate log
   msgfile = Fopen_Fut("A/CBDUMPER.LOG","w")
   if msgfile <> 0 then
      Fclose_Fut(msgfile)
   end if
end sub

private sub PutMsg(msg)
   if lcdmsg >= 0 then
      LCDMsg_SetStr(lcdmsg,msg)
   end if
   msgfile = Fopen_Fut("A/CBDUMPER.LOG","a")
   if msgfile <> 0 then
      Fwrite_Fut(msg,strlen(msg),1,msgfile)
      Fwrite_Fut("\n",1,1,msgfile)
      Fclose_Fut(msgfile)
   end if
end sub
 
private sub Initialize()
        
   RegisterProcs()
   InitMsg()
   PutMsg("Started")
 
   GetStart()
 
   if startaddr <> 0 then
      sprintf(msgstr,"%0X %s",startaddr,os)
      PutMsg(msgstr)
      romsize = 0xFFFFFFFC - startaddr
      dumpfile = Fopen_Fut("A/PRIMARY.BIN","w")
      if dumpfile <> 0 then
         Fwrite_Fut(startaddr,romsize,1,dumpfile)
         Fclose_Fut(dumpfile)
         Wait(500)
         PutMsg("done")
      else
         PutMsg("file error")
      end if
   else
      PutMsg("not found!")
   end if
   FreeMemory(msgstr)
end sub
« Last Edit: 13 / December / 2010, 03:42:36 by Bernd R »
Ixus 1000 HS

*

Offline reyalp

  • ******
  • 14080
Re: How to Dump Firmware ?
« Reply #72 on: 13 / December / 2010, 17:00:37 »
Quote
The source below does on your SX 30 too not work ?
so seem the new dumper does not work on all newer Cams
This is not the source of the latest universal canon basic dumper, and will not work on newest cameras because they only have System.Create, not SystemEventInit. The latest source can for the canon basic dumper can always be found at http://chdk.wikia.com/wiki/Canon_Basic/Scripts/Dumper

I suggest linking there rather than providing potentially obsolete copies in other places.
Don't forget what the H stands for.

Re: How to Dump Firmware ?
« Reply #73 on: 15 / December / 2010, 08:47:09 »
I test now your newest universal dumper source on my IX 1000.It work now.
I change the archive too.

Only problem that is still in, there is no text see from the PutMsg command

I think thats a problem because no text color is set.
when i start camera and there is no image on the SD card, there is show a white box lines and in middle stand No Image.

now when press func set, i see on left top, the white box line get garbage.so look as text color is black.

there seem also on chdk a color set problem with this cam.when the Canon menu is open with func/set to set ISO EV etc, then chdk things as histogram are now draw in the orange color of the Menu.same color as menu use.

when i quit the menu, all is draw with correct chdk color then
« Last Edit: 15 / December / 2010, 08:49:01 by Bernd R »
Ixus 1000 HS


*

Offline reyalp

  • ******
  • 14080
Re: How to Dump Firmware ?
« Reply #74 on: 15 / December / 2010, 22:58:16 »
I think thats a problem because no text color is set.
The default color is black on some cameras. If you had an image on your card (that wasn't black) you'd see it.

Because this isn't reliable (the colors are different on different cameras, we don't know what image will be in the background, and old cameras doesn't have PutMsg all) the script also logs to CBDUMPER.LOG

If you have some problem with CHDK colors, it doesn't belong in this thread.
Don't forget what the H stands for.

Re: How to Dump Firmware ?
« Reply #75 on: 16 / December / 2010, 05:05:15 »
@reyalp
>The default color is black on some cameras. If you had an image on your card (that wasn't black) you'd >see it.

I test with a 16:9 shoot image, but the text start is not see.
now when firmware dump is ready, the canon func/set menu open and here can see on top a little garbaged the Text done.

its not a problem to use the universal dumper, i want only report it, maybe this show a chdk problem.
If you know a answer about chdk color change, please write it then in the ixus 1000 porting thread

http://chdk.setepontos.com/index.php/topic,5722.new.html#new

i ask it some time ago here, but get no answer if other cams have same problem, or how this can solve
« Last Edit: 16 / December / 2010, 05:09:45 by Bernd R »
Ixus 1000 HS

Re: How to Dump Firmware ?
« Reply #76 on: 12 / June / 2011, 17:03:57 »
I had the same problem on the S95 (firmware 1.00k) which discovered while trying to dump the firmware. I've tested a few times with different color pictures, the cdumper.log and primary.bin are written to the card using the universal dumper script.

I noticed that with no pictures on the camera, when started with play I get the message "No Image" in white text with a white border near the edge. When func/set is pressed, I notice something black overwrite the white border. Pushing menu, I see "one" in the top left corner (the "d" doesn't overlap any menu items, so can't see black text on black background).

If I take an all white picture, I don't see any messages on the screen when camera started with play, and func/set is pushed. However, if I then push menu, I see the words "done" clearly in white. The cdumper.log and primary.bin are written successfully.

Finally, I tested with a normal picture, with varying colors up all over the frame (refracted sunlight from my coffee table), and find the no messages appear on the screen after play/func is pressed. However I see done when pushing menu, but this time I noticed it looks like "done" is masked out out of the first image and put on the menu screen. Basically, it only shows the intersection of the status message and the first image. That's why I can never see the status message without pushing menu to change the screen.

I just found in the Hello World script example, someone mentions using an extra function to change the status screen message. If you add LCDMsg_ChangeColor(a ,6) on the line below LCDMsg_SetStr(lcdmsg,msg) in the private sub PutMsg(msg) makes visible the status message on the screen (in orange) for the S95.

Hope this helps someone else who was confused by this behavior.
« Last Edit: 12 / June / 2011, 17:46:34 by fetidpants »

*

Offline reyalp

  • ******
  • 14080
Re: How to Dump Firmware ?
« Reply #77 on: 12 / June / 2011, 17:59:41 »
Here's a simpler solution:
Don't worry about messages on the screen, just wait a few seconds after pressing SET and then check the contents of the card. If it worked, your dump and cdumper.log will be there. If it didn't, then something broke...

Maybe I should take out the screen messages entirely ?
Don't forget what the H stands for.


Re: How to Dump Firmware ?
« Reply #78 on: 05 / February / 2018, 00:52:45 »
How to dump firmware in ixus 510hs. Pls help me. can some some explain the process one by one.

 

Related Topics