Advertisement
Guest User

Vgm2ModTxt_AyK_23.sdlbas

a guest
Jun 15th, 2017
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SdlBasic 14.84 KB | None | 0 0
  1. #! /usr/bin/sdlbrt
  2. finp$="tune.vgm"
  3.  
  4. '- .vgm to VortexTracker .txt converter - AY-3-8910 version
  5. '- copyleft Paulo Silva, feb'16
  6. '-------------------------------
  7. '- bugs:
  8. '- - an acute sound might appear because an issue related to volume 0 that VortexTracker doesnt support, R-- note used instead (and the converter should store which note/frequency is for a probable volume changing, and set back the note/frequency value back)
  9. '- - doesn't read yet the author/title information
  10. '- - 'L' will be useful for the loop point location
  11. '- - probably will need a sample counter before converting
  12. '- - missing noise support
  13. '- - frequncy inaccuracy from the germanic notation formula probably fixed, needs more testing
  14. '-------------------------------
  15.  
  16.  
  17.  
  18. ltxtm$=        "|...........|...........|...........|...........|...........|...........|...........|...........":ltxcr$=ltxtm$
  19. 'ltxtm$="....|..|--- .... ....|--- .... ....|--- .... ....":ltxcr$=ltxtm$
  20. freq0=0:freq1=0:freq2=0:vol0=0:vol1=0:vol2=0
  21. patsz=64:patc=0:patid=0:freqq=0
  22. hdram=0x40:vgmv=0:veof=0
  23. freqk0=0:freqk1=0:freqk2=0:freqk3=0:freqk4=0
  24. volk0=0:volk1=0:volk2=0:volk3=0:volk4=0
  25. dim hdrv[256]
  26. dim wfc0[32],wfc1[32],wfc2[32],wfc3[32],wfc4[32]
  27.  
  28.  
  29. if argc>2 then:finp$=argv(2):end if
  30. fout2$=finp$+"_asciimod.txt":fout3$=finp$+"_asciimod_debug.txt"
  31.  
  32. frmc=0:frmr=300:trg=0
  33.  
  34. frmi=735
  35. if argc>3 then:
  36.   if argv(3)="1" or ucase$(argv(2))="-PAL" then
  37.     frmi=882:end if:end if
  38.  
  39. debug=0
  40. if argc>4 then:
  41.   if argv(4)="1" or ucase$(argv(2))="-DEBUG" then
  42.     debug=1:end if:end if
  43.  
  44. '- fix: 0x0FE=440hz=A-4
  45. function nttfrq$(freqb)
  46.   e$=   "C-1C#1D-1D#1E-1F-1F#1G-1G#1A-1A#1B-1"
  47.   e$=e$+"C-2C#2D-2D#2E-2F-2F#2G-2G#2A-2A#2B-2"
  48.   e$=e$+"C-3C#3D-3D#3E-3F-3F#3G-3G#3A-3A#3B-3"
  49.   e$=e$+"C-4C#4D-4D#4E-4F-4F#4G-4G#4A-4A#4B-4"
  50.   e$=e$+"C-5C#5D-5D#5E-5F-5F#5G-5G#5A-5A#5B-5"
  51.   e$=e$+"C-6C#6D-6D#6E-6F-6F#6G-6G#6A-6A#6B-6"
  52.   e$=e$+"C-7C#7D-7D#7E-7F-7F#7G-7G#7A-7A#7B-7"
  53.   e$=e$+"C-8C#8D-8D#8E-8F-8F#8G-8G#8A-8A#8B-8---"
  54.   tmq=141-(int((log(freqb*.99)/log(2))*12))
  55.   if tmq<1 then:tmq=1:end if
  56.   if tmq>97 then:tmq=97:end if
  57.   return mid$(e$,(tmq*3)-2,3)
  58.   end function
  59.  
  60. open finp$ for input as #1
  61. for i=0 to 255
  62.   hdrv[i]=readbyte(1)
  63.   next
  64. close #1
  65.  
  66. hdram=0x040
  67. vgmv=hdrv[8]+hdrv[9]*256
  68. if vgmv>=0x0150 then:hdram=0x080:end if
  69. if vgmv>=0x0160 then:hdram=0x0C0:end if
  70. if vgmv>=0x0170 then:hdram=0x100:end if
  71.  
  72. '- wrong information???
  73. ttsam=hdrv[0x18]+hdrv[0x19]*256+hdrv[0x1A]*65536+hdrv[0x1B]*16777216
  74. hsam$="PlayOrder=L0"
  75. for i=1 to (ttsam/(frmi*patsz))-1
  76.   hsam$=hsam$+","+str$(i)
  77.   next
  78.  
  79. open finp$ for input as #1
  80. open fout2$ for output as #2
  81. open fout3$ for output as #3
  82.  
  83. print #2,"[Module]"
  84. print #2,"Format:mod"
  85. print #2,"Title:"
  86. print #2," "
  87.  
  88. for i=0 to 4
  89.   print #2,"[SampleInfo"+hex$(i)+"]"
  90.   print #2,"Name:SquareWave"
  91.   print #2,"Lenght:0x0020"
  92.   print #2,"Finetune:0"
  93.   print #2,"Volume:0x40"
  94.   print #2,"RepeatPoint:0x0000"
  95.   print #2,"RepeatLenght:0x0020"
  96.   print #2," "
  97.   next
  98.  
  99. print #2,"[MoreInfo]"
  100. print #2,"SongLenght:8"
  101. print #2,"VersionFlag1:0x00"
  102. print #2,"PlayOrder:0,1,2,3,4,5,6,7"
  103. print #2,"VersionFlag2:8CHN"
  104. print #2," "
  105. print #2,"[Pattern0]"
  106. print #2,"ModPlug Tracker MOD"
  107.  
  108. '- the amount of header bytes depends on vgm format version
  109. for eee=0 to hdram-1:q0=readbyte(1):next  '- read offset byte first
  110. txou1$="    #("+str$(0)+")"
  111.  
  112. while veof=0:
  113.   q0=readbyte(1)
  114.  
  115.   '- vgm eof command
  116.   if q0=0x66 then:
  117.     veof=1
  118.     print #3,"--vgm-eof--"
  119.     print #2," "
  120.     end if
  121.  
  122.   '- delay 1 byte (1..16 samples)
  123.   if bitwiseand(q0,0x70)=0x70 then
  124.     frmc=frmc+bitwiseand(q0,0xF)+1
  125.     txou1$="    #("+str$(frmc)+")"
  126.     'print #3,txou1$
  127.     end if
  128.  
  129.   '- delay 3 bytes (0..65535 samples)
  130.   if q0=0x61 then
  131.     q0=readbyte(1)
  132.     frmc=frmc+q0
  133.     q0=readbyte(1)
  134.     frmc=frmc+(q0*256)
  135.     txou1$="    #("+str$(frmc)+")"
  136.     'print #3,txou1$
  137.     end if
  138.  
  139.   '- 1 ntsc frame delay, 735 samples
  140.   if q0=0x62 then
  141.     frmc=frmc+735
  142.     txou1$="    #("+str$(frmc)+")"
  143.     'print #3,txou1$
  144.     end if
  145.  
  146.   '- 1 pal frame delay, 882 samples
  147.   if q0=0x63 then
  148.     frmc=frmc+882
  149.     txou1$="    #("+str$(frmc)+")"
  150.     'print #3,txou1$
  151.     end if
  152.  
  153.  
  154.  
  155.   '- updates frameout pulses
  156.   while frmr<frmc
  157.  
  158.     '- writes F7F and F01 in the firsts lines of the first pattern
  159.     if (patc<1 and patid=0) then
  160.       ltxcr$=replace$(93,ltxcr$,"F7F")
  161.       end if
  162.     if (patc=1 and patid=0) then
  163.       ltxcr$=replace$(93,ltxcr$,"F01")
  164.       end if
  165.  
  166.     '- creates a new pattern  
  167.     if patc>(patsz-1) then:
  168.       print #2," "
  169.       patid=patid+1:patc=0
  170.       txou9$="[Pattern"+str$(patid)+"]"
  171.       print #2,txou9$
  172.       print #2,"ModPlug Tracker MOD"
  173.       end if
  174.  
  175.     '- writes a pattern line in each frame
  176.     if trg=0 then
  177.       print #3,"--frameout-unchanged--"
  178.       print #2,ltxtm$
  179.     else
  180.       print #3,"--frameout--"
  181.       print #2,ltxcr$
  182.       ltxcr$=ltxtm$
  183.       trg=0
  184.       end if
  185.  
  186.     frmr=frmr+frmi
  187.     patc=patc+1
  188.     end while
  189.  
  190.  
  191.  
  192.   '- token 0xA0 gets registers and values to AY-3-8910 output
  193.   if q0=0xA0 then
  194.     q0=readbyte(1)
  195.  
  196.     '- channel 0, fine
  197.     if q0=0 then
  198.       q0=readbyte(1)
  199.       freq0= bitwiseor((bitwiseand(freq0,0xF00)),(bitwiseand(q0,0x0FF)))
  200.       ltxtm1$=ltxtm$
  201.       ltxtm2$=replace$(1,ltxtm1$,nttfrq$(freq0)+"01")
  202.       ltxcr$=replace$(1,ltxcr$,nttfrq$(freq0)+"01")
  203.       print #3,ltxtm2$
  204.       trg=1
  205.       end if
  206.  
  207.     '- channel 0, coarse
  208.     if q0=1 then
  209.       q0=readbyte(1)
  210.       freq0= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freq0,0x0FF)) )
  211.       ltxtm1$=ltxtm$
  212.       ltxtm2$=replace$(1,ltxtm1$,nttfrq$(freq0)+"01")
  213.       ltxcr$=replace$(1,ltxcr$,nttfrq$(freq0)+"01")
  214.       print #3,ltxtm2$
  215.       trg=1
  216.       end if
  217.  
  218.     '- channel 1, fine
  219.     if q0=2 then
  220.       q0=readbyte(1)
  221.       freq1= bitwiseor ( (bitwiseand(freq1,0xF00)),(bitwiseand(q0,0x0FF)) )
  222.       ltxtm1$=ltxtm$
  223.       ltxtm2$=replace$(13,ltxtm1$,nttfrq$(freq1)+"01")
  224.       ltxcr$=replace$(13,ltxcr$,nttfrq$(freq1)+"01")
  225.       print #3,ltxtm2$
  226.       trg=1
  227.       end if
  228.  
  229.     '- channel 1, coarse
  230.     if q0=3 then
  231.       q0=readbyte(1)
  232.       freq1= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freq1,0x0FF)) )
  233.       ltxtm1$=ltxtm$
  234.       ltxtm2$=replace$(13,ltxtm1$,nttfrq$(freq1)+"01")
  235.       ltxcr$=replace$(13,ltxcr$,nttfrq$(freq1)+"01")
  236.       print #3,ltxtm2$
  237.       trg=1
  238.       end if
  239.  
  240.     '- channel 2, fine
  241.     if q0=4 then
  242.       q0=readbyte(1)
  243.       freq2= bitwiseor ( (bitwiseand(freq2,0xF00)),(bitwiseand(q0,0x0FF)) )
  244.       ltxtm1$=ltxtm$
  245.       ltxtm2$=replace$(25,ltxtm1$,nttfrq$(freq2)+"01")
  246.       ltxcr$=replace$(25,ltxcr$,nttfrq$(freq2)+"01")
  247.       print #3,ltxtm2$
  248.       trg=1
  249.       end if
  250.  
  251.     '- channel 2, coarse
  252.     if q0=5 then
  253.       q0=readbyte(1)
  254.       freq2= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freq2,0x0FF)) )
  255.       ltxtm1$=ltxtm$
  256.       ltxtm2$=replace$(25,ltxtm1$,nttfrq$(freq2)+"01")
  257.       ltxcr$=replace$(25,ltxcr$,nttfrq$(freq2)+"01")
  258.       print #3,ltxtm2$
  259.       trg=1
  260.       end if
  261.  
  262.     '?????
  263.     if q0=6 then
  264.       print #3,ltxtm$
  265.       end if
  266.  
  267.     '?????
  268.     'if q0=7 then
  269.     '  q0=readbyte(1)
  270.     '  ltxtm1$=ltxtm$
  271.     '  ltxtm2$=left$(ltxtm1$,31)+  right$(bin$(512+q0),8)  +right$(ltxtm1$,2)+txou1$
  272.     '  print #3,ltxtm2$
  273.     '  trg=1
  274.     '  end if
  275.  
  276.     '- channel 1, volume
  277.     if q0=8 then
  278.       q0=readbyte(1)
  279.       vol0= bitwiseand(q0,0xF)
  280.       ltxtm1$=ltxtm$
  281.       ltxtm2$=replace$(9,ltxtm1$,"C"+ucase$(right$(hex$(0x100+vol0*4),2)))
  282.       ltxcr$=replace$(9,ltxcr$,"C"+ucase$(right$(hex$(0x100+vol0*4),2)))
  283.       print #3,ltxtm2$
  284.       trg=1
  285.       end if
  286.  
  287.     '- channel 2, volume
  288.     if q0=9 then
  289.       q0=readbyte(1)
  290.       vol1= bitwiseand(q0,0xF)
  291.       ltxtm1$=ltxtm$
  292.       ltxtm2$=replace$(21,ltxtm1$,"C"+ucase$(right$(hex$(0x100+vol1*4),2)))
  293.       ltxcr$=replace$(21,ltxcr$,"C"+ucase$(right$(hex$(0x100+vol1*4),2)))
  294.       print #3,ltxtm2$
  295.       trg=1
  296.       end if
  297.  
  298.     '- channel 3, volume
  299.     if q0=10 then
  300.       q0=readbyte(1)
  301.       vol2= bitwiseand(q0,0xF)
  302.       ltxtm1$=ltxtm$
  303.       ltxtm2$=replace$(33,ltxtm1$,"C"+ucase$(right$(hex$(0x100+vol2*4),2)))
  304.       ltxcr$=replace$(33,ltxcr$,"C"+ucase$(right$(hex$(0x100+vol2*4),2)))
  305.       print #3,ltxtm2$
  306.       trg=1
  307.       end if
  308.  
  309.     end if
  310.  
  311.  
  312.   '- token 0xD2 gets registers and values to K051649 output
  313.   if q0=0xD2 then
  314.     q0=readbyte(1)
  315.  
  316.     if q0=0x00 then '- write waveform
  317.       q0=readbyte(1)
  318.       if int(q0/32)=0 then
  319.         q1=readbyte(1)
  320.         wfc0[bitwiseand(q0,31)]=q1
  321.         end if
  322.       if int(q0/32)=1 then
  323.         q1=readbyte(1)
  324.         wfc1[bitwiseand(q0,31)]=q1
  325.         end if
  326.       if int(q0/32)=2 then
  327.         q2=readbyte(1)
  328.         wfc2[bitwiseand(q0,31)]=q2
  329.         end if
  330.       if int(q0/32)=3 then
  331.         q3=readbyte(1)
  332.         wfc3[bitwiseand(q0,31)]=q3
  333.         end if
  334.       if int(q0/32)=3 then
  335.         q4=readbyte(1)
  336.         wfc4[bitwiseand(q0,31)]=q4
  337.         end if
  338.  
  339.  
  340.  
  341.       end if
  342.  
  343.     if q0=0x01 then '- set frequency
  344.       q0=readbyte(1)
  345.       if q0=0 then
  346.         q0=readbyte(1)
  347.         freqk0= bitwiseor((bitwiseand(freqk0,0xF00)),(bitwiseand(q0,0x0FF)))
  348.         ltxtm1$=ltxtm$
  349.         ltxtm2$=replace$(37,ltxtm1$,nttfrq$(freqk0)+"02")
  350.         ltxcr$=replace$(37,ltxcr$,nttfrq$(freqk0)+"02")
  351.         print #3,ltxtm2$
  352.         trg=1
  353.         end if
  354.       if q0=1 then
  355.         q0=readbyte(1)
  356.         freqk0= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freqk0,0x0FF)) )
  357.         ltxtm1$=ltxtm$
  358.         ltxtm2$=replace$(37,ltxtm1$,nttfrq$(freqk0)+"02")
  359.         ltxcr$=replace$(37,ltxcr$,nttfrq$(freqk0)+"02")
  360.         print #3,ltxtm2$
  361.         trg=1
  362.         end if
  363.       if q0=2 then
  364.         q0=readbyte(1)
  365.         freqk1= bitwiseor((bitwiseand(freqk1,0xF00)),(bitwiseand(q0,0x0FF)))
  366.         ltxtm1$=ltxtm$
  367.         ltxtm2$=replace$(49,ltxtm1$,nttfrq$(freqk1)+"03")
  368.         ltxcr$=replace$(49,ltxcr$,nttfrq$(freqk1)+"03")
  369.         print #3,ltxtm2$
  370.         trg=1
  371.         end if
  372.       if q0=3 then
  373.         q0=readbyte(1)
  374.         freqk1= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freqk1,0x0FF)) )
  375.         ltxtm1$=ltxtm$
  376.         ltxtm2$=replace$(49,ltxtm1$,nttfrq$(freqk1)+"03")
  377.         ltxcr$=replace$(49,ltxcr$,nttfrq$(freqk1)+"03")
  378.         print #3,ltxtm2$
  379.         trg=1
  380.         end if
  381.       if q0=4 then
  382.         q0=readbyte(1)
  383.         freqk2= bitwiseor((bitwiseand(freqk2,0xF00)),(bitwiseand(q0,0x0FF)))
  384.         ltxtm1$=ltxtm$
  385.         ltxtm2$=replace$(61,ltxtm1$,nttfrq$(freqk2)+"04")
  386.         ltxcr$=replace$(61,ltxcr$,nttfrq$(freqk2)+"04")
  387.         print #3,ltxtm2$
  388.         trg=1
  389.         end if
  390.       if q0=5 then
  391.         q0=readbyte(1)
  392.         freqk2= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freqk2,0x0FF)) )
  393.         ltxtm1$=ltxtm$
  394.         ltxtm2$=replace$(61,ltxtm1$,nttfrq$(freqk2)+"04")
  395.         ltxcr$=replace$(61,ltxcr$,nttfrq$(freqk2)+"04")
  396.         print #3,ltxtm2$
  397.         trg=1
  398.         end if
  399.       if q0=6 then
  400.         q0=readbyte(1)
  401.         freqk3= bitwiseor((bitwiseand(freqk3,0xF00)),(bitwiseand(q0,0x0FF)))
  402.         ltxtm1$=ltxtm$
  403.         ltxtm2$=replace$(73,ltxtm1$,nttfrq$(freqk3)+"05")
  404.         ltxcr$=replace$(73,ltxcr$,nttfrq$(freqk3)+"05")
  405.         print #3,ltxtm2$
  406.         trg=1
  407.         end if
  408.       if q0=7 then
  409.         q0=readbyte(1)
  410.         freqk3= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freqk3,0x0FF)) )
  411.         ltxtm1$=ltxtm$
  412.         ltxtm2$=replace$(73,ltxtm1$,nttfrq$(freqk3)+"05")
  413.         ltxcr$=replace$(73,ltxcr$,nttfrq$(freqk3)+"05")
  414.         print #3,ltxtm2$
  415.         trg=1
  416.         end if
  417.       if q0=8 then
  418.         q0=readbyte(1)
  419.         freqk4= bitwiseor((bitwiseand(freqk4,0xF00)),(bitwiseand(q0,0x0FF)))
  420.         ltxtm1$=ltxtm$
  421.         ltxtm2$=replace$(85,ltxtm1$,nttfrq$(freqk4)+"05")
  422.         ltxcr$=replace$(85,ltxcr$,nttfrq$(freqk4)+"05")
  423.         print #3,ltxtm2$
  424.         trg=1
  425.         end if
  426.       if q0=9 then
  427.         q0=readbyte(1)
  428.         freqk4= bitwiseor ( (bitwiseand(q0*256,0xF00)),(bitwiseand(freqk4,0x0FF)) )
  429.         ltxtm1$=ltxtm$
  430.         ltxtm2$=replace$(85,ltxtm1$,nttfrq$(freqk4)+"05")
  431.         ltxcr$=replace$(85,ltxcr$,nttfrq$(freqk4)+"05")
  432.         print #3,ltxtm2$
  433.         trg=1
  434.         end if
  435.       end if
  436.  
  437.     if q0=0x02 then '- set volume
  438.       q0=readbyte(1)
  439.  
  440.       if q0=0 then
  441.         q0=readbyte(1)
  442.         volk0= bitwiseand(q0,0xF)
  443.         ltxtm1$=ltxtm$
  444.         ltxtm2$=replace$(45,ltxtm1$,"C"+ucase$(right$(hex$(0x100+volk0*4),2)))
  445.         ltxcr$=replace$(45,ltxcr$,"C"+ucase$(right$(hex$(0x100+volk0*4),2)))
  446.         print #3,ltxtm2$
  447.         trg=1
  448.         end if
  449.  
  450.       if q0=1 then
  451.         q0=readbyte(1)
  452.         volk1= bitwiseand(q0,0xF)
  453.         ltxtm1$=ltxtm$
  454.         ltxtm2$=replace$(57,ltxtm1$,"C"+ucase$(right$(hex$(0x100+volk1*4),2)))
  455.         ltxcr$=replace$(57,ltxcr$,"C"+ucase$(right$(hex$(0x100+volk1*4),2)))
  456.         print #3,ltxtm2$
  457.         trg=1
  458.         end if
  459.  
  460.       if q0=2 then
  461.         q0=readbyte(1)
  462.         volk2= bitwiseand(q0,0xF)
  463.         ltxtm1$=ltxtm$
  464.         ltxtm2$=replace$(69,ltxtm1$,"C"+ucase$(right$(hex$(0x100+volk2*4),2)))
  465.         ltxcr$=replace$(69,ltxcr$,"C"+ucase$(right$(hex$(0x100+volk2*4),2)))
  466.         print #3,ltxtm2$
  467.         trg=1
  468.         end if
  469.  
  470.       if q0=3 then
  471.         q0=readbyte(1)
  472.         volk3= bitwiseand(q0,0xF)
  473.         ltxtm1$=ltxtm$
  474.         ltxtm2$=replace$(81,ltxtm1$,"C"+ucase$(right$(hex$(0x100+volk3*4),2)))
  475.         ltxcr$=replace$(81,ltxcr$,"C"+ucase$(right$(hex$(0x100+volk3*4),2)))
  476.         print #3,ltxtm2$
  477.         trg=1
  478.         end if
  479.  
  480.       if q0=4 then
  481.         q0=readbyte(1)
  482.         volk4= bitwiseand(q0,0xF)
  483.         ltxtm1$=ltxtm$
  484.         ltxtm2$=replace$(93,ltxtm1$,"C"+ucase$(right$(hex$(0x100+volk4*4),2)))
  485.         ltxcr$=replace$(93,ltxcr$,"C"+ucase$(right$(hex$(0x100+volk4*4),2)))
  486.         print #3,ltxtm2$
  487.         trg=1
  488.         end if
  489.  
  490.  
  491.       end if
  492.  
  493.     end if
  494.  
  495.  
  496.  
  497.  
  498.  
  499.   if eof(1)<>0 then:veof=1:end if
  500.   wend
  501.  
  502. print #2," "
  503. print #2,"[Sample0]"
  504. print #2,"7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F80808080808080808080808080808080"
  505. print #2," "
  506.  
  507. txousm$=""
  508. for i=0 to 31
  509.   txousm$=txousm$+ucase$(right$(hex$(0x180+wfc0[i]),2))
  510.   next
  511. print #2,"[Sample1]"
  512. print #2,txousm$
  513. print #2," "
  514.  
  515. txousm$=""
  516. for i=0 to 31
  517.   txousm$=txousm$+ucase$(right$(hex$(0x180+wfc1[i]),2))
  518.   next
  519. print #2,"[Sample2]"
  520. print #2,txousm$
  521. print #2," "
  522.  
  523. txousm$=""
  524. for i=0 to 31
  525.   txousm$=txousm$+ucase$(right$(hex$(0x180+wfc2[i]),2))
  526.   next
  527. print #2,"[Sample3]"
  528. print #2,txousm$
  529. print #2," "
  530.  
  531. txousm$=""
  532. for i=0 to 31
  533.   txousm$=txousm$+ucase$(right$(hex$(0x180+wfc3[i]),2))
  534.   next
  535. print #2,"[Sample4]"
  536. print #2,txousm$
  537. print #2," "
  538.  
  539. txousm$=""
  540. for i=0 to 31
  541.   txousm$=txousm$+ucase$(right$(hex$(0x180+wfc4[i]),2))
  542.   next
  543. print #2,"[Sample5]"
  544. print #2,txousm$
  545. print #2," "
  546.  
  547.  
  548.  
  549.  
  550. close #1:close #2:close #3
  551.  
  552. if debug=0 then:
  553.   shell("rm "+fout3$)
  554.   end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement