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

Ixus Wireless - SD430 Porting thread

  • 131 Replies
  • 22503 Views
*

Offline nafraf

  • *****
  • 1308
Re: Ixus Wireless - SD430 Porting thread
« Reply #70 on: 12 / October / 2013, 10:28:33 »
Advertisements
"No Memory Card".
This is something new, so can you confirm that the message is not something about a write protected card? What happens if you make the card bootable on the PC?
In loader/entry.S, there is an address that I have not found.
Code: [Select]
// Turn OFF SD Card power
// to support autostart
    LDR     R3, =0xC0220068  //Is this address right?
    MOV     R2, #0x44
    STR     R2, [R3]

*

Offline srsa_4c

  • ******
  • 4109
Re: Ixus Wireless - SD430 Porting thread
« Reply #71 on: 12 / October / 2013, 12:54:33 »
Code: [Select]
// Turn OFF SD Card power
// to support autostart
    LDR     R3, =0xC0220068  //Is this address right?
    MOV     R2, #0x44
    STR     R2, [R3]
Seems right. See first BL from "SD1stInit" task, sub_ff8834ec, the address found in this sub works for the ixus65.

@ahull
Can you uncomment the above lines in loader/ixusw_sd430/entry.S and see what happens?

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #72 on: 12 / October / 2013, 14:23:56 »
That loads better, but now it says "Card Locked" rather than "No Memory Card" when booted direct. I think we are on the right lines here.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #73 on: 12 / October / 2013, 15:50:56 »
Other than this little problem, everything seems to work.
I went through all of the menu options, no mishaps. Switched on *everything* on the CHDK  OSD - the layout looks pretty good.
I pushed things around using the OSD editor , no worries.
Palette colours look fine. 
I also ran a bunch of scripts, flattened two batteries (the SD430 eats batteries any way), without a single hitch.
If we get the auto-boot fixed I think we can declare the Ixus Wireless - SD430 port, at the very least Beta. 
« Last Edit: 12 / October / 2013, 15:53:54 by ahull »


*

Offline srsa_4c

  • ******
  • 4109
Re: Ixus Wireless - SD430 Porting thread
« Reply #74 on: 12 / October / 2013, 16:42:25 »
If we get the auto-boot fixed I think we can declare the Ixus Wireless - SD430 port, at the very least Beta.
If you bring back the 0xc0220200... debug display, boot up with a locked card and then with an unlocked card, and compare the bits. The write protect bit should be there somewhere.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #75 on: 12 / October / 2013, 17:02:36 »
Thanks. I'll give that a try in the morning.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #76 on: 13 / October / 2013, 08:09:04 »
Unlocked

PS1: 0x?004200
PS2: 0xff0?49c3
PS3: 0x2ffe

Locked

PS1: 0x?004200
PS2: 0xbf0?49c3
PS3: 0x2ffe

So             
PS2: 0xff0?49c3 = Unlocked
PS2: 0xbf0?49c3 = Locked

Therefore the lock switch seems to be PS2: 7th bit of first byte (I'm reading bytes left to right, and assuming ARM coders eat their eggs the same way) or the 4th byte, if you open your eggs from the other end  ;) i.e.  Binary XNXX XXXX
« Last Edit: 13 / October / 2013, 08:22:14 by ahull »

*

Offline srsa_4c

  • ******
  • 4109
Re: Ixus Wireless - SD430 Porting thread
« Reply #77 on: 13 / October / 2013, 08:35:16 »
PS2: 0xff0?49c3 = Unlocked
PS2: 0xbf0?49c3 = Locked
Try to apply the following:
Code: [Select]
Index: platform/ixusw_sd430/kbd.c
===================================================================
--- platform/ixusw_sd430/kbd.c (revision 549)
+++ platform/ixusw_sd430/kbd.c (working copy)
@@ -7,7 +7,7 @@
 #define KEY_MASK 0x2FFE
 
 #define NEW_SS (0x2000)
-#define SD_READONLY_FLAG (0x20000)
+#define SD_READONLY_FLAG (0x40000000)
 
 
 typedef struct {
@@ -137,7 +137,7 @@
     }
 
     // Drop SD readonly status
-    physw_status[2] = physw_status[2] & ~SD_READONLY_FLAG;
+    physw_status[1] = physw_status[1] | SD_READONLY_FLAG;
 }
 
 void kbd_key_press(long key)
This is a source diff, remove the - lines and replace them with the + lines (but I guess you already know what it is).
You could also identify the USB bit (connect the camera to the PC while the PS... debug display is active).


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #78 on: 13 / October / 2013, 08:56:03 »
Ooops. That crashes the camera  :(

*

Offline srsa_4c

  • ******
  • 4109
Re: Ixus Wireless - SD430 Porting thread
« Reply #79 on: 13 / October / 2013, 09:14:50 »
Ooops. That crashes the camera
Hmmm. I thought I should force that particular bit to its "unlocked" state. Can you get a romlog?

 

Related Topics