8-Bit Software Online Conversion
Jackpot - Listing
10REM Fruit Machine
20REM By M.T.Farnworth
30REM (c) Mikesoft/Andersonic
40MODE5:L%=FNcl("Fruit Machine.",3)
50L%=FNcl("By M.T.Farnworth",5)
60L%=FNcl("Keys",9)
70L%=FNcl(" SPACE - SPIN WHEELS",12)
80L%=FNcl("1/2/3 - NUDGE/HOLD",14)
90L%=FNcl("C - CANCEL",16)
100PROCinit
110L%=FNcl("Press Space to play.",20)
120REPEAT UNTIL GET=32
130ONERROR IF ERR=17 THEN MODE6:PRINT'
"You leave the arcade with £";M:END ELSE
MODE6:REPORT:PRINT" at line ";ERL:END
140PROCscreen
150PROCreel
160PROCcoin
170PROCreel
180L%=FNwin
190IF L%=1 AND S%<>1 THEN PROCnudge
200GOTO160
210DEFPROCinit
220VDU23,1;0;0;
230DIM Q% &A00,H%(2),O%(2)
240M=5.00
250new=&70
260old=&72
270temp=&74
280temp1=&76
290rows=&78
300temprows=&79
310columns=&7A
320FOR pass=0 TO 2 STEP 2
330P%=Q%
340[ OPT pass
350.put
360LDA #&80
370STA old
380LDA #0
390STA old+1
400
410.print
420STX columns
430STY rows
440LDX #0
450LDY #0
460LDA new
470STA temp1
480LDA new+1
490STA temp1+1
500LDA old
510STA temp
520LDA old+1
530STA temp+1
540.loop1
550LDA rows
560STA temprows
570.loop2
580.newdata
590LDA &3000,X
600STA (new),Y
610.olddata
620INX
630LDA old
640AND #7
650CMP #7
660BEQ bottom1
670INC old
680BNE next1
690INC old+1
700JMP next1
710.bottom1
720LDA old
730ADC #&38
740STA old
750LDA old+1
760ADC #1
770STA old+1
780.next1
790LDA new
800AND #7
810CMP #7
820BEQ bottom2
830INC new
840BNE next2
850INC new+1
860JMP next2
870.bottom2
880LDA new
890ADC #&38
900STA new
910LDA new+1
920ADC #1
930STA new+1
940.next2
950DEC temprows
960BNE loop2
970LDA temp1
980ADC #8
990STA new
1000STA temp1
1010LDA temp1+1
1020ADC #0
1030STA new+1
1040STA temp1+1
1050LDA temp
1060ADC #8
1070STA old
1080STA temp
1090LDA temp+1
1100ADC #0
1110STA old+1
1120STA temp+1
1130DEC columns
1140BNE loop1
1150RTS
1160
1170.sprite
1180]
1190NEXT
1200RESTORE
1210FOR i=1 TO (6*32*12) STEP 4
1220READ a$
1230!P%=EVAL("&"+a$)
1240P%=P%+4
1250NEXT
1260GOTO1730
1270REM CHERRY2
1280REM X=6/Y=32
1290DATA0,0,0,0,0,0,0,0,66000000,337766
66,27133333,7070707,30707,F4F0F07,3070F,
0,0,F0E00000,8C183070,D0E0E0E,30B0B1D,C0
D0B0B,80C,0,0,0,F0E0C080,8C183070,F0F0F4
E,E0F0F,0,0,0,0,0,E0E0C080,0,0,0,0,0,0,0
,0,0,0,0,0
1300REM PINE
1310REM X=6/Y=32
1320DATA0,0,0,0,0,0,0,0,10101030,331100
00,FFCFCF77,9FFFCFCF,CFCFFF9F,77CFCFFF,7
7676777,33676777,F0F06060,2FEFFFF0,FFCFC
F3F,9FFF9F9F,9F9FFF9F,9F9FFFFF,FF4F4FFF,
FF4F4FFF,F0D0D040,7F6ECCE0,EFEF9F9F,EFEF
3F3F,CFEF2F3F
1330DATA EF3F3FCF,9F9FFFEF,FF9F9FFF,0,0
,4C4CCC88,4C4CCCCC,CC4C4CCC,88CCCCCC,888
88888,888888,0,0,0,0,0,0,0,0
1340REM MELON
1350REM X=6/Y=32
1360DATA0,7030301,F070607,D0F0F0F,F0F0F
0F,707060F,1030307,0,F160000,F0F0B0F,F0F
0F0D,F0F0F07,F070D0F,F0F0D0F,F0F0F05,160
F,F0F00000,1E3C0C08,F160E0E,F0F070F,F0B0
F0F,1E1E0E0F,783C0C06,F000,F0F00000,F0F0
0000,F0F00000
1370DATA F0F00000,F0F00000,F0F00000,F0F
00000,F000,F0F00000,F0F00000,F0F00000,F0
F00000,F0F00000,F0F00000,F0F00000,F010,8
0000000,C0808080,E0C04040,E0E02020,E0E02
020,C0C04040,80808080,0
1380REM BAR
1390REM X=6/Y=32
1400DATAFFFF00,CCFFFF00,CCCCCCCC,CCCCCC
CC,CCCCCCCC,CCCCCCCC,FFFFCC,FFFF00,FFFF0
0,FFFF00,CCCCCC00,1111CCCC,CCCCCC11,CCCC
,FFFF11,FFFF00,FFFF00,CCFFFF00,CCCCCCCC,
CCCCCCCC,CCCCCCCC,CCCCCCCC,FFFFCC,FFFF00
,FFFF00,FFFF00
1410DATA CCCC0000,CCCC,CCCCCC00,CCCCCCC
C,FFFFCC,FFFF00,FFFF00,88FFFF00,99999988
,88999999,99999988,99999999,FFFF99,FFFF0
0,FFFF00,77FFFF00,99113333,33119999,9911
3377,99999999,FFFF99,FFFF00
1420REM APPLE
1430REM X=6/Y=32
1440DATA0,0,0,0,0,0,0,0,0,0,1000000,703
0301,7070707,7070707,10303,0,0,11111100,
F0F0713,2D1E0F0F,F1E0F0F,F3C0F0F,F0F0F3C
,70F,CC440000,8888,78E04880,78F0F078,1E0
F78F0,F0F03C96,486878F0,848,0,0,0,C08080
00,C0C0C0C0,8080C0C0
1450DATA 0,0,0,0,0,0,0,0,0,0
1460REM SEVEN
1470REM X=6/Y=32
1480DATA0,100,0,0,0,0,0,0,7000000,70F0F
0F,0,0,0,0,0,0,F000000,F0F0F0F,0,1010000
,3030101,7030303,7070707,6060707,F000000
,F0F0F0F,F070703,C0E0E0E,80C0C0C,8080808
,0,0,C000000,C0E0F0E,808,0,0,0,0,0,0,0,0
,0,0,0,0,0
1490REM STRAW
1500REM X=6/Y=32
1510DATA0,0,0,0,0,0,0,0,10303030,300101
0,17072707,3030307,1010101,0,0,0,B060606
0,F0F0B0B0,2F0F4F0F,4F0F9F0F,9F0F2F0F,2F
0F4F0F,7071707,10303,30303030,E1E06060,4
F0F9F0F,8F0F2F0F,F0F4F0F,E0E8E0E,C0C0C0C
,808,0,8000000
1520DATA 8C0C0C0C,808080C,0,0,0,0,0,0,0
,0,0,0,0,0
1530REM GRAPES
1540REM X=6/Y=32
1550DATA0,0,0,0,0,0,0,0,0,70111100,7030
0070,707000,30403030,30700030,10307000,1
0,33111111,10F0E8EE,E010F060,70E01070,10
70E010,609070E0,F0609070,10706090,CC8888
88,90E07177,6080F060,F06090E0,80F06080,6
080F060,F06080F0
1560DATA 80E06090,0,C0888800,E0E000C0,2
0E0C000,E020C0C0,E0C000C0,A0E0C000,80,0,
0,0,0,0,0,0,0
1570REM MA
1580REM X=6/Y=32
1590DATA0,0,0,0,0,0,0,0,87F00000,878787
87,87878787,80878787,87878787,87878787,6
1C38787,1030,FF00000,8F9FBFEF,8F8F8F8F,F
0F8F,3F1F0F0F,3F2F2F2F,2F2F2F2F,30E1870F
,FF00000,8FCF6F3F,8F8F8F8F,F0F8F,6FCF0F0
F,EF2F2F2F,2F2F2F2F
1600DATA E03C0F0F,FF00000,8F8F8F8F,8F8F
8F8F,F0F8F,F0F0F0F,F0F0F0F,3C1E0F0F,80C0
68,80800000,80808080,80808080,80808080,8
0808080,80808080,808080,0
1610REM TREES
1620REM X=6/Y=32
1630DATA0,0,0,0,0,0,0,0,30100000,707061
21,707043C3,44103030,1122,2200CC33,1122C
C,33110000,F0C3C370,96967878,C3C3F0F0,F0
F03C3C,FFFFFDF0,FFFFFFFF,FFFFFFFF,FFFFFF
FF,E0C08000,9696F0E0,3CF0F0F0,80C0E02C,E
E998880,9988EE88
1640DATA CCAA9999,EECC8888,0,0,80,0,880
000,0,CC00,0,0,0,0,0,0,0,0,0
1650REM LEMON
1660REM X=6/Y=32
1670DATA0,0,0,0,11,0,0,0,0,0,33111100,F
F557722,7777EEFF,11113333,0,0,0,77000000
,FFDDFFEE,FFDDFFFF,FFDDFFEE,F9FBE2F7,77F
C,0,0,EE000000,EEBBFFFF,FFEE77FF,BBFFFFD
D,F9FDFCFE,EEF3,0,0,0,CC888800,FFEEEECC,
EEEE77FF,8888CCCC
1680DATA 0,0,0,0,0,0,88,0,0,0
1690REM WINSPIN2
1700REM X=6/Y=32
1710DATAF000F0,D0D0D0D,F0F0D0D,C,222233
00,3322,3300,F000F0,F000F0,B0B0B0B,F0F0B
0B,3,1111DD00,5555DD11,DD55,F000F0,F000F
0,303,3000000,3,2222EE00,EE22,0,F000F0,F
000F0,C0C0F0F,F0C0C0C,F,2222FF00,2222222
2,FF22,F000F0
1720DATA F000F0,3030303,3030303,3,3333A
A00,22222222,AA22,F000F0,F000F0,70F0B03,
3030303,3,99111100,113377DD,1111,F000F0
1730temp=&70
1740FOR pass=0 TO 2 STEP 2
1750P%=&900
1760[ OPT pass
1770
1780½X,Y --> address
1790.convert
1800LDA #0
1810STA temp+1
1820TXA
1830ASL A
1840ASL A
1850ROL temp+1
1860ASL A
1870ROL temp+1
1880STA temp
1890TYA
1900AND #7
1910ADC temp
1920STA temp
1930LDA temp+1
1940ADC #0
1950STA temp+1
1960TYA
1970LSR A
1980LSR A
1990LSR A
2000ASL A
2010TAY
2020LDA table,Y
2030ADC temp
2040STA temp
2050LDA table+1,Y
2060ADC temp+1
2070STA temp+1
2080LDX #6:LDY #32
2090JMP Q%
2100
2110.table
2120OPT FNtable
2130]
2140NEXT
2150VDU19,2,2;0;
2160ENDPROC
2170
2180DEF FNtable
2190FOR I%=0 TO 31
2200[OPT pass
2210EQUW &5800+I%*&140
2220]
2230NEXT
2240=pass
2250DEF PROCscreen
2260CLS
2270PRINT'"Money : £";M
2280GCOL 3,2
2290MOVE 100,100:DRAW 100,800:DRAW 1200
,800:DRAW 1200,100:DRAW 100,100
2300MOVE 475,100:DRAW 475,800
2310MOVE 825,100:DRAW 825,800
2320ENDPROC
2330DEF PROCreel
2340FOR I%=0 TO 3:VDU19,I%,0;0;:NEXT
2350L%=FNmoney
2360N%=0
2370RESTORE 2500:IF C%>0 AND S%<>1 R%=R
ND(70)+10
2380IF H%(N%)<1 THEN 2400
2390H%(N%)=0:IF N%<2 GOTO 2490 ELSE GOT
O 2510
2400O%(N%)=R%
2410FOR I%=0 TO R%-1:READ Z%:NEXT
2420FOR I%=0 TO 2
2430READ Z%
2440L%=FNfruit
2450IF I%=1 THEN D%=Z%
2460NEXT
2470IF N%=0 THEN E%=D% ELSE IF N%=1 THE
N F%=D% ELSE IF N%=2 G%=D%:SOUND 1,-15,2
0-(N%*4),2:GOTO2510
2480SOUND 1,-15,20-(N%*4),1:SOUND 1,-15
,21-(N%*4),2
2490N%=N%+1:GOTO2370
2500DATA 10,3,6,0,1,3,2,5,0,3,1,2,0,3,4
,0,5,2,6,1,0,4,2,3,4,11,1,5,0,2,1,3,0,6,
1,4,11,8,0,7,1,7,0,6,2,7,9,1,4,11,8,0,9,
1,4,8,0,9,5,2,3,0,4,1,11,4,2,1,5,3,2,1,5
,7,6,8,10,3,6,0,1,3,2,5,0,3,1
2510FOR I%=0 TO 3:VDU19,I%,I%;0;:NEXT:E
NDPROC
2520IF N%=0 THEN X%=5 ELSE IF N%=1 THEN
X%=17 ELSE X%=29
2530IF I%=0 THEN Y%=70 ELSE IF I%=1 THE
N Y%=120 ELSE Y%=170
2540CALL &900
2550RETURN
2560DEF FNfruit
2570?(newdata+1)=(sprite+(&C0*Z%)) MOD2
56
2580?(newdata+2)=(sprite+(&C0*Z%)) DIV2
56
2590GOSUB2520
2600=0
2610DEFPROCcoin
2620M=M-0.1
2630IF M<=0 THEN L%=FNcl("YOU ARE BROKE
",3):L%=FNcl("PRESS SPACE",5):REPEAT UNT
IL GET=32:RUN
2640L%=FNcl("PRESS START",3)
2650L%=FNhold
2660IF L%=1 THEN 2680
2670REPEAT:G%=GET:UNTIL G%=32 OR G%=61
2680L%=FNcl(" ",3)
2690IF G%<>61 C%=1 ELSE C%=0
2700ENDPROC
2710DEFFNcl(a$,a)
2720COLOUR 1
2730PRINT TAB(0,a);STRING$(19," ")
2740PRINT TAB((?&30A+1-LEN a$)DIV 2,a)a
$
2750=0
2760DEFFNwin
2770IF E%=F% ELSE =1
2780IF F%=G% ELSE =1
2790IF E%=G% ELSE =1
2800RESTORE2840
2810IF E%=11 THEN S%=1:R%=RND(70)+10 EL
SE S%=0
2820FOR I%=0 TO E%:READ A$,B$:NEXT
2830L%=FNcl("3 "+A$+" £"+B$,3):M=M+EVAL
(B$):L%=FNwait:=0
2840DATA CHERRIES,0.10,PINEAPPLES,0.20,
MELONS,0.50,BARS,1.00,APPLES,1.50,SEVENS
,2.00,STRAWBERRIES,2.50,GRAPES,3.00,SHIE
LDS,4.00,TREES,5.00,LEMONS,10.00,WIN SPI
NS,0.10
2850DEFFNmoney
2860PRINTTAB(0,3);STRING$(20," ")
2870@%=&2020A
2880COLOUR2:PRINTTAB(0,1)"Money : £";M;
" "
2890=0
2900DEFFNwait
2910FOR I%=0 TO 100 STEP 4:SOUND 1,-15,
I%,1:NEXT
2920L%=FNmoney
2930=0
2940DEFFNhold
2945IF S%=1 THEN =0
2950K%=RND(6)
2960IF K%=1 ELSE =0
2970COLOUR 3
2980FOR I%=1 TO 3
2990PRINT TAB(I%*6-4,29);"HOLD"
3000NEXT
3010REPEAT
3020J%=GET
3030IF J%<52 AND J%>48 THEN GOTO 3080
3040IF J%=67 THEN FOR I%=0 TO 2:H%(I%)=
0:NEXT:UNTIL H%(0)=0:GOTO 2970
3050UNTIL J%=32
3060PRINTTAB(0,29)STRING$(19," ")
3070=1
3080H%(J%-49)=1:COLOUR1:PRINT TAB((J%-4
8)*6-4,29);"HELD"
3090GOTO3050
3100DEF PROCnudge
3110L%=RND(10)
3120IF L%=1 ELSE ENDPROC
3130FOR I%=0 TO 2:SOUND 0,1,100,10:SOUN
D0,0,0,1:NEXT
3140L%=FNcl("NUDGE ACTIVATED",3)
3150M%=RND(8)+2:L%=FNcl("MAX NUDGES : "
+STR$(M%),5)
3160Q%=0:REPEAT
3170N%=GET-49
3180IF N%<0 OR N%>2 THEN 3170
3190O%(N%)=O%(N%)-1
3200RESTORE 2500
3210FOR I%=0 TO O%(N%)-1:READ Z%:NEXT
3220FOR I%=0 TO 2
3230READ Z%
3240L%=FNfruit
3250IF I%=1 THEN D%=Z%
3260NEXT
3270IF N%=0 THEN E%=D%:GOTO3300
3280IF N%=1 THEN F%=D%:GOTO3300
3290IF N%=2 THEN G%=D%:GOTO3300
3300SOUND 1,-15,20-(N%*4),1:SOUND 1,-15
,21-(N%*4),2
3310L%=FNwin
3320IF L%=0 THEN UNTIL L%=0:GOTO3350
3330Q%=Q%+1
3340UNTIL Q%=M%
3350PRINTTAB(0,5);STRING$(19," ")
3360GOTO200