Advertisement
IsoKilo

AXM68k Compliant SMPS2ASM

Jun 2nd, 2023
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
M68000 Assembler 14.11 KB | Source Code | 0 0
  1. ; =============================================================================================
  2. ; Created by Flamewing, based on S1SMPS2ASM version 1.1 by Marc Gordon (AKA Cinossu)
  3. ; Ported to ASM68k by DeltaWooloo, further modified to be AXM compliant by Kilo
  4. ; =============================================================================================
  5. SourceDriver = 1 ; Please don't modify the value.
  6.  
  7. ; PSG conversion to S3/S&K/S3D drivers require a tone shift of 12 semi-tones.
  8. psgdelta    equ 12
  9. ; ---------------------------------------------------------------------------------------------
  10. ; Standard Octave Pitch equates
  11. smpsPitch10lo   equ $88
  12. smpsPitch09lo   equ $94
  13. smpsPitch08lo   equ $A0
  14. smpsPitch07lo   equ $AC
  15. smpsPitch06lo   equ $B8
  16. smpsPitch05lo   equ $C4
  17. smpsPitch04lo   equ $D0
  18. smpsPitch03lo   equ $DC
  19. smpsPitch02lo   equ $E8
  20. smpsPitch01lo   equ $F4
  21. smpsPitch00     equ $00
  22. smpsPitch01hi   equ $0C
  23. smpsPitch02hi   equ $18
  24. smpsPitch03hi   equ $24
  25. smpsPitch04hi   equ $30
  26. smpsPitch05hi   equ $3C
  27. smpsPitch06hi   equ $48
  28. smpsPitch07hi   equ $54
  29. smpsPitch08hi   equ $60
  30. smpsPitch09hi   equ $6C
  31. smpsPitch10hi   equ $78
  32. ; ---------------------------------------------------------------------------------------------
  33. ; Note equates
  34. ; ---------------------------------------------------------------------------------------------
  35. nRst        EQU $80
  36. nC0         EQU $81
  37. nCs0        EQU $82
  38. nD0         EQU $83
  39. nEb0        EQU $84
  40. nE0         EQU $85
  41. nF0         EQU $86
  42. nFs0        EQU $87
  43. nG0         EQU $88
  44. nAb0        EQU $89
  45. nA0         EQU $8A
  46. nBb0        EQU $8B
  47. nB0         EQU $8C
  48. nC1         EQU $8D
  49. nCs1        EQU $8E
  50. nD1         EQU $8F
  51. nEb1        EQU $90
  52. nE1         EQU $91
  53. nF1         EQU $92
  54. nFs1        EQU $93
  55. nG1         EQU $94
  56. nAb1        EQU $95
  57. nA1         EQU $96
  58. nBb1        EQU $97
  59. nB1         EQU $98
  60. nC2         EQU $99
  61. nCs2        EQU $9A
  62. nD2         EQU $9B
  63. nEb2        EQU $9C
  64. nE2         EQU $9D
  65. nF2         EQU $9E
  66. nFs2        EQU $9F
  67. nG2         EQU $A0
  68. nAb2        EQU $A1
  69. nA2         EQU $A2
  70. nBb2        EQU $A3
  71. nB2         EQU $A4
  72. nC3         EQU $A5
  73. nCs3        EQU $A6
  74. nD3         EQU $A7
  75. nEb3        EQU $A8
  76. nE3         EQU $A9
  77. nF3         EQU $AA
  78. nFs3        EQU $AB
  79. nG3         EQU $AC
  80. nAb3        EQU $AD
  81. nA3         EQU $AE
  82. nBb3        EQU $AF
  83. nB3         EQU $B0
  84. nC4         EQU $B1
  85. nCs4        EQU $B2
  86. nD4         EQU $B3
  87. nEb4        EQU $B4
  88. nE4         EQU $B5
  89. nF4         EQU $B6
  90. nFs4        EQU $B7
  91. nG4         EQU $B8
  92. nAb4        EQU $B9
  93. nA4         EQU $BA
  94. nBb4        EQU $BB
  95. nB4         EQU $BC
  96. nC5         EQU $BD
  97. nCs5        EQU $BE
  98. nD5         EQU $BF
  99. nEb5        EQU $C0
  100. nE5         EQU $C1
  101. nF5         EQU $C2
  102. nFs5        EQU $C3
  103. nG5         EQU $C4
  104. nAb5        EQU $C5
  105. nA5         EQU $C6
  106. nBb5        EQU $C7
  107. nB5         EQU $C8
  108. nC6         EQU $C9
  109. nCs6        EQU $CA
  110. nD6         EQU $CB
  111. nEb6        EQU $CC
  112. nE6         EQU $CD
  113. nF6         EQU $CE
  114. nFs6        EQU $CF
  115. nG6         EQU $D0
  116. nAb6        EQU $D1
  117. nA6         EQU $D2
  118. nBb6        EQU $D3
  119. nB6         EQU $D4
  120. nC7         EQU $D5
  121. nCs7        EQU $D6
  122. nD7         EQU $D7
  123. nEb7        EQU $D8
  124. nE7         EQU $D9
  125. nF7         EQU $DA
  126. nFs7        EQU $DB
  127. nG7         EQU $DC
  128. nAb7        EQU $DD
  129. nA7         EQU $DE
  130. nBb7        EQU $DF
  131. ; SMPS2ASM uses nMaxPSG for songs from S1/S2 drivers.
  132. ; nMaxPSG1 and nMaxPSG2 are used only for songs from S3/S&K/S3D drivers.
  133. ; The use of psgdelta is intended to undo the effects of PSGPitchConvert
  134. ; and ensure that the ending note is indeed the maximum PSG frequency.
  135.     if SourceDriver<=2
  136. nMaxPSG             EQU nA5
  137. nMaxPSG1            EQU nA5+psgdelta
  138. nMaxPSG2            EQU nA5+psgdelta
  139.     else
  140. nMaxPSG             EQU nBb6-psgdelta
  141. nMaxPSG1            EQU nBb6
  142. nMaxPSG2            EQU nB6
  143.     endif
  144. ; ---------------------------------------------------------------------------------------------
  145. ; PSG Flutter equates
  146. fTone_00    equ $00
  147. fTone_01    equ $01
  148. fTone_02    equ $02
  149. fTone_03    equ $03
  150. fTone_04    equ $04
  151. fTone_05    equ $05
  152. fTone_06    equ $06
  153. fTone_07    equ $07
  154. fTone_08    equ $08
  155. fTone_09    equ $09
  156. fTone_0A    equ $0A
  157. fTone_0B    equ $0B
  158. fTone_0C    equ $0C
  159. fTone_0D    equ $0D
  160. sTone_01    equ $0E
  161. sTone_02    equ $0F
  162. sTone_03    equ $10
  163. sTone_04    equ $11
  164. sTone_05    equ $12
  165. sTone_06    equ $13
  166. sTone_07    equ $14 ; SFX envelope, probably unused in S3K
  167. sTone_08    equ $15
  168. sTone_09    equ $16
  169. sTone_0A    equ $17
  170. sTone_0B    equ $18 ; For FM volume envelopes
  171. sTone_0C    equ $19
  172. sTone_0D    equ $1A ; This time it matches 100%
  173. sTone_0E    equ sTone_01    ; Duplicate of 01
  174. sTone_0F    equ sTone_02    ; Duplicate of 02
  175. sTone_10    equ $1B
  176. sTone_11    equ $1C
  177. sTone_12    equ sTone_05    ; Duplicate of 05
  178. sTone_13    equ sTone_06    ; Duplicate of 06
  179. sTone_14    equ $1D ; SFX envelope, probably unused in S3K
  180. sTone_15    equ sTone_08    ; Duplicate of 08
  181. sTone_16    equ sTone_09    ; Duplicate of 09
  182. sTone_17    equ sTone_0A    ; Duplicate of 0A
  183. sTone_18    equ $1E ; For FM volume envelopes
  184. sTone_19    equ sTone_0C    ; Duplicate of 0C
  185. sTone_1A    equ $1F
  186. sTone_1B    equ sTone_0C    ; Duplicate of 0C
  187. sTone_1C    equ $06
  188. sTone_1D    equ $07
  189. sTone_1E    equ $02
  190. sTone_1F    equ $04
  191. sTone_20    equ $00 ; This time it matches 100%
  192. sTone_21    equ $09
  193. sTone_22    equ $04
  194. sTone_23    equ $07
  195. sTone_24    equ $02
  196. sTone_25    equ $09
  197. sTone_26    equ $07
  198. sTone_27    equ $03
  199. sTone_DB2_3 equ $1F
  200. ; ---------------------------------------------------------------------------------------------
  201. ; DAC equates
  202. ; ---------------------------------------------------------------------------------------------
  203. dKick equ $81
  204. dSnare equ $82
  205. dClapS3 equ $83
  206. dKCCrash equ $84
  207. dCrashCymbal equ $85
  208. dKCKick equ $86
  209. dKCSnare equ $87
  210. dHiTimpani equ $88
  211. dMidTimpani equ $89
  212. dLowTimpani equ $8A
  213. dVLowTimpani equ $8B
  214. dKickS3 equ $8C
  215. dSnareS3    equ $8D
  216. dElectricHighTom equ $8E
  217. dElectricMidTom equ $8F
  218. dElectricLowTom equ $90
  219. dElectricFloorTom equ $91
  220. dHighTom equ $92
  221. dMidTomS3 equ $93
  222. dLowTomS3 equ $94
  223. dFloorTomS3 equ $95
  224. dLackOfTrack1 equ $96
  225. dLackOfTrack2 equ $97
  226. dLackOfTrack3 equ $98
  227. dLackOfTrack4 equ $99
  228. dLackOfTrack5 equ $9A
  229. dLackOfTrack6 equ $9B
  230. dKickSnare equ $9C
  231. dCrayonKick equ $9D
  232. dCrayonSnare equ $9E
  233. dQuickLooseSnare equ $9F
  234. dMidTom equ $A0
  235. dLowTom equ $A1
  236. dFloorTom equ $A2
  237. dLowMetalHit equ $A3
  238. dMetalHit equ $A4
  239. dHighMetalHit equ $A5
  240. dHigherMetalHit equ $A6
  241. dMidMetalHit equ $A7
  242. dTightSnare equ $A8
  243. dMidpitchSnare equ $A9
  244. dLooseSnare equ $AA
  245. dLooserSnare equ $AB
  246. dKCAltSnare equ $AC
  247. ; ---------------------------------------------------------------------------------------------
  248. ; Channel IDs for SFX
  249. ; ---------------------------------------------------------------------------------------------
  250. cPSG1               EQU $80
  251. cPSG2               EQU $A0
  252. cPSG3               EQU $C0
  253. cNoise              EQU $E0 ; Not for use in S3/S&K/S3D
  254. cFM3                EQU $02
  255. cFM4                EQU $04
  256. cFM5                EQU $05
  257. cFM6                EQU $06 ; Only in S3/S&K/S3D, overrides DAC
  258. ; ---------------------------------------------------------------------------------------------
  259. ; Conversion macros and functions
  260.  
  261. ;conv0To256  macro val
  262.     ;if val<$01
  263.         ;dc.b (256-val+$FF)&$FF
  264.     ;else  
  265.         ;dc.b (256-val)&$FF
  266.     ;endc
  267.     ;endm
  268. ; ---------------------------------------------------------------------------------------------
  269. ; Header Macros
  270. smpsHeaderStartSong macro ver
  271. SourceDriver = ver
  272. songStart = *
  273.     endm
  274.  
  275. smpsHeaderStartSongConvert macro ver
  276. SourceDriver = ver
  277. songStart = *
  278.     endm
  279.  
  280. smpsHeaderVoiceNull macro
  281.     if songStart<>*
  282.         fatal "Missing smpsHeaderStartSong or smpsHeaderStartSongConvert"
  283.     endif
  284.     dc.w    $0000
  285.     endm
  286.  
  287. ; Header - Set up Voice Location
  288. ; Common to music and SFX
  289. smpsHeaderVoice macro loc
  290.     if songStart<>*
  291.         fatal "Missing smpsHeaderStartSong or smpsHeaderStartSongConvert"
  292.     endif
  293.     dc.w    loc-songStart
  294.     endm
  295.  
  296. ; Header macros for music (not for SFX)
  297. ; Header - Set up Channel Usage
  298. smpsHeaderChan macro fm,psg
  299.     dc.b    fm,psg
  300.     endm
  301.  
  302. ; Header - Set up Tempo
  303. smpsHeaderTempo macro div,mod
  304.     dc.b    div
  305. tempoDivider = div
  306.     dc.b    mod
  307.     endm
  308.  
  309. ; Header - Set up DAC Channel
  310. smpsHeaderDAC macro loc,pitch,vol
  311.     dc.w    loc-songStart
  312.     if (narg=2)
  313.         dc.b    pitch
  314.         if (narg=3)
  315.             dc.b    vol
  316.         else
  317.             dc.b    $00
  318.         endif
  319.     else
  320.         dc.w    $00
  321.     endif
  322.     endm
  323.  
  324. ; Header - Set up FM Channel
  325. smpsHeaderFM macro loc,pitch,vol
  326.     dc.w    loc-songStart
  327.     dc.b    pitch,vol
  328.     endm
  329.  
  330. ; Header - Set up PSG Channel
  331. smpsHeaderPSG macro loc,pitch,vol,mod,voice
  332.     dc.w    loc-songStart
  333.     dc.b    pitch,vol,mod,voice
  334.     endm
  335.  
  336. ; Header macros for SFX (not for music)
  337. ; Header - Set up Tempo
  338. smpsHeaderTempoSFX macro div
  339.     dc.b    div
  340.     endm
  341.  
  342. ; Header - Set up Channel Usage
  343. smpsHeaderChanSFX macro chan
  344.     dc.b    chan
  345.     endm
  346.  
  347. ; Header - Set up FM Channel
  348. smpsHeaderSFXChannel macro chanid,loc,pitch,vol
  349.     if (chanid=cNoise)
  350.         fatal "Using channel ID of FM6 ($06) in Sonic 1 or Sonic 2 drivers is unsupported. Change it to another channel."
  351.     endif
  352.     dc.b    $80,chanid
  353.     dc.w    loc-songStart
  354.     if (chanid&$80)<>0
  355.     if SourceDriver>=3
  356.         dc.b    (pitch-psgdelta)&$FF
  357.     else
  358.         dc.b    pitch
  359.     endif
  360.     else
  361.         dc.b    pitch
  362.     endif
  363.     dc.b    vol
  364.     endm
  365. ; ---------------------------------------------------------------------------------------------
  366. ; Co-ord Flag Macros and equates
  367. ; E0xx - Panning, AMS, FMS
  368. smpsPan macro direction,amsfms
  369. panNone = $00
  370. panRight = $40
  371. panLeft = $80
  372. panCentre = $C0
  373. panCenter = $C0 ; silly Americans :U
  374.     dc.b $E0,direction+amsfms
  375.     endm
  376.  
  377. ; E1xx - Set channel frequency displacement to xx
  378. smpsAlterNote macro val
  379.     dc.b    $E1,val
  380.     endm
  381.  
  382. smpsDetune macro val
  383.     dc.b $E1, val
  384.     endm
  385.  
  386. ; E2xx - Useless
  387. smpsNop macro val
  388.     dc.b    $E2,val
  389.     endm
  390.  
  391. ; Return (used after smpsCall)
  392. smpsReturn macro val
  393.     dc.b    $E3
  394.     endm
  395.  
  396. ; Fade in previous song (ie. 1-Up)
  397. smpsFade macro val
  398.     dc.b    $E4
  399.     endm
  400.  
  401. ; E5xx - Set channel tempo divider to xx
  402. smpsChanTempoDiv macro val
  403.     dc.b    $E5,val
  404.     endm
  405.  
  406. ; E6xx - Alter Volume by xx
  407. smpsAlterVol macro val
  408.     dc.b    $E6,val
  409.     endm
  410. sVol    equ $E6
  411.  
  412. ; E7 - Prevent attack of next note
  413. smpsNoAttack    equ $E7
  414. smpsNA  equ smpsNoAttack
  415. sNA equ smpsNoAttack
  416.  
  417. ; E8xx - Set note fill to xx
  418. smpsNoteFill macro val
  419.     if SourceDriver>=3
  420.     dc.b    $FA,val
  421.     else
  422.     dc.b    $E8,val
  423.     endif
  424.     endm
  425.  
  426. ; Add xx to channel pitch
  427. smpsAlterPitch macro val
  428.     dc.b    $E9,val
  429.     endm
  430.  
  431. smpsChangeTransposition macro val
  432.     dc.b    $E9,val
  433.     endm
  434.  
  435. ; Set music tempo modifier to xx
  436. smpsSetTempoMod macro val
  437.     dc.b    $EA
  438.     dc.b    val
  439.     endm
  440.  
  441. ; Set music tempo divider to xx
  442. smpsSetTempoDiv macro val
  443.     dc.b    $EB,val
  444.     endm
  445.  
  446. ; ECxx - Set Volume to xx
  447. smpsSetVol macro val
  448.     dc.b    $E4,val
  449.     endm
  450.  
  451. ; Works on all drivers
  452. smpsPSGAlterVol macro vol
  453.     dc.b    $EC,vol
  454.     endm
  455. spVol   equ $EC
  456.  
  457. ; Clears pushing sound flag in S1
  458. smpsClearPush macro
  459.     dc.b    $ED
  460.     endm
  461.  
  462. ; Stops special SFX (S1 only) and restarts overridden music track
  463. smpsStopSpecial macro
  464.     dc.b    $EE
  465.     endm
  466.  
  467. ; EFxx[yy] - Set Voice of FM channel to xx; xx < 0 means yy present
  468. smpsSetvoice macro voice,songID
  469.     dc.b    $EF,voice
  470.     endm
  471.  
  472. ; EFxx - Set Voice of FM channel to xx
  473. smpsFMvoice macro voice
  474.     dc.b    $EF,voice
  475.     endm
  476.  
  477. ; F0wwxxyyzz - Modulation - ww: wait time - xx: modulation speed - yy: change per step - zz: number of steps
  478. ; DeltaWooloo: I modified this to make the modulation accurate based on the sound source chosen for each song/SFX.
  479. smpsModSet macro wait,speed,change,step
  480.     dc.b    $F0
  481.     if SourceDriver>=3
  482.         dc.b    wait-1,speed,change,(step*speed-1)&$FF
  483.     else
  484.         dc.b    wait,speed,change,step
  485.     endif
  486.     endm
  487.  
  488. ; Turn on Modulation
  489. smpsModOn macro
  490.     dc.b    $F1
  491.     endm
  492.  
  493. ; F2 - End of channel
  494. smpsStop macro
  495.     dc.b    $F2
  496.     endm
  497.  
  498. ; F3xx - PSG waveform to xx
  499. smpsPSGform macro form
  500.     dc.b    $F3,form
  501.     endm
  502.  
  503. ; Turn off Modulation
  504. smpsModOff macro
  505.     dc.b    $F4
  506.     endm
  507.  
  508. ; Set Modulation
  509. smpsModChange macro val
  510.     dc.b    $F4,val
  511.     endm   
  512.  
  513. ; F5xx - PSG voice to xx
  514. smpsPSGvoice macro voice
  515.     dc.b    $F5,voice
  516.     endm
  517.  
  518. ; F6xxxx - Jump to xxxx
  519. smpsJump macro loc
  520.     dc.b    $F6
  521.     dc.w    loc-*-1
  522.     endm
  523.  
  524. ; F7xxyyzzzz - Loop back to zzzz yy times, xx being the loop index for loop recursion fixing
  525. smpsLoop macro index,loops,loc
  526.     dc.b    $F7
  527.     dc.b    index,loops
  528.     dc.w    loc-*-1
  529.     endm
  530.  
  531. ; F8xxxx - Call pattern at xxxx, saving return point
  532. smpsCall macro loc
  533.     dc.b    $F8
  534.     dc.w    loc-*-1
  535.     endm
  536.    
  537. ; FCxxxx - Jump to xxxx
  538. smpsContinuousLoop macro loc
  539.     dc.b    $FB
  540.     dc.w    loc-*-1
  541.     endm   
  542.    
  543. ; ---------------------------------------------------------------------------------------------
  544. ; Alter Volume
  545. smpsFMAlterVol macro val1,val2
  546.     dc.b    $E6,val1
  547.     endm
  548.  
  549. ; ---------------------------------------------------------------------------------------------
  550. ; S1/S2 only coordination flag
  551. ; Sets D1L to maximum volume (minimum attenuation) and RR to maximum for operators 3 and 4 of FM1
  552. smpsWeirdD1LRR macro
  553.     dc.b    $F9
  554.     endm
  555. ; ---------------------------------------------------------------------------------------------
  556. ; Macros for FM instruments
  557. ; Voices - Feedback
  558. smpsVcFeedback macro val
  559. vcFeedback = val
  560.     endm
  561.  
  562. ; Voices - Algorithm
  563. smpsVcAlgorithm macro val
  564. vcAlgorithm = val
  565.     endm
  566.  
  567. smpsVcUnusedBits macro val
  568. vcUnusedBits = val
  569.     endm
  570.  
  571. ; Voices - Detune
  572. smpsVcDetune macro op1,op2,op3,op4
  573. vcDT1 = op1
  574. vcDT2 = op2
  575. vcDT3 = op3
  576. vcDT4 = op4
  577.     endm
  578.  
  579. ; Voices - Coarse-Frequency
  580. smpsVcCoarseFreq macro op1,op2,op3,op4
  581. vcCF1 = op1
  582. vcCF2 = op2
  583. vcCF3 = op3
  584. vcCF4 = op4
  585.     endm
  586.  
  587. ; Voices - Rate Scale
  588. smpsVcRateScale macro op1,op2,op3,op4
  589. vcRS1 = op1
  590. vcRS2 = op2
  591. vcRS3 = op3
  592. vcRS4 = op4
  593.     endm
  594.  
  595. ; Voices - Attack Rate
  596. smpsVcAttackRate macro op1,op2,op3,op4
  597. vcAR1 = op1
  598. vcAR2 = op2
  599. vcAR3 = op3
  600. vcAR4 = op4
  601.     endm
  602.  
  603. ; Voices - Amplitude Modulation
  604. smpsVcAmpMod macro op1,op2,op3,op4
  605. vcAM1 = op1
  606. vcAM2 = op2
  607. vcAM3 = op3
  608. vcAM4 = op4
  609.     endm
  610.  
  611. ; Voices - First Decay Rate
  612. smpsVcDecayRate1 macro op1,op2,op3,op4
  613. vcD1R1 = op1
  614. vcD1R2 = op2
  615. vcD1R3 = op3
  616. vcD1R4 = op4
  617.     endm
  618.  
  619. ; Voices - Second Decay Rate
  620. smpsVcDecayRate2 macro op1,op2,op3,op4
  621. vcD2R1 = op1
  622. vcD2R2 = op2
  623. vcD2R3 = op3
  624. vcD2R4 = op4
  625.     endm
  626.  
  627. ; Voices - Decay Level
  628. smpsVcDecayLevel macro op1,op2,op3,op4
  629. vcDL1 = op1
  630. vcDL2 = op2
  631. vcDL3 = op3
  632. vcDL4 = op4
  633.     endm
  634.  
  635. ; Voices - Release Rate
  636. smpsVcReleaseRate macro op1,op2,op3,op4
  637. vcRR1 = op1
  638. vcRR2 = op2
  639. vcRR3 = op3
  640. vcRR4 = op4
  641.     endm
  642.  
  643. ; Voices - Total Level
  644. smpsVcTotalLevel macro op1,op2,op3,op4
  645. vcTL1 = op1
  646. vcTL2 = op2
  647. vcTL3 = op3
  648. vcTL4 = op4
  649.     dc.b    (vcUnusedBits<<6)+(vcFeedback<<3)+vcAlgorithm
  650.     dc.b    (vcDT4<<4)+vcCF4, (vcDT3<<4)+vcCF3, (vcDT2<<4)+vcCF2, (vcDT1<<4)+vcCF1
  651.     dc.b    (vcRS4<<6)+vcAR4, (vcRS3<<6)+vcAR3, (vcRS2<<6)+vcAR2, (vcRS1<<6)+vcAR1
  652.     dc.b    (vcAM4<<5)+vcD1R4, (vcAM3<<5)+vcD1R3, (vcAM2<<5)+vcD1R2, (vcAM1<<5)+vcD1R1
  653.     dc.b    vcD2R4, vcD2R3, vcD2R2, vcD2R1
  654.     dc.b    (vcDL4<<4)+vcRR4, (vcDL3<<4)+vcRR3, (vcDL2<<4)+vcRR2, (vcDL1<<4)+vcRR1
  655.     ;dc.b   vcTL4|vcTLMask4, vcTL3|vcTLMask3, vcTL2|vcTLMask2, vcTL1|vcTLMask1
  656.     if vcAlgorithm=7
  657.         dc.b    op4|$80
  658.     else
  659.         dc.b    op4
  660.     endif
  661.  
  662.     if vcAlgorithm>=4
  663.         dc.b    op3|$80
  664.     else
  665.         dc.b    op3
  666.     endif
  667.  
  668.     if vcAlgorithm>=5
  669.         dc.b    op2|$80
  670.     else
  671.         dc.b    op2
  672.     endif
  673.         dc.b    op1|$80
  674.     endm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement