mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
mkamsboot: make clip zip boot OF when pressing left button
pressing vol- to boot OF is still possible git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31112 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ab76a0db28
commit
444b17626f
3 changed files with 34 additions and 9 deletions
|
|
@ -154,16 +154,20 @@ unsigned char dualboot_fuzev2[332] = {
|
||||||
0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8,
|
0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8,
|
||||||
0x00, 0x00, 0x0d, 0xc8, 0x10, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x07, 0xc8
|
0x00, 0x00, 0x0d, 0xc8, 0x10, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x07, 0xc8
|
||||||
};
|
};
|
||||||
unsigned char dualboot_clipzip[168] = {
|
unsigned char dualboot_clipzip[232] = {
|
||||||
0x06, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x06, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x24, 0x00, 0x1f, 0xe5, 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5,
|
0x24, 0x00, 0x1f, 0xe5, 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5,
|
||||||
0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a,
|
0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a,
|
||||||
0x2c, 0x30, 0x0f, 0xe5, 0x54, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3,
|
0x2c, 0x30, 0x0f, 0xe5, 0x90, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3,
|
||||||
0x00, 0x10, 0x80, 0xe5, 0x48, 0x00, 0x9f, 0xe5, 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3,
|
0x00, 0x10, 0x80, 0xe5, 0x84, 0x00, 0x9f, 0xe5, 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3,
|
||||||
0x02, 0x00, 0x00, 0x1a, 0x58, 0x00, 0x1f, 0xe5, 0x58, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea,
|
0x11, 0x00, 0x00, 0x1a, 0x78, 0x00, 0x9f, 0xe5, 0x00, 0x14, 0x90, 0xe5, 0x06, 0x10, 0x81, 0xe3,
|
||||||
0x6c, 0x00, 0x1f, 0xe5, 0x6c, 0x10, 0x1f, 0xe5, 0x64, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2,
|
0x20, 0x10, 0xc1, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x08, 0x10, 0x80, 0xe5,
|
||||||
0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1,
|
0x04, 0x10, 0xa0, 0xe3, 0x10, 0x10, 0x80, 0xe5, 0x32, 0x10, 0xa0, 0xe3, 0x01, 0x10, 0x51, 0xe2,
|
||||||
0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1,
|
0xfd, 0xff, 0xff, 0x1a, 0x80, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x1a,
|
||||||
0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8
|
0x94, 0x00, 0x1f, 0xe5, 0x94, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0xa8, 0x00, 0x1f, 0xe5,
|
||||||
|
0xa8, 0x10, 0x1f, 0xe5, 0xa0, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0,
|
||||||
|
0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a,
|
||||||
|
0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8,
|
||||||
|
0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0d, 0xc8
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@ extern unsigned char dualboot_fuze[176];
|
||||||
extern unsigned char dualboot_clipv2[248];
|
extern unsigned char dualboot_clipv2[248];
|
||||||
extern unsigned char dualboot_clipplus[340];
|
extern unsigned char dualboot_clipplus[340];
|
||||||
extern unsigned char dualboot_fuzev2[332];
|
extern unsigned char dualboot_fuzev2[332];
|
||||||
extern unsigned char dualboot_clipzip[168];
|
extern unsigned char dualboot_clipzip[232];
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,27 @@ uclcopy:
|
||||||
cmp r1, #0 @ test input from pins
|
cmp r1, #0 @ test input from pins
|
||||||
bne boot_of @ branch directly to OF if either pin high
|
bne boot_of @ branch directly to OF if either pin high
|
||||||
|
|
||||||
|
ldr r0, =GPIOC
|
||||||
|
|
||||||
|
ldr r1, [r0, #0x400]
|
||||||
|
orr r1, r1, #((1<<1)|(1<<2)) @ output
|
||||||
|
bic r1, r1, #(1<<5) @ input
|
||||||
|
str r1, [r0, #0x400]
|
||||||
|
|
||||||
|
mov r1, #0
|
||||||
|
str r1, [r0, #4*(1<<1)] @ zero C1
|
||||||
|
mov r1, #(1<<2)
|
||||||
|
str r1, [r0, #4*(1<<2)] @ set C2
|
||||||
|
|
||||||
|
mov r1, #50 /* small delay */
|
||||||
|
1: subs r1, r1, #1
|
||||||
|
bne 1b
|
||||||
|
|
||||||
|
ldr r1, [r0, #4*(1<<5)] @ read C5 = left
|
||||||
|
|
||||||
|
cmp r1, #0
|
||||||
|
bne boot_of
|
||||||
|
|
||||||
#elif defined(SANSA_C200V2)
|
#elif defined(SANSA_C200V2)
|
||||||
.set BUTTON_LEFT, (1<< 2)
|
.set BUTTON_LEFT, (1<< 2)
|
||||||
.set BUTTON_DOWN, (1<< 3)
|
.set BUTTON_DOWN, (1<< 3)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue