SX730 HS porting thread - page 2 - DryOS Development - CHDK Forum  

SX730 HS porting thread

  • 56 Replies
  • 49553 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: SX730 HS porting thread
« Reply #10 on: 06 / November / 2018, 11:07:47 »
Advertisements
The Firmware Version does not match with that posted from kmmng, who commited a 1.00C Firmware.
Fortunately, the main part of the firmware is identical in 100b and 100c (only difference is the build timestamp and the version strings). The loaders differ (that happens quite often lately), but that's not a concern.

edit:
I don't think the following wikia page was mentioned in this thread: http://chdk.wikia.com/wiki/Digic_6_Porting
« Last Edit: 06 / November / 2018, 11:09:54 by srsa_4c »

*

Offline srsa_4c

  • ******
  • 4451
Re: SX730 HS porting thread
« Reply #11 on: 10 / November / 2018, 15:20:13 »
I just found out that the sigfinder still isn't working correctly on the sx730 dump and some of the stubs it outputs are incorrectly identified. Anyone trying to work on a port is advised to double check stubs_entry.S entries.

*

Offline reyalp

  • ******
  • 14082
Re: SX730 HS porting thread
« Reply #12 on: 10 / November / 2018, 17:31:58 »
I just found out that the sigfinder still isn't working correctly on the sx730 dump and some of the stubs it outputs are incorrectly identified.
If you have some examples handy, I can take a look.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: SX730 HS porting thread
« Reply #13 on: 10 / November / 2018, 17:58:21 »
If you have some examples handy, I can take a look.
The one that caught my eye is GetEventFlagValue having the same address as DebugAssert (the latter is okay). Plus, there seems to be another copy of CreateTaskStrictly which is used for creating PhySw.

edit:
The other CreateTaskStrictly is not a copy on D7 cams. "HdmiCecTask" gives a better match finding it (there are several occurrences of the "PhySw" string and sig_match_str_r0_call can't cope with that).
« Last Edit: 11 / November / 2018, 13:23:47 by srsa_4c »


*

Offline reyalp

  • ******
  • 14082
Re: SX730 HS porting thread
« Reply #14 on: 11 / November / 2018, 21:14:26 »
If you have some examples handy, I can take a look.
The one that caught my eye is GetEventFlagValue having the same address as DebugAssert (the latter is okay). Plus, there seems to be another copy of CreateTaskStrictly which is used for creating PhySw.

edit:
The other CreateTaskStrictly is not a copy on D7 cams. "HdmiCecTask" gives a better match finding it (there are several occurrences of the "PhySw" string and sig_match_str_r0_call can't cope with that).
Thanks. I added the other CreateTaskStrictly for Dry R59 and later as CreateTaskStrictly_alt, which will be used to search for tasks in addition to the others. The even flag functions should be sorted out too.

I'm still working on some other issues. Should definitely not blindly trust the found sigs on these cams.  I've thought about adding some kind of validating or scoring logic to finsig_thumb2, but it's worked well enough up to now that it hasn't felt too urgent.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: SX730 HS porting thread
« Reply #15 on: 18 / November / 2018, 06:51:25 »
If someone could provide RAM dump(s), we could find out whether the issue (missing bitmap buffer) philmoz encountered on the G5x is affecting this camera.

The following Canon Basic script can be used to dump the whole camera RAM (512 MB). The card needs to be set up like this.
Code: [Select]
' dump RAM to A/RAM.BIN
' log to A/CBDUMP.LOG
' a working script blocks the camera until finished
 
DIM startaddr=0
' following is the size of RAM to dump (has to be adjusted to not exceed the amount of camera RAM)
DIM dumpsize=0x20000000
DIM lcdmsg=0
DIM msgstr=0
DIM fname="A/RAM.BIN"
 
private sub RegisterProcs()
    if System.Create() = -1 then
        SystemEventInit()
    end if
    if ExecuteEventProcedure("UI_RegistDebugEventProc") = -1 then
        ExecuteEventProcedure("UI.CreatePublic")
    end if
end sub
 
private sub InitMsg()
    lcdmsg = ExecuteEventProcedure("LCDMsg_Create",10,10,"Started",2)
    if lcdmsg >= 0 then
        LCDMsg_ChangeColor(lcdmsg,2)
    end if
    msgstr = AllocateMemory(80)
end sub
 
private sub PutMsg(msg)
    if lcdmsg >= 0 then
        LCDMsg_SetStr(lcdmsg,msg,0)
    end if
    msgfile = Fopen_Fut("A/CBDUMP.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")
 
    sprintf(msgstr,"%0X",startaddr)
    PutMsg(msgstr)
    dumpfile = Fopen_Fut(fname,"w")
    if dumpfile <> 0 then
        Fwrite_Fut(startaddr,dumpsize,1,dumpfile)
        Fclose_Fut(dumpfile)
        Wait(500)
        PutMsg("done")
    else
        PutMsg("file error")
    end if
    FreeMemory(msgstr)
end sub
You can make a dump in either playback or rec mode, but you need to name the script file accordingly.
A script named extend.m can be started by pressing SET in playback mode. A script named autotest.m can be started by holding SET and pressing RIGHT in rec (shooting) mode.

Before you make a dump, make sure there is a visible JPEG (or live view when in rec mode) displayed on the LCD. Also make sure that there is some visible Canon overlay (exposure info, icons and such).
Note that the dump may include file(s) from the card and whatever is displayed on the LCD, so remove anything from there that you don't want to publish.
Compress the dump before sharing it.

Re: SX730 HS porting thread
« Reply #16 on: 19 / November / 2018, 11:36:27 »

*

Offline srsa_4c

  • ******
  • 4451
Re: SX730 HS porting thread
« Reply #17 on: 19 / November / 2018, 16:24:13 »
I have done the dump, it is here
Thanks. All needed framebuffers are present in the dump (and their location matches what I've seen in an sx720 dump).
A list of selected locations is attached for use with this program.


Re: SX730 HS porting thread
« Reply #18 on: 23 / October / 2019, 05:45:32 »
I have done the dump, it is here
Thanks. All needed framebuffers are present in the dump (and their location matches what I've seen in an sx720 dump).
A list of selected locations is attached for use with this program.


Just Wondering if anything is working? I unfortunatly cant help, but i send all my morale support

*

Offline reyalp

  • ******
  • 14082
Re: SX730 HS porting thread
« Reply #19 on: 12 / December / 2019, 01:13:03 »
I've started a port for this camera, firmware 100d. Assuming I get it working, ports for the other versions will follow.

Current status is it boots diskboot or fi2 and runs a blinker task.
FI2 encoding is d4j
dancingbits is 17
Green LED is usual 0xd20b0994 (there is also an orange LED in the same spot, related to charging)

A couple of notable changes from a CHDK perspective
* CreateTask is in ROM, like newer digic 4 cams. CreateTask_low appears to be hookable in the same way.
* The camera supports USB charging (NB micro USB, not mini like earlier cams), and automatically powers on when USB power is present. This may be nice for automation, multicam rigs etc, but has potential for interactions with CHDK boot process. It does appear to boot normally with diskboot when USB is plugged in to a computer.

Perhaps related to the USB charging stuff, windows doesn't recognize this camera (with totally stock firmware) at all on my usual Kensington USB3 hub. It works fine on other USB2 and 3 hubs. The hub has misbehaved in other ways so is likely at fault, but all my other powershots work with it.
Don't forget what the H stands for.

 

Related Topics