Author Topic: Card Tricks - a small utility to help manage SD cards [currently v. 1.44]  (Read 192160 times)

Offline Joe 1956

  • Rookie
  • *
  • Posts: 12
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #120 on: 18 / January / 2009, 00:38:17 »
Strange. From the times listed, I was editing it while you were posting. Never saw a board do that before.
SX100 IS; A510

Offline Joe 1956

  • Rookie
  • *
  • Posts: 12
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #121 on: 18 / January / 2009, 01:03:22 »
BTW You should also be able to format without DOS: 'My Computer' -> right-click card -> choose format
        Just make sure it uses FAT not FAT32 (there should be an option for that)

I've tried it that way also. Make bootable stays grayed out though, and that's the only thing I really need to do.
SX100 IS; A510

Offline whim

  • Guru Member
  • ******
  • Posts: 1957
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #122 on: 18 / January / 2009, 01:21:13 »
OK, in that case: follow fe50's recommendation and download HxD here:

(free download) http://mh-nexus.de/en/downloads.php?product=HxD

i also did, so let me know when you're ready ...

wim

edit: just tested it (verified with CardTricks) and it works. In the program, you first need to
        goto menu Extras -> Options -> Security (on tab General) -> uncheck "Open disk as readonly by default"
        Click OK.
        then, goto menu Extras -> Open disk and select your card's drive letter under "Logical disks"
        (BTW, always format cards with CANON_DC as drive label (like your cam does)  that makes it easier to recognize
          them - this program also shows the drive label)
        Click OK to dismiss the warning and your card will be opened in the editor.
        It's the rightmost column that we're interested in - this shows the ASCII representation of the card.
        In the first line of this column you should see MSDOS5.0, in the 4th there should be FAT16. Yes ?
        Then put the cursor on the 1st character of the 5th line and type (capitals !) BOOTDISK
        Then goto menu File -> Save , OK the warnings and close the program. Done.
« Last Edit: 18 / January / 2009, 02:20:15 by whim »

Offline Joe 1956

  • Rookie
  • *
  • Posts: 12
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #123 on: 18 / January / 2009, 01:51:10 »
Okay, I've downloaded the hex editor, have placed the build on an old 256 card to play around with, (which was fully formatted via right click in My Computer), and here's what I see, just so you'll know where I'm at:




I might be busy for a while tonight, so might not get back to you quickly.

SX100 IS; A510

Offline whim

  • Guru Member
  • ******
  • Posts: 1957
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #124 on: 18 / January / 2009, 02:22:05 »
Joe - still can't see whatever you're including - but check my previous post, I edited it with a detailed guide.

wim

Offline Joe 1956

  • Rookie
  • *
  • Posts: 12
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #125 on: 18 / January / 2009, 02:57:03 »
By George, that was easy enough. It works!     :D

To recap, for anyone who'll read this later:

