home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
routines
/
modplayer3.amos
/
modplayer3.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1993-03-15
|
23KB
|
934 lines
'
' Mod player version 3.0
' This is pretty good dont ya think???
' storm 1992-93
' This code is pretty old now but its still usefull
' OLD means I do things MUCH diffrently now.
'
'Command Line$="df1:mod.behind"
'
A#=0.0
C$=Command Line$
If C$<>"" Then Goto CHARGE
Dim DLIST$(60),REAL$(30)
Global DF$,DLIST$(),JEN,REAL$(),TEMP$,FSIZE,DKNAME$,T1$,T2$,Q1$,Q2$,RESPONSE
Shared DF$,DLIST$(),JEN,REAL$(),TEMP$,FSIZE,DKNAME$,T1$,T2$,Q1$,Q2$,RESPONSE
Global OPTS,SAMPLIST,SCREN
OPTS=1 : SAMPLIST=1 : SCREN=260
'
'
' CLI Stuff use carefully!
'
Goto BEGIN
CHARGE:
Amos Lock
Amos To Back
Open Port 1,"RAW:0/0/640/100/Mod Player V3.00 By Ejber Ozkan."
Print #1,Chr$(27)+"[33mPlease Wait Loading..."+Chr$(27)+"[32m"
If Exist(C$)=False
Bell 80
Print #1,"Sorry! File "+C$+" NOT FOUND!"
Wait 60
Print #1,"Bye Bye!!"
Amos Unlock
End
End If
Track Load C$,5
Print #1,Chr$(27)+"[33m Now Playing:"+Chr$(27)+"[32m"+C$+Chr$(27)+"[31m"
Track Play 5
Track Loop On
Print #1,"Press Esc to QUIT and stop music!"
Do
If Key State(69)=True
Track Stop
Print #1,"Bye Bye!!!"
Erase 5
Amos Unlock
End
End If
Loop
'
BEGIN:
SETUP
ICONS
End
Procedure SETUP
Screen Open 0,640,256,4,Hires
Screen Hide 0
_SCREENSET
Screen Display 0,140,40,640,256
Ink 1 : Bar 0,0 To 640,256
Ink 0 : Box 0,33 To 232,140 : Ink 3 : Draw 0,33 To 232,33 : Draw 0,33 To 0,140
Ink 3 : Draw 0,0 To 640,0 : Draw 0,0 To 0,200
Limit Mouse 0,0 To 450,300
'Colour 19,$14 : Colour 17,$A64 : Colour 18,$742
Reserve Zone 20
'
SH[10,15,"SELECT PATH",3]
Ink 0 : Box 5,6 To 105,20 : Ink 3 : Draw 5,6 To 105,6 : Draw 5,6 To 5,20
Set Zone 1,5,6 To 105,20
SH[115,15,"FULL DIRECTORY",3]
Ink 0 : Box 107,6 To 235,20 : Ink 3 : Draw 107,6 To 235,6 : Draw 107,6 To 107,20
Set Zone 2,107,6 To 235,20
SH[320,200,"SAMPLE LIST",3] : SH[335,210,"0 - 15",3]
Ink 0 : Box 310,189 To 420,220 : Ink 3 : Draw 310,189 To 420,189 : Draw 310,189 To 310,220
Set Zone 3,310,189 To 420,220
Ink 2 : Paint 321,201
SH[435,200,"SAMPLE LIST",3] : SH[450,210,"16 - 31",3]
Ink 0 : Box 422,189 To 535,220 : Ink 3 : Draw 422,189 To 535,189 : Draw 422,189 To 422,220
Set Zone 4,422,189 To 535,220
Ink 0 : Box 536,189 To 636,220 : Ink 3 : Draw 536,189 To 636,189 : Draw 536,189 To 536,220
Set Zone 5,536,189 To 636,220
SH[270,70,"/\",3]
Ink 0 : Box 265,60 To 290,75 : Ink 3 : Draw 265,60 To 290,60 : Draw 265,60 To 265,91
Set Zone 6,265,60 To 290,75
SH[270,86,"\/",3]
Set Zone 7,266,76 To 290,91
SH[240,110,"ESCAPE",2]
SH[254,120,"KEY",2]
SH[243,130,"QUITS",2]
Ink 0 : Box 266,76 To 290,91 : Ink 3 : Draw 266,76 To 290,76 : Draw 266,76 To 266,91
'
CN=7
Ink 1,0
For U=0 To 90 Step 8
Add CN,1
Set Zone CN,2,36+U To 248,43+U
Next U
Gr Writing 5
Ink 0
EQUALS
Screen 0
_STARTIT
Screen Show 0
End Proc
Procedure ICONS
Screen 0
WAM=0
Do
ZUP=Mouse Zone
Screen 0
If ZUP=1 and Mouse Key=1 Then Ink 2 : Paint 6,7 : SUP_LIST : Gosub OHNO : Ink 1 : Paint 6,7
If ZUP=2 and Mouse Key=1 Then FULLDIR
If ZUP=3 and Mouse Key=1 Then TRACKER_DETAIL
If ZUP=4 and Mouse Key=1 Then TRACKER2
If ZUP=5 and Mouse Key=1 Then Ink 2 : Paint 537,190 : _OPTIONS : Ink 1 : Paint 537,190
'If ZUP=6 and Mouse Key=1 Then Ink 2 : Paint 266,61 : Gosub OHNO3 : Ink 1 : Paint 266,61
'If ZUP=7 and Mouse Key=1 Then Ink 2 : Paint 267,77 : Gosub OHNO2 : Ink 1 : Paint 267,77
If ZUP=6 and Mouse Key=1 Then Gosub OHNO3
If ZUP=7 and Mouse Key=1 Then Gosub OHNO2
If ZUP=>8 and Mouse Key=1 Then Gosub RL1
If Key State(69)=True Then NYET
If Key State(76)=True Then _SUP
If Key State(77)=True Then _SDOWN
Loop
'
OHNO:
Screen 0
For T=0 To JEN-1
REAL$(T)=Left$(DLIST$(T),30)
Next T
VN=0
For U=0 To 90 Step 8
Add VN,1
If VN=>JEN Then Ink 1 : Bar 2,36+U To 200,50+U : Else SH[2,42+U,REAL$(VN),3]
Next U
Return
'
OHNO2:
Screen 0
If WAM=>JEN-1 Then Return
Add WAM,1
For T=0 To JEN-1
REAL$(T)=Left$(DLIST$(T+WAM),30)
Next T
VN=0
For U=0 To 90 Step 8
' SH[2,42+U," ",3]
Ink 1 : Bar 2,36+U To 200,50+U
Next U
For U=0 To 90 Step 8
Add VN,1
If VN=>JEN Then Ink 1 : Bar 2,36+U To 200,50+U : Else SH[2,42+U,REAL$(VN),3]
Next U
Return
'
OHNO3:
Screen 0
If WAM=<0 Then Return
Add WAM,-1
For T=0 To JEN-1
REAL$(T)=Left$(DLIST$(T+WAM),30)
Next T
VN=0
For U=0 To 90 Step 8
' SH[2,42+U," ",3]
Ink 1 : Bar 2,36+U To 200,50+U
Next U
For U=0 To 90 Step 8
Add VN,1
If VN=>JEN Then Ink 1 : Bar 2,36+U To 200,50+U : Else SH[2,42+U,REAL$(VN),3]
Next U
Return
'
'
RL1:
Screen 0
CHS$=REAL$(ZUP-7)
If CHS$="" Then Return
TEMP$=REAL$(ZUP-7)
Ink 6 : CH[2,42+(ZUP-8)*8,TEMP$,2] : Ink 2 : JINGLE : SH[2,42+(ZUP-8)*8,TEMP$,3] : Return
Return
'
'
End Proc
Procedure JINGLE
On Error Goto FISH
'
'Construct REAL filename from original in memory
'
Screen 0
TEMP1$=TEMP$
TEMP2$=Mid$(TEMP1$,2,30)
F=Instr(TEMP2$," ")
TEMP3$=Mid$(TEMP2$,1,F-1)
TEMP4$=DF$+TEMP3$
'
'load and play!
'
'Ink 1 : Bar 2,23 To 299,32
'SH[2,30,"LOADING:"+TEMP4$,6]
If Exist(TEMP4$)=False Then Error 23
Track Load TEMP4$,5
Track Play 5,0
Track Loop On
SAMPLIST=2
TRACKER_DETAIL
TRACKER3
'
JIF:
Pop Proc
FISH:
'
'Error reports!
'
If Errn=94 Then SUPERQ["SORRY COULDNT LOAD FILE!",""," DAMN!"," DAMN!"] : Resume JIF
If Errn=24 Then SUPERQ["NOT ENOUGH MEMORY SORRY!","MODULE IS TO LARGE! (oe-er!)"," DAMN!","� DAMN!"] : Resume JIF
If Errn=23 Then SUPERQ["NO DISK OR FILE PRESENT!","I CANT LOAD IT AT ALL SORRY!"," DAMN!"," DAMN!"] : Resume JIF
SUPERQ["AN ERROR REPORT OHNO!","ERROR NUMBER:"+Str$(Errn),"OKAY","OKAY"]
Resume JIF
PRIMEA:
'
'CLI to front/back
'
'Print Errn
'Wait Key
'If CLI=0 Then Amos To Back : CLI=1 : Return
'If CLI=1 Then CLI=0 : Amos To Front : Return
'Return
'
FREC:
'Cls 0 : Home : Print
Print
Centre "no disk or file present!"
Print
Centre "volume:"+DKNAME$+" is no longer present!" : Print
Wait 20
Centre "suggest you select a new path... press mouse button!"
Wait 40
Repeat
Until Mouse Key=1
'Screen Close 1
Screen 0
Pop Proc
End Proc
Procedure _STARTIT
Screen 0
SH[550,196,"STORM",3]
SH[550,206,"MODPLAYER",3]
SH[550,216,"VERSION 3",3]
SER=0
SH[320,20,"Songname :",2]
'
'Get and print halve of instruments list to screen
'
BTR=20
For I=20 To 440 Step 30
Add NO,1
Add BTR,10
CH[320,BTR,"INSTRNUM :"+Hex$(NO),2]
Next I
Ink 0 : Box 300,7 To 636,188 : Ink 3 : Draw 300,7 To 636,7 : Draw 300,7 To 300,188
Ink 0 : Box 0,151 To 299,254 : Ink 3 : Draw 0,151 To 299,151 : Draw 0,151 To 0,254
Ink 0 : Box 300,221 To 561,254 : Ink 3 : Draw 300,221 To 561,221 : Draw 300,221 To 300,254
End Proc
Procedure TRACKER_DETAIL
'
'This procedure examines the song currently
'being played by the program!
'
Screen 0
NO=0
If SAMPLIST=1 Then Pop Proc
Ink 2 : Paint 311,190 : Ink 1 : Paint 423,190
Ink 1 : Bar 320,10 To 635,187
SH[320,20,"SONGNAME :",2]
ST=Start(5)
'
'Get REAL song name from bank
'
SER=0
For I=0 To 19
Add SER,9
AW=Peek(ST+I)
If AW=0 Then SH[420+I*9,20,".",3] : Else SH[420+I*9,20,Chr$(AW),3]
Next I
'
'Get and print halve of instruments list to screen
'
BTR=20
For I=20 To 440 Step 30
Add NO,1
Add BTR,10
CH[320,BTR,"INSTRNUM :"+Hex$(NO),2]
For U=0 To 21
AW=Peek(ST+I+U)
If AW=0 Then CH[420+U*9,BTR,".",3] : Else CH[420+U*9,BTR,Chr$(AW),3]
Next U
Next I
End Proc
Procedure TRACKER2
'
'Now print the second halve
'
Screen 0
If SAMPLIST=1 Then Pop Proc
Ink 2 : Paint 423,190 : Ink 1 : Paint 311,190
Ink 1 : Bar 320,23 To 635,187
BTR=20
NO=15
ST=Start(5)
For I=470 To 940 Step 30
Add NO,1
Add BTR,10 : CH[320,BTR,"INSTRNUM:"+Hex$(NO),2]
For U=0 To 21
AW=Peek(ST+I+U)
If AW=0 Then CH[420+U*9,BTR,".",3] : Else CH[420+U*9,BTR,Chr$(AW),3]
Next U
Next I
End Proc
Procedure TRACKER3
'
'Get length of module
'
Screen 0
Ink 1 : Bar 2,154 To 298,253
ST=Start(5)
STL=Peek(ST+950)
FSIZE=Length(5)
SH[2,160,"SIZE OF MODULE:"+Str$(FSIZE)+" K",2]
SH[2,170,"POSITION LENGTH:"+Hex$(STL)+" ("+Str$(STL)+" )",3]
SH[2,180,"PATTERNS PROGRAMMED AS FOLLOWS:",3]
'
'Make list of used patterns and sort
'To get the highest and total amount used!
'
DFE=-20 : DFF=190
For T=0 To STL
Add DFE,20
PT=Peek(ST+952+T)
AD$=Hex$(PT)
D=Val(AD$)
SH[DFE,DFF,Str$(D)+",",3]
If DFE=>225 Then DFE=-20 : Add DFF,10
Next T
Ink 1 : Bar 310,226 To 560,253
SH[320,230,"STORED IN MEMORY AT:"+Hex$(ST),3]
SH[320,240,"FAST MEM LEFT:"+Str$(Fast Free)+" K",3]
CH=Chip Free
If CH=<0 Then CH=0
SH[320,250,"CHIP MEM LEFT:"+Str$(Chip Free)+" K",3]
End Proc
Procedure MEMORY
'CH=Chip Free
'If CH=<0 Then CH=0
'TTAL=Free+CH+Fast Free
'Ink 1 : Bar 2,139 To 200,155
''SH[2,146,"TOTAL FREE MEM:"+Str$(TTAL),3]
End Proc
Procedure FULLDIR
If DF$="" Then Goto NOD
Screen Open 2,640,286,4,Hires
Screen Display 2,140,40,640,256
'Curs Off : Flash Off
_SCREENSET
Cls 1 : NO=0
Paper 1 : Pen 3
Home
Print "Full directory of last device used:"
Screen To Front 2
F$=Dir First$(DF$)
While F$<>""
Print F$
F$=Dir Next$
If Y Curs=24 Then Gosub KYTV
Wend
'
A$=Disc Info$(DF$)
C=Instr(A$,":")
N$=Left$(A$,C)
Pen 3
Print
Print "volume name : ";N$
Print "press space to continue"
Repeat
Until Key State(64)=True
Cls 1 : Home : Screen Close 2
Pop Proc
'
KYTV:
Pen 2
Print "press space to continue"
Repeat
Until Key State(64)=True
Cls 1 : Home
Return
'
NOD:
W$="No directory/path yet selected!!!!!!"
SUPERQ[W$,""," OOPS!"," OOPS!"]
Pop Proc
End Proc
Procedure SUP_LIST
Screen Open 1,640,220,4,Hires
Screen Hide 1
Screen Display 1,140,220,640,27
_SCREENSET
Ink 1 : Bar 0,0 To 640,220 : Ink 3 : Draw 0,0 To 640,0 : Draw 0,0 To 0,220
SCUM:
On Error Goto PIST
If Exist("df1:")=True Then CHD=1 Else CHD=0
If Exist("df0:")=True Then CHE=1 Else CHE=0
'
'Search for mod files only (change to suite!)
'
Reserve Zone 35
If CHD=1
SH[50,10,"PATH DF1:",3]
Ink 0 : Box 40,2 To 130,16 : Ink 3 : Draw 40,2 To 130,2 : Draw 40,2 To 40,16
Set Zone 1,40,2 To 130,16
End If
If CHE=1
SH[145,10,"PATH DF0:",3]
Ink 0 : Box 132,2 To 225,16 : Ink 3 : Draw 132,2 To 225,2 : Draw 132,2 To 132,16
Set Zone 2,132,2 To 225,16
End If
If CHD=1
SH[240,10,"ROOT DF1:",3]
Ink 0 : Box 227,2 To 325,16 : Ink 3 : Draw 227,2 To 325,2 : Draw 227,2 To 227,16
Set Zone 3,227,2 To 325,16
End If
If CHE=1
SH[340,10,"ROOT DF0:",3]
Ink 0 : Box 327,2 To 420,16 : Ink 3 : Draw 327,2 To 420,2 : Draw 327,2 To 327,16
Set Zone 4,327,2 To 420,16
End If
SH[440,10,"CANCEL",3]
Ink 0 : Box 422,2 To 510,16 : Ink 3 : Draw 422,2 To 510,2 : Draw 422,2 To 422,16
Set Zone 5,422,2 To 510,16
Ink 0 : Box 180,28 To 457,218 : Ink 3 : Draw 180,28 To 457,28 : Draw 180,28 To 180,218
Screen Show 1
Screen Display 1,,,640,27
Do
MOT=Mouse Zone
If MOT=1 and Mouse Key=1 Then DF$="df1:" : Gosub ERAZE : Ink 2 : Paint 41,3 : Gosub LSD
If MOT=2 and Mouse Key=1 Then DF$="df0:" : Gosub ERAZE : Ink 2 : Paint 133,3 : Gosub LSD
If MOT=3 and Mouse Key=1 Then DF$="df1:" : Gosub ERAZE : Ink 2 : Paint 228,3 : Gosub MAN
If MOT=4 and Mouse Key=1 Then DF$="df0:" : Gosub ERAZE : Ink 2 : Paint 228,3 : Gosub MAN
If MOT=5 and Mouse Key=1 Then Ink 2 : Paint 423,3 : Wait 20 : Screen Close 1 : Screen 0 : Pop Proc
Loop
'
ERAZE:
For I=0 To 60 : DLIST$(I)="" : Next I
For I=0 To 30 : REAL$(I)="" : Next I
Screen 0
Ink 1,1
Bar 2,36 To 220,138
Screen 1
Return
'
LSD:
For W=220 To 40 Step -1
Screen Display 1,,W,,
Wait Vbl
Next W
For W=27 To 220
Screen Display 1,,,,W
Wait Vbl
Next W
Ink 1 : Paint 41,3
A$=Disc Info$(DF$)
C=Instr(A$,":")
DKNAME$=Left$(A$,C)
SH[150,25,"LOCATING AVAILABLE DIRECTORIES IN DRIVE "+DF$,3]
S$=Dir First$(DF$+"*.*")
If Left$(S$,1)="*" Then SNAKE=1
If Left$(S$,1)="*" Then SNAKE=1
If SNAKE=1 Then JEN=1 : DLIST$(JEN)=S$ : Add JEN,1
'
'Build directory of files in ram .Leave out sub dirs "*"
'
While S$<>""
S$=Dir Next$
If Left$(S$,1)<>"*" Then Goto SUM2 Else Add JEN,1 : DLIST$(JEN)=S$
DLIST$(JEN)=S$
SUM2:
Wend
If JEN=<0
Ink 1
Bar 150,17 To 630,27
SH[150,25," NO DIRECTORIES FOUND SORRY!!!",2]
Wait 80
Goto ENT
End If
SHT=0
Ink 1 : Bar 150,17 To 630,27
SH[150,25,"CLICK ON A DIRECTORY TO SEARCH FOR MODULES IN!",3]
Print
CHP=20 : POL=0
Reset Zone
For I=0 To JEN
Add SHT,1 : Add CHP,10
SH[200,CHP+10,DLIST$(I),3]
Set Zone SHT,200,CHP To 350,CHP+10
Next I
Do
For I=1 To JEN+1
If Mouse Zone=I and Mouse Key=1 Then Goto DIT
Next I
Loop
'
DIT:
ER=Instr(DLIST$(I-1)," ")
EF$=Mid$(DLIST$(I-1),2,ER-2)
PF$=DF$+EF$+"/"
'Print PF$
DF$=PF$
JEN=0
'
'Check to see if there are any mod files in memory!
'
MAN:
For I=0 To 60 : DLIST$(I)="" : Next I
For I=0 To 30 : REAL$(I)="" : Next I
JEN=0
A$=Disc Info$(DF$)
C=Instr(A$,":")
DKNAME$=Left$(A$,C)
Screen 1
Ink 1 : Bar 140,17 To 600,27
SH[150,25,"SEARCHING DIRECTORY:"+DF$,3]
S$=""
S$=Dir First$(DF$+"mod.*")
If Left$(S$,4)=" mod" Then SNAKE=1
If Left$(S$,4)=" MOD" Then SNAKE=1
If Left$(S$,1)="*" Then Goto WISH
If SNAKE=1 Then JEN=1 : DLIST$(JEN)=S$ : Rem Add JEN,1
'
'Build directory of files in ram .Leave out sub dirs "*"
'
WISH:
While S$<>""
S$=Dir Next$
If Left$(S$,1)="*" Then Goto SUM3 Else Add JEN,1 : DLIST$(JEN)=S$
DLIST$(JEN)=S$
SUM3:
Wend
'
'Check to see if there are any mod files in memory!
'
Screen 1
For U=0 To JEN-1
If Left$(DLIST$(U),4)=" mod" Then NHS=1
If Left$(DLIST$(U),4)=" MOD" Then NHS=1
Next U
If NHS=>1 Then Gosub ENT Else Goto RIP
'
End
'
'Error no path found!
'
PIST:
If Errn=81 Then Resume SCUM
Resume RIP
'
'No mod files found!
'
RIP:
Ink 1 : Bar 140,17 To 600,27
SUPERQ["Didnt find any files with 'mod.' prefix!",""," OKAY",""]
DF$=""
For I=0 To 60 : DLIST$(I)="" : Next I
For I=0 To 30 : REAL$(I)="" : Next I
JEN=0
'Screen 1
'Ink 1 : Bar 181,28 To 456,218
'Goto SCUM
'
ENT:
Screen Close 1
Screen 0
Ink 1 : Bar 2,23 To 299,32
If JEN=<0 Then JEN=1
SH[2,30,Str$(JEN-1)+" 'MOD' FILES FOUND!",2]
End Proc
Procedure NYET
A$=" ARE YOU SURE YOU WANT TO QUIT?"
C$=" MOD PLAYER V 3.0"
SUPERQ[A$,C$," OKAY"," CANCEL"]
If RESPONSE=2 Then Pop Proc
Erase 5
End
End Proc
Procedure SH[TX,TY,T$,I]
' Colour 3,$FB5
Gr Writing 0
Ink 0 : Text TX+1,TY+1,T$
' Text TX-1,TY-1,T$
Ink I : Text TX,TY,T$
End Proc
Procedure CH[TX,TY,T$,I]
' Colour 3,$FB5
' Gr Writing 1
' Ink 0 : Text TX+1,TY+1,T$
' Text TX-1,TY-1,T$
Ink I : Text TX,TY,T$
End Proc
Procedure SUPERQ[T1$,T2$,Q1$,Q2$]
Screen Open 7,640,81,4,Hires
Screen Hide 7
Screen Display 7,140,40,,1
Reserve Zone 3
Shared RESPONSE
_SCREENSET
Cls 1
LTH=Len(T1$) : LTH2=Len(T2$) : LTH3=Len(Q1$) : LTH4=Len(Q2$)
If LTH=>40 Then T1$=Left$(T1$,40)
If LTH2=>40 Then T2$=Left$(T2$,40)
If LTH3=>10 Then Q1$=Left$(Q1$,10)
If LTH4=>10 Then Q2$=Left$(Q2$,10)
Screen 7
Limit Mouse 189,40 To 365,77
'
Ink 1
Bar 120,0 To 500,50
'
Ink 3
Draw 140,7 To 470,7 : Ink 0 : Draw 470,7 To 470,30
Ink 0
Draw 470,30 To 140,30 : Ink 3 : Draw 140,30 To 140,7 : Draw 139,30 To 139,7
'
Ink 3
Draw 120,0 To 500,0 : Draw 120,0 To 120,50
Ink 0
Draw 500,50 To 500,0 : Ink 0 : Draw 120,50 To 500,50
'
If LTH3>0
SH[135,42,Q1$,3]
Ink 3
Draw 130,33 To 220,33 : Ink 0 : Draw 220,33 To 220,47
Ink 0
Draw 220,47 To 130,47 : Ink 3 : Draw 130,47 To 130,33
Set Zone 1,130,33 To 220,47
End If
'
If LTH4>0
Ink 3,4
SH[405,42,Q2$,3]
Ink 3
Draw 400,33 To 490,33 : Ink 0 : Draw 490,33 To 490,47
Ink 0
Draw 490,47 To 400,47 : Ink 3 : Draw 400,47 To 400,33
Set Zone 2,400,33 To 490,47
End If
'
SH[145,16,T1$,3]
SH[145,26,T2$,3]
'
Screen Show 7
If ERNO=23 Then Screen To Front 2 : DEF=200 : Goto DER
DEF=250
DER:
For I=0 To 51
Add DEF,-1
Screen Display 7,,40,,I
Wait Vbl
Next I
'
Do
MZ=Mouse Zone
Screen 7
If MZ=1 and Mouse Key=1 Then Gosub RP1 : RESPONSE=1 : Reset Zone : Gosub HAS : Screen Close 7 : Screen 0 : Limit Mouse : Pop Proc
If MZ=2 and Mouse Key=1 Then Gosub RP2 : RESPONSE=2 : Reset Zone : Gosub HAS : Screen Close 7 : Screen 0 : Limit Mouse : Pop Proc
Loop
'
'
HAS:
DEF=DEF-1
For I=51 To 0 Step -1
Add DEF,1
Screen Display 7,,40,,I
Wait Vbl
Next I
Return
'
RP1:
Ink 2
Paint 136,34
Ink 3,2
SH[135,42,Q1$,3]
Ink 3
Draw 130,33 To 220,33 : Ink 0 : Draw 220,33 To 220,47
Ink 0
Draw 220,47 To 130,47 : Ink 3 : Draw 130,47 To 130,33
Wait 10
Return
'
RP2:
Ink 2
Paint 405,34
Ink 3,2
SH[405,42,Q2$,3]
Ink 3
Draw 400,33 To 490,33 : Ink 0 : Draw 490,33 To 490,47
Ink 0
Draw 490,47 To 400,47 : Ink 3 : Draw 400,47 To 400,33
Wait 10
Return
End Proc
Procedure _SUP
If SCREN=<10 Then Pop Proc
Add SCREN,-1
Amreg(0)=SCREN
End Proc
Procedure _SDOWN
If SCREN=>260 Then Pop Proc
Add SCREN,1
Amreg(0)=SCREN
End Proc
Procedure EQUALS
Screen Open 4,320,80,4,Lowres
Screen Display 4,140,260,320,50
_SCREENSET
Ink 1
Bar 0,0 To 320,80
Ink 3
Draw 0,0 To 320,0
Draw 0,0 To 0,80
Ink 0 : Box 115,0 To 201,50 : Ink 3 : Draw 115,0 To 201,0 : Draw 115,0 To 115,50
Screen 4
SH[10,10,"MODPLAYER V3",3]
SH[25,20,"CODED BY",3]
SH[37,30,"STORM",2]
SH[10,40,"DATE: 2/1/93",3]
SH[202,10,"USE CURSOR KEYS",3]
SH[212,20,"TO MOVE THIS",3]
SH[232,30,"SCREEN",3]
SH[219,40,"UP N DOWN!",3]
ABD
Amreg(0)=260
Channel 5 To Screen Display 4
A$="L: Let Y=RA ;Jump Loop"
Amal 5,A$ : Amal On
End Proc
Procedure ABD
' Equalizers....
' This is a routine which is quite easy to do
' If you think it through!
' Have a look at the code but dont change anything! YET!
' Use it at will but mention who REALLY did it please...
' Ejber Ozkan
Double Buffer
Bob 2,120,50,1
Bob 3,140,50,1
Bob 4,160,50,1
Bob 5,180,50,1
Channel 1 To Bob 2
A$=" AUtotest ( Let R1=Vu(0); Let Y=83; If R1=0 eXit else Direct Start )"
A$=A$+"Start: For R2=0 To R1 ; Let Y=R2*2 ; Next R2; "
A$=A$+"For R2=0-R1 To 0 ; Let Y=R2*4 ;Next R2; W "
Amal 1,A$ : Amal On
Channel 2 To Bob 3
A$=" AUtotest ( Let R1=Vu(1); Let Y=83 ;If R1=0 eXit else Direct Start )"
A$=A$+"Start: For R2=0 To R1 ; Let Y=R2*2 ; Next R2; "
A$=A$+"For R2=0-R1 To 0; Let Y=R2*4 ;Next R2; W"
Amal 2,A$ : Amal On
Channel 3 To Bob 4
A$=" AUtotest ( Let R1=Vu(2); Let Y=83 ;If R1=0 eXit else Direct Start )"
A$=A$+"Start: For R2=0 To R1 ; Let Y=R2*2 ; Next R2; "
A$=A$+"For R2=0-R1 To 0; Let Y=R2*4 ;Next R2; W"
Amal 3,A$ : Amal On
Channel 4 To Bob 5
A$=" AUtotest ( Let R1=Vu(3); Let Y=83 ;If R1=0 eXit else Direct Start )"
A$=A$+"Start: For R2=0 To R1 ; Let Y=R2*2 ; Next R2; "
A$=A$+"For R2=0-R1 To 0; Let Y=R2*4 ;Next R2; W"
Amal 4,A$ : Amal On
'Cls 0
End Proc
Procedure _OPTIONS
' Screen 1 : Ink 2 : Paint 453,24
Screen Open 3,640,90,4,Hires
Screen Hide 3
_SCREENSET
Screen Display 3,140,169,640,80
'Limit Mouse 128,60 To 447,229
Cls 1 : Ink 0
Box 0,0 To 639,169 : Ink 3 : Draw 0,0 To 639,0 : Draw 0,0 To 0,169
If Chip Free<0 Then CH=0 Else CH=Chip Free
FH=Fast Free+Free
SH[240,10,"STORM MODULE PLAYER V3.00",2]
SH[100,20,"Free Fast Mem:"+Str$(FH),3]
SH[100,30,"Free Chip Mem:"+Str$(CH),3]
SH[100,40,"Totl Free Mem:"+Str$(FH+CH),3]
SH[400,20,"THIS IS FREEWARE",3]
SH[400,30,"SPREAD IT EVERYWHERE",3]
SH[400,40,"AND ANYWHERE YOU CAN!",3]
'
If Exist("df0:")=True Then Dir$="df0:" : SH[100,50,"Free Df0:"+Str$(Dfree),3]
If Exist("df0:")=False Then SH[100,50,"Free Df0:NON",3]
If Exist("df1:")=True Then Dir$="df1:" : SH[400,50,"Free Df1:"+Str$(Dfree),3]
If Exist("df1:")=False Then SH[400,50,"Free Df1:NON",3]
Reserve Zone 7
'
SH[100,70,"Palette Mode:",3]
Ink 0 : Box 89,60 To 250,77 : Ink 3 : Draw 89,60 To 250,60 : Draw 89,60 To 89,77
'
SH[260,70,"+",3]
Set Zone 1,252,60 To 275,77
Ink 0 : Box 252,60 To 275,77 : Ink 3 : Draw 252,60 To 275,60 : Draw 252,60 To 252,77
'
SH[285,70,"-",3]
Set Zone 2,277,60 To 300,77
Ink 0 : Box 277,60 To 300,77 : Ink 3 : Draw 277,60 To 300,60 : Draw 277,60 To 277,77
'
' SH[400,70,"MUSIC:",3]
' Ink 0 : Box 395,60 To 455,77 : Ink 3 : Draw 395,60 To 455,60 : Draw 395,60 To 395,77
'
' SH[460,70,"ON",3]
' Ink 0 : Box 457,60 To 480,77 : Ink 3 : Draw 457,60 To 480,60 : Draw 457,60 To 457,77
' Set Zone 4,457,60 To 480,77
'If DMUS=1 Then Ink 2 : Paint 458,61 : Ink 1
'
' SH[485,70,"OFF",3]
' Ink 0 : Box 482,60 To 515,77 : Ink 3 : Draw 482,60 To 515,60 : Draw 482,60 To 482,77
' Set Zone 5,482,60 To 515,77
' If DMUS=0 Then Ink 2 : Paint 483,61 : Ink 1
'
' SH[520,70,"CLEAR",3]
' Ink 0 : Box 517,60 To 570,77 : Ink 3 : Draw 517,60 To 570,60 : Draw 517,60 To 517,77
' Set Zone 6,517,60 To 570,77
' If NOMUS=1 Then Set Pattern 2 : Ink 1 : Paint 396,61 : Paint 458,61 : Paint 483,61 : Paint 518,61 : Set Pattern 0 : Ink 1
'
SH[590,70,"OKAY",3]
Ink 0 : Box 580,60 To 635,77 : Ink 3 : Draw 580,60 To 635,60 : Draw 580,60 To 580,77
Set Zone 3,580,60 To 635,77
Screen Show 3
'
SH[210,70,Str$(OPTS),3]
'
Do
ZD=Mouse Zone
If ZD=1 and Mouse Key=1 Then Gosub UPAL
If ZD=2 and Mouse Key=1 Then Gosub DPAL
If ZD=3 and Mouse Key=1 Then Gosub FIN
' If ZD=4 and Mouse Key=1 Then Gosub MUON
' If ZD=5 and Mouse Key=1 Then Gosub MOFF
' If ZD=6 and Mouse Key=1 Then Gosub CLMUSIC
Loop
'
FIN:
Ink 2 : Paint 581,61
Get Palette 3
ET=169
For I=80 To 0 Step -2
Add ET,1
Screen Display 3,,ET,,I
Wait Vbl
Next I
Reset Zone
Screen 0 : Get Palette 3 : Screen 4 : Get Palette 3
Screen Close 3
Screen 0
Limit Mouse 0,0 To 450,300
Pop Proc
'
UPAL:
If OPTS=>8 Then Return
Ink 2 : Paint 253,61
Add OPTS,1
'_CLSNUM3
SH[210,70,Str$(OPTS),3]
_PALS[OPTS]
Ink 1 : Paint 253,61
Return
'
DPAL:
If OPTS=<1 Then Return
Add OPTS,-1
Ink 2 : Paint 278,61
'_CLSNUM3
SH[210,70,Str$(OPTS),3]
_PALS[OPTS]
Ink 1 : Paint 278,61
Return
Return
End Proc
Procedure _SCREENSET
Curs Off : Flash Off : Pen 2 : Paper 0 : Ink 2,0 : Cls 0
_PALS[OPTS]
' Mouse colours
Colour 17,$FFF : Colour 18,$888 : Colour 19,$111
End Proc
Procedure _PALS[AW]
If AW=1 Then Gosub T1 : Pop Proc
If AW=2 Then Gosub T8 : Pop Proc
If AW=3 Then Gosub T3 : Pop Proc
If AW=4 Then Gosub T4 : Pop Proc
If AW=5 Then Gosub T5 : Pop Proc
If AW=6 Then Gosub T6 : Pop Proc
If AW=7 Then Gosub T7 : Pop Proc
If AW=8 Then Gosub T2 : Pop Proc
Pop Proc
T1:
Palette $0,$AAA,$27D,$FFF,$F00,$FF0,$F0,$5F
Return
T2:
Palette $0,$A70,$853,$FF6,$F00,$FF0,$F0,$5F
Return
T3:
Palette $0,$A0A,$404,$F7F,$F00,$FF0,$F0,$5F
Return
T4:
Palette $0,$A0,$40,$F7,$F00,$FF0,$F0,$5F
Return
T5:
Palette $0,$A00,$411,$F70,$F00,$FF0,$F0,$5F
Return
T6:
Palette $0,$A,$4,$6F,$F00,$FF0,$F0,$FF0
Return
T7:
Palette $0,$38,$124,$AF,$F00,$FF0,$F0,$5FF
Return
T8:
Palette $0,$521,$660,$DD0,$F00,$FF0,$F0,$5F
Return
End Proc