diff options
Diffstat (limited to 'apps/plugins/rockboy/lcd.c')
-rw-r--r-- | apps/plugins/rockboy/lcd.c | 153 |
1 files changed, 3 insertions, 150 deletions
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c index e8d43f772a..143b8fdfa8 100644 --- a/apps/plugins/rockboy/lcd.c +++ b/apps/plugins/rockboy/lcd.c | |||
@@ -69,7 +69,7 @@ static void updatepatpix(void) ICODE_ATTR; | |||
69 | static void updatepatpix(void) | 69 | static void updatepatpix(void) |
70 | { | 70 | { |
71 | int i, j; | 71 | int i, j; |
72 | #if ((CONFIG_CPU != SH7034) && !defined(CPU_COLDFIRE)) | 72 | #if !defined(CPU_COLDFIRE) |
73 | int k, a, c; | 73 | int k, a, c; |
74 | #endif | 74 | #endif |
75 | byte *vram = lcd.vbank[0]; | 75 | byte *vram = lcd.vbank[0]; |
@@ -83,76 +83,7 @@ static void updatepatpix(void) | |||
83 | patdirty[i] = 0; | 83 | patdirty[i] = 0; |
84 | for (j = 0; j < 8; j++) | 84 | for (j = 0; j < 8; j++) |
85 | { | 85 | { |
86 | #if CONFIG_CPU == SH7034 | 86 | #if defined(CPU_COLDFIRE) |
87 | asm volatile ( | ||
88 | "mov.w @%2,r1 \n" | ||
89 | "swap.b r1,r2 \n" | ||
90 | |||
91 | "mov #0,r0 \n" | ||
92 | "shlr r1 \n" | ||
93 | "rotcl r0 \n" | ||
94 | "shlr r2 \n" | ||
95 | "rotcl r0 \n" | ||
96 | "mov.b r0,@%0 \n" | ||
97 | "mov.b r0,@(7,%1) \n" | ||
98 | "mov #0,r0 \n" | ||
99 | "shlr r1 \n" | ||
100 | "rotcl r0 \n" | ||
101 | "shlr r2 \n" | ||
102 | "rotcl r0 \n" | ||
103 | "mov.b r0,@(1,%0) \n" | ||
104 | "mov.b r0,@(6,%1) \n" | ||
105 | "mov #0,r0 \n" | ||
106 | "shlr r1 \n" | ||
107 | "rotcl r0 \n" | ||
108 | "shlr r2 \n" | ||
109 | "rotcl r0 \n" | ||
110 | "mov.b r0,@(2,%0) \n" | ||
111 | "mov.b r0,@(5,%1) \n" | ||
112 | "mov #0,r0 \n" | ||
113 | "shlr r1 \n" | ||
114 | "rotcl r0 \n" | ||
115 | "shlr r2 \n" | ||
116 | "rotcl r0 \n" | ||
117 | "mov.b r0,@(3,%0) \n" | ||
118 | "mov.b r0,@(4,%1) \n" | ||
119 | "mov #0,r0 \n" | ||
120 | "shlr r1 \n" | ||
121 | "rotcl r0 \n" | ||
122 | "shlr r2 \n" | ||
123 | "rotcl r0 \n" | ||
124 | "mov.b r0,@(4,%0) \n" | ||
125 | "mov.b r0,@(3,%1) \n" | ||
126 | "mov #0,r0 \n" | ||
127 | "shlr r1 \n" | ||
128 | "rotcl r0 \n" | ||
129 | "shlr r2 \n" | ||
130 | "rotcl r0 \n" | ||
131 | "mov.b r0,@(5,%0) \n" | ||
132 | "mov.b r0,@(2,%1) \n" | ||
133 | "mov #0,r0 \n" | ||
134 | "shlr r1 \n" | ||
135 | "rotcl r0 \n" | ||
136 | "shlr r2 \n" | ||
137 | "rotcl r0 \n" | ||
138 | "mov.b r0,@(6,%0) \n" | ||
139 | "mov.b r0,@(1,%1) \n" | ||
140 | "mov #0,r0 \n" | ||
141 | "shlr r1 \n" | ||
142 | "rotcl r0 \n" | ||
143 | "shlr r2 \n" | ||
144 | "rotcl r0 \n" | ||
145 | "mov.b r0,@(7,%0) \n" | ||
146 | "mov.b r0,@%1 \n" | ||
147 | : /* outputs */ | ||
148 | : /* inputs */ | ||
149 | /* %0 */ "r"(patpix[i+1024][j]), | ||
150 | /* %1 */ "r"(patpix[i][j]), | ||
151 | /* %2 */ "r"(&vram[(i<<4)|(j<<1)]) | ||
152 | : /* clobbers */ | ||
153 | "r0", "r1", "r2" | ||
154 | ); | ||
155 | #elif defined(CPU_COLDFIRE) | ||
156 | asm volatile ( | 87 | asm volatile ( |
157 | "move.b (%2),%%d2 \n" | 88 | "move.b (%2),%%d2 \n" |
158 | "move.b (1,%2),%%d1 \n" | 89 | "move.b (1,%2),%%d1 \n" |
@@ -229,85 +160,7 @@ static void updatepatpix(void) | |||
229 | patpix[i+1024][j][7-k]; | 160 | patpix[i+1024][j][7-k]; |
230 | #endif | 161 | #endif |
231 | } | 162 | } |
232 | #if CONFIG_CPU == SH7034 | 163 | #if defined(CPU_COLDFIRE) |
233 | asm volatile ( | ||
234 | "mov.l @%0,r0 \n" | ||
235 | "mov.l @(4,%0),r1 \n" | ||
236 | "mov.l r0,@(56,%1) \n" | ||
237 | "mov.l r1,@(60,%1) \n" | ||
238 | "mov.l @(8,%0),r0 \n" | ||
239 | "mov.l @(12,%0),r1 \n" | ||
240 | "mov.l r0,@(48,%1) \n" | ||
241 | "mov.l r1,@(52,%1) \n" | ||
242 | "mov.l @(16,%0),r0 \n" | ||
243 | "mov.l @(20,%0),r1 \n" | ||
244 | "mov.l r0,@(40,%1) \n" | ||
245 | "mov.l r1,@(44,%1) \n" | ||
246 | "mov.l @(24,%0),r0 \n" | ||
247 | "mov.l @(28,%0),r1 \n" | ||
248 | "mov.l r0,@(32,%1) \n" | ||
249 | "mov.l r1,@(36,%1) \n" | ||
250 | "mov.l @(32,%0),r0 \n" | ||
251 | "mov.l @(36,%0),r1 \n" | ||
252 | "mov.l r0,@(24,%1) \n" | ||
253 | "mov.l r1,@(28,%1) \n" | ||
254 | "mov.l @(40,%0),r0 \n" | ||
255 | "mov.l @(44,%0),r1 \n" | ||
256 | "mov.l r0,@(16,%1) \n" | ||
257 | "mov.l r1,@(20,%1) \n" | ||
258 | "mov.l @(48,%0),r0 \n" | ||
259 | "mov.l @(52,%0),r1 \n" | ||
260 | "mov.l r0,@(8,%1) \n" | ||
261 | "mov.l r1,@(12,%1) \n" | ||
262 | "mov.l @(56,%0),r0 \n" | ||
263 | "mov.l @(60,%0),r1 \n" | ||
264 | "mov.l r0,@%1 \n" | ||
265 | "mov.l r1,@(4,%1) \n" | ||
266 | |||
267 | "add %2,%0 \n" | ||
268 | "add %2,%1 \n" | ||
269 | |||
270 | "mov.l @%0,r0 \n" | ||
271 | "mov.l @(4,%0),r1 \n" | ||
272 | "mov.l r0,@(56,%1) \n" | ||
273 | "mov.l r1,@(60,%1) \n" | ||
274 | "mov.l @(8,%0),r0 \n" | ||
275 | "mov.l @(12,%0),r1 \n" | ||
276 | "mov.l r0,@(48,%1) \n" | ||
277 | "mov.l r1,@(52,%1) \n" | ||
278 | "mov.l @(16,%0),r0 \n" | ||
279 | "mov.l @(20,%0),r1 \n" | ||
280 | "mov.l r0,@(40,%1) \n" | ||
281 | "mov.l r1,@(44,%1) \n" | ||
282 | "mov.l @(24,%0),r0 \n" | ||
283 | "mov.l @(28,%0),r1 \n" | ||
284 | "mov.l r0,@(32,%1) \n" | ||
285 | "mov.l r1,@(36,%1) \n" | ||
286 | "mov.l @(32,%0),r0 \n" | ||
287 | "mov.l @(36,%0),r1 \n" | ||
288 | "mov.l r0,@(24,%1) \n" | ||
289 | "mov.l r1,@(28,%1) \n" | ||
290 | "mov.l @(40,%0),r0 \n" | ||
291 | "mov.l @(44,%0),r1 \n" | ||
292 | "mov.l r0,@(16,%1) \n" | ||
293 | "mov.l r1,@(20,%1) \n" | ||
294 | "mov.l @(48,%0),r0 \n" | ||
295 | "mov.l @(52,%0),r1 \n" | ||
296 | "mov.l r0,@(8,%1) \n" | ||
297 | "mov.l r1,@(12,%1) \n" | ||
298 | "mov.l @(56,%0),r0 \n" | ||
299 | "mov.l @(60,%0),r1 \n" | ||
300 | "mov.l r0,@%1 \n" | ||
301 | "mov.l r1,@(4,%1) \n" | ||
302 | : /* outputs */ | ||
303 | : /* inputs */ | ||
304 | /* %0 */ "r"(patpix[i][0]), | ||
305 | /* %1 */ "r"(patpix[i+2048][0]), | ||
306 | /* %2 */ "r"(1024*64) | ||
307 | : /* clobbers */ | ||
308 | "r0", "r1" | ||
309 | ); | ||
310 | #elif defined(CPU_COLDFIRE) | ||
311 | asm volatile ( | 164 | asm volatile ( |
312 | "movem.l (%0),%%d0-%%d3 \n" | 165 | "movem.l (%0),%%d0-%%d3 \n" |
313 | "move.l %%d0,%%d4 \n" | 166 | "move.l %%d0,%%d4 \n" |