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 | |
parent | 54aeadaa6bd876e04b9560c68e6fbc3ec6be3f2b (diff) |
Greyscale library: Very slight speedup on archos.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16021 a1c6a512-1295-4272-9138-f99709370657
-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: * this would significantly decrease performance. */ mov.b @r3, r0 /* r0 = PBDRL */ - mov r4, r8 /* copy start address */ + mov #0x80, r9 /* for phase modification - "or #imm,xx" only allows r0 */ mov.b @r4+, r6 /* fetch first pixel phase */ or #(LCD_DS|LCD_SD), r0 /* r0 |= LCD_DS|LCD_SD */ and #(~(LCD_CS|LCD_SC)), r0 /* r0 &= ~(LCD_CS|LCD_SC) */ neg r0, r2 /* r2 = 0 - r0 */ - mov #0x80, r9 /* for phase modification - "or #imm,xx" only allows r0 */ - + mov #-3, r0 /* offset for storing phase */ + /* loop exploits that SD is on bit 0 for recorders and Ondios */ .greyloop: cmp/pz r6 /* phase non-negative? */ - mov.b @r4+, r0 /* fetch pixel value */ + mov.b @r4+, r8 /* fetch pixel value */ negc r2, r1 /* T -> SD, SC low */ mov.b r1, @r3 /* set port */ or r9, r6 /* r6 -= (r6 >= 0) ? 128 : 0; */ mov.b @r4+, r7 /* fetch next pixel phase */ add #(LCD_SC), r1 /* rise SC */ mov.b r1, @r3 /* set port */ - add r6, r0 /* calculate new phase */ - mov.b r0, @r8 /* store phase */ + add r8, r6 /* calculate new phase */ + mov.b r6, @(r0,r4) /* store phase */ cmp/pz r7 - mov.b @r4+, r0 + mov.b @r4+, r8 negc r2, r1 mov.b r1, @r3 or r9, r7 mov.b @r4+, r6 add #(LCD_SC), r1 mov.b r1, @r3 - add r7, r0 - mov.b r0, @(2,r8) + add r8, r7 + mov.b r7, @(r0,r4) cmp/pz r6 - mov.b @r4+, r0 + mov.b @r4+, r8 negc r2, r1 mov.b r1, @r3 or r9, r6 mov.b @r4+, r7 add #(LCD_SC), r1 mov.b r1, @r3 - add r6, r0 - mov.b r0, @(4,r8) + add r8, r6 + mov.b r6, @(r0,r4) cmp/pz r7 - mov.b @r4+, r0 + mov.b @r4+, r8 negc r2, r1 mov.b r1, @r3 or r9, r7 mov.b @r4+, r6 add #(LCD_SC), r1 mov.b r1, @r3 - add r7, r0 - mov.b r0, @(6,r8) + add r8, r7 + mov.b r7, @(r0,r4) cmp/pz r6 - mov.b @r4+, r0 + mov.b @r4+, r8 negc r2, r1 mov.b r1, @r3 or r9, r6 mov.b @r4+, r7 add #(LCD_SC), r1 mov.b r1, @r3 - add r6, r0 - mov.b r0, @(8,r8) + add r8, r6 + mov.b r6, @(r0,r4) cmp/pz r7 - mov.b @r4+, r0 + mov.b @r4+, r8 negc r2, r1 mov.b r1, @r3 or r9, r7 mov.b @r4+, r6 add #(LCD_SC), r1 mov.b r1, @r3 - add r7, r0 - mov.b r0, @(10,r8) + add r8, r7 + mov.b r7, @(r0,r4) cmp/pz r6 - mov.b @r4+, r0 + mov.b @r4+, r8 negc r2, r1 mov.b r1, @r3 or r9, r6 mov.b @r4+, r7 add #(LCD_SC), r1 mov.b r1, @r3 - add r6, r0 - mov.b r0, @(12,r8) + add r8, r6 + mov.b r6, @(r0,r4) cmp/pz r7 - mov.b @r4+, r0 + mov.b @r4+, r8 negc r2, r1 mov.b r1, @r3 or r9, r7 mov.b @r4+, r6 add #(LCD_SC), r1 mov.b r1, @r3 - add r7, r0 - mov.b r0, @(14,r8) + add r8, r7 + mov.b r7, @(r0,r4) - add #16, r8 /* advance current block address */ cmp/hi r4, r5 /* some blocks left? */ bt .greyloop - mov.l @r15+, r9 /* restore r9 */ mov #(LCD_CS|LCD_DS|LCD_SD|LCD_SC), r0 - mov.l @r15+, r8 /* restore r8 */ + mov.l @r15+, r9 /* restore r9 */ or r0, r1 /* restore port */ + mov.l @r15+, r8 /* restore r8 */ rts mov.b r1, @r3 |