Index: umsboot/target/ipodnano2g/lcd.S |
— | — | @@ -26,11 +26,16 @@ |
27 | 27 | .global lcd_init
|
28 | 28 | .type lcd_init, %function
|
29 | 29 | lcd_init:
|
30 | | - mov r1, #0x38000000
|
31 | | - orr r1, r1, #0x400000
|
| 30 | + mov r1, #0x38400000
|
32 | 31 | mov r0, #0x20000000
|
33 | | - orr r0, r0, #0x190000
|
| 32 | + orr r0, r0, #0x590000
|
34 | 33 | str r0, [r1,#0x104]
|
| 34 | + orr r1, r1, #0x200000
|
| 35 | + mov r0, #0xd00
|
| 36 | + orr r0, r0, #0x1
|
| 37 | + str r0, [r1]
|
| 38 | + mov r0, #0
|
| 39 | + str r0, [r1,#0x10]
|
35 | 40 | mov pc, lr
|
36 | 41 | .size lcd_init, .-lcd_init
|
37 | 42 |
|
— | — | @@ -51,46 +56,46 @@ |
52 | 57 | b lcd_shutdown_done
|
53 | 58 | lcd_shutdown_type2:
|
54 | 59 | mov r0, #0x07
|
55 | | - bl displaylcd_sendlcd2c
|
| 60 | + bl displaylcd_sendlcdc
|
56 | 61 | mov r0, #0x200
|
57 | 62 | orr r0, r0, #0x32
|
58 | | - bl displaylcd_sendlcd2d
|
| 63 | + bl displaylcd_sendlcdd
|
59 | 64 | mov r0, #0x13
|
60 | | - bl displaylcd_sendlcd2c
|
| 65 | + bl displaylcd_sendlcdc
|
61 | 66 | mov r0, #0x1100
|
62 | 67 | orr r0, #0x37
|
63 | | - bl displaylcd_sendlcd2d
|
| 68 | + bl displaylcd_sendlcdd
|
64 | 69 | mov r0, #0x07
|
65 | | - bl displaylcd_sendlcd2c
|
| 70 | + bl displaylcd_sendlcdc
|
66 | 71 | mov r0, #0x200
|
67 | 72 | orr r0, r0, #0x01
|
68 | | - bl displaylcd_sendlcd2d
|
| 73 | + bl displaylcd_sendlcdd
|
69 | 74 | mov r0, #0x13
|
70 | | - bl displaylcd_sendlcd2c
|
| 75 | + bl displaylcd_sendlcdc
|
71 | 76 | mov r0, #0x100
|
72 | 77 | orr r0, #0x37
|
73 | | - bl displaylcd_sendlcd2d
|
| 78 | + bl displaylcd_sendlcdd
|
74 | 79 | mov r0, #0x07
|
75 | | - bl displaylcd_sendlcd2c
|
| 80 | + bl displaylcd_sendlcdc
|
76 | 81 | mov r0, #0x200
|
77 | | - bl displaylcd_sendlcd2d
|
| 82 | + bl displaylcd_sendlcdd
|
78 | 83 | mov r0, #0x10
|
79 | | - bl displaylcd_sendlcd2c
|
| 84 | + bl displaylcd_sendlcdc
|
80 | 85 | mov r0, #0x680
|
81 | | - bl displaylcd_sendlcd2d
|
| 86 | + bl displaylcd_sendlcdd
|
82 | 87 | mov r0, #0x12
|
83 | | - bl displaylcd_sendlcd2c
|
| 88 | + bl displaylcd_sendlcdc
|
84 | 89 | mov r0, #0x160
|
85 | | - bl displaylcd_sendlcd2d
|
| 90 | + bl displaylcd_sendlcdd
|
86 | 91 | mov r0, #0x13
|
87 | | - bl displaylcd_sendlcd2c
|
| 92 | + bl displaylcd_sendlcdc
|
88 | 93 | mov r0, #0x100
|
89 | 94 | orr r0, r0, #0x27
|
90 | | - bl displaylcd_sendlcd2d
|
| 95 | + bl displaylcd_sendlcdd
|
91 | 96 | mov r0, #0x10
|
92 | | - bl displaylcd_sendlcd2c
|
| 97 | + bl displaylcd_sendlcdc
|
93 | 98 | mov r0, #0x600
|
94 | | - bl displaylcd_sendlcd2d
|
| 99 | + bl displaylcd_sendlcdd
|
95 | 100 | lcd_shutdown_done:
|
96 | 101 | ldmfd sp!, {r4, lr}
|
97 | 102 | mov r0, #5120
|
— | — | @@ -129,7 +134,7 @@ |
130 | 135 | .global displaylcd
|
131 | 136 | .type displaylcd, %function
|
132 | 137 | displaylcd:
|
133 | | - stmfd sp!, {r0-r4,lr}
|
| 138 | + stmfd sp!, {r0-r5,lr}
|
134 | 139 | bl displaylcd_sync
|
135 | 140 | bl displaylcd_detectlcd
|
136 | 141 | sub r12, r12, #0x04900000
|
— | — | @@ -136,45 +141,45 @@ |
137 | 142 | cmp r0, #2
|
138 | 143 | bne displaylcd_othertypes
|
139 | 144 | mov r0, #0x50
|
140 | | - bl displaylcd_sendlcd2c
|
| 145 | + bl displaylcd_sendlcdc
|
141 | 146 | ldr r0, [sp]
|
142 | | - bl displaylcd_sendlcd2d
|
| 147 | + bl displaylcd_sendlcdd
|
143 | 148 | mov r0, #0x51
|
144 | | - bl displaylcd_sendlcd2c
|
| 149 | + bl displaylcd_sendlcdc
|
145 | 150 | ldr r0, [sp,#0x04]
|
146 | | - bl displaylcd_sendlcd2d
|
| 151 | + bl displaylcd_sendlcdd
|
147 | 152 | mov r0, #0x52
|
148 | | - bl displaylcd_sendlcd2c
|
| 153 | + bl displaylcd_sendlcdc
|
149 | 154 | ldr r0, [sp,#0x08]
|
150 | | - bl displaylcd_sendlcd2d
|
| 155 | + bl displaylcd_sendlcdd
|
151 | 156 | mov r0, #0x53
|
152 | | - bl displaylcd_sendlcd2c
|
| 157 | + bl displaylcd_sendlcdc
|
153 | 158 | ldr r0, [sp,#0x0c]
|
154 | | - bl displaylcd_sendlcd2d
|
| 159 | + bl displaylcd_sendlcdd
|
155 | 160 | mov r0, #0x20
|
156 | | - bl displaylcd_sendlcd2c
|
| 161 | + bl displaylcd_sendlcdc
|
157 | 162 | ldr r0, [sp]
|
158 | | - bl displaylcd_sendlcd2d
|
| 163 | + bl displaylcd_sendlcdd
|
159 | 164 | mov r0, #0x21
|
160 | | - bl displaylcd_sendlcd2c
|
| 165 | + bl displaylcd_sendlcdc
|
161 | 166 | ldr r0, [sp,#0x08]
|
162 | | - bl displaylcd_sendlcd2d
|
| 167 | + bl displaylcd_sendlcdd
|
163 | 168 | mov r0, #0x22
|
164 | | - bl displaylcd_sendlcd2c
|
| 169 | + bl displaylcd_sendlcdc
|
165 | 170 | b displaylcd_blit
|
166 | 171 | displaylcd_othertypes:
|
167 | 172 | mov r0, #0x2a
|
168 | 173 | bl displaylcd_sendlcdc
|
169 | 174 | ldr r0, [sp]
|
170 | | - bl displaylcd_sendlcd2d
|
| 175 | + bl displaylcd_sendlcdd
|
171 | 176 | ldr r0, [sp,#0x04]
|
172 | | - bl displaylcd_sendlcd2d
|
| 177 | + bl displaylcd_sendlcdd
|
173 | 178 | mov r0, #0x2b
|
174 | 179 | bl displaylcd_sendlcdc
|
175 | 180 | ldr r0, [sp,#0x08]
|
176 | | - bl displaylcd_sendlcd2d
|
| 181 | + bl displaylcd_sendlcdd
|
177 | 182 | ldr r0, [sp,#0x0c]
|
178 | | - bl displaylcd_sendlcd2d
|
| 183 | + bl displaylcd_sendlcdd
|
179 | 184 | mov r0, #0x2c
|
180 | 185 | bl displaylcd_sendlcdc
|
181 | 186 | displaylcd_blit:
|
— | — | @@ -183,56 +188,61 @@ |
184 | 189 | add r1, r1, #1
|
185 | 190 | sub r3, r2
|
186 | 191 | add r3, r3, #1
|
187 | | - mul r2, r1, r3
|
188 | | - ldr r1, [sp,#0x18]
|
| 192 | + mul r5, r1, r3
|
| 193 | + ldr r1, [sp,#0x1c]
|
| 194 | + add r12, r12, #0x40
|
| 195 | +displaylcd_wait:
|
| 196 | + ldr r4, [r12,#-0x24]
|
| 197 | + tst r4, #8
|
| 198 | + bne displaylcd_wait
|
189 | 199 | cmp r1, #-1
|
190 | 200 | bne displaylcd_dma
|
| 201 | + ldr r0, [sp,#0x20]
|
| 202 | + movs r4, r5,lsl#31
|
| 203 | + mov r1, r0
|
| 204 | + stmcsia r12, {r0-r1}
|
| 205 | + mov r2, r0
|
| 206 | + strne r0, [r12]
|
| 207 | + mov r3, r0
|
191 | 208 | displaylcd_pixel:
|
192 | | - ldr r0, [sp,#0x1c]
|
193 | | - bl displaylcd_sendlcd2d
|
194 | | - subs r2, r2, #1
|
| 209 | + ldr r4, [r12,#-0x24]
|
| 210 | + tst r4, #8
|
195 | 211 | bne displaylcd_pixel
|
196 | | - ldmfd sp!, {r0-r4,pc}
|
| 212 | + subs r5, r5, #4
|
| 213 | + stmcsia r12, {r0-r3}
|
| 214 | + bhi displaylcd_pixel
|
| 215 | + ldmfd sp!, {r0-r5,pc}
|
197 | 216 | displaylcd_dma:
|
198 | | - mov r4, #0x38000000
|
199 | | - orr r4, r4, #0x400000
|
| 217 | + movs r4, r5,lsl#31
|
| 218 | + mov r4, #0x38400000
|
| 219 | + ldrcsh r2, [r1], #2
|
200 | 220 | mov r0, #0x20000000
|
201 | | - orr r0, r0, #0x190000
|
| 221 | + ldrcsh r3, [r1], #2
|
| 222 | + orr r0, r0, #0x590000
|
| 223 | + stmcsia r12, {r2-r3}
|
| 224 | + mov r3, r5,lsr#2
|
| 225 | + ldrneh r2, [r1], #2
|
| 226 | + sub r3, r3, #1
|
| 227 | + str r1, [r4,#0x100]
|
202 | 228 | str r0, [r4,#0x104]
|
203 | | - str r1, [r4,#0x100]
|
204 | | - mov r0, r2,lsr#1
|
205 | | - sub r0, r0, #1
|
206 | | - str r0, [r4,#0x108]
|
| 229 | + str r3, [r4,#0x108]
|
| 230 | + strne r2, [r12]
|
207 | 231 | bl clean_dcache
|
208 | 232 | mov r0, #4
|
209 | 233 | str r0, [r4,#0x114]
|
210 | | - ldmfd sp!, {r0-r4,pc}
|
| 234 | + ldmfd sp!, {r0-r5,pc}
|
211 | 235 |
|
212 | | -displaylcd_sendlcd2c:
|
| 236 | +displaylcd_sendlcdc:
|
213 | 237 | ldr r4, [r12,#0x1c]
|
214 | 238 | tst r4, #0x10
|
215 | | - bne displaylcd_sendlcd2c
|
216 | | - mov r4, r0,lsr#8
|
217 | | - str r4, [r12,#0x04]
|
218 | | - and r0, r0, #0xff
|
219 | | -displaylcd_sendlcdc:
|
220 | | - ldrh r4, [r12,#0x1c]
|
221 | | - tst r4, #0x10
|
222 | 239 | bne displaylcd_sendlcdc
|
223 | | - strh r0, [r12,#0x04]
|
| 240 | + str r0, [r12,#0x04]
|
224 | 241 | mov pc, lr
|
225 | | -displaylcd_sendlcd2d:
|
226 | | - ldrh r4, [r12,#0x1c]
|
227 | | - tst r4, #0x10
|
228 | | - bne displaylcd_sendlcd2d
|
229 | | - mov r4, r0,lsr#8
|
230 | | - strh r4, [r12,#0x40]
|
231 | | - and r0, r0, #0xff
|
232 | 242 | displaylcd_sendlcdd:
|
233 | | - ldrh r4, [r12,#0x1c]
|
| 243 | + ldr r4, [r12,#0x1c]
|
234 | 244 | tst r4, #0x10
|
235 | 245 | bne displaylcd_sendlcdd
|
236 | | - strh r0, [r12,#0x40]
|
| 246 | + str r0, [r12,#0x40]
|
237 | 247 | mov pc, lr
|
238 | 248 |
|
239 | 249 | displaylcd_detectlcd:
|
— | — | @@ -260,8 +270,7 @@ |
261 | 271 | displaylcd_sync:
|
262 | 272 | str lr, [sp,#-4]!
|
263 | 273 | displaylcd_sync_wait:
|
264 | | - mov r1, #0x38000000
|
265 | | - orr r1, r1, #0x400000
|
| 274 | + mov r1, #0x38400000
|
266 | 275 | ldr r0, [r1,#0x184]
|
267 | 276 | tst r0, #0x70000
|
268 | 277 | ldreq pc, [sp], #4
|
— | — | @@ -273,8 +282,7 @@ |
274 | 283 | .global displaylcd_busy
|
275 | 284 | .type displaylcd_busy, %function
|
276 | 285 | displaylcd_busy:
|
277 | | - mov r1, #0x38000000
|
278 | | - orr r1, r1, #0x400000
|
| 286 | + mov r1, #0x38400000
|
279 | 287 | ldr r0, [r1,#0x184]
|
280 | 288 | and r0, r0, #0x70000
|
281 | 289 | mov pc, lr
|
— | — | @@ -285,8 +293,7 @@ |
286 | 294 | .global displaylcd_safe
|
287 | 295 | .type displaylcd_safe, %function
|
288 | 296 | displaylcd_safe:
|
289 | | - mov r1, #0x38000000
|
290 | | - orr r1, r1, #0x400000
|
| 297 | + mov r1, #0x38400000
|
291 | 298 | ldr r0, [r1,#0x184]
|
292 | 299 | tst r0, #0x70000
|
293 | 300 | moveq r0, #1
|
— | — | @@ -300,8 +307,7 @@ |
301 | 308 | .type INT_DMA8, %function
|
302 | 309 | INT_DMA8:
|
303 | 310 | str lr, [sp,#-4]!
|
304 | | - mov r1, #0x38000000
|
305 | | - orr r1, r1, #0x400000
|
| 311 | + mov r1, #0x38400000
|
306 | 312 | mov r0, #7
|
307 | 313 | str r0, [r1,#0x114]
|
308 | 314 | bl lcdconsole_callback
|