diff options
author | Robin Watts | 2007-12-06 00:50:22 +0000 |
---|---|---|
committer | Robin Watts | 2007-12-06 00:50:22 +0000 |
commit | e92c67d5a043e5044864ae9325d2adb97a5151e8 (patch) | |
tree | 64947298e2e6f9581429fc002bc29f2ab865a107 /backends/platform/ds/arm9/source | |
parent | 10844ea1727d9faece5d172f594037eaf4e04c96 (diff) | |
download | scummvm-rg350-e92c67d5a043e5044864ae9325d2adb97a5151e8.tar.gz scummvm-rg350-e92c67d5a043e5044864ae9325d2adb97a5151e8.tar.bz2 scummvm-rg350-e92c67d5a043e5044864ae9325d2adb97a5151e8.zip |
Attempted fix for the DS blitters; looks like I was reading from dst and
storing to src. D'Oh. Still untested, but this code is broken anyway
(apparently) and is disabled, so I can't really make it any worse...
svn-id: r29732
Diffstat (limited to 'backends/platform/ds/arm9/source')
-rw-r--r-- | backends/platform/ds/arm9/source/blitters_arm.s | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/backends/platform/ds/arm9/source/blitters_arm.s b/backends/platform/ds/arm9/source/blitters_arm.s index fdf409a570..f473f4ccac 100644 --- a/backends/platform/ds/arm9/source/blitters_arm.s +++ b/backends/platform/ds/arm9/source/blitters_arm.s @@ -21,7 +21,7 @@ @ @author Robin Watts (robin@wss.co.uk) .text - + .global asmDrawStripToScreen .global asmCopy8Col .global Rescale_320x256xPAL8_To_256x256x1555 @@ -142,7 +142,7 @@ asmCopy8Col: @ r3 = height STMFD r13!,{r14} SUB r1,r1,#4 - + TST r3,#1 ADDNE r3,r3,#1 BNE roll2 @@ -177,9 +177,9 @@ Rescale_320x256x1555_To_256x256x1555: @ r2 = dstStride @ r3 = srcStride STMFD r13!,{r4-r5,r8-r11,r14} - - SUB r2,r2,#64*5 @ srcStride -= line length - SUB r3,r3,#64*4 @ dstStride -= line length + + SUB r2,r2,#64*4 @ srcStride -= line length + SUB r3,r3,#64*5 @ dstStride -= line length MOV r8, #0x0000001F ORR r8, r8,#0x00007C00 @@ -187,12 +187,12 @@ Rescale_320x256x1555_To_256x256x1555: MOV r5, #200 @ r5 = y yLoop3: MOV r4, #64 @ r4 = x -xLoop3: - LDRH r9, [r0],#2 @ r9 = src0 - LDRH r10,[r0],#2 @ r10= src1 - LDRH r11,[r0],#2 @ r11= src2 - LDRH r12,[r0],#2 @ r12= src3 - LDRH r14,[r0],#2 @ r14= src4 +xLoop3: + LDRH r9, [r1],#2 @ r9 = src0 + LDRH r10,[r1],#2 @ r10= src1 + LDRH r11,[r1],#2 @ r11= src2 + LDRH r12,[r1],#2 @ r12= src3 + LDRH r14,[r1],#2 @ r14= src4 ORR r9, r9, r9, LSL #16 @ r9 = src0 | src0 ORR r10,r10,r10,LSL #16 @ r10= src1 | src1 @@ -212,7 +212,7 @@ xLoop3: ADD r11,r11,r12 @ r11= dst2 ADD r12,r12,r14 @ r12= src3 + src4 ADD r12,r12,r14,LSL #1 @ r12= src3 + src4*3 = dst3<<2 - + AND r9, r8, r9, LSR #2 @ r9 = dst0 (split) AND r10,r8, r10,LSR #1 @ r10= dst1 (split) AND r11,r8, r11,LSR #1 @ r11= dst2 (split) @@ -227,15 +227,15 @@ xLoop3: ORR r10,r10,#0x8000 ORR r11,r11,#0x8000 ORR r12,r12,#0x8000 - - STRH r9, [r1],#2 - STRH r10,[r1],#2 - STRH r11,[r1],#2 - STRH r12,[r1],#2 + + STRH r9, [r0],#2 + STRH r10,[r0],#2 + STRH r11,[r0],#2 + STRH r12,[r0],#2 SUBS r4,r4,#1 BGT xLoop3 - + ADD r0,r0,r2,LSL #1 ADD r1,r2,r3,LSL #1 SUBS r5,r5,#1 @@ -264,7 +264,7 @@ Rescale_320x256xPAL8_To_256x256x1555: ORR r8, r8,#0x00007C00 ORR r8, r8,#0x03E00000 @ r8 = mask LDR r9, [r13,#7*4] @ r9 = palette - + SUB r13,r13,#256*4 @ r13 = 1K of space on the stack. MOV r5, r13 @ r5 points to this space MOV r14,#256 @@ -275,19 +275,19 @@ palLoop: AND r10,r10,r8 @ r10 = separated palette entry STR r10,[r5], #4 BGT palLoop - - SUB r2,r2,#64*5 @ srcStride -= line length - SUB r3,r3,#64*4 @ dstStride -= line length + + SUB r2,r2,#64*4 @ srcStride -= line length + SUB r3,r3,#64*5 @ dstStride -= line length MOV r5,#200 @ r5 = y yLoop4: MOV r4,#64 @ r4 = x -xLoop4: - LDRB r9, [r0],#1 @ r9 = src0 - LDRB r10,[r0],#1 @ r10= src1 - LDRB r11,[r0],#1 @ r11= src2 - LDRB r12,[r0],#1 @ r12= src3 - LDRB r14,[r0],#1 @ r14= src4 +xLoop4: + LDRB r9, [r1],#1 @ r9 = src0 + LDRB r10,[r1],#1 @ r10= src1 + LDRB r11,[r1],#1 @ r11= src2 + LDRB r12,[r1],#1 @ r12= src3 + LDRB r14,[r1],#1 @ r14= src4 LDR r9, [r13,r9, LSL #2] @ r9 = pal[src0] LDR r10,[r13,r10,LSL #2] @ r10= pal[src1] @@ -301,7 +301,7 @@ xLoop4: ADD r11,r11,r12 @ r11= dst2 ADD r12,r12,r14 @ r12= src3 + src4 ADD r12,r12,r14,LSL #1 @ r12= src3 + src4*3 = dst3<<2 - + AND r9, r8, r9, LSR #2 @ r9 = dst0 (split) AND r10,r8, r10,LSR #1 @ r10= dst1 (split) AND r11,r8, r11,LSR #1 @ r11= dst2 (split) @@ -316,17 +316,17 @@ xLoop4: ORR r10,r10,#0x8000 ORR r11,r11,#0x8000 ORR r12,r12,#0x8000 - - STRH r9, [r1],#2 - STRH r10,[r1],#2 - STRH r11,[r1],#2 - STRH r12,[r1],#2 + + STRH r9, [r0],#2 + STRH r10,[r0],#2 + STRH r11,[r0],#2 + STRH r12,[r0],#2 SUBS r4,r4,#1 BGT xLoop4 - - ADD r0,r0,r2 - ADD r1,r2,r3,LSL #1 + + ADD r0,r0,r2,LSL #1 + ADD r1,r2,r3 SUBS r5,r5,#1 BGT yLoop4 @@ -334,4 +334,4 @@ xLoop4: LDMFD r13!,{r4-r5,r8-r11,PC} - + |