HispaMSX

To move the sprites in code machine high speed

2004-08-19 16:49:02
Hello we all of msx,

Here downstairs there is a small videogame which to use routine code machine 
for to move the sprites high speed, but for move the ship of player1 can it to 
use only the keyboard msx and does't work with joystick in port-1 or 2.
Would be necessary to modify the code machine to have her worked is with 
joystick in port-1 and with the keyboard contemporarily.
I hope that somebody can work us.
 
Thanks again for you and for your help.
Bye bye
Andrea from Italy

  
1 REM GUERRE STELLARI
4 GOSUB60000
5 SCREEN1,2:KEYOFF:COLOR15,1,1:PRINT"GUERRE STELLARI"
10 GOSUB60000:DEFINTA-Z           
15 FORI=1TO32:READQ:A$=A$+CHR$(Q):NEXT:SPRITE$(0)=A$:A$=""
20 FORI=1TO32:READQ:A$=A$+CHR$(Q):NEXT:SPRITE$(1)=A$:A$=""
25 FORI=1TO8:READQ:A$=A$+CHR$(Q):NEXT:SPRITE$(2)=A$
30 DEFUSR=60000!:DEFUSR1=60118!:POKE59996!,10
35 FORI=1TO5:VPOKE6914+4*I,8:NEXT
40 FS=1:PRINT:PRINT:PRINT:INPUT"LIVELLO DI DIFFICOLTA' 
(1-4)";LD$:DT=2*VAL(LD$)+2:IFDT>10THEN40
50 FORI=1TO8:PRINT:NEXT:PRINT"PREMI UN TASTO PER INIZIARE"
55 D=RND(1):IFINKEY$=""THEN55
60 SPRITEON:ONSPRITEGOSUB800
65 FORI=1089TO1095:VPOKEI,0:NEXT:VPOKE1088,10
70 CLS:FORI=0TO60:VPOKE6144+INT(RND(1)*700),136:NEXT
95 TIME=0:PUTSPRITE0,(120,160),11
100 POKE59999!,7:D=USR(D)
110 GOSUB200
120 GOSUB300
190 GOTO100
200 IFTIME<105-25*LDTHENRETURN
210 K=LS+1:IFK=6THENK=1
212 IFSFAND2^KTHENRETURNELSELS=K:TIME=0:IFRND(1)<.6THENK1=8:K2=7ELSEK1=4:K2=8
215 
VPOKE6914+4*LS,K1:PUTSPRITELS,(INT(RND(1)*(150-20*LD)+40+20*LD),0),K2:SF=(SF)OR2^LS
220 RETURN
300 
POKE59999!,DT:POKE59998!,2:FORI=1TO5:IFSFAND2^ITHENPOKE59997!,I:D=USR1(D):IFVPEEK(6912+4*I)>190AND(SFAND2^I)THENSF=SFAND(255-2^I):PUTSPRITEI,(10+30*I,200):IFVPEEK(6914+4*I)=8THENGE=1:GOTO900ELSEFS=FS+1:IFFS=6THENFS=1
305 NEXT
310 RETURN
800 SPRITEOFF:IFVPEEK(6914+4*FS)=4THEN900
810 
PUTSPRITEFS,(10+30*FS,200):SF=SFAND(255-2^FS):NS=NS+1:PLAY"L54M1700S10N54N32"
820 FS=FS+1:IFFS=6THENFS=1
830 SPRITEON:RETURN
900 PRINT" G A M E   O V E R"
910 FORI=1TO10:PRINT:NEXT:PRINT"ASTRONAVI NEMICHE COLPITE:";NS
920 PRINT:PRINT:IFGE=1THENPRINT"UNA ASTRONAVE E' RIUSCITA A FUGGIRE!!"ELSE 
PRINT"L'ASTRONAVE DA TRASPORTODI HA COLPITO!"
940 IFINKEY$=""THENENDELSE940
9999 REM DATA SPRITES
10000 DATA 
1,1,1,129,129,129,206,206,254,206,255,207,199,198,199,131,128,128,128,130,130,227,115,115,127,115,255,243,227,99,227,194
10010 DATA 
56,56,255,255,255,127,63,63,31,30,14,6,2,1,1,1,28,28,28,255,255,255,254,252,252,248,120,112,96,64,128,128,128
10020 DATA 129,195,231,255,24,36,66,129
10030 DATA 48,120,120,48,0,0,0,0
10040 DATA 1,2,4,8,16,32,64,128
10050 DATA 0,0,0,0,0,0,0,255
60000 CLS:RESTORE60020
60010 FORI=60000!TO60217!:READQ:POKEI,Q:NEXT:RESTORE:RETURN
60020 DATA 
219,170,230,240,33,92,234,94,246,8,0,0,0,0,0,0,0,0,0,0,0,211,170,219,169,71,0,0,0,0,0,0,0,0
60030 DATA 
0,0,0,230,128,194,151,234,203,91,202,151,234,62,3,50,94,234,195,209,234,120,230,64,194,170,234,203,83,202,170,234,62,2
60040 DATA 
50,94,234,195,209,234,120,230,32,194,189,234,203,67,202,189,234,62,0,50,94,234,195,209,234,120,230,16,194,208,234,203,75,202,208,234,62,1,50,94,234,195,209,234,201,62,0,50,93,234,58
60050 DATA 
93,234,203,39,203,39,79,6,0,33,0,27,9,58,95,234,71,58,94,234,87,254,0,194,250,234,205,27,235,121,152,79,195,44,235,254
60060 DATA 
1,194,6,235,35,205,27,235,195,244,234,254,2,194,20,235,205,27,235,121,128,79,195,44,235,35,205,27,235,195,14,235,125,243,211
60070 DATA 
153,124,211,153,0,0,0,0,219,152,79,183,251,201,125,243,211,153,124,246,64,211,153,121,211,152,251,201



[Se han eliminado los trozos de este mensaje que no contenían texto]


<Anterior en la conversación] Conversación actual [Siguiente en la conversación>
  • To move the sprites in code machine high speed, Andrea <=