-@ vim:filetype=armasm\r
-@ some color conversion and blitting routines\r
-\r
-@ (c) Copyright 2006, 2007 notaz\r
-@ All Rights Reserved\r
-\r
-@ vim:filetype=armasm\r
+/*\r
+ * some color conversion and blitting routines\r
+ * (C) notaz, 2006-2009\r
+ *\r
+ * This work is licensed under the terms of MAME license.\r
+ * See COPYING file in the top-level directory.\r
+ */\r
\r
.text\r
.align 4\r
@ to 00000000 rrr00000 ggg00000 bbb00000 ...\r
\r
@ lr = 0x00e000e0, out: r3=lower_pix, r2=higher_pix; trashes rin\r
-@ if sh==2, r8=0x00404040 (sh!=0 destroys flags!)\r
.macro convRGB32_2 rin sh=0\r
and r2, lr, \rin, lsr #4 @ blue\r
and r3, \rin, lr\r
.endif\r
\r
orr r2, r2, r2, lsr #3\r
+.if \sh == 1\r
+ str r2, [r0, #0x40*2*4]\r
+.endif\r
str r2, [r0], #4\r
.endm\r
\r
\r
-.global vidConvCpyRGB32 @ void *to, void *from, int pixels\r
+.global bgr444_to_rgb32 @ void *to, void *from\r
\r
-vidConvCpyRGB32:\r
+bgr444_to_rgb32:\r
stmfd sp!, {r4-r7,lr}\r
\r
- mov r12, r2, lsr #3 @ repeats\r
+ mov r12, #0x40>>3 @ repeats\r
mov lr, #0x00e00000\r
orr lr, lr, #0x00e0\r
\r
convRGB32_2 r5\r
convRGB32_2 r6\r
convRGB32_2 r7\r
-\r
bgt .loopRGB32\r
\r
- ldmfd sp!, {r4-r7,lr}\r
- bx lr\r
+ ldmfd sp!, {r4-r7,pc}\r
\r
\r
-.global vidConvCpyRGB32sh @ void *to, void *from, int pixels\r
+.global bgr444_to_rgb32_sh @ void *to, void *from\r
\r
-vidConvCpyRGB32sh:\r
+bgr444_to_rgb32_sh:\r
stmfd sp!, {r4-r7,lr}\r
\r
- mov r12, r2, lsr #3 @ repeats\r
+ mov r12, #0x40>>3 @ repeats\r
+ add r0, r0, #0x40*4\r
mov lr, #0x00e00000\r
orr lr, lr, #0x00e0\r
\r
convRGB32_2 r5, 1\r
convRGB32_2 r6, 1\r
convRGB32_2 r7, 1\r
-\r
bgt .loopRGB32sh\r
\r
- ldmfd sp!, {r4-r7,lr}\r
- bx lr\r
-\r
-\r
-.global vidConvCpyRGB32hi @ void *to, void *from, int pixels\r
-\r
-vidConvCpyRGB32hi:\r
- stmfd sp!, {r4-r7,lr}\r
-\r
- mov r12, r2, lsr #3 @ repeats\r
- mov lr, #0x00e00000\r
- orr lr, lr, #0x00e0\r
+ mov r12, #0x40>>3 @ repeats\r
+ sub r1, r1, #0x40*2\r
\r
.loopRGB32hi:\r
ldmia r1!, {r4-r7}\r
\r
bx lr\r
\r
+@ vim:filetype=armasm\r