I fully formatted my card by right clicking on it in My Computer, making sure that CANON_DC was the volume label (it always is if you used the card in the camera first, no doubt you'll have to label a new card), used Card Tricks to get my camera build onto the card (which I might be able to do manually - will check later), then used the hex editor to type BOOTDISK on the 5th line of the header.

Now I have something to understand by comparison. This is sorta like editing the header in a .jpg.

Thank you!



SX100 IS; A510

Offline whim

  • Guru Member
  • ******
  • Posts: 1957
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #126 on: 18 / January / 2009, 03:14:21 »
@Joe

Nice ! Just remember every time you do this to check if it says FAT16 on line 4 ...
(i'm not sure from which size camera's start formatting FAT32, but they definitely
  do for 4 Gb and up)

cheers,

wim

edit:
Quote
which I might be able to do manually
yes, it's just an unzip operation
Quote
This is sorta like editing the header in a .jpg.
exactly, you can also do that with this program.
       
« Last Edit: 18 / January / 2009, 03:20:02 by whim »

Offline Joe 1956

  • Rookie
  • *
  • Posts: 12
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #127 on: 18 / January / 2009, 03:59:33 »
I just now got another card to work, a 1 gig. Tried it on a 4 gig card, but it didn't work, but that's okay since it did work when I set it up on my friends machine. (Don't understand much of it, of course, but I noticed the header was a little different on the 4 gig).

All in all, I can now make do with anything less than a 4 gig, until I can get to an XP machine. Wim, thanks for your help!

Oops.  fe50, thanks to you as well.
« Last Edit: 18 / January / 2009, 04:21:19 by Joe 1956 »
SX100 IS; A510

Offline fe50

  • Guru Member
  • ******
  • Posts: 2608
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #128 on: 18 / January / 2009, 18:07:36 »
The problem is the Win98 format command: there's no /FS: switch since Win98 can only use FAT.

Up to 2GB format uses FAT16, with 4GB automatically FAT32 is used - that's why CT disables the bootable button.
It's also the same with in-camera formatting...

So the card should be formatted on a Windows XP machine with FAT16 (either with Cardtricks or in a CMD windows with the /fs:FAT parameter), on Linux it should also be possible.
Maybe there's another format tool that can do it...

CHDK Forum

Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #128 on: 18 / January / 2009, 18:07:36 »

Offline Joe 1956

  • Rookie
  • *
  • Posts: 12
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #129 on: 18 / January / 2009, 20:41:39 »
I wonder how a 4 gig standard card would work with what you guys have taught me, (not an SDHC type, which both of mine are). Seems there aren't that many of the standard ones around. Perhaps nobody's tried?
SX100 IS; A510

Offline fe50

  • Guru Member
  • ******
  • Posts: 2608
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #130 on: 18 / January / 2009, 20:50:42 »
Joe,
imo it doesn't matter if the card is SD or SDHC - but with SDHC cards the camera itself must support SDHC.

An older camera without SDHC support always reject a SDHC card (with any size), normally with 'card error' - you can't do anything with such a card in such a camera...

The autostart mechanism in CHDK is limited to 4GB/FAT16 (SD or SDHC), that's why a card > 4GB must be partitioned (needs CHDK multi partition support, CHDK starts from a small FAT16 partition and then swaps the partitions on the fly)...

Offline Joe 1956

  • Rookie
  • *
  • Posts: 12
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #131 on: 18 / January / 2009, 21:34:34 »
I think I understand, but am not sure.  I thought that maybe the memory addresses were different in the two types, meaning as to what line in the header you could change.

So much to learn, so little time left.
SX100 IS; A510

Offline fe50

  • Guru Member
  • ******
  • Posts: 2608
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #132 on: 18 / January / 2009, 21:55:48 »
I think I understand, but am not sure.  I thought that maybe the memory addresses were different in the two types, meaning as to what line in the header you could change.

The SD and SDHC cards uses different reader hard/software (aka the in-camera 'card reader'), therefore an old SD-only device (e.g. an older camera or USB card reader) can't access the card.

The logical structure of the card's first sector (the 512 bytes where we write the BOOTDISK identifier) is always the same.
The CHDK autostart method hijacks the original Canon firmware update mechanism to load & run the CHDK code on the camera; this update mechanism is designed (by Canon) to work only with FAT16...

Quote
So much to learn, so little time left.
Yeah - that's true !

Offline whim

  • Guru Member
  • ******
  • Posts: 1957
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.43]
« Reply #133 on: 20 / January / 2009, 16:57:04 »
@fe50

Quote
The problem is the Win98 format command: there's no /FS: switch since Win98 can only use FAT.

I'm being lazy here, but if it's not too much work, could you get me a dump of the '98 format help output ?
Then it would be a breeze to add support ...

wim

PS Interestingly, i also just ran into the fact that good old debug.exe (present in all Win versions) is able to read/write
     disk sectors, if it behaves sufficiently equal that would open up the possibility of replacing bootable.exe with a
     debug script on OS'es that don't support it ...
« Last Edit: 20 / January / 2009, 17:05:10 by whim »

Offline whim

  • Guru Member
  • ******
  • Posts: 1957
  • A620/A630/A590-101b/i70-101b/i870-101a/i300
Re: Card Tricks - a small utility to help manage SD cards [currently v. 1.44]
« Reply #134 on: 20 / January / 2009, 19:30:33 »
Since I was getting a bit fed up with (false, of course) virus reports about CardTricks, here is

             CardTricks-144-SFX.exe - 510 kB

  • None of the (35) scanners on Virus Total gave a false alarm on this today at 15:00 h (GMT+1)

  • No need to upgrade from 1.43, functionally identical; if you want to anyway, just point the self-extractor
    to the folder containing your previous version

  • This is a 7-zip self-extracting archive, just get 7-zip (open source, get it here: http://www.7-zip.org)
    and you can manually unpack it, giving you full access to the source before running anything  :D

  • The previous method (AutoIt 'FileInstall' + UPX --ultra-brute) was ~20% more efficient than the current
    (UPX --ultra-brute on the CT exe, then 7-zip LZMA Ultra SFX on exe + /CardTricks folder)  -
    must be the SFX stub, i suppose  :( 

to all users of previous versions: thanks for your confidence,
and sorry, but this update will do more for me than for you   :haha

wim

PS Still don't have a clue why previous method triggered these alarms, though ...
« Last Edit: 20 / January / 2009, 21:36:10 by whim »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal