diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-03-27 08:31:34 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-03-27 08:31:34 +0000 |
commit | d569727aa7a2fe34815298d747f9c8325a4b6202 (patch) | |
tree | 9a72b6ceed3ea80a9ec27bfb6c8314c4e32b14cb | |
parent | ee1ab2ee11565d8e02ac1bf0e75400578d60d6c8 (diff) |
Support iAudio X5V in the scrambler
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9278 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | tools/scramble.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/scramble.c b/tools/scramble.c index e289fcdc24..cb3630ea5a 100644 --- a/tools/scramble.c +++ b/tools/scramble.c @@ -22,7 +22,7 @@ #include <string.h> #include "iriver.h" -int iaudio_encode(char *iname, char *oname); +int iaudio_encode(char *iname, char *oname, char *idstring); enum { @@ -69,7 +69,8 @@ void usage(void) "\t-neo SSI Neo format\n" "\t-mm=X Archos Multimedia format (X values: A=JBMM, B=AV1xx, C=AV3xx)\n" "\t-iriver iRiver format\n" - "\t-iaudio iAudio format\n" + "\t-iaudiox5 iAudio X5 format\n" + "\t-iaudiox5v iAudio X5V format\n" "\t-add=X Rockbox generic \"add-up\" checksum format\n" "\t (X values: h100, h120, h140, h300, ipco, nano, ipvd\n" "\t ip3g, ip4g, mini, x5)\n" @@ -198,10 +199,15 @@ int main (int argc, char** argv) iriver_encode(iname, oname, FALSE); return 0; } - else if(!strcmp(argv[1], "-iaudio")) { + else if(!strcmp(argv[1], "-iaudiox5")) { iname = argv[2]; oname = argv[3]; - return iaudio_encode(iname, oname); + return iaudio_encode(iname, oname, "COWON_X5_FW"); + } + else if(!strcmp(argv[1], "-iaudiox5v")) { + iname = argv[2]; + oname = argv[3]; + return iaudio_encode(iname, oname, "COWON_X5V_FW"); } /* open file */ @@ -373,7 +379,7 @@ int main (int argc, char** argv) return 0; } -int iaudio_encode(char *iname, char *oname) +int iaudio_encode(char *iname, char *oname, char *idstring) { size_t len; int length; @@ -405,7 +411,7 @@ int iaudio_encode(char *iname, char *oname) } memset(outbuf, 0, 0x1030); - strcpy((char *)outbuf, "COWON_X5_FW"); + strcpy((char *)outbuf, idstring); for(i = 0; i < length;i++) sum += outbuf[0x1030 + i]; |