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 >
GFA-BASIC Atari  |  2006-01-23  |  5KB  |  213 lines

  1. CLS
  2. VSETCOLOR 0,1911
  3. VSETCOLOR 1,0
  4. ON ERROR GOSUB err
  5. DIM reg%(16)
  6. newdir$=DIR$(0)
  7. phys%=XBIOS(2)
  8. xb2%=XBIOS(2)
  9. xb3%=XBIOS(3)
  10. res&=XBIOS(4)
  11. mus_buff$=SPACE$(15000)
  12. muzak%=VARPTR(mus_buff$)
  13. logbuff$=SPACE$(32000)
  14. log%=VARPTR(logbuff$)
  15. physt%=phys%+25*160+0*8
  16. logt%=log%+25*160+0*8
  17. BMOVE phys%,log%,32000
  18. ALERT 0,"Mad Max Player Ver 1.0  |   Coded By Dr.Stein|          Of|   The X'press Crew.",1,"1991",dummy%
  19. startover:
  20. FOR i|=0 TO 50
  21.   a$=INKEY$
  22. NEXT i|
  23. VSETCOLOR 0,1911
  24. VSETCOLOR 1,0
  25. ~XBIOS(5,L:xb3%,L:xb2%,W:res&)
  26. CLS
  27. SPOKE &H484,&X11
  28. OUT 4,8
  29. FILESELECT #"Select Music-File To Load",newdir$+"\*.MUS",oldfile$,filename$
  30. IF filename$=""
  31.   END
  32. ENDIF
  33. newdir
  34. VOID XBIOS(5,L:-1,L:-1,W:0)
  35. CLS
  36. SDPOKE &HFF8242,&HF00
  37. SDPOKE &HFF825E,&HFFF
  38. SPOKE &H484,&X10
  39. OUT 4,18
  40. HIDEM
  41. BLOAD filename$,muzak%
  42. loop_mus%=muzak%+8
  43. reg%(0)=1
  44. RCALL muzak%,reg%()
  45. super%=GEMDOS(32,L:0)
  46. FOR i|=0 TO 1
  47.   VOID XBIOS(5,L:log%,L:phys%,W:-1)
  48.   SWAP phys%,log%
  49.   VSYNC
  50.   PRINT AT(1,22);SPACE$(40)
  51.   PRINT AT(1,22);"Now playing:";oldfile$
  52.   PRINT AT(28,22);"Tune number:";1
  53. NEXT i|
  54. REPEAT
  55.   IF BYTE{&HFFFC02}=&H38
  56.     CARD{&HFF8240}=&H700
  57.   ENDIF
  58.   VSYNC
  59.   CARD{&HFF8240}=&H0
  60.   ~XBIOS(38,L:loop_mus%)
  61.   checkkeys
  62.   takt
  63.   SWAP physt%,logt%
  64.   VOID XBIOS(5,L:log%,L:phys%,W:-1)
  65.   SWAP log%,phys%
  66. UNTIL BYTE{&HFFFC02}=&H39
  67. ~GEMDOS(32,L:super%)
  68. WAVE 0,0
  69. GOTO startover
  70. err(1)
  71. > PROCEDURE err(a%)
  72.   ~GEMDOS(32,L:super%)
  73.   WAVE 0,0
  74.   IF a%<>1
  75.     VOID FORM_ALERT(1,"[1][Error!!!!][ OK ]")
  76.   ELSE
  77.     VOID FORM_ALERT(1,"[1][Inget error!!!!][ OK ]")
  78.   ENDIF
  79.   EDIT
  80. RETURN
  81. > PROCEDURE takt
  82.   BYTE{&HFF8800}=&H8
  83.   a|=BYTE{&HFF8800}
  84.   BYTE{&HFF8800}=&H9
  85.   b|=BYTE{&HFF8800}
  86.   BYTE{&HFF8800}=&HA
  87.   c|=BYTE{&HFF8800}
  88.   ' a
  89.   bitmaska%=&X0
  90.   bitmaskb%=&X0
  91.   bitmaskc%=&X0
  92.   FOR i|=0 TO 15
  93.     IF a|>=15-i|
  94.       bitmaska%=&HFFFF
  95.     ENDIF
  96.     IF b|>=15-i|
  97.       bitmaskb%=&HFFFF
  98.     ENDIF
  99.     IF c|>=15-i|
  100.       bitmaskc%=&HFFFF
  101.     ENDIF
  102.     CARD{physt%+i|*1440}=bitmaska% !
  103.     CARD{physt%+i|*1440+8}=bitmaska%
  104.     CARD{physt%+i|*1440+16}=bitmaska%
  105.     CARD{physt%+i|*1440+24}=bitmaska%
  106.     CARD{physt%+i|*1440+32}=bitmaska%
  107.     CARD{physt%+i|*1440+40}=bitmaska%
  108.     CARD{physt%+i|*1440+480}=bitmaska% !
  109.     CARD{physt%+i|*1440+488}=bitmaska%
  110.     CARD{physt%+i|*1440+496}=bitmaska%
  111.     CARD{physt%+i|*1440+504}=bitmaska%
  112.     CARD{physt%+i|*1440+512}=bitmaska%
  113.     CARD{physt%+i|*1440+520}=bitmaska%
  114.     CARD{physt%+i|*1440+960}=bitmaska% !
  115.     CARD{physt%+i|*1440+968}=bitmaska%
  116.     CARD{physt%+i|*1440+976}=bitmaska%
  117.     CARD{physt%+i|*1440+984}=bitmaska%
  118.     CARD{physt%+i|*1440+992}=bitmaska%
  119.     CARD{physt%+i|*1440+1000}=bitmaska%
  120.     ' b
  121.     CARD{physt%+i|*1440+56}=bitmaskb% !
  122.     CARD{physt%+i|*1440+64}=bitmaskb%
  123.     CARD{physt%+i|*1440+72}=bitmaskb%
  124.     CARD{physt%+i|*1440+80}=bitmaskb%
  125.     CARD{physt%+i|*1440+88}=bitmaskb%
  126.     CARD{physt%+i|*1440+96}=bitmaskb%
  127.     CARD{physt%+i|*1440+536}=bitmaskb% !
  128.     CARD{physt%+i|*1440+544}=bitmaskb%
  129.     CARD{physt%+i|*1440+552}=bitmaskb%
  130.     CARD{physt%+i|*1440+560}=bitmaskb%
  131.     CARD{physt%+i|*1440+568}=bitmaskb%
  132.     CARD{physt%+i|*1440+576}=bitmaskb%
  133.     CARD{physt%+i|*1440+1016}=bitmaskb% !
  134.     CARD{physt%+i|*1440+1024}=bitmaskb%
  135.     CARD{physt%+i|*1440+1032}=bitmaskb%
  136.     CARD{physt%+i|*1440+1040}=bitmaskb%
  137.     CARD{physt%+i|*1440+1048}=bitmaskb%
  138.     CARD{physt%+i|*1440+1056}=bitmaskb%
  139.     ' c
  140.     CARD{physt%+i|*1440+112}=bitmaskc% !
  141.     CARD{physt%+i|*1440+120}=bitmaskc%
  142.     CARD{physt%+i|*1440+128}=bitmaskc%
  143.     CARD{physt%+i|*1440+136}=bitmaskc%
  144.     CARD{physt%+i|*1440+144}=bitmaskc%
  145.     CARD{physt%+i|*1440+152}=bitmaskc%
  146.     CARD{physt%+i|*1440+592}=bitmaskc% !
  147.     CARD{physt%+i|*1440+600}=bitmaskc%
  148.     CARD{physt%+i|*1440+608}=bitmaskc%
  149.     CARD{physt%+i|*1440+616}=bitmaskc%
  150.     CARD{physt%+i|*1440+624}=bitmaskc%
  151.     CARD{physt%+i|*1440+632}=bitmaskc%
  152.     CARD{physt%+i|*1440+1072}=bitmaskc% !
  153.     CARD{physt%+i|*1440+1080}=bitmaskc%
  154.     CARD{physt%+i|*1440+1088}=bitmaskc%
  155.     CARD{physt%+i|*1440+1096}=bitmaskc%
  156.     CARD{physt%+i|*1440+1104}=bitmaskc%
  157.     CARD{physt%+i|*1440+1112}=bitmaskc%
  158.   NEXT i|
  159. RETURN
  160. > PROCEDURE newdir
  161.   l#=LEN(filename$)
  162.   REPEAT
  163.     test$=MID$(filename$,l#,1)
  164.     DEC l#
  165.   UNTIL test$="\"
  166.   newdir$=LEFT$(filename$,l#)
  167.   oldfile$=MID$(filename$,l#+2)
  168. RETURN
  169. > PROCEDURE checkkeys
  170.   IF reg%(0)>0
  171.     PRINT AT(40,22);reg%(0)
  172.     reg%(0)=0
  173.   ENDIF
  174.   SELECT BYTE{&HFFFC02}
  175.   CASE 2
  176.     reg%(0)=1
  177.     RCALL muzak%,reg%()
  178.     PRINT AT(40,22);1
  179.   CASE 3
  180.     reg%(0)=2
  181.     RCALL muzak%,reg%()
  182.     PRINT AT(40,22);2
  183.   CASE 4
  184.     reg%(0)=3
  185.     RCALL muzak%,reg%()
  186.     PRINT AT(40,22);3
  187.   CASE 5
  188.     reg%(0)=4
  189.     RCALL muzak%,reg%()
  190.     PRINT AT(40,22);4
  191.   CASE 6
  192.     reg%(0)=5
  193.     RCALL muzak%,reg%()
  194.     PRINT AT(40,22);5
  195.   CASE 7
  196.     reg%(0)=6
  197.     RCALL muzak%,reg%()
  198.     PRINT AT(40,22);6
  199.   CASE 8
  200.     reg%(0)=7
  201.     RCALL muzak%,reg%()
  202.     PRINT AT(40,22);7
  203.   CASE 9
  204.     reg%(0)=8
  205.     RCALL muzak%,reg%()
  206.     PRINT AT(40,22);8
  207.   CASE 10
  208.     reg%(0)=9
  209.     RCALL muzak%,reg%()
  210.     PRINT AT(40,22);9
  211.   ENDSELECT
  212. RETURN
  213.