summaryrefslogtreecommitdiff
path: root/rbutil
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2011-12-02 18:31:40 +0000
committerRafaël Carré <rafael.carre@gmail.com>2011-12-02 18:31:40 +0000
commit444b17626fc8e1ed7dee23252d3bd0fe5d0020f9 (patch)
tree561fd2af5e56fb3d2d9f01d9b442697a6f9d7156 /rbutil
parentab76a0db287f41c100be1d467a4077fd60789d72 (diff)
downloadrockbox-444b17626fc8e1ed7dee23252d3bd0fe5d0020f9.tar.gz
rockbox-444b17626fc8e1ed7dee23252d3bd0fe5d0020f9.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/mkamsboot/dualboot.c20
-rw-r--r--rbutil/mkamsboot/dualboot.h2
-rw-r--r--rbutil/mkamsboot/dualboot/dualboot.S21
3 files changed, 34 insertions, 9 deletions
diff --git a/rbutil/mkamsboot/dualboot.c b/rbutil/mkamsboot/dualboot.c
index b1bf69d12b..644444703a 100644
--- a/rbutil/mkamsboot/dualboot.c
+++ b/rbutil/mkamsboot/dualboot.c
@@ -154,16 +154,20 @@ unsigned char dualboot_fuzev2[332] = {
154 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8, 154 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8,
155 0x00, 0x00, 0x0d, 0xc8, 0x10, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x07, 0xc8 155 0x00, 0x00, 0x0d, 0xc8, 0x10, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x07, 0xc8
156}; 156};
157unsigned char dualboot_clipzip[168] = { 157unsigned char dualboot_clipzip[232] = {
158 0x06, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 158 0x06, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
159 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 159 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
160 0x24, 0x00, 0x1f, 0xe5, 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5, 160 0x24, 0x00, 0x1f, 0xe5, 0x24, 0x10, 0x1f, 0xe5, 0x01, 0x20, 0x40, 0xe0, 0x18, 0x30, 0x1f, 0xe5,
161 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a, 161 0x01, 0x40, 0x50, 0xe4, 0x01, 0x40, 0x43, 0xe4, 0x00, 0x00, 0x52, 0xe1, 0xfb, 0xff, 0xff, 0x1a,
162 0x2c, 0x30, 0x0f, 0xe5, 0x54, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3, 162 0x2c, 0x30, 0x0f, 0xe5, 0x90, 0x00, 0x9f, 0xe5, 0x00, 0x10, 0x90, 0xe5, 0x01, 0x18, 0x81, 0xe3,
163 0x00, 0x10, 0x80, 0xe5, 0x48, 0x00, 0x9f, 0xe5, 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 163 0x00, 0x10, 0x80, 0xe5, 0x84, 0x00, 0x9f, 0xe5, 0x00, 0x11, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3,
164 0x02, 0x00, 0x00, 0x1a, 0x58, 0x00, 0x1f, 0xe5, 0x58, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 164 0x11, 0x00, 0x00, 0x1a, 0x78, 0x00, 0x9f, 0xe5, 0x00, 0x14, 0x90, 0xe5, 0x06, 0x10, 0x81, 0xe3,
165 0x6c, 0x00, 0x1f, 0xe5, 0x6c, 0x10, 0x1f, 0xe5, 0x64, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 165 0x20, 0x10, 0xc1, 0xe3, 0x00, 0x14, 0x80, 0xe5, 0x00, 0x10, 0xa0, 0xe3, 0x08, 0x10, 0x80, 0xe5,
166 0x01, 0x40, 0x43, 0xe0, 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 166 0x04, 0x10, 0xa0, 0xe3, 0x10, 0x10, 0x80, 0xe5, 0x32, 0x10, 0xa0, 0xe3, 0x01, 0x10, 0x51, 0xe2,
167 0xfb, 0xff, 0xff, 0x1a, 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 167 0xfd, 0xff, 0xff, 0x1a, 0x80, 0x10, 0x90, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x02, 0x00, 0x00, 0x1a,
168 0x14, 0x00, 0x0f, 0xc8, 0x00, 0x00, 0x0b, 0xc8 168 0x94, 0x00, 0x1f, 0xe5, 0x94, 0x10, 0x1f, 0xe5, 0x01, 0x00, 0x00, 0xea, 0xa8, 0x00, 0x1f, 0xe5,
169 0xa8, 0x10, 0x1f, 0xe5, 0xa0, 0x30, 0x1f, 0xe5, 0x02, 0x50, 0x83, 0xe2, 0x01, 0x40, 0x43, 0xe0,
170 0x01, 0x20, 0x50, 0xe4, 0x01, 0x20, 0x43, 0xe4, 0x04, 0x00, 0x53, 0xe1, 0xfb, 0xff, 0xff, 0x1a,
171 0x01, 0x00, 0x83, 0xe2, 0x00, 0x20, 0xa0, 0xe3, 0x15, 0xff, 0x2f, 0xe1, 0x14, 0x00, 0x0f, 0xc8,
172 0x00, 0x00, 0x0b, 0xc8, 0x00, 0x00, 0x0d, 0xc8
169}; 173};
diff --git a/rbutil/mkamsboot/dualboot.h b/rbutil/mkamsboot/dualboot.h
index a635753c69..5df5208bd5 100644
--- a/rbutil/mkamsboot/dualboot.h
+++ b/rbutil/mkamsboot/dualboot.h
@@ -9,4 +9,4 @@ extern unsigned char dualboot_fuze[176];
9extern unsigned char dualboot_clipv2[248]; 9extern unsigned char dualboot_clipv2[248];
10extern unsigned char dualboot_clipplus[340]; 10extern unsigned char dualboot_clipplus[340];
11extern unsigned char dualboot_fuzev2[332]; 11extern unsigned char dualboot_fuzev2[332];
12extern unsigned char dualboot_clipzip[168]; 12extern unsigned char dualboot_clipzip[232];
diff --git a/rbutil/mkamsboot/dualboot/dualboot.S b/rbutil/mkamsboot/dualboot/dualboot.S
index 4df69a45cc..fae13df0e9 100644
--- a/rbutil/mkamsboot/dualboot/dualboot.S
+++ b/rbutil/mkamsboot/dualboot/dualboot.S
@@ -182,6 +182,27 @@ uclcopy:
182 cmp r1, #0 @ test input from pins 182 cmp r1, #0 @ test input from pins
183 bne boot_of @ branch directly to OF if either pin high 183 bne boot_of @ branch directly to OF if either pin high
184 184
185 ldr r0, =GPIOC
186
187 ldr r1, [r0, #0x400]
188 orr r1, r1, #((1<<1)|(1<<2)) @ output
189 bic r1, r1, #(1<<5) @ input
190 str r1, [r0, #0x400]
191
192 mov r1, #0
193 str r1, [r0, #4*(1<<1)] @ zero C1
194 mov r1, #(1<<2)
195 str r1, [r0, #4*(1<<2)] @ set C2
196
197 mov r1, #50 /* small delay */
1981: subs r1, r1, #1
199 bne 1b
200
201 ldr r1, [r0, #4*(1<<5)] @ read C5 = left
202
203 cmp r1, #0
204 bne boot_of
205
185#elif defined(SANSA_C200V2) 206#elif defined(SANSA_C200V2)
186.set BUTTON_LEFT, (1<< 2) 207.set BUTTON_LEFT, (1<< 2)
187.set BUTTON_DOWN, (1<< 3) 208.set BUTTON_DOWN, (1<< 3)