Ixus Wireless - SD430 Porting thread - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

Ixus Wireless - SD430 Porting thread

  • 131 Replies
  • 45627 Views
*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #10 on: 05 / October / 2013, 15:28:51 »
Advertisements
Progress (of sorts). I made the changes suggested by srsa_4c - now the camera boots up, I get a brief flash of the blue "Canon" logo, and then the camera shuts down (sometimes I get a very brief flash of an all white screen before it shuts down).
Try to get a romlog (if that works at this point). Also, comment out every task replacement in generic/main.c createHook() (or in ixusw_sd430/main.c if you copied it there), including the code that starts spytask. Re-enable them one by one. The old sigfinder is not perfect, a few firmware function address could be wrong.

I'll try that in the morning.

Quote
Quote
The Ixus 50 dump is also proving a little bit of a head scratcher. I tried the universal dumper, and the various variants of it, but I cant seem to get it to run. I reformatted the SD card I was using in the Ixus 50, and tried various tricks.
It's more than likely not your fault. Try using my version of the Canon Basic dumper: http://chdk.setepontos.com/index.php?topic=6934.msg96394#msg96394, and make sure the card is not write protected (I forgot about this several times in the past).

I'll give that a shot too.

Quote
The menu layout is a bit screwy...
Hmmm.
edit: perhaps that's the reason (sub/110a/lib.c):
Code: [Select]
//To do: all this file!!!
Hmm yes that might do it  :D

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #11 on: 05 / October / 2013, 15:43:41 »
Quote
Quote
The Ixus 50 dump is also proving a little bit of a head scratcher. I tried the universal dumper, and the various variants of it, but I cant seem to get it to run. I reformatted the SD card I was using in the Ixus 50, and tried various tricks.
It's more than likely not your fault. Try using my version of the Canon Basic dumper: http://chdk.setepontos.com/index.php?topic=6934.msg96394#msg96394, and make sure the card is not write protected (I forgot about this several times in the past).

Eeek.. That version actually crashes the camera. (Although at least it proves the script ran, I was beginning to think Canon Basic didn't exist on this model).
 
I'll try again in the morning.


*

Offline srsa_4c

  • ******
  • 4451
Re: Ixus Wireless - SD430 Porting thread
« Reply #12 on: 05 / October / 2013, 17:57:15 »
Eeek.. That version actually crashes the camera.
That could be a sign that this Canon Basic version now expects parentheses after Initialize, so the script could be
Code: [Select]
' dump PRIMARY to A/PRIMARY.BIN

DIM startaddr=0xFF810000

private sub Initialize()
'    SystemEventInit
'    Wait(100)
    ExecuteEventProcedure("SystemEventInit")
    Wait(100)
    ExecuteEventProcedure("UI_RegistDebugEventProc")
    Wait(100)
    romsize = 0xFFFFFFFC - startaddr
    dumpfile = creat("A/PRIMARY.BIN",2)
    write(dumpfile,startaddr,romsize)
    close(dumpfile)
end sub
SystemEventInit was duplicated, not sure which form is the correct one (with or without ExecuteEventProcedure). One of the event procedure calls is probably unnecessary in this script, but that shouldn't hurt.

The menu problem on the ixusW should be solved by my later addition on the previous page. The wrong address surely causes memory corruption.

*

Offline nafraf

  • *****
  • 1308
Re: Ixus Wireless - SD430 Porting thread
« Reply #13 on: 05 / October / 2013, 20:25:47 »
@srsa_4c thanks for checking the boot code.

@ahull  ixusw svn files were updated. addresses detected by srsa_4c are included in code_gen.txt.
            lib.c was modified too, but it is not complete.


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #14 on: 06 / October / 2013, 07:14:39 »
@nafraf I fixed a couple of typos and the like. Attached is a svn diff

You will need to chop out the stuff you already have, the only actual diffs are in ../platform/ixusw_sd430/sub/110a/boot.c and ../platform/ixusw_sd430/sub/110a/libc.c
 
It now boots to a perfectly aligned CHDK, so long as you use the Firmware Upgrade method. The locked card method still crashes the camera.
 
Menu colours are fine, and  I can navigate, select options and so forth.

The mode switch and power buttons however don't operate, so I can't actually get from CHDK in playback mode to shooting mode to test further.

Significant progress. Many thanks to you both.  :D
« Last Edit: 06 / October / 2013, 07:29:29 by ahull »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #15 on: 06 / October / 2013, 08:42:18 »
Attached is a ROMLOG.LOG following an attempt to boot with the card locked method.
EDIT: 2nd attempt to attach the log. Not sure what went wrong the first time.
« Last Edit: 06 / October / 2013, 13:14:57 by ahull »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #16 on: 06 / October / 2013, 08:50:04 »
Eeek.. That version actually crashes the camera.
That could be a sign that this Canon Basic version now expects parentheses after Initialize, so the script could be
Code: [Select]
' dump PRIMARY to A/PRIMARY.BIN

DIM startaddr=0xFF810000

private sub Initialize()
'    SystemEventInit
'    Wait(100)
    ExecuteEventProcedure("SystemEventInit")
    Wait(100)
    ExecuteEventProcedure("UI_RegistDebugEventProc")
    Wait(100)
    romsize = 0xFFFFFFFC - startaddr
    dumpfile = creat("A/PRIMARY.BIN",2)
    write(dumpfile,startaddr,romsize)
    close(dumpfile)
end sub
SystemEventInit was duplicated, not sure which form is the correct one (with or without ExecuteEventProcedure). One of the event procedure calls is probably unnecessary in this script, but that shouldn't hurt.

The menu problem on the ixusW should be solved by my later addition on the previous page. The wrong address surely causes memory corruption.

Well that version neither crashes the camera, nor dumps the ROM.  ::)

*

Offline srsa_4c

  • ******
  • 4451
Re: Ixus Wireless - SD430 Porting thread
« Reply #17 on: 06 / October / 2013, 09:43:59 »
Well that version neither crashes the camera, nor dumps the ROM.  ::)
Quite interesting... That means neither the old (creat(), write()), nor the new (Fopen_Fut(), ...) file API is usable for this...
If you're still interested, try removing the following lines from core/main.c and use the "RAM dumper" facility of CHDK 1.2+ (miscellaneous... -> debug... -> RAM dump..., and set ALT +/- debug action to DmpRAM) . Use 0xff800000 as start address and 0x7FFFFC as length.
Code: [Select]
    // enforce RAM area
    if ((unsigned int)conf.memdmp_start > (unsigned int)camera_info.maxramaddr)
        conf.memdmp_start = 0;
    if ( (unsigned int)conf.memdmp_start + (unsigned int)conf.memdmp_size > ((unsigned int)camera_info.maxramaddr+1) )
        conf.memdmp_size = (unsigned int)camera_info.maxramaddr + 1 - (unsigned int)conf.memdmp_start;
It could be that this won't work either...

edit:
The above romlog has zero length.

edit2:
updated the above instruction
« Last Edit: 06 / October / 2013, 10:29:52 by srsa_4c »


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #18 on: 06 / October / 2013, 13:17:08 »
I re-attached the ROMLOG to my earlier post. I'll take a look at your dumping suggestions shortly.


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #19 on: 06 / October / 2013, 17:41:59 »
A quick non exhaustive test.

All the menus work.
The colour scheme looks good.
The CHDK ODS battery meter, disk space and temperature display all work.
All of the games work. 

Obviously since I can't operate the mode switch or boot up in Shoot or Video mode, I cant test much more.
 

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal