home *** CD-ROM | disk | FTP | other *** search
- ; \|/
- ; O O
- ; --------------------------------oOO--U--OOo--------------------------------
- ; | |
- ; | 16 colours Zoomer with realtime generated code. |
- ; | By Alain BROBECKER. (as Baah) |
- ; | |
- ; ---------------------------------------------------------------------------
- ;
- ; * The only interesting thing in here is the realtime code generator.
- ; All the rest is a mere demonstration of its ability, so go have a look
- ; at it to have more infos... I' m quite sorry of this fact, but the
- ; rest of this code is not very good. (I mean I' m not satisfied with it)
- ; * When called, this part of the demo assumes all colors are set to
- ; black! Also, I' m using some of the tables (inverses;sin-cos) created
- ; in the main part! Anyway, I don' t think all this is very hard to
- ; understand!
-
- #set zoom_img_w = 120 ; Must be a multiple of 8.
- #set zoom_img_h = 153
- #set zoom_ystart = -330
- #set zoom_yend = 175
- #set zoom_vy = 1
- #set zoom_shift = 9 ; Shift for sinus, gives the amplitued.
- #set zoom_vangle = 3
-
- .zoomer_part
- stmfd r13!,{r0-r12,r14}
- ; First, clear the whole videoram.
- bl get_showscreen ; r0=showscreen adress.
- mov r1,#&0 ; r1=fill pattern.
- bl clear_mode9
- bl get_workscreen ; r0=workscreen adress.
- mov r1,#&0 ; r1=fill pattern.
- bl clear_mode9
- ; Then, put the palette.
- adr r2,_zoomer_colors
- bl set_palette
-
- mov r0,#zoom_ystart ; First position of the zoomer.
- str r0,_y_position
- ._zoomer_one_frame
- bl wait_and_swap ; Wait vsync and swap screen.
- str r0,_workscreen_ad
- ; Clear the image which was displayed two vbls before!
- adr r1,_previous_y
- ldmia r1,{r2-r3} ; r2=y_pos(-1) | r3=y_pos(-2).
- str r2,[r1,#4] ; Next VBl y_pos(-1) will be y_pos(-2).
- mov r1,r3 ; r1=y_pos(-2).
- bl _clear_box ; Clear box.
- ; Here we do the calculations to know the width of the image on screen
- ; (scr_w), its height (scr_h) and its position. (First visible y=screen_y)
- ldr r0,_y_position ; y_pos+=vy.
- add r0,r0,#zoom_vy
- cmp r0,#zoom_yend ; y_pos>yend?
- ldmGEfd r13!,{r0-r12,pc} ; Yes, then quit.
- str r0,_y_position ; Save new y_pos.
- ldr r1,_angle ; Angle-=vangle.
- add r1,r1,#zoom_vangle
- cmp r1,#512 ; angle>512?.
- subGE r1,r1,#512 ; Then wrap to beginning of table.
- str r1,_angle ; Save new angle.
- adr r2,bss+sin_cos_ad
- ldr r1,[r2,r1,lsl #2] ; r1=65536*sin(angle).
- movS r1,r1,asr #zoom_shift ; r1=amplitude*sin(angle).
- rsbMI r1,r1,#0 ; r1=z=abs(dist*sin(angle)).
- add r1,r1,#128 ; r1=z+dist_eye.
- adr r4,bss+inv_ad
- ldr r1,[r4,r1,lsl #2] ; r1=65536/(z+dist_eye).
- mul r12,r0,r1 ; r12=y*65536/(z+dist_eye).
- mov r12,r12,asr #9 ; r12=y*dist_eye/(z+dist_eye).
- add r12,r12,#160 ; r12=screen_y.
- str r12,_previous_y ; Save it for next time.
- mov r0,#zoom_img_h
- mul r11,r0,r1
- mov r11,r11,asr #9 ; r11=scr_h=img_h*dist_eye/(z+dist_eye).
- ; Generate the zoomer code.
- mov r0,#zoom_img_w ; r0=Original size.
- mul r1,r0,r1 ; r1=img_w*(z+dist_eye).
- mov r1,r1,asr #9 ; r1=zoomed_size.
- mov r2,#160
- sub r2,r2,r1,lsr #1 ; r2=x_position. (From left)
- bl generate_zoomer_code
- ; Here we go for the drawing of the image. Of course, as the object is
- ; y zoomed too, we have to calculate the y_zoom_coef (=original/zoomed).
- ; Then we can start drawing the object.
- ldr r0,[r4,r11,lsl #2] ; r0=65536/zoomed_h.
- mov r1,#zoom_img_h ; r1=original_h.
- mul r6,r0,r1 ; r6=65536*(original_h/zoomed_h).
- mov r7,#0 ; r7=65536*src_y_pos.
- adr r8,_image ; Adress of source image.
- ldr r9,_workscreen_ad ; Adress of workscreen.
- add r9,r9,#160 ; We point on the righ border.
- mov r2,#&f0000000 ; Used by the zoomer.
- adr r14,_next_line ; I want to be back..
- ._one_line
- addS r0,r12,r12,lsl #2 ; r0=screen_y*5.
- bMI _next_line ; If screen_y<0, line is not visible.
- cmp r12,#256 ; Same comment if screen_y>255, but
- bGE _end_frame ; then no more line is visible.
- add r0,r9,r0,lsl #5 ; r0 points on screen_y line.
- mov r1,r7,lsr #16 ; r1=int(src_y_pos).
- mov r3,#zoom_img_w/2 ; r3=nb of bytes per src_line.
- mla r1,r3,r1,r8 ; r1 points on good source line.
- bl zoom_routine
- ._next_line
- add r12,r12,#1 ; Next screen line.
- add r7,r7,r6 ; src_y_pos+=(original_h/zoomed_h).
- mov r0,r7,lsr #16 ; r0=int(src_y_pos).
- cmp r0,#zoom_img_h ; Beyond the image?
- bLT _one_line
- ._end_frame ; Everything done, go on...
- b _zoomer_one_frame
-
-
- ; ===========================================================================
- ; = =
- ; = DATAS =
- ; = =
- ; ===========================================================================
-
- ._angle
- dcd 0
- ._y_position
- dcd 0
- ._previous_y
- dcd 0,0
-
- ._workscreen_ad
- dcd 0
-
- ._image
- incbin Datas.NewNours
-
- ._zoomer_colors
- dcb &00,&00,&00,&55,&55,&77,&99,&99,&99,&ee,&ee,&ee
- dcb &bb,&77,&88,&cc,&88,&99,&dd,&99,&aa,&aa,&99,&bb
- dcb &88,&aa,&cc,&55,&aa,&dd,&44,&99,&cc,&33,&88,&bb
- dcb &22,&77,&aa,&11,&66,&99,&bb,&bb,&dd,&88,&88,&aa
-
- ; ===========================================================================
- ; ===========================================================================
- ; = =
- ; = ROUTINES =
- ; = =
- ; ===========================================================================
- ; ===========================================================================
-
-
- ;----------------------------------------------------------------------------
- ; This routine simply clears a box of the maximum size of the image.
- ; Note that if you want to change the width of the box cleared, you must
- ; get your hands dirty and made this by your own. Full clipping is provided.
- ; I assume the box is centered on screen, and in fact I took a box a bit
- ; bigger than maximum image....
- ; Parameters of this routine...
- ; r0=videoram adress.
- ; r1=y pos of first line.
- ._clear_box
- stmfd r13!,{r0-r12,r14}
- addS r2,r1,#zoom_img_h-1 ; r2=ymax<0?
- ldmMIfd r13!,{r0-r12,pc} ; Then box is invisible.
- cmp r1,#256 ; r1=ymin>255?
- ldmGEfd r13!,{r0-r12,pc} ; Same comment.
- mov r14,#zoom_img_h ; Nb of lines to clear.
- cmp r1,#0 ; ymin<0?
- addMI r14,r14,r1 ; Then draw image_h+ymin lines,
- movMI r1,#0 ; and start at line y=0.
- subS r2,r2,#255 ; ymax>255?
- subGT r14,r14,r2 ; Then draw image_h-(ymax-255) lines.
- add r1,r1,r1,lsl #2 ; Make r0 point on first line to clear.
- add r0,r0,r1,lsl #5
- add r0,r0,#4+(320-zoom_img_w)/4 ; Box centered.
-
- mov r1,#0:mov r2,r1:mov r3,r1:mov r4,r1:mov r5,r1:mov r6,r1
- mov r7,r1:mov r8,r1:mov r9,r1:mov r10,r1:mov r11,r1:mov r12,r1
- ._clear_one_line
- stmia r0!,{r1-r12} ; 120/8 => 15 longs.
- stmia r0!,{r1-r4}
- add r0,r0,#(320-zoom_img_w)/2-4 ; Next line.
- subS r14,r14,#1
- bNE _clear_one_line
- ldmfd r13!,{r0-r12,pc} ; Bye...
-
-
- ; ***************************************************************************
- ; ***** *****
- ; ***** Routine generating a zoomer routine. *****
- ; ***** By Alain BROBECKER. (as Baah) *****
- ; ***** Februar 1995. *****
- ; ***** *****
- ; ***************************************************************************
- ;
- ; >-------------------------------------------------------------------------<
- ; Parameters of generating routine...
- ; r0=original size of hline.
- ; r1=zoomed size of hline.
- ; r2=x position. (From right to left...)
- ;
- ; >-------------------------------------------------------------------------<
- ; Parameters of the generated zoom routine...
- ; r0=adress of dest hline. (Adress of the right border...)
- ; r1=adress of source hline.
- ; r2=$f000000. (Mask used to isolate source pixies.)
- ; r3,r4 & r5 are modified.
- ; r14=return adress.
- ; Only r2 and r14 are left unchanged. r3 is used to load a source word,
- ; r4 will contain isolated source pixies and r5 will contain the dest word.
- ;
- ; >-------------------------------------------------------------------------<
- ; Some (usefull) explanations...
- ; ------------------------------
- ; In the zoom routine...
- ; * I isolate the source pixels into r4, and then I mix it to the others
- ; pixels already contained in r5. Of course, the first pixie of each longword
- ; (ie the pixie contained in bits 28-31) is isolated directly in r5. The
- ; mixing and isolation of a pixies are requiring registers rotations.
- ; * I'm generating the code for 8 pixies in one time, this proves to be
- ; faster and much easier, because then the rotations for the pixels mixing
- ; are always known.
- ; * There was, in the first version I coded, a fucking bug!.. In fact I
- ; didn' t know that 'r?,ror #0' is not a legal operand! At this time the
- ; drawing was from left to right (classical then) and I had to use a
- ; 'ror #0'. So I should have replaced this by a 'lsl #0', and then there
- ; should have been a supplementary test. So, I found a neat (I hope) 'trick'
- ; which allows me not to care about the 'ror #0' and which proves faster at
- ; the same time... First, the mixing rotations are no problem, (see above) so
- ; I simply had to avoid 'ror #0' during isolation rotations, and this is done
- ; by simply avoid to generate rors.. So I decided to isolate the pixies in
- ; the bits 28-31 of r4, and so I only have to use shifts left. But then,
- ; if I was drawing from left to right, it would be shitty cos I would have
- ; the first pixie, normally contained in bits 0-3 which will be isolated
- ; in bits 28-31. But now, if you consider drawing from right to left, the
- ; (small) problem quite simply disappears! Of course, there may have been
- ; others solutions, but I bet they would not be as easy. So, now you can
- ; understand why I am able to isolate directly the first pixie. Well, anyway,
- ; the very important thing is to know that 'ror #0' is no LEGAL instruction!
- ; (It' s replaced by 'rrx' which seems the same as 'ror #1'.)
- ; * Hum, er.. I said the problem disappeared, and that' s right, but of
- ; course another problem came to replace the last one.. Anyway this new
- ; problem is not all that big.. In fact you must only know that the source
- ; image must be organized in a strange way! Considering the standard left
- ; to right image, you must take its symmetric longword per longword. (But
- ; not the symmetric of the longwords!...) See the 'ConvPic' basic proggy.
- ; * The generated routine always begin with 'lsr r3,[r1]', so it is
- ; stupid to generate it each time.. Just let it be inchanged.
- ;
- ; The generated routine looks like this...(If x_pos mod(8)=0).
- ; ldr r3,[r1] ; r3=source long.
- ; and r5,r2,r3,lsl #0 ; bits 28-31 of r5=src_pixie 0.
- ; and r4,r2,r3,lsl #16 ; bits 28-31 of r4=src_pixie 4.
- ; add r5,r5,r4,ror #4 ; Mix.
- ; ldr r3,[r1,#4]!
- ; and r4,r2,r3 ; bits 28-31 of r4=src_pixie 8.
- ; add r5,r5,r4,ror #8 ; Mix.
- ; and r4,r2,r3,lsl #16 ; bits 28-31 of r4=src_pixie 12.
- ; add r5,r5,r4,ror #12 ; Mix.
- ; ....
- ; str r5,[r0],#-4 ; Save zoomed long.
- ; ....
-
- .generate_zoomer_code
- stmfd r13!,{r0-r12,r14}
- adr r3,zoom_routine+4 ; r3 points on zoom routine+4.
- adr r4,_opcodes
- ldmia r4!,{r5-r12,r14} ; Load opcodes.
- adr r4,bss+inv_ad ; Make r4 point on inverses table.
- ldr r4,[r4,r1,lsl #2] ; r4=65536/zoomed_size.
- mul r0,r4,r0 ; r0=zoom=65536*(original/zoomed).
- and r4,r2,#&7 ; r4=dest=x_pos mod(8).
- sub r2,r2,r4 ; r2=x_pos-(x_pos mod(8))=2*offset.
- add r5,r5,r2,lsr #1 ; r5='sub r0,r0,#offset'.
- str r5,[r3],#4 ; Generate 'sub r0,r0,#offset'.
- rsb r2,r4,#8 ; r2=dest2=8-x_pos mod(8).
- mov r5,#0 ; r5=src_pos.
- cmp r1,r2 ; Flags=nb_dest-dest2.
- bMI _only_one_long
- cmp r4,#0 ; Flags=dest-0.
- bEQ _full_longs_generation ; If dest=0, first word is full.
-
- ; >-------------------------------------------------------------------------<
- ; The first longword of the dest is not full, generate the routine according
- ; to this fact.
-
- ._first_long_generation
- str r8,[r3],#4 ; Generate 'and r4,r2,r3,lsl #0'.
- add r5,r5,r0 ; src_pos=src_pos+zoom.
- add r6,r6,r4,lsl #9 ; r6='mov r5,r4,ror #dest*4'.
- str r6,[r3],#4
- sub r1,r1,r2 ; nb_dest=nb_dest-dest2.
- add r4,r4,#1 ; dest=dest+1.
- cmp r4,#8 ; Flags=dest-8.
- bEQ _end_first_long
- ._first_long
- mov r6,r5,lsr #17 ; r6=int(src_pos/2).
- bicS r6,r6,#&3 ; r6=(src_pos-(src_pos mod(8))/2.
- addNE r6,r11,r6 ; r6='ldr r3,[r1,#..]!'.
- strNE r6,[r3],#4 ; Generate it.
- bicNE r5,r5,#&3f80000 ; r5=src_pos mod(8).
- mov r6,r5,lsr #16 ; r6=int(src_pos).
- add r6,r8,r6,lsl #9 ; r6='and r4,r2,r3,lsl #src_pos*4'.
- str r6,[r3],#4 ; Generate it.
- add r5,r5,r0 ; src_pos=src_pos+zoom.
- add r6,r9,r4,lsl #9 ; r6='add r5,r5,r4,ror #dest*4'.
- str r6,[r3],#4 ; Generate it.
- add r4,r4,#1 ; dest=dest+1.
- cmp r4,#8 ; Gnerate dest points until word is full.
- bNE _first_long
- ._end_first_long
- str r12,[r3],#4 ; Generate 'str r5,[r0],#-4'.
-
- ; >-------------------------------------------------------------------------<
- ; This routine generate code in the case when dest longwords are full.
- ; (i.e. there is more than 8 pixies to generate still.)
-
- ._full_longs_generation
- subS r1,r1,#8 ; nb_dest=nb_dest-8.
- bMI _last_long_generation
- ._full_longs
- ; Generates code for first source pixie... Isolate directly in dest long.
- mov r6,r5,lsr #17 ; r6=int(src_pos/2).
- bicS r6,r6,#&3 ; r6=(src_pos-(src_pos mod(8))/2.
- addNE r6,r11,r6 ; r6='ldr r3,[r1,#..]!'.
- strNE r6,[r3],#4 ; Generate it.
- bicNE r5,r5,#&3f80000 ; r3=src_pos mod(8).
- mov r6,r5,lsr #16 ; r6=int(src_pos).
- add r6,r7,r6,lsl #9 ; r6='and r5,r2,r3,lsl #src_pos*4'.
- str r6,[r3],#4 ; Generate it.
- add r5,r5,r0 ; src_pos=src_pos+zoom.
- ; ... second pixie. Use the 'add r5,r5,r4,ror #4' to mix dest pixies.
- mov r6,r5,lsr #17 ; r6=int(src_pos/2).
- bicS r6,r6,#&3 ; r6=(src_pos-(src_pos mod(8))/2.
- addNE r6,r11,r6 ; r6='ldr r3,[r1,#..]!'.
- strNE r6,[r3],#4 ; Generate it.
- bicNE r5,r5,#&3f80000 ; r3=src_pos mod(8).
- mov r6,r5,lsr #16 ; r6=int(src_pos).
- add r6,r8,r6,lsl #9 ; r6='and r4,r2,r3,lsl #src_pos*4'.
- str r6,[r3],#4 ; Generate it.
- add r5,r5,r0 ; src_pos=src_pos+zoom.
- str r10,[r3],#4 ; Generate 'add r5,r5,r4,ror #4'.
- ; ... 3rd to 8th pixies... Generates 'add r5,r5,r4, ror #?'.
- mov r6,r5,lsr #17 ; 3rd.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r5,r5,r0
- add r6,r9,#8<<7 ; r6='add r5,r5,r4,ror #8'.
- str r6,[r3],#4
- mov r6,r5,lsr #17 ; 4th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r5,r5,r0
- add r6,r9,#12<<7 ; r6='add r5,r5,r4,ror #12'.
- str r6,[r3],#4
- mov r6,r5,lsr #17 ; 5th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r5,r5,r0
- add r6,r9,#16<<7 ; r6='add r5,r5,r4,ror #16'.
- str r6,[r3],#4
- mov r6,r5,lsr #17 ; 6th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r5,r5,r0
- add r6,r9,#20<<7 ; r6='add r5,r5,r4,ror #20'.
- str r6,[r3],#4
- mov r6,r5,lsr #17 ; 7th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r5,r5,r0
- add r6,r9,#24<<7 ; r6='add r5,r5,r4,ror #24'.
- str r6,[r3],#4
- mov r6,r5,lsr #17 ; 8th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r5,r5,r0
- add r6,r9,#28<<7 ; r6='add r5,r5,r4,ror #28'.
- str r6,[r3],#4
-
- str r12,[r3],#4 ; Generate 'str r5,[r0],#-4'.
- subS r1,r1,#8 ; nb_dest=nb_dest-8.
- bPL _full_longs ; More than 8 pixies left?
-
- ; >-------------------------------------------------------------------------<
- ; Generate code which will fill the last longword...
- ; Quite similar to the full long generation, except that we must test
- ; at each different dest point if we have finished, and that we will never
- ; have a 8th pixie.
-
- ._last_long_generation
- addS r1,r1,#8 ; r1=nb of points still to draw.
- BEQ _the_end ; All points drawn?
-
- mov r6,r5,lsr #17 ; 1st pixie.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r7,r6,lsl #9 ; r6='and r5,r2,r3,lsl #src_pos*4'.
- str r6,[r3],#4
- subS r1,r1,#1
- bEQ _last_long_save
- add r5,r5,r0
- mov r6,r5,lsr #17 ; 2nd.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9 ; r6='and r4,r2,r3,lsl #src_pos*4'.
- str r6,[r3],#4
- str r10,[r3],#4 ; Generate 'add r5,r5,r4,ror #4'.
- subS r1,r1,#1
- bEQ _last_long_save
- add r5,r5,r0
- mov r6,r5,lsr #17 ; 3rd.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r6,r9,#8<<7 ; r6='add r5,r5,r4,ror #8'.
- str r6,[r3],#4
- subS r1,r1,#1
- bEQ _last_long_save
- add r5,r5,r0 ; src_pos=src_pos+zoom.
- mov r6,r5,lsr #17 ; 4th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r6,r9,#12<<7 ; r6='add r5,r5,r4,ror #12'.
- str r6,[r3],#4
- subS r1,r1,#1
- bEQ _last_long_save
- add r5,r5,r0
- mov r6,r5,lsr #17 ; 5th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r6,r9,#16<<7 ; r6='add r5,r5,r4,ror #16'.
- str r6,[r3],#4
- subS r1,r1,#1
- bEQ _last_long_save
- add r5,r5,r0
- mov r6,r5,lsr #17 ; 6th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r6,r9,#20<<7 ; r6='add r5,r5,r4,ror #20'.
- str r6,[r3],#4
- subS r1,r1,#1
- bEQ _last_long_save
- add r5,r5,r0
- mov r6,r5,lsr #17 ; 7th.
- bicS r6,r6,#&3
- addNE r6,r11,r6
- strNE r6,[r3],#4
- bicNE r5,r5,#&3f80000
- mov r6,r5,lsr #16
- add r6,r8,r6,lsl #9
- str r6,[r3],#4
- add r6,r9,#24<<7 ; r6='add r5,r5,r4,ror #24'.
- str r6,[r3],#4
-
- ._last_long_save
- str r12,[r3],#4 ; Generate 'str r5,[r0],#-4'.
-
- ._the_end
- str r14,[r3],#4 ; Generate the 'mov pc,r14'
- ldmfd r13!,{r0-r12,pc}
-
- ; >-------------------------------------------------------------------------<
- ; The case where the zoomed image is contained in one long is not
- ; implemented because it is dull. Not hard to do anyway...
- ._only_one_long
- str r14,[r3],#4 ; Generate 'mov pc,r14'.
- ldmfd r13!,{r0-r12,pc}
-
- ; >-------------------------------------------------------------------------<
- ; This contains all the opcodes used in the zoomer routine.
- ._opcodes
- sub r0,r0,#0
- dcd $e1a05064 ; 'mov r5,r4,ror #0'.
- and r5,r2,r3,lsl #0
- and r4,r2,r3,lsl #0
- dcd $e0855064 ; 'add r5,r5,r4,ror #0'.
- add r5,r5,r4,ror #4
- ldr r3,[r1,#0]!
- str r5,[r0],#-4
- mov pc,r14
-
- .zoom_routine
- ldr r3,[r1] ; Always the first instruction.
- dbd 320*4
-