90

et, au fait, je viens de voir tes movem.b... ça n'existe PAS...
In many respects the Yoshi is like a beautiful woman. A man can come so enamoured that he bestows on her all his time, his energy and his fortune.
- Fred whipple, 1960

*** Ne sous-estimez pas la puissance de la Marmotte ***
© Marmotte Team : LaMarmotte, sBibi, Vark & Sabrina

91

boon... voila a koi ça ressemble...
je remplacerai surement l'imm du jmp par un areg, ms bon c pa le + urgent smile
put_sprite_16x16 ;a0=sprite, a1=LCD_MEM, d1=x ,d2=y  lea spriteS(pc),a0  add.w d2,d2  move.w d2,d4  lsl.w #4,d2  sub.w d4,d2  move.w d1,d4  lsr.w #4,d4  add.w d4,d4  add.w d2,d4  adda.w d4,a1  andi.w #$f,d1  move.w d1,d3  add.w d3,d3  add.w d3,d3  move.l Lookup(pc,d3.w),branch+2 branch jmp PSGen Lookup ;      0     1     2     3     4     5     6     7  dc.l PS16,PSGen,PSGen,PSGen,PSGen,PSGen,PSGen,PSGen  dc.l PSGen,PSGen,PSGen,PSGen,PSGen,PSGen,PSGen,PSGen ;      8     9     10    11    12    13    14    15 PS16  movem.l (a0)+,d0-d7  or.l d0,(a1)  or.l d1,30(a1)  or.l d2,30*2(a1)  or.l d3,30*3(a1)  or.l d4,30*4(a1)  or.l d5,30*5(a1)  or.l d6,30*6(a1)  or.l d7,30*7(a1)  movem.l (a0)+,d0-d7  or.l d0,30*8(a1)  or.l d1,30*9(a1)  or.l d2,30*10(a1)  or.l d3,30*11(a1)  or.l d4,30*12(a1)  or.l d5,30*13(a1)  or.l d6,30*14(a1)  or.l d7,30*15(a1)  rts PSGen  movem.l (a0)+,d0/d2-d7  lsr.l d1,d0  lsr.l d1,d2  lsr.l d1,d3  lsr.l d1,d4  lsr.l d1,d5  lsr.l d1,d6  lsr.l d1,d7  or.l d0,(a1)  or.l d2,30(a1)  or.l d3,30*2(a1)  or.l d4,30*3(a1)  or.l d5,30*4(a1)  or.l d6,30*5(a1)  or.l d7,30*6(a1)  movem.l (a0)+,d0/d2-d7  lsr.l d1,d0  lsr.l d1,d2  lsr.l d1,d3  lsr.l d1,d4  lsr.l d1,d5  lsr.l d1,d6  lsr.l d1,d7  or.l d0,30*7(a1)  or.l d2,30*8(a1)  or.l d3,30*9(a1)  or.l d4,30*10(a1)  or.l d5,30*11(a1)  or.l d6,30*12(a1)  or.l d7,30*13(a1)  move.l (a0)+,d7  lsr.l d1,d7  or.l d7,30*14(a1)  move.l (a0)+,d7  lsr.l d1,d7  or.l d7,30*15(a1)  rts
In many respects the Yoshi is like a beautiful woman. A man can come so enamoured that he bestows on her all his time, his energy and his fortune.
- Fred whipple, 1960

*** Ne sous-estimez pas la puissance de la Marmotte ***
© Marmotte Team : LaMarmotte, sBibi, Vark & Sabrina

92

d'accord, c'est tout en .l, mais c'est plus rapide que la plupart de tes routines en .w de la page précédente (à part Sprite16x16_32x) smile
(et puis... heu je me trompe ou t'av fait la table pour toute une ligne de X? grin

et la table, je l'aie mise au cas ou, pour éventuellement insérer d'autres cas particuliers...

sinon si il y en a pas d'autres, y a qu'à faire:
put_sprite_16x16 ;a0=sprite, a1=LCD_MEM, d1=x ,d2=y  add.w d2,d2  move.w d2,d4  lsl.w #4,d2  sub.w d4,d2  move.w d1,d4  lsr.w #4,d4  add.w d4,d4  add.w d2,d4  adda.w d4,a1  andi.w #$f,d1  beq PS16 PSGen  movem.l (a0)+,d0/d2-d7  lsr.l d1,d0  lsr.l d1,d2  lsr.l d1,d3  lsr.l d1,d4  lsr.l d1,d5  lsr.l d1,d6  lsr.l d1,d7  or.l d0,(a1)  or.l d2,30(a1)  or.l d3,30*2(a1)  or.l d4,30*3(a1)  or.l d5,30*4(a1)  or.l d6,30*5(a1)  or.l d7,30*6(a1)  movem.l (a0)+,d0/d2-d7  lsr.l d1,d0  lsr.l d1,d2  lsr.l d1,d3  lsr.l d1,d4  lsr.l d1,d5  lsr.l d1,d6  lsr.l d1,d7  or.l d0,30*7(a1)  or.l d2,30*8(a1)  or.l d3,30*9(a1)  or.l d4,30*10(a1)  or.l d5,30*11(a1)  or.l d6,30*12(a1)  or.l d7,30*13(a1)  move.l (a0)+,d7  lsr.l d1,d7  or.l d7,30*14(a1)  move.l (a0)+,d7  lsr.l d1,d7  or.l d7,30*15(a1)  rts PS16  movem.l (a0)+,d0-d7  or.l d0,(a1)  or.l d1,30(a1)  or.l d2,30*2(a1)  or.l d3,30*3(a1)  or.l d4,30*4(a1)  or.l d5,30*5(a1)  or.l d6,30*6(a1)  or.l d7,30*7(a1)  movem.l (a0)+,d0-d7  or.l d0,30*8(a1)  or.l d1,30*9(a1)  or.l d2,30*10(a1)  or.l d3,30*11(a1)  or.l d4,30*12(a1)  or.l d5,30*13(a1)  or.l d6,30*14(a1)  or.l d7,30*15(a1)  rts
In many respects the Yoshi is like a beautiful woman. A man can come so enamoured that he bestows on her all his time, his energy and his fortune.
- Fred whipple, 1960

*** Ne sous-estimez pas la puissance de la Marmotte ***
© Marmotte Team : LaMarmotte, sBibi, Vark & Sabrina

93

Non, ca n'en vaut pas la peine de doubler la taille des sprites juste pour faire ca. M'enfin c'est mon avis.
Et movem.w fait une extension de signe.

94

oui, bah g laisse tomber cette methode la., c vrai que doubler la taille du sprite, c pas top...
In many respects the Yoshi is like a beautiful woman. A man can come so enamoured that he bestows on her all his time, his energy and his fortune.
- Fred whipple, 1960

*** Ne sous-estimez pas la puissance de la Marmotte ***
© Marmotte Team : LaMarmotte, sBibi, Vark & Sabrina

95

salté de movem.w sad
ya pas moyen de contourné, genre:

movem.w (a0)+,d0-d6
ext.l d0
...
XLib v1.00 Powerrrrrrrrrrrrrrrrrrrr!

96

C'est justement ce qu'il fait. Un ext.l d0 tongue
Faudrait faire un
swap d0 clr.w d0 swap d0, mais on perd l'interet du movem