home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fujiology Archive
/
fujiology_archive_v1_0.iso
/
I
/
IMAGINA
/
IOI_INVI.ZIP
/
IOI_INVI.MSA
/
PLAYER.GFA
(
.txt
)
< prev
next >
Wrap
GFA-BASIC Atari
|
2006-01-23
|
5KB
|
213 lines
CLS
VSETCOLOR 0,1911
VSETCOLOR 1,0
ON ERROR GOSUB err
DIM reg%(16)
newdir$=DIR$(0)
phys%=XBIOS(2)
xb2%=XBIOS(2)
xb3%=XBIOS(3)
res&=XBIOS(4)
mus_buff$=SPACE$(15000)
muzak%=VARPTR(mus_buff$)
logbuff$=SPACE$(32000)
log%=VARPTR(logbuff$)
physt%=phys%+25*160+0*8
logt%=log%+25*160+0*8
BMOVE phys%,log%,32000
ALERT 0,"Mad Max Player Ver 1.0 | Coded By Dr.Stein| Of| The X'press Crew.",1,"1991",dummy%
startover:
FOR i|=0 TO 50
a$=INKEY$
NEXT i|
VSETCOLOR 0,1911
VSETCOLOR 1,0
~XBIOS(5,L:xb3%,L:xb2%,W:res&)
CLS
SPOKE &H484,&X11
OUT 4,8
FILESELECT #"Select Music-File To Load",newdir$+"\*.MUS",oldfile$,filename$
IF filename$=""
END
ENDIF
newdir
VOID XBIOS(5,L:-1,L:-1,W:0)
CLS
SDPOKE &HFF8242,&HF00
SDPOKE &HFF825E,&HFFF
SPOKE &H484,&X10
OUT 4,18
HIDEM
BLOAD filename$,muzak%
loop_mus%=muzak%+8
reg%(0)=1
RCALL muzak%,reg%()
super%=GEMDOS(32,L:0)
FOR i|=0 TO 1
VOID XBIOS(5,L:log%,L:phys%,W:-1)
SWAP phys%,log%
VSYNC
PRINT AT(1,22);SPACE$(40)
PRINT AT(1,22);"Now playing:";oldfile$
PRINT AT(28,22);"Tune number:";1
NEXT i|
REPEAT
IF BYTE{&HFFFC02}=&H38
CARD{&HFF8240}=&H700
ENDIF
VSYNC
CARD{&HFF8240}=&H0
~XBIOS(38,L:loop_mus%)
checkkeys
takt
SWAP physt%,logt%
VOID XBIOS(5,L:log%,L:phys%,W:-1)
SWAP log%,phys%
UNTIL BYTE{&HFFFC02}=&H39
~GEMDOS(32,L:super%)
WAVE 0,0
GOTO startover
err(1)
> PROCEDURE err(a%)
~GEMDOS(32,L:super%)
WAVE 0,0
IF a%<>1
VOID FORM_ALERT(1,"[1][Error!!!!][ OK ]")
ELSE
VOID FORM_ALERT(1,"[1][Inget error!!!!][ OK ]")
ENDIF
EDIT
RETURN
> PROCEDURE takt
BYTE{&HFF8800}=&H8
a|=BYTE{&HFF8800}
BYTE{&HFF8800}=&H9
b|=BYTE{&HFF8800}
BYTE{&HFF8800}=&HA
c|=BYTE{&HFF8800}
' a
bitmaska%=&X0
bitmaskb%=&X0
bitmaskc%=&X0
FOR i|=0 TO 15
IF a|>=15-i|
bitmaska%=&HFFFF
ENDIF
IF b|>=15-i|
bitmaskb%=&HFFFF
ENDIF
IF c|>=15-i|
bitmaskc%=&HFFFF
ENDIF
CARD{physt%+i|*1440}=bitmaska% !
CARD{physt%+i|*1440+8}=bitmaska%
CARD{physt%+i|*1440+16}=bitmaska%
CARD{physt%+i|*1440+24}=bitmaska%
CARD{physt%+i|*1440+32}=bitmaska%
CARD{physt%+i|*1440+40}=bitmaska%
CARD{physt%+i|*1440+480}=bitmaska% !
CARD{physt%+i|*1440+488}=bitmaska%
CARD{physt%+i|*1440+496}=bitmaska%
CARD{physt%+i|*1440+504}=bitmaska%
CARD{physt%+i|*1440+512}=bitmaska%
CARD{physt%+i|*1440+520}=bitmaska%
CARD{physt%+i|*1440+960}=bitmaska% !
CARD{physt%+i|*1440+968}=bitmaska%
CARD{physt%+i|*1440+976}=bitmaska%
CARD{physt%+i|*1440+984}=bitmaska%
CARD{physt%+i|*1440+992}=bitmaska%
CARD{physt%+i|*1440+1000}=bitmaska%
' b
CARD{physt%+i|*1440+56}=bitmaskb% !
CARD{physt%+i|*1440+64}=bitmaskb%
CARD{physt%+i|*1440+72}=bitmaskb%
CARD{physt%+i|*1440+80}=bitmaskb%
CARD{physt%+i|*1440+88}=bitmaskb%
CARD{physt%+i|*1440+96}=bitmaskb%
CARD{physt%+i|*1440+536}=bitmaskb% !
CARD{physt%+i|*1440+544}=bitmaskb%
CARD{physt%+i|*1440+552}=bitmaskb%
CARD{physt%+i|*1440+560}=bitmaskb%
CARD{physt%+i|*1440+568}=bitmaskb%
CARD{physt%+i|*1440+576}=bitmaskb%
CARD{physt%+i|*1440+1016}=bitmaskb% !
CARD{physt%+i|*1440+1024}=bitmaskb%
CARD{physt%+i|*1440+1032}=bitmaskb%
CARD{physt%+i|*1440+1040}=bitmaskb%
CARD{physt%+i|*1440+1048}=bitmaskb%
CARD{physt%+i|*1440+1056}=bitmaskb%
' c
CARD{physt%+i|*1440+112}=bitmaskc% !
CARD{physt%+i|*1440+120}=bitmaskc%
CARD{physt%+i|*1440+128}=bitmaskc%
CARD{physt%+i|*1440+136}=bitmaskc%
CARD{physt%+i|*1440+144}=bitmaskc%
CARD{physt%+i|*1440+152}=bitmaskc%
CARD{physt%+i|*1440+592}=bitmaskc% !
CARD{physt%+i|*1440+600}=bitmaskc%
CARD{physt%+i|*1440+608}=bitmaskc%
CARD{physt%+i|*1440+616}=bitmaskc%
CARD{physt%+i|*1440+624}=bitmaskc%
CARD{physt%+i|*1440+632}=bitmaskc%
CARD{physt%+i|*1440+1072}=bitmaskc% !
CARD{physt%+i|*1440+1080}=bitmaskc%
CARD{physt%+i|*1440+1088}=bitmaskc%
CARD{physt%+i|*1440+1096}=bitmaskc%
CARD{physt%+i|*1440+1104}=bitmaskc%
CARD{physt%+i|*1440+1112}=bitmaskc%
NEXT i|
RETURN
> PROCEDURE newdir
l#=LEN(filename$)
REPEAT
test$=MID$(filename$,l#,1)
DEC l#
UNTIL test$="\"
newdir$=LEFT$(filename$,l#)
oldfile$=MID$(filename$,l#+2)
RETURN
> PROCEDURE checkkeys
IF reg%(0)>0
PRINT AT(40,22);reg%(0)
reg%(0)=0
ENDIF
SELECT BYTE{&HFFFC02}
CASE 2
reg%(0)=1
RCALL muzak%,reg%()
PRINT AT(40,22);1
CASE 3
reg%(0)=2
RCALL muzak%,reg%()
PRINT AT(40,22);2
CASE 4
reg%(0)=3
RCALL muzak%,reg%()
PRINT AT(40,22);3
CASE 5
reg%(0)=4
RCALL muzak%,reg%()
PRINT AT(40,22);4
CASE 6
reg%(0)=5
RCALL muzak%,reg%()
PRINT AT(40,22);5
CASE 7
reg%(0)=6
RCALL muzak%,reg%()
PRINT AT(40,22);6
CASE 8
reg%(0)=7
RCALL muzak%,reg%()
PRINT AT(40,22);7
CASE 9
reg%(0)=8
RCALL muzak%,reg%()
PRINT AT(40,22);8
CASE 10
reg%(0)=9
RCALL muzak%,reg%()
PRINT AT(40,22);9
ENDSELECT
RETURN