2 * assembly optimized versions of most funtions from draw2.c
\r
3 * (C) notaz, 2006-2008
\r
5 * This work is licensed under the terms of MAME license.
\r
6 * See COPYING file in the top-level directory.
\r
8 * this is highly specialized, be careful if changing related C code!
\r
11 #include "pico_int_o32.h"
\r
13 @ define these constants in your include file:
\r
14 @ .equiv START_ROW, 1
\r
15 @ .equiv END_ROW, 27
\r
16 @ one row means 8 pixels. If above example was used, (27-1)*8=208 lines would be rendered.
\r
27 @ void BackFillFull(void *dst, int reg7)
\r
29 .global BackFillFull
\r
32 stmfd sp!, {r4-r9,lr}
\r
38 orr r0, r0, r0, lsl #8
\r
39 orr r0, r0, r0, lsl #16
\r
41 mov r1, r0 @ 25 opcodes wasted?
\r
51 mov r12, #(END_ROW-START_ROW)*8
\r
58 stmia lr!, {r0-r9} @ 10*4*8
\r
69 ldmfd sp!, {r4-r9,lr}
\r
74 @ -------- some macros --------
\r
78 @ TileLineSinglecol (r1=pdest, r2=pixels8, r3=pal) r4: scratch, r0: pixels8_old
\r
79 .macro TileLineSinglecol notsinglecol=0
\r
80 and r2, r2, #0xf @ #0x0000000f
\r
82 cmp r2, r0, lsr #28 @ if these don't match,
\r
83 bicne r9, r9, #2 @ it is a sign that whole tile is not singlecolor (only it's lines may be)
\r
86 orr r4, r4, r4, lsl #8
\r
88 tst r1, #1 @ not aligned?
\r
94 strneb r4, [r1], #1 @ have a remaining unaligned pixel?
\r
98 orr r0, r0, r2, lsl #28 @ we will need the old palindex later
\r
102 @ TileNorm (r1=pdest, r2=pixels8, r3=pal) r0,r4: scratch
\r
103 .macro TileLineNorm
\r
104 ands r4, r0, r2, lsr #12 @ #0x0000f000
\r
107 ands r4, r0, r2, lsr #8 @ #0x00000f00
\r
110 ands r4, r0, r2, lsr #4 @ #0x000000f0
\r
113 ands r4, r0, r2 @ #0x0000000f
\r
116 ands r4, r0, r2, lsr #28 @ #0xf0000000
\r
119 ands r4, r0, r2, lsr #24 @ #0x0f000000
\r
122 ands r4, r0, r2, lsr #20 @ #0x00f00000
\r
125 ands r4, r0, r2, lsr #16 @ #0x000f0000
\r
130 @ TileFlip (r1=pdest, r2=pixels8, r3=pal) r0,r4: scratch
\r
131 .macro TileLineFlip
\r
132 ands r4, r0, r2, lsr #16 @ #0x000f0000
\r
135 ands r4, r0, r2, lsr #20 @ #0x00f00000
\r
138 ands r4, r0, r2, lsr #24 @ #0x0f000000
\r
141 ands r4, r0, r2, lsr #28 @ #0xf0000000
\r
144 ands r4, r0, r2 @ #0x0000000f
\r
147 ands r4, r0, r2, lsr #4 @ #0x000000f0
\r
150 ands r4, r0, r2, lsr #8 @ #0x00000f00
\r
153 ands r4, r0, r2, lsr #12 @ #0x0000f000
\r
158 @ Tile (r1=pdest, r3=pal, r9=prevcode, r10=Pico.vram) r2,r4,r7: scratch, r0=0xf
\r
159 .macro Tile hflip vflip
\r
160 mov r7, r9, lsl #13 @ r9=code<<8; addr=(code&0x7ff)<<4;
\r
161 add r7, r10, r7, lsr #16
\r
162 orr r9, r9, #3 @ emptytile=singlecolor=1, r9 must be <code_16> 00000xxx
\r
164 @ we read tilecodes in reverse order if we have vflip
\r
167 @ loop through 8 lines
\r
168 orr r9, r9, #(7<<24)
\r
171 0: @ singlecol_loop
\r
172 subs r9, r9, #(1<<24)
\r
173 add r1, r1, #328 @ set pointer to next line
\r
174 bmi 8f @ loop_exit with r0 restore
\r
177 ldr r2, [r7, #-4]! @ pack=*(unsigned int *)(Pico.vram+addr); // Get 8 pixels
\r
182 beq 2f @ empty line
\r
185 bne 3f @ not singlecolor
\r
192 subs r9, r9, #(1<<24)
\r
193 add r1, r1, #328 @ set pointer to next line
\r
194 bmi 8f @ loop_exit with r0 restore
\r
196 ldr r2, [r7, #-4]! @ next pack
\r
200 mov r0, #0xf @ singlecol_loop might have messed r0
\r
204 bic r9, r9, #3 @ if we are here, it means we have empty and not empty line
\r
207 3: @ not empty, not singlecol
\r
212 4: @ not empty, not singlecol loop
\r
213 subs r9, r9, #(1<<24)
\r
214 add r1, r1, #328 @ set pointer to next line
\r
217 ldr r2, [r7, #-4]! @ next pack
\r
222 beq 4b @ empty line
\r
225 beq 7f @ singlecolor line
\r
234 TileLineSinglecol 1
\r
240 add r9, r9, #(1<<24) @ fix r9
\r
241 sub r1, r1, #328*8 @ restore pdest pointer
\r
245 @ TileLineSinglecolAl (r1=pdest, r4,r7=color)
\r
246 .macro TileLineSinglecolAl0
\r
251 .macro TileLineSinglecolAl1
\r
255 strb r4, [r1], #1+320
\r
259 .macro TileLineSinglecolAl2
\r
266 .macro TileLineSinglecolAl3
\r
270 strb r4, [r1], #1+320
\r
274 @ TileSinglecol (r1=pdest, r2=pixels8, r3=pal) r4,r7: scratch, r0=0xf
\r
275 @ kaligned==1, if dest is always aligned
\r
276 .macro TileSinglecol kaligned=0
\r
277 and r4, r2, #0xf @ we assume we have good r2 from previous time
\r
279 orr r4, r4, r4, lsl #8
\r
280 orr r4, r4, r4, lsl #16
\r
284 tst r1, #2 @ not aligned?
\r
290 TileLineSinglecolAl0
\r
291 TileLineSinglecolAl0
\r
292 TileLineSinglecolAl0
\r
293 TileLineSinglecolAl0
\r
294 TileLineSinglecolAl0
\r
295 TileLineSinglecolAl0
\r
296 TileLineSinglecolAl0
\r
297 TileLineSinglecolAl0
\r
302 TileLineSinglecolAl1
\r
303 TileLineSinglecolAl1
\r
304 TileLineSinglecolAl1
\r
305 TileLineSinglecolAl1
\r
306 TileLineSinglecolAl1
\r
307 TileLineSinglecolAl1
\r
308 TileLineSinglecolAl1
\r
309 TileLineSinglecolAl1
\r
316 TileLineSinglecolAl2
\r
317 TileLineSinglecolAl2
\r
318 TileLineSinglecolAl2
\r
319 TileLineSinglecolAl2
\r
320 TileLineSinglecolAl2
\r
321 TileLineSinglecolAl2
\r
322 TileLineSinglecolAl2
\r
323 TileLineSinglecolAl2
\r
327 TileLineSinglecolAl3
\r
328 TileLineSinglecolAl3
\r
329 TileLineSinglecolAl3
\r
330 TileLineSinglecolAl3
\r
331 TileLineSinglecolAl3
\r
332 TileLineSinglecolAl3
\r
333 TileLineSinglecolAl3
\r
334 TileLineSinglecolAl3
\r
338 sub r1, r1, #328*8 @ restore pdest pointer
\r
343 @ DrawLayerTiles(*hcache, *scrpos, (cells<<24)|(nametab<<9)|(vscroll&0x3ff)<<11|(shift[width]<<8)|planeend, (ymask<<24)|(planestart<<16)|[htab||hscroll]
\r
345 @ void DrawLayerFull(int plane, int *hcache, int planestart, int planeend,
\r
346 @ struct PicoEState *est)
\r
348 .global DrawLayerFull
\r
352 stmfd sp!, {r4-r11,lr}
\r
354 mov r6, r1 @ hcache
\r
356 ldr r11, [r12, #OFS_Pico_video]
\r
357 ldr r10, [r12, #OFS_Pico_vram]
\r
358 ldrb r5, [r11, #13] @ pvid->reg[13]
\r
359 ldrb r7, [r11, #11]
\r
362 and lr, lr, #0x00ff0000 @ lr=cells
\r
364 mov r5, r5, lsl #10 @ htab=pvid->reg[13]<<9; (halfwords)
\r
365 add r5, r5, r0, lsl #1 @ htab+=plane
\r
366 bic r5, r5, #0x00ff0000 @ just in case
\r
368 tst r7, #3 @ full screen scroll? (if ==0)
\r
369 ldrb r7, [r11, #16] @ ??hh??ww
\r
370 ldreqh r5, [r10, r5]
\r
371 biceq r5, r5, #0x0000fc00 @ r5=hscroll (0-0x3ff)
\r
372 movne r5, r5, lsr #1
\r
373 orrne r5, r5, #0x8000 @ this marks that we have htab pointer, not hscroll here
\r
377 orr r5, r5, r7, lsl #1+24
\r
378 orr r5, r5, #0x1f000000
\r
380 biclt r5, r5, #0x80000000
\r
381 biceq r5, r5, #0xc0000000
\r
382 bicgt r5, r5, #0xe0000000
\r
384 mov r9, r2, lsl #24
\r
385 orr r5, r5, r9, lsr #8 @ r5=(ymask<<24)|(trow<<16)|[htab||hscroll]
\r
389 subge r4, r4, #1 @ r4=shift[width] (5,6,6,7)
\r
392 orr lr, lr, r3, lsl #24 @ lr=(planeend<<24)|(cells<<16)|shift[width]
\r
395 mov r8, r8, lsl #24+5
\r
396 orr r8, r8, #0x1f000000
\r
400 ldreqb r4, [r11, #2]
\r
401 moveq r4, r4, lsr #3
\r
402 ldrneb r4, [r11, #4]
\r
404 orr lr, lr, r4, lsl #13 @ lr|=nametab_bits{3}<<13
\r
406 ldr r11,[sp, #9*4] @ est
\r
407 sub r4, r9, #(START_ROW<<24)
\r
408 ldr r11, [r11, #OFS_Draw2FB]
\r
409 mov r4, r4, asr #24
\r
411 mla r11, r4, r7, r11 @ scrpos+=8*328*(planestart-START_ROW);
\r
413 @ Get vertical scroll value:
\r
414 add r7, r10, #0x012000
\r
415 add r7, r7, #0x000180 @ r7=Pico.vsram (Pico+0x22180)
\r
418 moveq r7, r7, lsl #22
\r
419 movne r7, r7, lsl #6
\r
420 mov r7, r7, lsr #22 @ r7=vscroll (10 bits)
\r
422 orr lr, lr, r7, lsl #3
\r
423 mov lr, lr, ror #24 @ packed: cccccccc nnnvvvvv vvvvvsss pppppppp: cells, nametab, vscroll, shift[width], planeend
\r
426 addne lr, lr, #1 @ we have vertically clipped tiles due to vscroll, so we need 1 more row
\r
429 str r7, [r6], #4 @ push y-offset to tilecache
\r
431 mla r11, r4, r7, r11 @ scrpos+=(8-(vscroll&7))*328;
\r
433 mov r9, #0xff000000 @ r9=(prevcode<<8)|flags: 1~tile empty, 2~tile singlecolor
\r
436 mov r4, lr, lsl #11
\r
437 mov r4, r4, lsr #25 @ r4=vscroll>>3 (7 bits)
\r
438 add r4, r4, r5, lsr #16 @ +trow
\r
439 and r4, r4, r5, lsr #24 @ &=ymask
\r
441 and r7, r7, #7 @ shift[width]
\r
443 and r0, r0, #0x7000 @ nametab
\r
444 add r12,r0, r4, lsl r7 @ nametab_row = nametab + (((trow+(vscroll>>3))&ymask)<<shift[width]);
\r
446 mov r4, lr, lsr #24
\r
447 orr r12,r12,r4, lsl #23
\r
448 mov r12,r12,lsl #1 @ (nametab_row|(cells<<24)) (halfword compliant)
\r
452 moveq r7, r5, lsl #22 @ hscroll (0-3FFh)
\r
453 moveq r7, r7, lsr #22
\r
454 beq .rtr_hscroll_done
\r
456 @ get hscroll from htab
\r
457 mov r7, r5, lsl #17
\r
458 ands r4, r5, #0x00ff0000
\r
459 add r7, r7, r4, lsl #5 @ +=trow<<4
\r
460 andne r4, lr, #0x3800
\r
461 subne r7, r7, r4, lsl #7 @ if(trow) htaddr-=(vscroll&7)<<1;
\r
462 mov r7, r7, lsr #16 @ halfwords
\r
466 and r8, r8, #0xff000000
\r
467 rsb r4, r7, #0 @ r4=tilex=(-ts->hscroll)>>3
\r
470 orr r8, r8, r4 @ r8=(xmask<<24)|tilex
\r
474 add r7, r7, #1 @ r7=dx=((ts->hscroll-1)&7)+1
\r
477 subeq r12,r12, #0x01000000 @ we will loop cells+1 times, so loop less when there is no hscroll
\r
479 add r1, r11, r7 @ r1=pdest
\r
483 @ r4 & r7 are scratch in this loop
\r
484 .rtrloop: @ 40-41 times
\r
486 subs r12,r12, #0x01000000
\r
491 and r7, r8, r8, lsr #24
\r
492 add r7, r10, r7, lsl #1
\r
493 bic r4, r12, #0xff000000 @ Pico.vram[nametab_row+(tilex&xmask)];
\r
494 ldrh r7, [r7, r4] @ r7=code (int, but from unsigned, no sign extend)
\r
500 bne .rtr_notsamecode
\r
501 @ we know stuff about this tile already
\r
503 bne .rtrloop @ empty tile
\r
505 bne .rtr_singlecolor @ singlecolor tile
\r
509 and r4, r9, #0x600000
\r
510 mov r9, r7, lsl #8 @ remember new code
\r
513 and r7, r7, #0x6000
\r
514 mov r3, r7, asr #9 @ r3=pal=((code&0x6000)>>9);
\r
517 tst r9, #0x100000 @ vflip?
\r
520 tst r9, #0x080000 @ hflip?
\r
523 @ Tile (r1=pdest, r3=pal, r9=prevcode, r10=Pico.vram) r2,r4,r7: scratch, r0=0xf
\r
532 tst r9, #0x080000 @ hflip?
\r
533 bne .rtr_vflip_hflip
\r
547 @ *(*hcache)++ = code|(dx<<16)|(trow<<27);
\r
549 orr r7, r7, r4, lsl #16
\r
550 and r4, r5, #0x00ff0000
\r
551 orr r7, r7, r4, lsl #11 @ (trow<<27)
\r
552 str r7, [r6], #4 @ cache hi priority tile
\r
556 add r5, r5, #0x00010000
\r
558 cmp r4, lr, lsl #24
\r
559 bge .rtrloop_outer_exit
\r
560 add r11, r11, #328*8
\r
563 .rtrloop_outer_exit:
\r
565 @ terminate cache list
\r
567 str r0, [r6] @ save cache pointer
\r
569 ldmfd sp!, {r4-r11,lr}
\r
575 @ void DrawTilesFromCacheF(int *hc, struct PicoEState *est)
\r
577 .global DrawTilesFromCacheF
\r
579 DrawTilesFromCacheF:
\r
580 stmfd sp!, {r4-r10,lr}
\r
582 mov r9, #0xff000000 @ r9=prevcode=-1
\r
583 mvn r6, #0 @ r6=prevy=-1
\r
585 ldr r4, [r1, #OFS_Draw2FB]
\r
586 ldr r2, [r0], #4 @ read y offset
\r
589 sub r12, r2, #(328*8*START_ROW) @ r12=scrpos
\r
591 ldr r10, [r1, #OFS_Pico_vram]
\r
596 @ *hcache++ = code|(dx<<16)|(trow<<27); // cache it
\r
599 ldr r7, [r8], #4 @ read code
\r
600 movs r1, r7, lsr #16 @ r1=dx;
\r
601 ldmeqfd sp!, {r4-r10,pc} @ dx is never zero, this must be a terminator, return
\r
604 cmp r6, r7, lsr #27
\r
605 movne r6, r7, lsr #27
\r
607 mlane r5, r4, r6, r12 @ r5=pd = scrpos + prevy*328*8
\r
609 bic r1, r1, #0xf800
\r
610 add r1, r5, r1 @ r1=pdest (halfwords)
\r
612 mov r7, r7, lsl #16
\r
613 mov r7, r7, lsr #16
\r
616 bne .dtfcf_notsamecode
\r
617 @ we know stuff about this tile already
\r
619 bne .dtfcf_loop @ empty tile
\r
621 bne .dtfcf_singlecolor @ singlecolor tile
\r
624 .dtfcf_notsamecode:
\r
625 and r4, r9, #0x600000
\r
626 mov r9, r7, lsl #8 @ remember new code
\r
629 and r7, r7, #0x6000
\r
630 mov r3, r7, asr #9 @ r3=pal=((code&0x6000)>>9);
\r
635 tst r9, #0x100000 @ vflip?
\r
638 tst r9, #0x080000 @ hflip?
\r
641 @ Tile (r1=pdest, r3=pal, r9=prevcode, r10=Pico.vram) r2,r4,r7: scratch, r0=0xf
\r
650 tst r9, #0x080000 @ hflip?
\r
651 bne .dtfcf_vflip_hflip
\r
656 .dtfcf_vflip_hflip:
\r
660 .dtfcf_singlecolor:
\r
669 @ (tile_start<<16)|row_start
\r
670 @ void DrawWindowFull(int start, int end, int prio, struct PicoEState *est)
\r
672 .global DrawWindowFull
\r
675 stmfd sp!, {r4-r11,lr}
\r
677 ldr r11, [r3, #OFS_Pico_video]
\r
678 ldrb r12, [r11, #3] @ pvid->reg[3]
\r
679 mov r12, r12, lsl #10
\r
682 mov r5, #1 @ nametab_step
\r
683 tst r4, #1 @ 40 cell mode?
\r
684 andne r12, r12, #0xf000 @ 0x3c<<10
\r
685 andeq r12, r12, #0xf800
\r
686 movne r5, r5, lsl #7
\r
687 moveq r5, r5, lsl #6 @ nametab_step
\r
690 mla r12, r5, r4, r12 @ nametab += nametab_step*start;
\r
692 ldr r10, [r3, #OFS_Pico_vram]
\r
693 mov r4, r0, lsr #16 @ r4=start_cell_h
\r
694 add r7, r12, r4, lsl #1
\r
696 @ fetch the first code now
\r
698 cmp r2, r7, lsr #15
\r
699 ldmnefd sp!, {r4-r11,pc} @ hack: simply assume that whole window uses same priority
\r
701 rsb r8, r4, r1, lsr #16 @ cells (h)
\r
702 orr r8, r8, r4, lsl #8
\r
703 mov r4, r1, lsl #24
\r
704 sub r4, r4, r0, lsl #24
\r
705 orr r8, r8, r4, lsr #8 @ r8=cells_h|(start_cell_h<<8)|(cells_v<<16)
\r
706 sub r8, r8, #0x010000 @ adjust for algo
\r
708 mov r9, #0xff000000 @ r9=prevcode=-1
\r
710 ldr r11, [r3, #OFS_Draw2FB]
\r
712 add r11, r11, #328*8
\r
713 sub r4, r4, #START_ROW
\r
717 mla r11, r7, r4, r11 @ scrpos+=8*328*(start-START_ROW);
\r
721 and r6, r8, #0xff00 @ r6=tilex
\r
722 add r1, r11, r6, lsr #5 @ r1=pdest
\r
723 add r6, r12, r6, lsr #7
\r
724 add r6, r10, r6 @ r6=Pico.vram+nametab+tilex
\r
725 orr r8, r8, r8, lsl #24
\r
726 sub r8, r8, #0x01000000 @ cell loop counter
\r
729 @ r4 & r7 are scratch in this loop
\r
732 subs r8, r8, #0x01000000
\r
736 ldrh r7, [r6], #2 @ r7=code
\r
739 bne .dwf_notsamecode
\r
740 @ we know stuff about this tile already
\r
742 bne .dwfloop @ empty tile
\r
744 bne .dwf_singlecolor @ singlecolor tile
\r
748 and r4, r9, #0x600000
\r
749 mov r9, r7, lsl #8 @ remember new code
\r
752 and r7, r7, #0x6000
\r
753 mov r3, r7, asr #9 @ r3=pal=((code&0x6000)>>9);
\r
757 tst r9, #0x100000 @ vflip?
\r
760 tst r9, #0x080000 @ hflip?
\r
763 @ Tile (r1=pdest, r3=pal, r9=prevcode, r10=Pico.vram) r2,r4,r7: scratch, r0=0xf
\r
772 tst r9, #0x080000 @ hflip?
\r
773 bne .dwf_vflip_hflip
\r
787 bic r8, r8, #0xff000000 @ fix r8
\r
788 subs r8, r8, #0x010000
\r
789 ldmmifd sp!, {r4-r11,pc}
\r
790 add r11, r11, #328*8
\r
791 add r12, r12, r5 @ nametab+=nametab_step
\r
797 @ ---------------- sprites ---------------
\r
799 .macro SpriteLoop hflip vflip
\r
801 mov r1, r5, lsr #24 @ height
\r
803 mla r11, r1, r0, r11 @ scrpos+=height*328*8;
\r
804 add r12, r12, r1, lsl #3 @ sy+=height*8
\r
809 add r8, r8, r1, lsl #3 @ sx+=width*8
\r
813 add r9, r9, r5, lsr #16
\r
814 sub r5, r5, #1 @ sub width
\r
818 cmp r8, #0 @ skip tiles hidden on the left of screen
\r
821 add r9, r9, r5, lsr #16
\r
830 add r8, r8, #8 @ sx+=8
\r
832 bic r5, r5, #0xff000000 @ fix height
\r
833 orr r5, r5, r5, lsl #16
\r
836 sub r5, r5, #1 @ width--
\r
837 movs r1, r5, lsl #24
\r
838 ldmmifd sp!, {r4-r11,pc} @ end of tile
\r
840 subs r8, r8, #8 @ sx-=8
\r
841 ldmlefd sp!, {r4-r11,pc} @ tile offscreen
\r
844 ldmgefd sp!, {r4-r11,pc} @ tile offscreen
\r
846 mov r6, r12 @ r6=sy
\r
847 add r1, r11, r8 @ pdest=scrpos+sx
\r
851 add r9, r9, #1<<8 @ tile++
\r
853 add r6, r6, #8 @ sy+=8
\r
859 subs r5, r5, #0x01000000
\r
862 sub r6, r6, #8 @ sy-=8
\r
867 cmp r6, #(START_ROW*8)
\r
870 cmp r6, #(END_ROW*8+8)
\r
873 @ Tile (r1=pdest, r3=pal, r9=prevcode, r10=Pico.vram) r2,r4,r7: scratch, r0=0xf
\r
874 Tile \hflip, \vflip
\r
878 @ void DrawSpriteFull(unsigned int *sprite, struct PicoEState *est)
\r
880 .global DrawSpriteFull
\r
883 stmfd sp!, {r4-r11,lr}
\r
885 ldr r3, [r0] @ sprite[0]
\r
887 mov r6, r5, lsr #30
\r
888 add r6, r6, #1 @ r6=width
\r
890 mov r5, r5, lsr #30
\r
891 add r5, r5, #1 @ r5=height
\r
893 mov r12, r3, lsl #23
\r
894 mov r12, r12, lsr #23
\r
896 ldr lr, [r0, #4] @ lr=code
\r
897 sub r12, r12, #0x78 @ r12=sy
\r
899 mov r8, r8, lsr #23
\r
900 sub r8, r8, #0x78 @ r8=sx
\r
902 mov r9, lr, lsl #21
\r
903 mov r9, r9, lsr #13 @ r9=tile<<8
\r
905 and r3, lr, #0x6000
\r
906 mov r3, r3, lsr #9 @ r3=pal=((code>>9)&0x30);
\r
908 ldr r11, [r1, #OFS_Draw2FB]
\r
909 ldr r10, [r1, #OFS_Pico_vram]
\r
910 sub r1, r12, #(START_ROW*8)
\r
912 mla r11, r1, r0, r11 @ scrpos+=(sy-START_ROW*8)*328;
\r
914 orr r5, r5, r5, lsl #16 @
\r
915 orr r5, r6, r5, lsl #8 @ r5=width|(height<<8)|(height<<24)
\r
917 tst lr, #0x1000 @ vflip?
\r
920 tst lr, #0x0800 @ hflip?
\r
929 tst lr, #0x0800 @ hflip?
\r
930 bne .dsf_vflip_hflip
\r
939 @ vim:filetype=armasm
\r