notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
e55f0cb
)
asm for PicoDoHighPal555
author
notaz
<notasas@gmail.com>
Wed, 23 Jul 2008 18:30:34 +0000
(18:30 +0000)
committer
notaz
<notasas@gmail.com>
Wed, 23 Jul 2008 18:30:34 +0000
(18:30 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@561
be3aeb3a
-fb24-0410-a615-
afba39da0efa
Pico/Draw.c
patch
|
blob
|
blame
|
history
Pico/Draw.s
patch
|
blob
|
blame
|
history
diff --git
a/Pico/Draw.c
b/Pico/Draw.c
index
acdd15d
..
6d64cd6
100644
(file)
--- a/
Pico/Draw.c
+++ b/
Pico/Draw.c
@@
-1138,6
+1138,7
@@
static void BackFill(int reg7, int sh)
\r
unsigned short HighPal[0x100];
\r
\r
\r
unsigned short HighPal[0x100];
\r
\r
+#ifndef _ASM_DRAW_C
\r
void PicoDoHighPal555(int sh)
\r
{
\r
unsigned short *pal=HighPal;
\r
void PicoDoHighPal555(int sh)
\r
{
\r
unsigned short *pal=HighPal;
\r
@@
-1169,7
+1170,6
@@
void PicoDoHighPal555(int sh)
}
\r
}
\r
\r
}
\r
}
\r
\r
-#ifndef _ASM_DRAW_C
\r
static void FinalizeLineBGR444(int sh)
\r
{
\r
unsigned short *pd=DrawLineDest;
\r
static void FinalizeLineBGR444(int sh)
\r
{
\r
unsigned short *pd=DrawLineDest;
\r
diff --git
a/Pico/Draw.s
b/Pico/Draw.s
index
036d3a9
..
5074a63
100644
(file)
--- a/
Pico/Draw.s
+++ b/
Pico/Draw.s
@@
-1633,18
+1633,15
@@
FinalizeLineBGR444:
orr \reg, \reg, r3 @ add blue back
\r
.endm
\r
\r
orr \reg, \reg, r3 @ add blue back
\r
.endm
\r
\r
-.global vidConvCpyRGB565
\r
-
\r
-vidConvCpyRGB565: @ void *to, void *from, int pixels
\r
- stmfd sp!, {r4-r9,lr}
\r
-
\r
+@ trashes: r2-r9,r12,lr; r0,r1 are advanced
\r
+.macro vidConvCpyRGB565_local
\r
mov r12, r2, lsr #3 @ repeats
\r
mov lr, #0x001c0000
\r
orr lr, lr, #0x01c @ lr == pattern 0x001c001c
\r
mov r8, #0x00030000
\r
orr r8, r8, #0x003
\r
\r
mov r12, r2, lsr #3 @ repeats
\r
mov lr, #0x001c0000
\r
orr lr, lr, #0x01c @ lr == pattern 0x001c001c
\r
mov r8, #0x00030000
\r
orr r8, r8, #0x003
\r
\r
-
.loopRGB565
:
\r
+
0
:
\r
ldmia r1!, {r4-r7}
\r
subs r12, r12, #1
\r
convRGB565 r4
\r
ldmia r1!, {r4-r7}
\r
subs r12, r12, #1
\r
convRGB565 r4
\r
@@
-1656,44
+1653,51
@@
vidConvCpyRGB565: @ void *to, void *from, int pixels
convRGB565 r7
\r
str r7, [r0], #4
\r
\r
convRGB565 r7
\r
str r7, [r0], #4
\r
\r
- bgt .loopRGB565
\r
+ bgt 0b
\r
+.endm
\r
+
\r
+
\r
+.global vidConvCpyRGB565
\r
\r
\r
+vidConvCpyRGB565: @ void *to, void *from, int pixels
\r
+ stmfd sp!, {r4-r9,lr}
\r
+ vidConvCpyRGB565_local
\r
ldmfd sp!, {r4-r9,lr}
\r
bx lr
\r
\r
\r
ldmfd sp!, {r4-r9,lr}
\r
bx lr
\r
\r
\r
+.global PicoDoHighPal555 @ int sh
\r
\r
\r
-.global FinalizeLineRGB555 @ int sh
\r
-
\r
-FinalizeLineRGB555:
\r
- stmfd sp!, {r4-r8,lr}
\r
+PicoDoHighPal555:
\r
+ stmfd sp!, {r4-r9,lr}
\r
+ mov r1, #0
\r
ldr r8, =(Pico+0x22228) @ Pico.video
\r
ldr r8, =(Pico+0x22228) @ Pico.video
\r
- ldr r4, =HighPal
\r
\r
\r
- ldrb r7, [r8, #-0x1a] @ 0x2220e ~ dirtyPal
\r
- mov r6, r0
\r
+PicoDoHighPal555_nopush:
\r
+ str r1, [sp, #-8] @ is called from FinalizeLineRGB555?
\r
+
\r
+ str r0, [sp, #-4]
\r
+ ldr r0, =HighPal
\r
+
\r
mov r1, #0
\r
mov r1, #0
\r
- tst r7, r7
\r
- beq .fl_noconvRGB555
\r
- strb r1, [r8, #-0x1a]
\r
+ strb r1, [r8, #-0x1a] @ 0x2220e ~ dirtyPal
\r
+
\r
sub r1, r8, #0x128 @ r1=Pico.cram
\r
sub r1, r8, #0x128 @ r1=Pico.cram
\r
- mov r0, r4
\r
mov r2, #0x40
\r
mov r2, #0x40
\r
- bl vidConvCpyRGB565
\r
+ vidConvCpyRGB565_local
\r
\r
\r
-.fl_noconvRGB555:
\r
- mov r3, r4
\r
- tst r6, r6
\r
- beq .fl_noshRGB555
\r
- tst r7, r7
\r
- beq .fl_noshRGB555
\r
+ ldr r0, [sp, #-4]
\r
+ tst r0, r0
\r
+ beq PicoDoHighPal555_end
\r
+
\r
+ ldr r3, =HighPal
\r
\r
@ shadowed pixels:
\r
mov r12, #0x008e
\r
\r
@ shadowed pixels:
\r
mov r12, #0x008e
\r
- orr r12,r12,#0x7300
\r
- orr r12,r12,r12,lsl #16
\r
add r4, r3, #0x40*2
\r
add r4, r3, #0x40*2
\r
+ orr r12,r12,#0x7300
\r
add r5, r3, #0xc0*2
\r
add r5, r3, #0xc0*2
\r
+ orr r12,r12,r12,lsl #16
\r
mov lr, #0x40/4
\r
.fl_loopcpRGB555_sh:
\r
ldmia r3!, {r1,r6}
\r
mov lr, #0x40/4
\r
.fl_loopcpRGB555_sh:
\r
ldmia r3!, {r1,r6}
\r
@@
-1713,13
+1717,33
@@
FinalizeLineRGB555:
str r1, [r4], #4
\r
subs lr, lr, #1
\r
bne .fl_loopcpRGB555_hi
\r
str r1, [r4], #4
\r
subs lr, lr, #1
\r
bne .fl_loopcpRGB555_hi
\r
+ mov r0, #1
\r
\r
\r
- sub r3, r3, #0x40*2
\r
- mov r6, #1
\r
+PicoDoHighPal555_end:
\r
+ ldr r1, [sp, #-8]
\r
+ tst r1, r1
\r
+ ldmeqfd sp!, {r4-r9,pc}
\r
+
\r
+ ldr r8, =(Pico+0x22228) @ Pico.video
\r
+ b FinalizeLineRGB555_pal_done
\r
+
\r
+
\r
+.global FinalizeLineRGB555 @ int sh
\r
+
\r
+FinalizeLineRGB555:
\r
+ stmfd sp!, {r4-r9,lr}
\r
+ ldr r8, =(Pico+0x22228) @ Pico.video
\r
+
\r
+ ldrb r2, [r8, #-0x1a] @ 0x2220e ~ dirtyPal
\r
+ mov r1, #1
\r
+ tst r2, r2
\r
+ bne PicoDoHighPal555_nopush
\r
+
\r
+FinalizeLineRGB555_pal_done:
\r
+ ldr r3, =HighPal
\r
\r
\r
-.fl_noshRGB555:
\r
ldr r12,=rendstatus
\r
ldr r12,=rendstatus
\r
- eors r
6, r6, #1
@ sh is 0
\r
+ eors r
0, r0, #1
@ sh is 0
\r
ldr r12,[r12]
\r
mov lr, #0xff
\r
tstne r12,#PDRAW_ACC_SPRITES
\r
ldr r12,[r12]
\r
mov lr, #0xff
\r
tstne r12,#PDRAW_ACC_SPRITES
\r
@@
-1791,12
+1815,12
@@
FinalizeLineRGB555:
stmia r0!, {r4,r5,r8,r12}
\r
bne .fl_loopRGB555
\r
\r
stmia r0!, {r4,r5,r8,r12}
\r
bne .fl_loopRGB555
\r
\r
- ldmfd sp!, {r4-r
8
,lr}
\r
+ ldmfd sp!, {r4-r
9
,lr}
\r
bx lr
\r
\r
\r
.fl_32scale_RGB555:
\r
bx lr
\r
\r
\r
.fl_32scale_RGB555:
\r
- stmfd sp!, {r
9,r
10}
\r
+ stmfd sp!, {r10}
\r
mov r9, #0x3900 @ f800 07e0 001f | e000 0780 001c | 3800 01e0 0007
\r
orr r9, r9, #0x00e7
\r
\r
mov r9, #0x3900 @ f800 07e0 001f | e000 0780 001c | 3800 01e0 0007
\r
orr r9, r9, #0x00e7
\r
\r
@@
-1857,8
+1881,8
@@
FinalizeLineRGB555:
stmia r0!, {r4,r5,r6,r8,r10}
\r
bne .fl_loop32scale_RGB555
\r
\r
stmia r0!, {r4,r5,r6,r8,r10}
\r
bne .fl_loop32scale_RGB555
\r
\r
- ldmfd sp!, {r
9,r
10}
\r
- ldmfd sp!, {r4-r
8
,lr}
\r
+ ldmfd sp!, {r10}
\r
+ ldmfd sp!, {r4-r
9
,lr}
\r
bx lr
\r
\r
.if UNALIGNED_DRAWLINEDEST
\r
bx lr
\r
\r
.if UNALIGNED_DRAWLINEDEST
\r
@@
-1904,7
+1928,7
@@
FinalizeLineRGB555:
\r
strh r8, [r0], #2
\r
\r
\r
strh r8, [r0], #2
\r
\r
- ldmfd sp!, {r4-r
8
,lr}
\r
+ ldmfd sp!, {r4-r
9
,lr}
\r
bx lr
\r
\r
\r
bx lr
\r
\r
\r
@@
-1970,8
+1994,8
@@
FinalizeLineRGB555:
\r
strh r4, [r0], #2
\r
\r
\r
strh r4, [r0], #2
\r
\r
- ldmfd sp!, {r
9,r
10}
\r
- ldmfd sp!, {r4-r
8
,lr}
\r
+ ldmfd sp!, {r10}
\r
+ ldmfd sp!, {r4-r
9
,lr}
\r
bx lr
\r
\r
.endif @ UNALIGNED_DRAWLINEDEST
\r
bx lr
\r
\r
.endif @ UNALIGNED_DRAWLINEDEST
\r