diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-01-08 01:09:31 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-01-08 01:09:31 +0000 |
commit | 08e6c6bc2a90e953372e503367c406c469994da2 (patch) | |
tree | fc7296aaa4d5fd85f18b6ed04b19773664753cbc /firmware | |
parent | 54aeadaa6bd876e04b9560c68e6fbc3ec6be3f2b (diff) | |
download | rockbox-08e6c6bc2a90e953372e503367c406c469994da2.tar.gz rockbox-08e6c6bc2a90e953372e503367c406c469994da2.zip |
Greyscale library: Very slight speedup on archos.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16021 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/sh/archos/lcd-as-archos-bitmap.S | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/firmware/target/sh/archos/lcd-as-archos-bitmap.S b/firmware/target/sh/archos/lcd-as-archos-bitmap.S index a84ce50686..492413fdb7 100644 --- a/firmware/target/sh/archos/lcd-as-archos-bitmap.S +++ b/firmware/target/sh/archos/lcd-as-archos-bitmap.S | |||
@@ -240,112 +240,111 @@ _lcd_grey_data: | |||
240 | * this would significantly decrease performance. */ | 240 | * this would significantly decrease performance. */ |
241 | 241 | ||
242 | mov.b @r3, r0 /* r0 = PBDRL */ | 242 | mov.b @r3, r0 /* r0 = PBDRL */ |
243 | mov r4, r8 /* copy start address */ | 243 | mov #0x80, r9 /* for phase modification - "or #imm,xx" only allows r0 */ |
244 | mov.b @r4+, r6 /* fetch first pixel phase */ | 244 | mov.b @r4+, r6 /* fetch first pixel phase */ |
245 | or #(LCD_DS|LCD_SD), r0 /* r0 |= LCD_DS|LCD_SD */ | 245 | or #(LCD_DS|LCD_SD), r0 /* r0 |= LCD_DS|LCD_SD */ |
246 | and #(~(LCD_CS|LCD_SC)), r0 /* r0 &= ~(LCD_CS|LCD_SC) */ | 246 | and #(~(LCD_CS|LCD_SC)), r0 /* r0 &= ~(LCD_CS|LCD_SC) */ |
247 | neg r0, r2 /* r2 = 0 - r0 */ | 247 | neg r0, r2 /* r2 = 0 - r0 */ |
248 | mov #0x80, r9 /* for phase modification - "or #imm,xx" only allows r0 */ | 248 | mov #-3, r0 /* offset for storing phase */ |
249 | 249 | ||
250 | /* loop exploits that SD is on bit 0 for recorders and Ondios */ | 250 | /* loop exploits that SD is on bit 0 for recorders and Ondios */ |
251 | 251 | ||
252 | .greyloop: | 252 | .greyloop: |
253 | cmp/pz r6 /* phase non-negative? */ | 253 | cmp/pz r6 /* phase non-negative? */ |
254 | mov.b @r4+, r0 /* fetch pixel value */ | 254 | mov.b @r4+, r8 /* fetch pixel value */ |
255 | negc r2, r1 /* T -> SD, SC low */ | 255 | negc r2, r1 /* T -> SD, SC low */ |
256 | mov.b r1, @r3 /* set port */ | 256 | mov.b r1, @r3 /* set port */ |
257 | or r9, r6 /* r6 -= (r6 >= 0) ? 128 : 0; */ | 257 | or r9, r6 /* r6 -= (r6 >= 0) ? 128 : 0; */ |
258 | mov.b @r4+, r7 /* fetch next pixel phase */ | 258 | mov.b @r4+, r7 /* fetch next pixel phase */ |
259 | add #(LCD_SC), r1 /* rise SC */ | 259 | add #(LCD_SC), r1 /* rise SC */ |
260 | mov.b r1, @r3 /* set port */ | 260 | mov.b r1, @r3 /* set port */ |
261 | add r6, r0 /* calculate new phase */ | 261 | add r8, r6 /* calculate new phase */ |
262 | mov.b r0, @r8 /* store phase */ | 262 | mov.b r6, @(r0,r4) /* store phase */ |
263 | 263 | ||
264 | cmp/pz r7 | 264 | cmp/pz r7 |
265 | mov.b @r4+, r0 | 265 | mov.b @r4+, r8 |
266 | negc r2, r1 | 266 | negc r2, r1 |
267 | mov.b r1, @r3 | 267 | mov.b r1, @r3 |
268 | or r9, r7 | 268 | or r9, r7 |
269 | mov.b @r4+, r6 | 269 | mov.b @r4+, r6 |
270 | add #(LCD_SC), r1 | 270 | add #(LCD_SC), r1 |
271 | mov.b r1, @r3 | 271 | mov.b r1, @r3 |
272 | add r7, r0 | 272 | add r8, r7 |
273 | mov.b r0, @(2,r8) | 273 | mov.b r7, @(r0,r4) |
274 | 274 | ||
275 | cmp/pz r6 | 275 | cmp/pz r6 |
276 | mov.b @r4+, r0 | 276 | mov.b @r4+, r8 |
277 | negc r2, r1 | 277 | negc r2, r1 |
278 | mov.b r1, @r3 | 278 | mov.b r1, @r3 |
279 | or r9, r6 | 279 | or r9, r6 |
280 | mov.b @r4+, r7 | 280 | mov.b @r4+, r7 |
281 | add #(LCD_SC), r1 | 281 | add #(LCD_SC), r1 |
282 | mov.b r1, @r3 | 282 | mov.b r1, @r3 |
283 | add r6, r0 | 283 | add r8, r6 |
284 | mov.b r0, @(4,r8) | 284 | mov.b r6, @(r0,r4) |
285 | 285 | ||
286 | cmp/pz r7 | 286 | cmp/pz r7 |
287 | mov.b @r4+, r0 | 287 | mov.b @r4+, r8 |
288 | negc r2, r1 | 288 | negc r2, r1 |
289 | mov.b r1, @r3 | 289 | mov.b r1, @r3 |
290 | or r9, r7 | 290 | or r9, r7 |
291 | mov.b @r4+, r6 | 291 | mov.b @r4+, r6 |
292 | add #(LCD_SC), r1 | 292 | add #(LCD_SC), r1 |
293 | mov.b r1, @r3 | 293 | mov.b r1, @r3 |
294 | add r7, r0 | 294 | add r8, r7 |
295 | mov.b r0, @(6,r8) | 295 | mov.b r7, @(r0,r4) |
296 | 296 | ||
297 | cmp/pz r6 | 297 | cmp/pz r6 |
298 | mov.b @r4+, r0 | 298 | mov.b @r4+, r8 |
299 | negc r2, r1 | 299 | negc r2, r1 |
300 | mov.b r1, @r3 | 300 | mov.b r1, @r3 |
301 | or r9, r6 | 301 | or r9, r6 |
302 | mov.b @r4+, r7 | 302 | mov.b @r4+, r7 |
303 | add #(LCD_SC), r1 | 303 | add #(LCD_SC), r1 |
304 | mov.b r1, @r3 | 304 | mov.b r1, @r3 |
305 | add r6, r0 | 305 | add r8, r6 |
306 | mov.b r0, @(8,r8) | 306 | mov.b r6, @(r0,r4) |
307 | 307 | ||
308 | cmp/pz r7 | 308 | cmp/pz r7 |
309 | mov.b @r4+, r0 | 309 | mov.b @r4+, r8 |
310 | negc r2, r1 | 310 | negc r2, r1 |
311 | mov.b r1, @r3 | 311 | mov.b r1, @r3 |
312 | or r9, r7 | 312 | or r9, r7 |
313 | mov.b @r4+, r6 | 313 | mov.b @r4+, r6 |
314 | add #(LCD_SC), r1 | 314 | add #(LCD_SC), r1 |
315 | mov.b r1, @r3 | 315 | mov.b r1, @r3 |
316 | add r7, r0 | 316 | add r8, r7 |
317 | mov.b r0, @(10,r8) | 317 | mov.b r7, @(r0,r4) |
318 | 318 | ||
319 | cmp/pz r6 | 319 | cmp/pz r6 |
320 | mov.b @r4+, r0 | 320 | mov.b @r4+, r8 |
321 | negc r2, r1 | 321 | negc r2, r1 |
322 | mov.b r1, @r3 | 322 | mov.b r1, @r3 |
323 | or r9, r6 | 323 | or r9, r6 |
324 | mov.b @r4+, r7 | 324 | mov.b @r4+, r7 |
325 | add #(LCD_SC), r1 | 325 | add #(LCD_SC), r1 |
326 | mov.b r1, @r3 | 326 | mov.b r1, @r3 |
327 | add r6, r0 | 327 | add r8, r6 |
328 | mov.b r0, @(12,r8) | 328 | mov.b r6, @(r0,r4) |
329 | 329 | ||
330 | cmp/pz r7 | 330 | cmp/pz r7 |
331 | mov.b @r4+, r0 | 331 | mov.b @r4+, r8 |
332 | negc r2, r1 | 332 | negc r2, r1 |
333 | mov.b r1, @r3 | 333 | mov.b r1, @r3 |
334 | or r9, r7 | 334 | or r9, r7 |
335 | mov.b @r4+, r6 | 335 | mov.b @r4+, r6 |
336 | add #(LCD_SC), r1 | 336 | add #(LCD_SC), r1 |
337 | mov.b r1, @r3 | 337 | mov.b r1, @r3 |
338 | add r7, r0 | 338 | add r8, r7 |
339 | mov.b r0, @(14,r8) | 339 | mov.b r7, @(r0,r4) |
340 | 340 | ||
341 | add #16, r8 /* advance current block address */ | ||
342 | cmp/hi r4, r5 /* some blocks left? */ | 341 | cmp/hi r4, r5 /* some blocks left? */ |
343 | bt .greyloop | 342 | bt .greyloop |
344 | 343 | ||
345 | mov.l @r15+, r9 /* restore r9 */ | ||
346 | mov #(LCD_CS|LCD_DS|LCD_SD|LCD_SC), r0 | 344 | mov #(LCD_CS|LCD_DS|LCD_SD|LCD_SC), r0 |
347 | mov.l @r15+, r8 /* restore r8 */ | 345 | mov.l @r15+, r9 /* restore r9 */ |
348 | or r0, r1 /* restore port */ | 346 | or r0, r1 /* restore port */ |
347 | mov.l @r15+, r8 /* restore r8 */ | ||
349 | rts | 348 | rts |
350 | mov.b r1, @r3 | 349 | mov.b r1, @r3 |
351 | 350 | ||