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

Ixus Wireless - SD430 Porting thread

  • 131 Replies
  • 24281 Views
*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #80 on: 13 / October / 2013, 09:25:15 »
Advertisements
Hmmm it seems not. The ROMLOG is dated yesterday. I attached it anyway, but I think it doesn't write to the card.
« Last Edit: 13 / October / 2013, 09:30:16 by ahull »

*

Offline srsa_4c

  • ******
  • 4239
Re: Ixus Wireless - SD430 Porting thread
« Reply #81 on: 13 / October / 2013, 09:41:23 »
OK, I'll have to think about this. This particular bit doesn't show up in the 0xc0220200 range on the ixus65 (at least not in my memory browser).
Comment out the line after
Code: [Select]
// Drop SD readonly statusand modify the debug display to show the physw_status words: 0x19d30, 0x19d34, 0x19d38. If digits are oscillating, note their values, so that they don't disguise the bit in question.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #82 on: 13 / October / 2013, 14:05:44 »
New locations

Unlocked.

PS1: 0x0?004200 (? Oscillating between 6 and 7)
PS2: 0x3f3?49c2 (? Oscillating betwwen 3 and 1)
PS3: 0x2ffe

Locked

PS1: 0x0?004200 (? Oscillating between 6 and 7)
PS2: 0xbf3?49c2 (? Oscillating between 3 and 1)
PS3: 0x2ffe


So PS2: Looks like the most likely suspect.


*

Offline srsa_4c

  • ******
  • 4239
Re: Ixus Wireless - SD430 Porting thread
« Reply #83 on: 13 / October / 2013, 14:38:05 »
Unlocked.
PS2: 0x3f3?49c2 (? Oscillating betwwen 3 and 1)
Locked
PS2: 0xbf3?49c2 (? Oscillating between 3 and 1)
Interesting, it's a different bit and is negated.
Code: [Select]
Index: platform/ixusw_sd430/kbd.c
===================================================================
--- platform/ixusw_sd430/kbd.c (revision 550)
+++ platform/ixusw_sd430/kbd.c (working copy)
@@ -7,7 +7,7 @@
 #define KEY_MASK 0x2FFE
 
 #define NEW_SS (0x2000)
-#define SD_READONLY_FLAG (0x40000000)
+#define SD_READONLY_FLAG (0x80000000)
 
 
 typedef struct {
@@ -137,7 +137,7 @@
     }
 
     // Drop SD readonly status
-    physw_status[1] = physw_status[1] | SD_READONLY_FLAG;
+    physw_status[1] = physw_status[1] & ~SD_READONLY_FLAG;
 }
 
 void kbd_key_press(long key)
Diff against nafraf's latest revision.
edit: don't forget the USB bit ;)


*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #84 on: 13 / October / 2013, 14:47:11 »
That fixes the SD card booting issue.  :D

Now on to the USB stuff.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #85 on: 13 / October / 2013, 14:52:40 »
Same locations...


PS1: 0x0?004200 - USB cable unplugged
PS1: 0x0?404200 - USB cable plugged

*

Offline srsa_4c

  • ******
  • 4239
Re: Ixus Wireless - SD430 Porting thread
« Reply #86 on: 13 / October / 2013, 15:06:02 »
Code: [Select]
Index: platform/ixusw_sd430/kbd.c
===================================================================
--- platform/ixusw_sd430/kbd.c (revision 550)
+++ platform/ixusw_sd430/kbd.c (working copy)
@@ -7,7 +7,7 @@
 #define KEY_MASK 0x2FFE
 
 #define NEW_SS (0x2000)
-#define SD_READONLY_FLAG (0x40000000)
+#define SD_READONLY_FLAG (0x80000000)
 
 
 typedef struct {
@@ -27,15 +27,15 @@
 static char kbd_stack[NEW_SS];
 #endif
 
-#define USB_MASK 0x8000000 //TODO
-#define USB_IDX  1         //TODO
+#define USB_MASK 0x400000
+#define USB_IDX  0
 
 //TO DO
 extern void usb_remote_key( void ) ;
 int get_usb_bit()
 {
     register long usb_physw;
-    usb_physw = *(long*)0xc0220204; //can be read directly (the usb bit doesn't need kbd_power_on or so)
+    usb_physw = *(long*)0xc0220200; //can be read directly (the usb bit doesn't need kbd_power_on or so)
     return(( usb_physw & USB_MASK)==USB_MASK);
 }
 
@@ -137,7 +137,7 @@
     }
 
     // Drop SD readonly status
-    physw_status[1] = physw_status[1] | SD_READONLY_FLAG;
+    physw_status[1] = physw_status[1] & ~SD_READONLY_FLAG;
 }
 
 void kbd_key_press(long key)
Updated diff, only apply the new changes of course. There is a certain chance that the USB bit is (also) elsewhere on the 0xc0220200 IO port.
Now, if you enable USB remote, the camera should no longer notice the USB connection when you plug it into the PC. If the bit's port is really 0xc0220200, and the bit's location is the same, you'll even be able to use the USB remote.

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #87 on: 13 / October / 2013, 15:23:34 »
 :D Well that also seems to work.

I plug in the USB lead, the camera focuses, I unplug and it takes a shot. I don't have a USB trigger, but I can make one up in the office tomorrow if we need to test further.

If we push all of those changes to nafraf's build, I will test everything from scratch to make sure it is all up to date.
I can set up chdk ptp on my raspi in the office too, and have a play with that.

Looks good. Many thanks, anything we haven't covered?
 
« Last Edit: 13 / October / 2013, 15:25:55 by ahull »


*

Offline nafraf

  • *****
  • 1308
Re: Ixus Wireless - SD430 Porting thread
« Reply #88 on: 13 / October / 2013, 19:01:56 »
Looks good. Many thanks, anything we haven't covered?
exp_drv_task and filewritetask.

New changes:
- exp_drv_task implemented
- platform_camera.h: #define REMOTE_SYNC_STATUS_LED 0xC02200B5   <- This is the Print LED
- capt_seq.c: #define USE_STUBS_NRFLAG 1
- filewritetask implemented
« Last Edit: 13 / October / 2013, 19:54:51 by nafraf »

*

Offline ahull

  • *****
  • 634
Re: Ixus Wireless - SD430 Porting thread
« Reply #89 on: 14 / October / 2013, 05:20:04 »
Looks good. Many thanks, anything we haven't covered?
exp_drv_task and filewritetask.

New changes:
- exp_drv_task implemented
- platform_camera.h: #define REMOTE_SYNC_STATUS_LED 0xC02200B5   <- This is the Print LED
- capt_seq.c: #define USE_STUBS_NRFLAG 1
- filewritetask implemented

I updated with those changes, but you seem to have missed the card lock change... ( http://chdk.setepontos.com/index.php?topic=10728.msg106265#msg106265 ) - I'm getting the "No Memory Card" message again.
« Last Edit: 14 / October / 2013, 06:52:58 by ahull »

 

Related Topics