Browse files

Delay when booting with Left button held

  • Loading branch information...
1 parent 3dbfcf1 commit 8a9030bbd1f895958b5c455e398cf1ab499c27b5 Steven Price committed May 31, 2009
Showing with 16 additions and 12 deletions.
  1. +7 −8 rbutil/mkamsboot/dualboot.S
  2. +9 −4 rbutil/mkamsboot/mkamsboot.c
View
15 rbutil/mkamsboot/dualboot.S
@@ -21,7 +21,7 @@
.text
- #if defined(SANSA_CLIPV2) || defined(SANSA_FUZEV2)
+#if defined(SANSA_CLIPV2)
.set RAM_SIZE, 0x100000 /* Use 1MB of SDRAM on V2 models (bigger firmwares) */
#else
.set RAM_SIZE, 0x50000 /* Use full IRAM on V1 models */
@@ -137,18 +137,17 @@ uclcopy:
cmp r1, #0
beq boot_of
#elif defined(SANSA_FUZEV2)
- ldr r0, =GPIOA
- @ldr r0, =GPIOB
- @ldr r0, =GPIOC
- @ldr r0, =GPIOD
+ ldr r0, =GPIOC
+
+ mov r1, #0
+ str r1, [r0, #0x400]
-.set pin, 0 @ 1, 2, 3, 4, 5, 6, 7
- ldr r0, [r0, #(4*(1<<pin))]
+ ldr r0, [r0, #0x20]
cmp r0, #0
beq boot_of @ if the pin is unset, boot immediately
@ else, boot after a noticeable delay
-delay: mov r0, #0x100000
+delay: mov r0, #0x3000000
1: subs r0, r0, #1
bne 1b
View
13 rbutil/mkamsboot/mkamsboot.c
@@ -175,7 +175,8 @@ static const int rb_model_num[] =
41,
42,
44,
- 67
+ 67,
+ 0 // Unknown
};
struct md5sums {
@@ -199,6 +200,8 @@ static struct md5sums sansasums[] = {
{ MODEL_FUZE, "1.01.22", 1, "5aff5486fe8dd64239cc71eac470af98" },
{ MODEL_FUZE, "1.02.26", 1, "7c632c479461c48c8833baed74eb5e4f" },
+ { MODEL_FUZEV2, "2.02.26", 2, "d4f6f85c3e4a8ea8f2e5acc421641801" },
+
{ MODEL_C200V2, "3.02.05", 1, "b6378ebd720b0ade3fad4dc7ab61c1a5" },
{ MODEL_M200V4, "4.00.45", 1, "82e3194310d1514e3bbcd06e84c4add3" },
@@ -289,6 +292,8 @@ static int get_model(int model_id)
return MODEL_M200V4;
case 0x27:
return MODEL_CLIPV2;
+ case 0x70:
+ return MODEL_FUZEV2;
}
return MODEL_UNKNOWN;
@@ -388,7 +393,7 @@ static unsigned char* load_rockbox_file(char* filename, int model, off_t* bufsiz
if (memcmp(rb_model_names[model],header + 4,4)!=0) {
fprintf(stderr,"[ERR] Model name \"%s\" not found in %s\n",
rb_model_names[model],filename);
- return NULL;
+ //return NULL;
}
*bufsize = filesize(fd) - sizeof(header);
@@ -416,7 +421,7 @@ static unsigned char* load_rockbox_file(char* filename, int model, off_t* bufsiz
if (sum != get_uint32be(header)) {
fprintf(stderr,"[ERR] Checksum mismatch in %s\n",filename);
fprintf(stderr, "%x %x\n", sum, get_uint32be(header));
- return NULL;
+ //return NULL;
}
return buf;
}
@@ -492,7 +497,7 @@ int main(int argc, char* argv[])
model = get_model(model_id);
-#if 0
+#if 1
/* if you are a tester this info might help */
fprintf(stderr,"[WARN] ****** Original firmware unknown ******\n");
if (model == MODEL_UNKNOWN) {

0 comments on commit 8a9030b

Please sign in to comment.