s80 anybody? - page 9 - General Discussion and Assistance - CHDK Forum

s80 anybody?

  • 205 Replies
  • 77166 Views
Re: s80 anybody?
« Reply #80 on: 02 / November / 2009, 01:51:12 »
Advertisements
After fixing the 'BL 0x????' issue , the bootdisk method works as expected, but fw update still dies during calling that function (j_taskResume). I am starting to wonder whether it has to do with the TurnOffSDPower. Currently mine is LDR     R3,=0xC02200BC, and which seems to be correct, after comparing it to other ports. So the issue remains, and I am a bit lost how to proceed.

*

Offline reyalp

  • ******
  • 13387
Re: s80 anybody?
« Reply #81 on: 02 / November / 2009, 02:28:45 »
You can try jumping back to the canon code at earlier points to see if it is something you are doing along the way. For example, at the start of boot() you should be able to just "B sub_FF810000" or after boot() you should be able to "B sub_FF811990" to jump to the canon version of h_usrInit.

Starting from diskboot, this will give you a boot loop since you haven't hidden the diskboot yet, but starting from FIR it should work normally.
Don't forget what the H stands for.

Re: s80 anybody?
« Reply #82 on: 02 / November / 2009, 11:57:03 »
I tried to put
   asm volatile (
   "B sub_FF810000\n"
   );
right in the beginning of the boot() function, and no luck: neither diskboot nor fw update works. I used turning led to make sure the execution does come to this point. So does this mean the problem happens before the boot function (maybe in copy_and_restart?)

*

Offline reyalp

  • ******
  • 13387
Re: s80 anybody?
« Reply #83 on: 02 / November / 2009, 13:59:26 »
I tried to put
   asm volatile (
   "B sub_FF810000\n"
   );
right in the beginning of the boot() function, and no luck: neither diskboot nor fw update works. I used turning led to make sure the execution does come to this point. So does this mean the problem happens before the boot function (maybe in copy_and_restart?)
More likely it means I missed some reason it shouldn't work, since diskboot was previously working. DISKBOOT should give you a boot loop if you do that, but the LED should still come on. You could put in a delay to be sure, it's possible that in the diskboot case it turns on/off so quickly you don't see it.

Another place you can try the same thing is at the end of copy_and_restart instead of the final MOV PC, %0 (afaik you can't use B sub_XXX here, but LDR PC,=0xFF81000 should work).

If you zip up and attach your current platform and loader code, maybe someone will be able to spot something.
Don't forget what the H stands for.


Re: s80 anybody?
« Reply #84 on: 02 / November / 2009, 17:27:45 »
I don't think I have attachment option enabled (I don't see any attachment icon in my GUi interface). Anyways, I've zipped my changes and put it in the following link. It includes the new code I added for s80 and minimal changes to some common files to make it compile.

http://www.yousendit.com/download/TzY0UGhZNHZGOFIzZUE9PQ

To summarise the current status:
- diskboot works, loads CHDK. alt-menu is available.
- camera currently reports "Card Locked", hence I cannot take pictures
- firmware update does not work. tried various methods and could not figure out what went wrong.

*

Offline reyalp

  • ******
  • 13387
Re: s80 anybody?
« Reply #85 on: 02 / November / 2009, 17:35:04 »
When posting, press "additional options". If you start in the quick reply box, you'll have to press preview first.

In the future, it would be helpful if you can exclude the .svn files. A patch with the appropriate files added is even better.
Don't forget what the H stands for.

Re: s80 anybody?
« Reply #86 on: 02 / November / 2009, 17:52:47 »
Ah, I see, didn't see the additional options, sorry about that. I've uploaded the same zip here, with .svn folders removed, and PRIMARY.BIN removed as well (due to file size limit). Thanks.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: s80 anybody?
« Reply #87 on: 02 / November / 2009, 18:21:06 »
Try to make own kbd_read_keys_r2() function from assembly and insert some code:

ROM:FF8273C4                 ORR     R0, R4, #0xC0000024 
ROM:FF8273C8                 BL      sub_FF8279F4               
                                       MOV R0, #0 // <--- insert this code ( R0=0)
ROM:FF8273CC                 MOV     R3, #0x120     

or the same in other place:

ROM:FF827394                 ORR     R0, R4, #0xC000001C
ROM:FF827398                 BL      sub_FF8279F4
                                      MOV R0, #0
ROM:FF8273A0                 MOV     R3, #0x118


Re: s80 anybody?
« Reply #88 on: 02 / November / 2009, 19:05:45 »
I made my own version of kbd_read_keys_r2, but the compiler reports:
kbd.c:(.text+0xa4): undefined reference to `sub_FFAE8AB4'
kbd.c:(.text+0xb8): undefined reference to `sub_FF8279F4'
kbd.c:(.text+0xe8): undefined reference to `sub_FF8279F4'
These subs are apparently not in stubs_auto.S. Do I need to change the make file somewhere?

Re: s80 anybody?
« Reply #89 on: 02 / November / 2009, 19:15:36 »
OK, I moved the kbd_read_keys_r2 to boot.c and it compiled. I inserted the instructions you suggested, but camera still reports card locked.

 

Related Topics