DOS\pHQ(OB,xCOpNhJg,@)n&A"C( N @*h">(&/0<@2<N)@g~ l2< 'p Q$HC2< Q4<z9909EEvraRCBQ6<rarCBQ6<ra\CBQ6<raFSCBQ A ,"(H@0XHH@0XHHA0XHHA0,|?.?.-|=|-J=|Bn"lA~(rpg8 fr@` f@`$I&M@ p(QRA`<<=| 9g0.g=| Q-|=_=_-lBn,_Jg l0<@2<N"N,xNbPL,xCfd|oNJg @ hpNupNuJEf8`x0@@0@H@0000Nutopaz.fontgraphics.library" f" ,x,8 Where Amiga Memories Live On AMIGA DB  https://amigadb.net --- YOUR PORTAL TO AMIGA HISTORY --- ! Press mouse to boot !p@bBconmlkjihgfedc{E+xdemopbdBMX@ rHKH瀀,xN(@~JfA\NA\N.CpN+@ Jfn",g ,m N+@ LB0JgP ?f A~$v`"Hg Ae Zb) ` -f (qfP T  gS`*P$G jo($j$P"g,m N+@ jP CfE0"Jp,xN+@ gNE+"JpN+@ g<"<tA&+C B(<,m NvJg,xN|"GNLpNuA$A f| &,m N"gN`$VER: P61Con, The Player 6.1A Converter Version 610.4 / 16.06.1998becS Player 6.1A Converter!You need Usage: P61con [-q][filename] dos.libraryreqtools.librarypowerpacker.libraryVHK,xN+@ tpN skC dNC pN+@ "- g,m N"m +i. +i* aJm fH,m N. @p((#S@;@ m (m\0( @2- &A4A;B "2-ZAA;@V0(@2- (A4A;B $2-\AA;@XA ",m N4+@ gb @+h2 A x"m #H|p,m N"m $Ipr4<(6<m m NA |"m bfF#HB)I R0,2- (lSA46ll SBSC"J,m N,"L m p,m NJg(F`A R"m ҕN"~ m EH+J:+JN  fB"A.N2<@@0 m C."N( PG  fRJ`Jf m $hV*p$- s,xNĀfA dN$@ CONVf m +h ",m NB P Bm >B &B Bm / E+Z +Z & R+H 2X 2CHf`"_Jm g #|ERR!`Jm >g #|BRK!`#|DONE,xN`: JNJg"@$)(iN` @g f m ,m NB `n m +h ",m N0,&gS@gS@gS@gJ`DB &B Bm >Bm bgN J fp @p,m N+@ gbA E XJPgfS#?bhB"m ANCA JgfSAH+H 2pr.g QAHfA"m EG,m NJg m hCHJgf|/ ):fSAf"<H$<,m N"g"NAF(KCE,m NJg `"<H$<,m N+@ f AF(KCE,m NP ` &B Jm fx- gp- fh m C hJgf|/ ):fSA JgfSApr.g QAf"<$<,m N+@ / aah*_"m T - ,xN.B T - \g"@ - N.B \Jm >f"m Ap,m N"- ,m NB Jmbic >g "<HN"- gNB Jm >g "<NJm >f Jm f - gNAH"Jf|.infoB$<,m N.g"$< 3&<EN"NAHazAFI( - "- $"L""""""" l",CE,m N` hJ fJj SGzxvDL;@Ś;0Q`$GSGQ` @,܆Q.(#r(II#"LprgR`#"y TA|EG*~(zGSG| v6"7A7Z7Zp0J@GQSEkp7@GQE(zZ|)SFQbkV]$zL~(SG*z8z|(SF HGp @p,m N+@ gA E XJgfS#?B"m ANA"m EG,m NJgj m hCHJgf|/ ):fSAf"<H$<,m N+@ gT"$- T&- N"m TG< m P61AfXE~(SG$v6փ"- NE Q"- NB "m T - ,xN.B T - \g"@ - ",xN.B \`H.?b lg J.k S.xLNu(. S.LNu/ J. gpS. $nr` `f rp pf$rx xf*B^BJj6`2Jj(`$r@<Jj`r@IIf"m Ap,m N"- ,m NB Jm >g "<HN"- gNB Jm >g "<NJm >g$AF(KCE,m NJfBm >`v- gNAH"Jf|.infoB$<,m N(g"$< 3&<EN"NAHa - ѭ @"- ӭ Dѭ H - g"@ - &,xN.B m .+P .f m *,m NB *AFI( - @"- D$- H"L""""""CVEN`/C("" " l",AC(E"GH\+oqb~Q{mur_RqE+xAmigaDBE+xE#&rUsB\ JTpst]A^t =T EDIT-BACKUPrs -*^df0:demo uwv_devspvwۤwsystem-configurationuvp+y||x|ni`@ " ,EpsonX[CBM_MPS-1250]P BxyB\spyzu>z;B\startup-sequencexy;3)df0:c/border on df0:c/climaxx -c -t df0:boot.txt df0:demo {|n}|B\boot.txtp{}U Where Amiga Memories Live On __ _____ (__) / _ \ _____ __ _________ / /_\ \ / \| |/ ___\__ \ / | \ Y Y \ / /_/ > __ \_ \____|__ /__|_| /__\___ (____ / {;Z \/ \/ /_____/ \/DB https://AmigaDB.net --- YOUR PORTAL TO AMIGA HISTORY --- ~hB\cp7B\cls~m-] ?g $<Lv`$<Mv,yC@pN*@N"N"MNbpNudos.library Parameters are not required  7tB\border~󫔿HzHHI&TNJg,$! !N. n (gB" & @I<(X/BrQ >D@ Ư!RC":c4@g=3sUE_(ր`J`J7BkpS ЃaZ,o>܄U!H mp9Q>h@9*k7QGB G dmTQ ҫۮ[$E[5:!{a+Pă[Oҥ`*t4e$#> OJo"=@a1ܩ)7-$Ĥ@Z*1'ػ;/=I8 B[_`F<Brp;(uT{Ch9>6- F9X@#~lTNa"2S|w1 yd Qd=qh3a'1p@4Ґ $a*GB*1 p0p$0pI(40k 49@oyfMg\Al1 FF43xL3< <&͆o iac%yΆ>rJFOfLf90Mh1@ɋ|  IcE9BNo8ÙeQΆmq 'N8 SԹ[)tļ2@n䅽FxI)ɨ!Ii|%|HDR)Hћl:A9AІ@ZJ B\htype~ ,`mmNUH720|&P~Cp$,KN$@ J gprAQA"M$v,JN+@JfN|"$N&`N+@ <rHA,KNT+@Jf,JN|"$N&`nr @1|!| m+A+A+HgR mHHHg@phfp+@`pnfp+@`(HH+@A"C$ ,JNF`zJgzJgSJjAn~+H`zA+m~+HJfd"m Y+H+I gPB"$-,JNJg*N|.ptЀf~+mAB"C$ NF`~Jf"m i"(,JN m+@"$<N+@-N|."-NJf m+HA"C$ NF` -g8Jf2"$<N+@JfN|.+mA"C$ NF`Z -g"N "- Ja.Jg "-,JN"-,JNBJf"-NJgN|.ptЀf~"-,JN` -g"A$,JNF`Jgm "t,JN& 0f~`~ -g",JN -g",JN"m,KNN"-,JN"J,KNb`0|"P ipz!@ LLN]Nudos.libraryFROM/A/M,TO/K,OPT/K,HEX/S,NUMBER/S$VER: type 37.2 (21.1.91) Option '%lc' ignored Type can't do both HEX and NUMBER 2 No files to type TYPE can't open %s 0123456789ABCDEF%04lx: %s %5ld %sNUH72.,&Hp*+@",KN+@Rg2JfJf p m,zN8A`\9fNuRaC  gfBA"$<A,zhN+@g"tvN"-tvN+@ g,r,xN:+@g"-$-&- ,z N mB0"-,z NJg(Aca maAXa"m - ,xN.Nu m"h. iX (g"|0) 2) i,zN,zNNuJxgNur < ,xN: @(@C0< QNAp0RB RԈJfR RԈ 0fC,xNhr&Ё @"PrA 3@H@2B97A!xNuH瀀AHpR(T( V(X( Q9L3 Nsgraphics.library"<,xx N(N:JfNu  gSNu zg" -ff ( gJ(f NupNu"$vRJf,z0NAC!IC!I,xN+@pN+@C#mx;|"m) fJ iCg>EL" C8#A #AE#Jr#AE| #@(NAN+m -N -Nu1mCLIMax v1.0 0m33mby RIFF RAFF of UNITED FORCES 0mUsage: CLIMax [options] Options... -f Fullsize, -b Borderless, -c Clear window, -a Add21k, -t Type text, -s CLI Stars -n No Fastmem, -w Wait for mouse d-'0 p pbnr,xN"$<,m NLNuNu,xN|A,m N4+@ AzC !I!m I(( 2CE,m N f m h. h+h2 ,xNv m ,m N$m "Jp,m NAN"J @Npxrm JC,m Npxr$m JCNpxr?m JCN"Jp,m N"Jpyr@m 4<yvFm NNu,xNvX`aAV,m N4+@ g m $hV*p,xN JNJg"@$)(iN` @g& gD f m +hV,m N`gZ~gm0,&m `|J fp,m N+@ gDngbܧCgȹg`@A4"$<,m N(g&"$< &<N"N` aHzf`A4"$<,m N(g"$< &<N"NNuA"m E G1,m NJgE m hfA"m ҕ,m N"`A"m E GJ,m NJgjE `A"m E Gc,m NJgFE `I - j ` "g(A`NuC +I ,xN|A,m N4+@ AC !I!m (K"m L,m N g ,xNv` m h. h+h2 r(7C m p,m N,xNv m N m Jg (,xN"m b+A ),m N g @gJ@f m Jg,P `$ - gQ `C dJ)k,xN - g"@ - &,xN. - g "@,m N - g "@,m N - g "@,m N - g "@,m N"- g,m N"m ,xNb"m Nb - g"@Nb"- ,m Nd"m ,xNbLpNu m "m TB l- g"P61Ap(;@&S@rEd*QRA;A$,F<܈prEd*QRAA<+A L҈+A(HG-&SGEg-&SGdS*QSm$m$e` GRDm$e+F0m% - LAbХr H@0B@H@Q"m p,m N"m 0<r=m N"m ApNLI@,LrBQE*A-$O;G `Bm b"m X,<;| &m \aD$FT>-$SGPp0,m \l a m Xz$a>gm`~I&lrln aag a C`zllbs alaf XRElm"W mSmo +B;E ;A a, C`r -gPr2- XW P" T l@`R PRYYBBm Bm` Hz`0( X4Rm baQSm g$F4`̓ X;I"`ZB~fJ0@fBp+g"`k U P`jS P`\W P<jNR P`Dp+gJkRS P`,`(0@HHpU PJjR PXNuB~f:0@f2p+g`k`R`H<j>`8p+gJkR`$` 0@HbaHpJjXNu/rB` B`fHBp B`g.Bx Bpg"Jj>IBg2 g,R f$R` IJAj`Ig$NuH`GC&aAax L NuH"m ʑ,m N f0- `v6- b዆$m "Jp,m N"JpzCr%m N"JpzCr+m N "JpN"Jpyr%m tyCv+m N - L&- P዆"JpN"JpxCr@m N"JpxCrFm N "JpN"JpyCr@m 4<yvFm N"JpN - PAr H@0B@H@Q"J0<rFm N"JApN - L P$Ar H@0B@H@Q"J0<bA)x8rOm N"JApN2 - L p0A 0H@0"J0<{rOm N"JApNLGNup0-"Э Xr€Ё+@8 m $m4G"m T- gX>-$SGI$$Q- g)@- g)>-&SGQP"-8&2 T+C / "m \ - ,xN.B \"_- g~)SG|CBmEdBmB,Jm f Jm fzJQkg QgJmffH`I( L C@ 1gR` "m CS@ AFC%EA,m NLS@kg S@g:S@g S@fP)P`naJgl/&@(R8SD6Q`p0Ѐr&Ibe,xN:"KJg>&@(R8SD6Q(@6a$ajJf&Ip0Ѐ"B,xN."K`/,@0S@zxvDL;@&Ś;0 Qp0Ѐ&I"B,xN. "K`& @p0Ѐr&I,xN:"KNu"t4)j"x6` ҂҂68BI9|(9C9|9|@)@9C9|9|@a<9|a2(9D)A9D, vf9|p0Ѐ&I"_N."K`0,f^,fnNuXCRQJmg m T- gX+h,`D$m T$ "- v- gXXYRx8YD*P,m N$ "- &NY `"- $- T&- ,m NJm f- f- g,- f,-  mb-Wě A*"m T- gXX- gX(m(~G@x"J3@gP Qf$< tvH׭ NL`,v6k&J)kxփ- f$ H׭ NLCz:څARDH@"m ʑ,m N fLCQzNuLGXP >NuLCP >NuLGPP >NuHzH.S"LErzH J|xH@jDAAnQ`*H8QS6 H J|xH@jDAAnQ`*H8QSMSfLNu @H S LSfL`8P(a8+J+E$83D D g D fJmgsP83 D D g D fJmgs P83bl',0D D g D fJmgs0PGXJmg~?`~>(a mJjJ(kNf.Jgf4|A PY`@|A PY`.Jf R(A PY`+J+E$X`fR(A PY83D D g D fJmgsP83 D D g D fJmgs P830D D g D fJmgs0PGJmfQ` JGgGGpBmRm ba Sm fd8NuHp"m ʑ,m N f0- `v6- b዆$m "Jp,m N"JpzCrm N"JpzCr"m N "JpN"Jpyrm tyCv"m N - L&- P዆"JpN"JpxCr@m N"JbpxCrFm N "JpN"JpyCr@m 4<yvFm N"JpN - PAr H@0B@H@Q"J0<rFm N"JApN - L P$Ar H@0B@H@Q"J0<rOm N"JApN2 - L p0A 0H@0"J0<{rOm N"JApNLGNuH`z HDgr$MvPg TEQz`("A4B4; XN TIAHDg HD$- l Df 8<YAD +B l(XgA@0@HD錊LANu ((2<dFrJAgx`JAfx`~JAfx`tJAfx`j4BgIDA`ZbAfRx`LxAA`>JGgJmgxr`,P`$ A@cr@`4BB4; 0N ,AA`tAfx r`tAfrx`HA&- fBh`P m P61AfX(@@g (r,xN:+@ \g$@`@"m ,xNUg0 - &rN:Jgz m "@"- &2Sf"m +@ - &N. m pMaJ@fBLJm fpAFI(CHJm gC(CE,m NMaP - \g "@ m P61AfX (,xN.B \LJm fNuX`p ,xN``bNuNu`NuNu`D@b~2^H?>ABJPgM0:g S@g$`8apL|pNu P61AgY?pf0C,JEp@(f,IYGNr(/ISAx(8jDDKD,5@)F85@ĝ`&,J(jJk0U@k*I””Q8tvp0k:@*F(8`(88pBJ8JjkJp@(gB>Jj SGzxvDL;@Ś;0Q`$GSGQ` @,܆Q. _(/ C\EIKpr248:QCEPp%JQ$_'J`r(II'Ld"Lpf'Ih 7@p'LH(Ip0C'I&0C'If0C'Ib&ŷk0C'IAx'Hl7|?7|7| Bk B$Bk\Bk^BSp9@pM=@=@=@=@=|0S@gS@g"x )<g <` <OM'@ }7@@7@/Bkp,xpN@wkC'I@/ N"_#@A XB!HCx'ICAprNDJfPvC'IC'IvCp,xN'@xgj,@C0pNJgXC pNJfJM ;0J,@-v fS@@ - @C#p"zqzlP,_Nup`Nup=@=@=@=@=|9:"9Bk/Gp:g,zlCzbBSN,xJ+vg CN>B+vp:EkNPw,_Nu0:2:I=A2:(I=A2:\I=A2:I=ANuGBk&r kep7@Bк'@p@7@BkF"zh zRkB'I"z7@DHLC0'I&C'If0C'I0'HNuGJk:f z#zNuHz:|@~8RDzg L6 zbzKIzJm$g pU@0;N$HJ$z -@H0;N FnJSfp-m pqm o;@ 9m `JSfp-m mX o;|X 9m `rJSflp-m bVqc p@m l;@ 9m `LJSfFp-m jBm 9m `,p-Sf Bm=@k"m(88 ]7|p"z|`Smf0->=@k"m(9Q7|p"z|p-;@`0;g k-H`0-9{`Np-@m9{`8XX(\:}hS@. xqRR"}Y7{eQ>, ~wqLLxU3xcO<*bMfD }vpFFtP/u`L:(}vo@@oL+ r^J8&|un:: kH'p[H5${tm44fD#mYE3"zsm..b?kVC1 yrlX(\:}hS@. xR"b C;|Y7{eQ>, ~w~~LxU3xcO<* }vwwFtP/u`L:(}vqq@oL+ r^J8&{ukk: kH'p[H5${tdd4fD#mYE3"zs^^.b?kVC1 b! yr-- j Bm Bm<`p@m l ;@ ;@<`n;m <`f-- j Bm Bm<`p@m l;@ ;m <0-g:2-m mm m n ;@ Bm9@`m m m;@ Bm9m a Qиz gPNup-m pqm o ;@ 9@`9m `p-m mX o0<X;@ 9@`9m `NuJk^fK =D"m(9Q9m ;m =D"m Ё(I0Aj(p9@`m ``p-kep7@Bк '@p@7@BkF"zx z RkBj "z BkB'I"z 7@DHLC0'I&C'If0C'I0'H`-g-ggB`-g-vggB`-H0;N 6txxxrb$_P@\x-99`Dp~gB-B-m;@;r p-m pqm o;@ p~f&`H"$<,m NJkfp+@ L`."$< ~vN$"N kgL XPKF ~f&- f IMP! ~g"H,m N+@ $LJgB` - $H,xN:LJf p+@ B`\"/ "$<,m NJkfp+@ "_$ B"B,xN.`(.""W$&N$"N kg"_ QB a*L| - Nu+H+I+J+AA,CN+@ `H<8&H(HJ$K!!!$6kSO"Op"Q"O`pNuJg#SfeOpgpL><<|Quit|>><<|Quit| The Player 6.1A Version 610.4 / 16.06.1998 Copyright 1992-95 Jarno Paananen A Sahara Surfers (tm) Production b/L& The Player 6.1APreferencesLoadSavePlayS:P61A.prefs*%(*/(*%(**(( 2 3 X2 3 X2   _   <XQXcb0xXcXsXrXvXwtopaz.fontxpkmaster.libraryP61con.portP61.port d( ,'2<22=UUST-00:MODULESb1XCSYS:SYS:mod.P61.SMP.,@ ,, ~#  #  b2Q #   #   .#   ZN  Z j vN NN '=GW_c " HBHh`hh)b3OB+ n)***:++JV,, f-- Vi  )X+ Vz n)n+ 6JR b45@ V l  ~2 2jBN 1^11  2 2~( &"''2:JRb5:br(()) ** - B(  - ( n-    \N :b6oo z  N : zO' Convert Protracker module(s)Conveb7rt a P61A modulePlay a Player 6.1A modulePreferencesAboutDefault load dirDefault save dirDefault batch dirTwo files'P61A' signSAVELOADNo samplesTempoIconDeltaPack samplesDefault Player prefixDefault ProTracker prefixDefault sample prefix The Player 6.1A Version 610.4 / 16.06.1998 Copyright 1992-95 Jarno Paananen Fixed in 1998 by NoName and Platon42 A Sahara Surfers (tm) Production! b8L譭 Copyrights: This program and all other stuff coming in this package are FULLY copyrighted by Jarno Paananen / Guru of Sahara Surfers With the exception of Reqtools and Powerpacker libraries by Nico Franois BUT!: You are allowed to make additions or modifications or what so ever to the source to fit it to your own needs. That's why it is here. But, please: Credits for the author and maybe a copy to myself, if pb9\1 cossible, so I can add your new features to the future releases! Distribution: This program is freeware. You can distribute this as long as _ALL_ files are included and not more than a nominal fee for copying is asked. This program can _NOT_ be used for commercial purposes without written permission from the author and a contribution for development costs (like Coca-Cola :-). If you have suggestions or remarks about this program, or if you find any bugs, please let me b:Nknow. For commercial use, contact me for a licence!Special hellos to: Janne Oksanen! And in alphabetical order to: Timo Aila, Otto Chrons, Mikko Haapamki, Tommi Hakala, Sren Hannibal, Jussi Hartzell, John Hinge, Kari Huttunen, Janne Juhola, Teemu Kalvas, Petteri Kangaslampi, Mikko Karvonen Jarno Kilpi, Kari-Pekka Koljonen, Juha Lainema, Jouni Mannonen, Antti Mikkonen, Timo Mkel, Pauli Porkka, Markku Saarinen, Steffan Schumacher For moral support and more: The Ib;|-B-class of the Tampereen lyseon lukio Contact address: I'm improving this utility for my own use, but send me some $$$ (Finnish marks, please) or two disks with return envelope WITH stamps (or International Responce Coupon) and I'll send you the newest version (Mention which version you have, so I won't send the same version!) IF THESE CONDITIONS ARE NOT MET, ABSOLUTELY NO REPLY IS GUARANTEED! Also for licences for commercial use! TO: J.Paananen Puskalantie 6 3712b<L(p0 Nokia Finland Or by phone: +358-31-3422147 / Jarno Or preferably via Internet: jpaana@kauhajoki.fi or jpaana@freenet.hut.fi6("("("(%p6+ 0 < 0C `c `c 8 0 8 pF f f b @c     UUUUUPUUUUP}UPWP9PǜYP啜YP]P=Y\PY\Pb=\P\PW\PW\PW\PUYPUyPUPU|WPU@UP6vX  <  8 ჌ ၌  <        8  | UUUUUPUUUUPATP5P PkFVbr~ 6>jr > n < R d l ~    @ b f ~ 6:>JNhp "&BF^vz $,>BJn :>Vb?$rv~*.BFZ^z~BT\dvz $(BFN`dh $(BF`dh @@pb@|8@p=? ·~h?/p x @|>_0_x`@bA[H1a.?<x`p=? ·~h?/p?y@|?>_?1_x~`oA.?<x`rbB^H:{     E+xP6111-Play-stripped.ixpCߕQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!  ݿF01patch=1 nowaveforms=noshorts copdma=1-lev6 Custom_Block_Size=16 ifnd player61_i player61_i:set 1 ifnd exec_types_i exec_types_i:set 1 include_version:equ 40 extern_lib:macro xref _lvo\1 endm structure:macro \1:equ 0 soffset:set \2 endm fptr:macro \1:equ soffset soffset:set soffset+4 endm bool:macro \1:equ soffset soffset:set soffset+2 endm byte:macro \1:equ soffset soffset:set soffset+1 endm ubyte:macro \1:equ soffset soffset:set soffset+1 e8ndm word:macro \1:equ soffset soffset:set soffset+2 endm uword:macro \1:equ soffset soffset:set soffset+2 endm short:macro \1:equ soffset soffset:set soffset+2 endm ushort:macro \1:equ soffset soffset:set soffset+2 endm long:macro \1:equ soffset soffset:set soffset+4 endm ulong:macro \1:equ soffset soffset:set soffset+4 endm float:macro \1:equ soffset soffset:set soffset+4 endm double:macro \1:equ soffset soffset:set soffset+8 endm aptr:macro ʡ_@ \1:equ soffset soffset:set soffset+4 endm cptr:macro \1:equ soffset soffset:set soffset+4 endm rptr:macro \1:equ soffset soffset:set soffset+2 endm label:macro \1:equ soffset endm struct:macro \1:equ soffset soffset:set soffset+\2 endm alignword:macro soffset:set (soffset+1)&$fffffffe endm alignlong:macro soffset:set (soffset+3)&$fffffffc endm enum:macro ifc '\1','' eoffset:set 0 endc ifnc '\1','' eoffset:set \1 endc endm eitem:macro \1:e5qu eoffset eoffset:set eoffset+1 endm bitdef0:macro \1\3\2:equ \4 endm bitdef:macro bitdef0 \1,\2,b_,\3 \@bitdef:set 1<<\3 bitdef0 \1,\2,f_,\@bitdef endm library_minimum:equ 33 endc structure Player_Header,0 ulong P61_InitOffset ulong P61_MusicOffset ulong P61_EndOffset ulong P61_SetRepeatOffset ulong P61_SetPositionOffset uword P61_MasterVolume uword P61_UseTempo uword P61_PlayFlag uword P61_E8_info aptr P61_UseVBR uword P61_Position uword`} P61_Pattern uword P61_Row aptr P61_Cha0Offset aptr P61_Cha1Offset aptr P61_Cha2Offset aptr P61_Cha3Offset label Player_Header_SIZE structure Channel_Block,0 ubyte P61_SN_Note ubyte P61_Command ubyte P61_Info ubyte P61_Pack aptr P61_Sample uword P61_OnOff aptr P61_ChaPos aptr P61_TempPos uword P61_TempLen uword P61_Note uword P61_Period uword P61_Volume uword P61_Fine uword P61_Offset uword P61_LOffset uword P61_ToPeriod uword P61_TPSpe ed ubyte P61_VibCmd ubyte P61_VibPos ubyte P61_TreCmd ubyte P61_TrePos uword P61_RetrigCount ubyte P61_Funkspd ubyte P61_Funkoff aptr P61_Wave uword P61_TData aptr P61_TChaPos aptr P61_TTempPos uword P61_TTempLen uword P61_Shadow ifne oscillo aptr P61_oscptr uword P61_oscptrrem aptr P61_oscptrWrap endc uword P61_DMABit label Channel_Block_Size structure Sample_Block,0 aptr P61_SampleOffset uword P61_SampleLength aptr P61_RepeatOffset ίuword P61_RepeatLength uword P61_SampleVolume uword P61_FineTune label Sample_Block_SIZE P61_ft=usecode&1 P61_pu=usecode&2 P61_pd=usecode&4 P61_tp=usecode&40 P61_vib=usecode&80 P61_tpvs=usecode&32 P61_vbvs=usecode&64 P61_tre=usecode&$80 P61_arp=usecode&$100 P61_sof=usecode&$200 P61_vs=usecode&$400 P61_pj=usecode&$800 P61_vl=usecode&$1000 P61_pb=usecode&$2800 P61_sd=usecode&$8000 P61_ec=usecode&$ffff0000 P61_fi=usecode&$10000 P61_fsu=usecode&$20000 P61_fsd=usegXcode&$40000 P61_sft=usecode&$200000 P61_pl=usecode&$400000&((1-split4)*$400000) P61_timing=usecode&$1000000 P61_rt=usecode&$2000000 P61_fvu=usecode&$4000000 P61_fvd=usecode&$8000000 P61_nc=usecode&$10000000 P61_nd=usecode&$20000000 P61_pde=usecode&$40000000 P61_il=usecode&$80000000 endc ifne asmonereport printt "" printt "Options used:" printt "-------------" ifne p61fade printt "Mastervolume on" else printt "Mastervolume off" endc ifne p61system pri ntt "System friendly" else printt "System killer" endc ifne p61cia printt "CIA-tempo on" else printt "CIA-tempo off" endc ifne p61exec printt "ExecBase valid" else printt "ExecBase invalid" endc ifne lev6 printt "Level 6 IRQ on" else ifeq (noshorts&(1-p61system)) printt "FAIL: Non-lev6 NOT available for p61system=1 or noshorts=0!" else printt "Non-lev6 implemented with 'poke DMAbits byte to a specified address'." printt "* READ DOCS for how t Jko specify it and how it works." endc endc ifne opt020 printt "MC68020 optimizations" else printt "Normal MC68000 code" endc printt "Channels:" printv channels ifgt channels-4 printt "FAIL: More than 4 channels." endc ifeq channels printt "FAIL: Can't have 0 channels." endc printt "UseCode:" printv usecode printt "Player binary size:" printv P61E-P61B endc P61B: P61_motuuli: jmp P61_Init(PC) ifeq p61cia jmp P61_Music(PC) else rts r .ts endc jmp P61_End(PC) rts rts ifne p61jump jmp P61_SetPosition(PC) else rts rts endc P61_Master: dc.w 64 P61_Tempo: dc.w 1 P61_Play: dc.w 1 P61_E8: dc.w 0 P61_VBR: dc.l 0 P61_Pos: dc.w 0 P61_Patt: dc.w 0 P61_CRow: dc.w 0 P61_Temp0Offset: dc.l P61_temp0-P61_motuuli P61_Temp1Offset: dc.l P61_temp1-P61_motuuli P61_Temp2Offset: dc.l P61_temp2-P61_motuuli P61_Temp3Offset: dc.l P61_temp3-P61_motuuli P61_getnote:macro moveq #$7e,d "Vֺ0 and.b (a5),d0 beq.b .nonote ifne P61_vib clr.b P61_VibPos(a5) endc ifne P61_tre clr.b P61_TrePos(a5) endc ifne P61_ft add P61_Fine(a5),d0 endc move d0,P61_Note(a5) move (a2,d0),P61_Period(a5) .nonote: endm ifeq p61system ifne p61cia P61_intti: movem.l d0-a6,-(sp) tst.b $bfdd00 lea $dff000+C,a6 move #$2000,$9c-C(a6) move #$2000,$9c-C(a6) bsr P61_Music movem.l (sp)+,d0-a6 nop rte endc endc ifne p61system P61_lev6server: mov ԰rem.l d2-d7/a2-a6,-(sp) lea P61_timeron(pc),a0 tst (a0) beq.b P61_ohi lea $dff000+C,a6 move P61_server(pc),d0 beq.b P61_musica subq #1,d0 beq P61_dmason ifeq nowaveforms bra P61_setrepeat else bra.b P61_ohi endc P61_musica: bsr P61_Music P61_ohi: movem.l (sp)+,d2-d7/a2-a6 moveq #1,d0 rts endc P61_Init: lea $dff000+C,a6 ifeq p61system ifne quietstart move.w #$f,$96-C(A6) lea $a0-C(A6),a5 lea P61_Quiet(PC),a3 moveq #0,d1 moveq #chang[nels-1,d5 .choffl:move.l a3,(a5)+ move.l #1<<16+124,(a5)+ move.l d1,(a5)+ addq.w #4,a5 dbf d5,.choffl endc endc cmp.l #"P61A",(a0)+ beq.b .modok subq.l #4,a0 .modok: ifne p61cia move d0,-(sp) endc moveq #0,d0 cmp.l d0,a1 bne.b .redirect move (a0),d0 lea (a0,d0.l),a1 .redirect: move.l a2,a6 lea 8(a0),a2 moveq #$40,d0 and.b 3(a0),d0 bne.b .buffer move.l a1,a6 subq.l #4,a2 .buffer: lea P61_cn(pc),a3 move.w #$ff00,d1 move.w d1,P61!]_OnOff+P61_temp0-P61_cn(a3) move.w d1,P61_OnOff+P61_temp1-P61_cn(a3) move.w d1,P61_OnOff+P61_temp2-P61_cn(a3) move.w d1,P61_OnOff+P61_temp3-P61_cn(a3) ifne copdma move.l a4,p61_DMApokeAddr-P61_cn(a3) endc moveq #$1f,d1 and.b 3(a0),d1 move.l a0,-(sp) lea P61_samples(pc),a4 subq #1,d1 moveq #0,d4 P61_lopos: move.l a6,(a4)+ move (a2)+,d4 bpl.b P61_kook neg d4 lea P61_samples-16(pc),a5 ifeq opt020 asl #4,d4 move.l (a5,d4),d6 else add d4,d4 m4ove.l (a5,d4*8),d6 endc move.l d6,-4(a4) ifeq opt020 move 4(a5,d4),d4 else move 4(a5,d4*8),d4 endc sub.l d4,a6 sub.l d4,a6 bra.b P61_jatk P61_kook: move.l a6,d6 tst.b 3(a0) bpl.b P61_jatk tst.b (a2) bmi.b P61_jatk move d4,d0 subq #2,d0 bmi.b P61_jatk move.l a1,a5 move.b (a5)+,d2 sub.b (a5),d2 move.b d2,(a5)+ .loop:sub.b (a5),d2 move.b d2,(a5)+ sub.b (a5),d2 move.b d2,(a5)+ dbf d0,.loop P61_jatk: move d4,(a4)+ moveq #0,d2 mo-Bcve.b (a2)+,d2 moveq #0,d3 move.b (a2)+,d3 moveq #0,d0 move (a2)+,d0 bmi.b .norepeat move d4,d5 sub d0,d5 move.l d6,a5 add.l d0,a5 add.l d0,a5 move.l a5,(a4)+ move d5,(a4)+ bra.b P61_gene .norepeat: move.l d6,(a4)+ move #1,(a4)+ P61_gene: move d3,(a4)+ moveq #$f,d0 and d2,d0 mulu #74,d0 move d0,(a4)+ tst -6(a2) bmi.b .nobuffer moveq #$40,d0 and.b 3(a0),d0 beq.b .nobuffer move d4,d7 tst.b d2 bpl.b .copy subq #1,d7 moveq #0,d\-5 moveq #0,d4 .lo:move.b (a1)+,d4 moveq #$f,d3 and d4,d3 lsr #4,d4 sub.b .table(pc,d4),d5 move.b d5,(a6)+ sub.b .table(pc,d3),d5 move.b d5,(a6)+ dbf d7,.lo bra.b .kop .copy: add d7,d7 subq #1,d7 .cob: move.b (a1)+,(a6)+ dbf d7,.cob bra.b .kop .table: dc.b 0,1,2,4,8,16,32,64,128,-64,-32,-16,-8,-4,-2,-1 .nobuffer: move.l d4,d6 add.l d6,d6 add.l d6,a6 add.l d6,a1 .kop: dbf d1,P61_lopos move.l (sp)+,a0 and.b #$7f,3(a0) move.l a2,-(sp)b_ lea P61_temp0(pc),a1 lea P61_temp1(pc),a2 lea P61_temp2(pc),a4 lea P61_temp3(pc),a5 moveq #Channel_Block_Size/2-2,d0 moveq #0,d1 .cl:move d1,(a1)+ move d1,(a2)+ move d1,(a4)+ move d1,(a5)+ dbf d0,.cl lea P61_temp0-P61_cn(a3),a1 lea P61_emptysample-P61_cn(a3),a2 moveq #channels-1,d0 .loo: move.l a2,P61_Sample(a1) lea Channel_Block_Size(a1),a1 dbf d0,.loo move.l (sp)+,a2 move.l a2,P61_positionbase-P61_cn(a3) moveq #$7f,d1 and.b 2(a0),d1 ifeq"dX opt020 lsl #3,d1 lea (a2,d1.l),a4 else lea (a2,d1.l*8),a4 endc move.l a4,P61_possibase-P61_cn(a3) move.l a4,a1 moveq #-1,d0 .search: cmp.b (a1)+,d0 bne.b .search move.l a1,P61_patternbase-P61_cn(a3) move.l a1,d0 sub.l a4,d0 subq.w #1,d0 move d0,P61_slen-P61_cn(a3) add.w P61_InitPos(pc),a4 moveq #0,d0 move.b (a4)+,d0 move.l a4,P61_spos-P61_cn(a3) lsl #3,d0 add.l d0,a2 move.l a1,a4 moveq #0,d0 move (a2)+,d0 lea (a4,d0.l),a1 move.l am1,P61_ChaPos+P61_temp0-P61_cn(a3) move (a2)+,d0 lea (a4,d0.l),a1 move.l a1,P61_ChaPos+P61_temp1-P61_cn(a3) move (a2)+,d0 lea (a4,d0.l),a1 move.l a1,P61_ChaPos+P61_temp2-P61_cn(a3) move (a2)+,d0 lea (a4,d0.l),a1 move.l a1,P61_ChaPos+P61_temp3-P61_cn(a3) ifeq nowaveforms lea P61_setrepeat(pc),a0 move.l a0,P61_intaddr-P61_cn(a3) endc move #63,P61_rowpos-P61_cn(a3) move #6,P61_speed-P61_cn(a3) move #5,P61_speed2-P61_cn(a3) clr P61_speedis1-P61_cn(a3) iݠVfne P61_pl clr.l P61_plcount-P61_cn(a3) endc ifne P61_pde clr P61_pdelay-P61_cn(a3) clr P61_pdflag-P61_cn(a3) endc clr (a3) moveq #2,d0 and.b $bfe001,d0 move.b d0,P61_ofilter-P61_cn(a3) bset #1,$bfe001 ifeq p61system ifne p61exec move.l 4.w,a6 moveq #0,d0 btst d0,297(a6) beq.b .no68010 lea P61_liko(pc),a5 jsr -$1e(a6) .no68010: move.l d0,P61_VBR-P61_cn(a3) endc move.l P61_VBR-P61_cn(a3),a0 lea $78(a0),a0 move.l a0,P61_vektori-P61_cn(a3޴) move.l (a0),P61_oldlev6-P61_cn(a3) ifeq copdma lea P61_dmason(pc),a1 move.l a1,(a0) endc endc moveq #$f,d0 lea $dff000+C,a6 ifeq quietstart moveq #$0,d1 move d1,$a8-C(a6) move d1,$b8-C(a6) move d1,$c8-C(a6) move d1,$d8-C(a6) move d0,$96-C(a6) endc ifne nowaveforms move.w d0,P61_NewDMA-P61_cn(a3) endc ifeq p61system ifeq copdma lea P61_dmason(pc),a1 move.l a1,(a0) endc move #$2000,$9a-C(a6) lea $bfd000,a0 lea P61_timers(pc),a1 ~Եmove.b #$7f,$d00(a0) ifne p61cia move.b #$10,$e00(a0) endc move.b #$10,$f00(a0) ifne p61cia move.b $400(a0),(a1)+ move.b $500(a0),(a1)+ else addq.w #2,a1 endc move.b $600(a0),(a1)+ move.b $700(a0),(a1) endc ifeq (p61system+p61cia) move.b #$82,$d00(a0) endc ifne p61cia move (sp)+,d0 subq #1,d0 beq.b P61_ForcePAL subq #1,d0 beq.b P61_NTSC ifne p61exec move.l 4.w,a1 cmp.b #60,$213(a1) beq.b P61_NTSC endc P61_ForcePAL: move.l #1773v447,d0 bra.b P61_setcia P61_NTSC: move.l #1789773,d0 P61_setcia: move.l d0,P61_timer-P61_cn(a3) divu #125,d0 move d0,P61_thi2-P61_cn(a3) sub #$1f0*2,d0 move d0,P61_thi-P61_cn(a3) ifeq p61system move P61_thi2-P61_cn(a3),d0 move.b d0,$400(a0) lsr #8,d0 move.b d0,$500(a0) lea P61_intti(pc),a1 move.l a1,P61_tintti-P61_cn(a3) move.l P61_vektori(pc),a2 move.l a1,(a2) move.b #$83,$d00(a0) move.b #$11,$e00(a0) endc endc ifeq p61system ifeq copdma* move #$e000,$9a-C(a6) else move #$c000,$9a-C(a6) endc ifne quietstart move.w #$800f,$96-C(A6) endc moveq #0,d0 rts ifne p61exec P61_liko: dc.l $4E7A0801 rte endc endc ifne p61system move.l a6,-(sp) ifne p61cia clr P61_server-P61_cn(a3) else move #1,P61_server-P61_cn(a3) endc move.l 4.w,a6 moveq #-1,d0 jsr -$14a(a6) move.b d0,P61_sigbit-P61_cn(a3) bmi P61_err lea P61_allocport(pc),a1 move.l a1,P61_portti-P61_cn(a3) move.b d0,!15(a1) move.l a1,-(sp) suba.l a1,a1 jsr -$126(a6) move.l (sp)+,a1 move.l d0,16(a1) lea P61_reqlist(pc),a0 move.l a0,(a0) addq.l #4,(a0) clr.l 4(a0) move.l a0,8(a0) lea P61_dat(pc),a1 move.l a1,P61_reqdata-P61_cn(a3) lea P61_allocreq(pc),a1 lea P61_audiodev(pc),a0 moveq #0,d0 moveq #0,d1 jsr -$1bc(a6) tst.l d0 bne P61_err st.b P61_audioopen-P61_cn(a3) lea P61_timerint(pc),a1 move.l a1,P61_timerdata-P61_cn(a3) lea P61_lev6server(pc),a1 moϾve.l a1,P61_timerdata+8-P61_cn(a3) moveq #0,d3 lea P61_cianame(pc),a1 P61_openciares: moveq #0,d0 move.l 4.w,a6 jsr -$1f2(a6) move.l d0,P61_ciares-P61_cn(a3) beq.b P61_err move.l d0,a6 lea P61_timerinterrupt(pc),a1 moveq #0,d0 jsr -6(a6) tst.l d0 beq.b P61_gottimer addq.l #4,d3 lea P61_timerinterrupt(pc),a1 moveq #1,d0 jsr -6(a6) tst.l d0 bne.b P61_err P61_gottimer: lea P61_craddr+8(pc),a6 move.l P61_ciaaddr(pc,d3),d0 move.l d0,(a6) subv& #$100,d0 move.l d0,-(a6) moveq #2,d3 btst #9,d0 bne.b P61_timerB subq.b #1,d3 add #$100,d0 P61_timerB: add #$900,d0 move.l d0,-(a6) move.l d0,a0 and.b #%10000000,(a0) move.b d3,P61_timeropen-P61_cn(a3) moveq #0,d0 ifne p61cia move.l P61_craddr+4(pc),a1 move.b P61_tlo(pc),(a1) move.b P61_thi(pc),$100(a1) endc or.b #$19,(a0) st P61_timeron-P61_cn(a3) P61_pois: move.l (sp)+,a6 rts P61_err:moveq #-1,d0 bra.b P61_pois P61_ciaaddr: dc.l $bWޛfd500,$bfd700 endc P61_End: lea $dff000+C,a6 moveq #0,d0 move d0,$a8-C(a6) move d0,$b8-C(a6) move d0,$c8-C(a6) move d0,$d8-C(a6) move #$f,$96-C(a6) and.b #%11111101,$bfe001 move.b P61_ofilter(pc),d0 or.b d0,$bfe001 ifeq p61system move #$2000,$9a-C(a6) move.l P61_vektori(pc),a0 move.l P61_oldlev6(pc),(a0) lea $bfd000,a0 lea P61_timers(pc),a1 ifne p61cia move.b (a1)+,$400(a0) move.b (a1)+,$500(a0) else addq.w #2,a1 endc move.b (a1)+,$600cB(a0) move.b (a1)+,$700(a0) ifne p61cia move.b #$10,$e00(a0) endc move.b #$10,$f00(a0) else move.l a6,-(sp) lea P61_cn(pc),a3 moveq #0,d0 clr P61_timeron-P61_cn(a3) move.b P61_timeropen(pc),d0 beq.b P61_rem1 move.l P61_ciares(pc),a6 lea P61_timerinterrupt(pc),a1 subq.b #1,d0 jsr -12(a6) P61_rem1: move.l 4.w,a6 tst.b P61_audioopen-P61_cn(a3) beq.b P61_rem2 lea P61_allocreq(pc),a1 jsr -$1c2(a6) clr.b P61_audioopen-P61_cn(a3) P61_rem2: move `q #0,d0 move.b P61_sigbit(pc),d0 bmi.b P61_rem3 jsr -$150(a6) st P61_sigbit-P61_cn(a3) P61_rem3: move.l (sp)+,a6 endc rts ifne p61fade P61_mfade: lea $dff0a8,a4 move P61_Master(pc),d0 move P61_temp0+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,(a4) ifgt channels-1 move P61_temp1+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,$10(a4) endc ifgt channels-2 move P61_temp2+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,$20(a4) endc !# ifgt channels-3 move P61_temp3+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,$30(a4) endc rts endc ifne oscillo oscextloops=0 oscbigempty=0 ticksframePAL=70937*4+2 ticksframeNTSC=59719*4+3 P61_osc: move.w P61_Period(a0),d4 bne.b .non0 .div0:lea Channel_Block_Size(a0),a0 moveq #0,d1 rts .non0: lea P61_oscptr(a0),a0 move.l (a0)+,d0 moveq #3,d3 and.l d0,d3 move.l d0,d2 addq.l #2,d2 lsr.l #2,d2 move.l d2,a2 move.l #ticksframePAL,d2 div"ku d4,d2 moveq #0,d1 move.w d2,d1 clr.w d2 divu d4,d2 add.w d2,(a0)+ addx.l d1,d0 move.l d0,-6(a0) move.l d0,d1 addq.l #2,d1 lsr.l #2,d1 sub.l a2,d1 moveq #0,d2 sub.l (a0)+,d0 blt.b .nowr move.l P61_Sample-P61_DMABit(a0),a1 ifeq oscbigempty move.w 10(a1),d2 subq.w #1,d2 endc move.l 6(a1),a1 ifne oscbigempty bne.b .nol1 lea P61_emptyloop578(PC),a1 .nol1: endc ifeq oscbigempty addq.l #1,d2 add.l d2,d2 else move.l #P61_emptyquiet#,578E-P61_emptyquiet578,d2 endc move.l a1,d4 lsl.l #2,d4 or.b d3,d4 addq.w #2,d0 lsr.w #2,d0 move.l d0,d3 ifeq oscextloops divu d2,d3 clr.w d3 swap d3 endc add.w d3,d3 add.w d3,d3 add.l d4,d3 move.l d3,-10(a0) move.l d2,d4 add.l a1,d2 move.l d2,d3 lsl.l #2,d3 move.l d3,-4(a0) bra.s .ct .nowr: move.l d2,d4 addq.l #2,d0 asr.l #2,d0 .ct: addq.w #2,a0 tst.w d1 RTS ifne oscbigempty P61_emptyloop578: dcb.w 578/2,0 P61_emptyloop$dee578E: endc endc ifne p61jump P61_SetPosition: lea P61_cn(pc),a3 ifne split4 move.w P61_speed2(PC),d1 subq.w #3,d1 else move.w P61_speed2(PC),d1 subq.w #1,d1 endc move.w d1,(a3) ifne P61_pl clr P61_plflag-P61_cn(a3) endc moveq #0,d1 move.b d0,d1 move.l d1,d0 ifeq optjmp cmp P61_slen-P61_cn(a3),d0 blo.b .e moveq #0,d0 .e: endc move d0,P61_Pos-P61_cn(a3) add.l P61_possibase(pc),d0 move.l d0,P61_spos-P61_cn(a3) moveq #63,d0 move d%}X0,P61_rowpos-P61_cn(a3) clr P61_CRow-P61_cn(a3) move.l P61_spos(pc),a1 move.l P61_patternbase(pc),a0 addq #1,P61_Pos-P61_cn(a3) move.b (a1)+,d0 move.l a1,P61_spos-P61_cn(a3) move.l P61_positionbase(pc),a1 move d0,P61_Patt-P61_cn(a3) lsl #3,d0 add.l d0,a1 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp0-P61_cn(a3) moveq #0,d0 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp1-P61_cn(a3) moveq #0,d0 move.w (a1)+,d0 add.l a0,d0 &OS move.l d0,P61_ChaPos+P61_temp2-P61_cn(a3) moveq #0,d0 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp3-P61_cn(a3) lea P61_temp0(PC),a3 clr.b P61_Pack+Channel_Block_Size*0(a3) clr.b P61_Pack+Channel_Block_Size*1(a3) clr.b P61_Pack+Channel_Block_Size*2(a3) clr.b P61_Pack+Channel_Block_Size*3(a3) clr.b P61_TempLen+1+Channel_Block_Size*0(a3) clr.b P61_TempLen+1+Channel_Block_Size*1(a3) clr.b P61_TempLen+1+Channel_Block_Size*2(a3) clr.b P61_TempLen+1+C'C)Lhannel_Block_Size*3(a3) move.w #$ff00,d0 move.w d0,P61_OnOff+Channel_Block_Size*0(a3) move.w d0,P61_OnOff+Channel_Block_Size*1(a3) move.w d0,P61_OnOff+Channel_Block_Size*2(a3) move.w d0,P61_OnOff+Channel_Block_Size*3(a3) clr.b P61_dma+1-P61_temp0(a3) move.w #$000f,$96-C(A6) ifne nowaveforms clr P61_NewDMA-P61_temp0(a3) endc ifne copdma move.l p61_DMApokeAddr(PC),a3 clr.b (a3) endc rts endc P61_Music: lea P61_cn(pc),a3 moveq #0,d7 lea $a0-C(a6),a(4 ifne playflag tst P61_Play-P61_cn(a3) bne.b P61_ohitaaa ifne p61cia ifne p61system move.l P61_craddr+4(pc),a0 move.b P61_tlo2(pc),(a0) move.b P61_thi2(pc),$100(a0) endc endc rts endc P61_ohitaaa: ifne visuctrs addq.w #1,P61_visuctr0-P61_cn(a3) addq.w #1,P61_visuctr1-P61_cn(a3) addq.w #1,P61_visuctr2-P61_cn(a3) addq.w #1,P61_visuctr3-P61_cn(a3) endc ifne p61fade pea P61_mfade(pc) endc move.w (a3),d4 cmp.w P61_speed2(pc),d4 beq.w P61_p) Rlaytime ifeq suppF01 blt.b P61_nowrap endc ifeq suppF01 ifne nowaveforms move.b P61_dma+1-P61_cn(a3),P61_NewDMA+1-P61_cn(a3) endc clr.w d4 subq #1,P61_rowpos-P61_cn(a3) bpl.b P61_nonewpatt P61_nextpattern: ifne P61_pl move d7,P61_plflag-P61_cn(a3) endc move.l P61_patternbase(pc),a0 moveq #63,d0 move d0,P61_rowpos-P61_cn(a3) move d7,P61_CRow-P61_cn(a3) move.l P61_spos(pc),a1 addq #1,P61_Pos-P61_cn(a3) move.b (a1)+,d0 bpl.b P61_dk move.l P61*_??_possibase(pc),a1 move.b (a1)+,d0 move d7,P61_Pos-P61_cn(a3) P61_dk: move.l a1,P61_spos-P61_cn(a3) move d0,P61_Patt-P61_cn(a3) lsl #3,d0 move.l P61_positionbase(pc),a1 add.l d0,a1 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp0-P61_cn(a3) moveq #0,d0 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp1-P61_cn(a3) moveq #0,d0 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp2-P61_cn(a3) moveq #0,d0 move.w (a1)+,d0 add++-S.l a0,d0 move.l d0,P61_ChaPos+P61_temp3-P61_cn(a3) bra.b P61_nowrap P61_nonewpatt: moveq #63,d0 sub P61_rowpos-P61_cn(a3),d0 move d0,P61_CRow-P61_cn(a3) endc P61_nowrap: addq.w #1,d4 move d4,(a3) P61_delay: ifne nowaveforms move.w P61_NewDMA(PC),d5 beq.b .nosetloops move.l P61_Sample+P61_temp0(PC),a0 move.l 6(a0),(a4) move.w 10(a0),4(a4) ifgt channels-1 move.l P61_Sample+P61_temp1(PC),a0 move.l 6(a0),$10(a4) move.w 10(a0),$14(a4) endc ifgt c,Ohannels-2 move.l P61_Sample+P61_temp2(PC),a0 move.l 6(a0),$20(a4) move.w 10(a0),$24(a4) endc ifgt channels-3 move.l P61_Sample+P61_temp3(PC),a0 move.l 6(a0),$30(a4) move.w 10(a0),$34(a4) endc move.w d7,P61_NewDMA-P61_cn(a3) .nosetloops: endc ifne p61cia ifne p61system move.l P61_craddr+4(pc),a0 move.b P61_tlo2(pc),(a0) move.b P61_thi2(pc),$100(a0) endc endc lea P61_temp0(pc),a5 moveq #channels-1,d5 P61_lopas: tst.b P61_OnOff+1(a5) beq.w P-s 61_contfxdone moveq #$f,d0 and (a5),d0 ifeq opt020 add d0,d0 move P61_jtab2(pc,d0),d0 else move P61_jtab2(pc,d0*2),d0 endc jmp P61_jtab2(pc,d0) P61_jtab2: dc P61_contfxdone-P61_jtab2 ifne P61_pu dc P61_portup-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_pd dc P61_portdwn-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_tp dc P61_toneport-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_vib dc P61_vib2-. P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_tpvs dc P61_tpochvslide-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_vbvs dc P61_vibochvslide-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_tre dc P61_tremo-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_arp dc P61_arpeggio-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc dc P61_contfxdone-P61_jtab2 ifne P61_vs dc P61_volslide-P61_jtab2 else /*0 dc P61_contfxdone-P61_jtab2 endc dc P61_contfxdone-P61_jtab2 dc P61_contfxdone-P61_jtab2 dc P61_contfxdone-P61_jtab2 ifne P61_ec dc P61_contecommands-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc dc P61_contfxdone-P61_jtab2 ifne P61_ec P61_contecommands: move.b P61_Info(a5),d0 and #$f0,d0 lsr #3,d0 move P61_etab2(pc,d0),d0 jmp P61_etab2(pc,d0) P61_etab2: dc P61_contfxdone-P61_etab2 ifne P61_fsu dc P61_fineup2-P61_etab2 else dc P61_contfx0Usdone-P61_etab2 endc ifne P61_fsd dc P61_finedwn2-P61_etab2 else dc P61_contfxdone-P61_etab2 endc dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 ifne P61_rt dc P61_retrig-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_fvu dc P61_finevup2-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_fvd dc P61_fine1Nvdwn2-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_nc dc P61_notecut-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_nd dc P61_notedelay-P61_etab2 else dc P61_contfxdone-P61_etab2 endc dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 endc ifne P61_fsu P61_fineup2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 sub d0,P61_Period(a5) moveq #113,d0 cmp P61_Period(a5),d0 ble.b .jup move d0,23|P61_Period(a5) .jup:move P61_Period(a5),6(a4) bra.w P61_contfxdone endc ifne P61_fsd P61_finedwn2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 add d0,P61_Period(a5) cmp #856,P61_Period(a5) ble.b .jup move #856,P61_Period(a5) .jup:move P61_Period(a5),6(a4) bra.w P61_contfxdone endc ifne P61_fvu P61_finevup2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 add d0,P61_Volume(a5) moveq #64,d0 cmp P61_Volu3޿me(a5),d0 bge.b .jup move d0,P61_Volume(a5) .jup:move P61_Volume(a5),8(a4) bra.w P61_contfxdone endc ifne P61_fvd P61_finevdwn2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 sub d0,P61_Volume(a5) bpl.b .jup move d7,P61_Volume(a5) .jup:move P61_Volume(a5),8(a4) bra.w P61_contfxdone endc ifne P61_nc P61_notecut: moveq #$f,d0 and.b P61_Info(a5),d0 cmp (a3),d0 bne.w P61_contfxdone ifeq p61fade move d7,8(a4) else move d4KI7,P61_Shadow(a5) endc move d7,P61_Volume(a5) bra.w P61_contfxdone endc ifne P61_nd P61_notedelay: moveq #$f,d0 and.b P61_Info(a5),d0 cmp (a3),d0 bne.w P61_contfxdone moveq #$7e,d0 and.b (a5),d0 beq.w P61_contfxdone move P61_DMABit(a5),d0 move d0,$96-C(a6) or d0,P61_dma-P61_cn(a3) ifne nowaveforms or d0,P61_NewDMA-P61_cn(a3) endc move.l P61_Sample(a5),a1 ifeq oscillo move.l (a1)+,(a4) move (a1),4(a4) else moveq #0,d1 move.l (a1)+,d0 5' move (a1),d1 move.l d0,(a4) move.w d1,4(a4) subq.w #1,d1 addq.l #1,d1 lsl.l #2,d0 move.l d0,P61_oscptr(a5) move.w d7,P61_oscptrrem(a5) lsl.l #3,d1 add.l d0,d1 move.l d1,P61_oscptrWrap(a5) endc move P61_Period(a5),6(a4) ifne copdma move.l p61_DMApokeAddr(PC),a0 move.b P61_dma+1-P61_cn(a3),(a0) endc ifeq copdma&nowaveforms ifeq p61system lea P61_dmason(pc),a1 move.l P61_vektori(pc),a0 move.l a1,(a0) move.b #$f0,$bfd600 move.b #$01,$bfd700 6R5 move.b #$19,$bfdf00 else move #1,P61_server-P61_cn(a3) move.l P61_craddr+4(pc),a1 move.b #$f0,(a1) move.b #1,$100(a1) endc endc bra.w P61_contfxdone endc ifne P61_rt P61_retrig: subq #1,P61_RetrigCount(a5) bne.w P61_contfxdone move P61_DMABit(a5),d0 move d0,$96-C(a6) or d0,P61_dma-P61_cn(a3) ifne nowaveforms or d0,P61_NewDMA-P61_cn(a3) endc move.l P61_Sample(a5),a1 ifeq oscillo move.l (a1)+,(a4) move (a1),4(a4) else moveq #0,d1 mov7M1e.l (a1)+,d0 move (a1),d1 move.l d0,(a4) move.w d1,4(a4) subq.w #1,d1 addq.l #1,d1 lsl.l #2,d0 move.l d0,P61_oscptr(a5) move.w d7,P61_oscptrrem(a5) lsl.l #3,d1 add.l d0,d1 move.l d1,P61_oscptrWrap(a5) endc ifne copdma move.l p61_DMApokeAddr(PC),a0 move.b P61_dma+1-P61_cn(a3),(a0) endc ifeq copdma&nowaveforms ifeq p61system lea P61_dmason(pc),a1 move.l P61_vektori(pc),a0 move.l a1,(a0) move.b #$f0,$bfd600 move.b #$01,$bfd700 move.b #$19,8 i$bfdf00 else move #1,P61_server-P61_cn(a3) move.l P61_craddr+4(pc),a1 move.b #$f0,(a1) move.b #1,$100(a1) endc endc moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_RetrigCount(a5) bra.w P61_contfxdone endc ifne P61_arp P61_arplist: dc.b 0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0 dc.b 1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1 P61_arpeggio: move (a3),d0 move.b P61_arplist(pc,d0),d0 beq.b .arp0 bmi.b .arp1 move.b P61_Info(a5),d0 lsr #4,d0 bra.b .arp3 .9BQarp0: move P61_Note(a5),d0 move P61_periods-P61_cn(a3,d0),6(a4) bra.w P61_contfxdone .arp1: moveq #$f,d0 and.b P61_Info(a5),d0 .arp3: add d0,d0 add P61_Note(a5),d0 move P61_periods-P61_cn(a3,d0),6(a4) bra.w P61_contfxdone endc ifne P61_vs P61_volslide: move.b P61_Info(a5),d0 sub.b d0,P61_Volume+1(a5) bpl.b .test move d7,P61_Volume(a5) ifeq p61fade move d7,8(a4) else move d7,P61_Shadow(a5) endc bra.w P61_contfxdone .test: moveq #64,d0 :<pcmp P61_Volume(a5),d0 bge.b .ncs move d0,P61_Volume(a5) ifeq p61fade move d0,8(a4) else move d0,P61_Shadow(a5) endc bra.w P61_contfxdone .ncs: ifeq p61fade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc bra.w P61_contfxdone endc ifne P61_tpvs P61_tpochvslide: move.b P61_Info(a5),d0 sub.b d0,P61_Volume+1(a5) bpl.b .test move d7,P61_Volume(a5) ifeq p61fade move d7,8(a4) else move d7,P61_Shadow(a5) endc bra.b ;" P61_toneport .test: moveq #64,d0 cmp P61_Volume(a5),d0 bge.b .ncs move d0,P61_Volume(a5) .ncs: ifeq p61fade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc endc ifne P61_tp P61_toneport: move P61_ToPeriod(a5),d0 beq.w P61_contfxdone move P61_TPSpeed(a5),d1 cmp P61_Period(a5),d0 blt.b .topoup add d1,P61_Period(a5) cmp P61_Period(a5),d0 bgt.b .setper move d0,P61_Period(a5) move d7,P61_ToPeriod(a5) move d0,6(a4) bra< @G.b P61_contfxdone .topoup: sub d1,P61_Period(a5) cmp P61_Period(a5),d0 blt.b .setper move d0,P61_Period(a5) move d7,P61_ToPeriod(a5) .setper: move P61_Period(a5),6(a4) else nop endc bra.w P61_contfxdone ifne P61_pu P61_portup: moveq #0,d0 move.b P61_Info(a5),d0 ifne use1Fx cmp.b #$f0,d0 bhs.b P61_contfxdone endc sub d0,P61_Period(a5) moveq #113,d0 cmp P61_Period(a5),d0 ble.b .skip move d0,P61_Period(a5) move d0,6(a4) bra.b P61_contfx=Hv=done .skip: move P61_Period(a5),6(a4) bra.w P61_contfxdone endc ifne P61_pd P61_portdwn: moveq #0,d0 move.b P61_Info(a5),d0 add d0,P61_Period(a5) cmp #856,P61_Period(a5) ble.b .skip move #856,d0 move d0,P61_Period(a5) move d0,6(a4) bra.b P61_contfxdone .skip: move P61_Period(a5),6(a4) endc P61_contfxdone: ifne P61_il bsr.w P61_funk2 endc lea Channel_Block_Size(a5),a5 lea Custom_Block_Size(a4),a4 dbf d5,P61_lopas ifeq split4 cmp P61_sp>GPeed2(PC),d4 bne.w P61_ret2 P61_preplay2: .pr:ifle (channels-splitchans) printt "splitchans >=channels! Must be less." else moveq #(channels-splitchans)-1,d5 lea P61_temp0(pc),a5 bra.w P61_preplay endc else CHANCPY:macro movem.l (a0),d0-d4 movem.l d0-d4,(a5) ifne P61_ft move.l P61_Volume(a0),P61_Volume(a5) else move.w P61_Volume(a0),P61_Volume(a5) endc ifne P61_sof move.w P61_Offset(a0),P61_Offset(a5) endc ifne P61_il move.l P61_Wave(a0),P61_?֞ɴWave(a5) endc endm P61_split4: move.w P61_speed2(PC),d5 cmp.w d5,d4 beq.b .pr2 subq.w #1,d5 cmp.w d5,d4 beq.b .pr1 subq.w #1,d5 cmp.w d5,d4 bne.w P61_ret2 .pr0: lea P61_temp0copy(PC),a5 lea P61_temp0(PC),a0 CHANCPY bra.w P61_preplay .pr1: ifgt channels-1 lea P61_temp1copy(PC),a5 lea P61_temp1(PC),a0 CHANCPY bra.w P61_preplay else rts endc .pr2: lea P61_temp0copy(PC),a0 lea P61_temp0(PC),a5 CHANCPY ifgt channels-1 lea P61_tem@ Lp1copy(PC),a0 lea P61_temp1(PC),a5 CHANCPY endc ifgt channels-2 lea P61_temp2(PC),a5 bra.w P61_preplay else rts endc endc P61_MyJpt: jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) AP jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_cmd(PC) jmp P61_cmd2(PC) jmp P61_cmd(PC) jmp P61_cmd2(PC) jmp P61_noote(PC) jmp P61_note2(PC) jmp P61_empty(PC) jmp P61_empty2(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61B q_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_cmdS(PC) jmp P61_cmd2S(PC) jmp P61_cmdS(PC) jmp P61_cmd2S(PC) jmp P61_noteS(PC) jmp P61_note2S(PC) jmp P61_emptyS(PC) P61_empty2S: move d7,(a5)+ move.b d7,(a5)+ P61_proccompS: move.b (a0)+,d1 move.b d1,d0 add.C %׆b d1,d1 bpl.b P61_permexit .b6set:bcs.b .bit16 .bit8:move.b d7,(a5) subq.l #3,a5 and.w d4,d0 move.b d0,P61_TempLen+1(a5) move.b (a0)+,d0 move.l a0,P61_ChaPos(a5) sub.l d0,a0 .jedi1:move.b (a0)+,d0 moveq #-8,d1 and.b d0,d1 jmp P61_MyJpt+256(PC,d1.w) .bit16:move.b d7,(a5) subq.l #3,a5 and.w d4,d0 move.b d0,P61_TempLen+1(a5) ifeq opt020 move.b (a0)+,d0 lsl #8,d0 move.b (a0)+,d0 else move.w (a0)+,d0 endc move.l a0,P61_ChaPos(a5) sub.l d0,a0D P61_Info(a5),d0 add d0,P61_Period(a5) cmp #856,P61_Period(a5) ble.b .jup move #856,P61_Period(a5) .jup:moveq #$7e,d0 and.b (a5),d0 bne.w P61_zample bra.w P61_nocha endc ifne P61_sft P61_setfinetune: moveq #$f,d0 and.b P61_Info(a5),d0 ifeq opt020 add d0,d0 move P61_mulutab(pc,d0),P61_Fine(a5) else move P61_mulutab(pc,d0*2),P61_Fine(a5) endc bra.w P61_fxdone P61_mulutab: dc 0,74,148,222,296,370,444,518,592,666,740,814,888,962,1036,1110 endc m4Atc ifne P61_pl P61_patternloop: moveq #$f,d0 and.b P61_Info(a5),d0 beq.b P61_setloop tst.b P61_plflag-P61_cn(a3) bne.b P61_noset move d0,P61_plcount-P61_cn(a3) st.b P61_plflag-P61_cn(a3) P61_noset: tst P61_plcount-P61_cn(a3) bne.b P61_looppaa move.b d7,P61_plflag-P61_cn(a3) bra.w P61_fxdone P61_looppaa: st.b P61_plflag+1-P61_cn(a3) subq #1,P61_plcount-P61_cn(a3) bra.w P61_fxdone P61_setloop: tst.b P61_plflag-P61_cn(a3) bne.w P61_fxdone move P61_rown5_pos(pc),P61_plrowpos-P61_cn(a3) lea P61_temp0+P61_TData(pc),a1 lea P61_looppos(pc),a0 moveq #channels-1,d0 .talt: move.l (a1)+,(a0)+ move.l (a1)+,(a0)+ move.l (a1),(a0)+ lea Channel_Block_Size-8(a1),a1 dbf d0,.talt bra.w P61_fxdone endc ifne P61_fvu P61_finevup: moveq #$f,d0 and.b P61_Info(a5),d0 add d0,P61_Volume(a5) moveq #64,d0 cmp P61_Volume(a5),d0 bge.w P61_fxdone move d0,P61_Volume(a5) bra.w P61_fxdone endc ifne P61_fvd P61_finevdwn:o6B" moveq #$f,d0 and.b P61_Info(a5),d0 sub d0,P61_Volume(a5) bpl.w P61_fxdone move d7,P61_Volume(a5) bra.w P61_fxdone endc ifne P61_timing P61_sete8: moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_E8-P61_cn(a3) bra.w P61_fxdone endc ifne P61_rt P61_setretrig: moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_RetrigCount(a5) bra.w P61_fxdone endc ifne P61_nd P61_ndelay: moveq #$7e,d0 and.b (a5),d0 beq.w P61_skip ifne P61_vib move.b d7,P61p7(_VibPos(a5) endc ifne P61_tre move.b d7,P61_TrePos(a5) endc ifne P61_ft add P61_Fine(a5),d0 endc move d0,P61_Note(a5) move P61_periods-P61_cn(a3,d0),P61_Period(a5) ifeq p61fade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc bra.w P61_skip endc ifne P61_pde P61_pattdelay: moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_pdelay-P61_cn(a3) st P61_pdflag-P61_cn(a3) bra.w P61_fxdone endc ifne P61_sd P61_cspeed: moveq8>q #0,d0 move.b P61_Info(a5),d0 ifne p61cia tst P61_Tempo-P61_cn(a3) beq.b P61_VBlank cmp.b #32,d0 bhs.b P61_STempo endc P61_VBlank: cmp.b #1,d0 beq.b P61_jkd move.b d0,P61_speed+1-P61_cn(a3) subq.b #1,d0 move.b d0,P61_speed2+1-P61_cn(a3) move d7,P61_speedis1-P61_cn(a3) bra.w P61_fxdone P61_jkd: move.b d0,P61_speed+1-P61_cn(a3) move.b d0,P61_speed2+1-P61_cn(a3) st P61_speedis1-P61_cn(a3) bra.w P61_fxdone ifne p61cia P61_STempo: move.l P61_timr9tv,er(pc),d1 divu d0,d1 move d1,P61_thi2-P61_cn(a3) sub #$1f0*2,d1 move d1,P61_thi-P61_cn(a3) ifeq p61system move P61_thi2-P61_cn(a3),d1 move.b d1,$bfd400 lsr #8,d1 move.b d1,$bfd500 endc bra P61_fxdone endc endc ifne P61_vbvs P61_vibochvslide: move.b P61_Info(a5),d0 sub.b d0,P61_Volume+1(a5) bpl.b P61_test62 move d7,P61_Volume(a5) ifeq p61fade move d7,8(a4) else move d7,P61_Shadow(a5) endc bra.b P61_vib2 P61_test62: moveq #64,d0 cmps:df P61_Volume(a5),d0 bge.b .ncs2 move d0,P61_Volume(a5) .ncs2: ifeq p61fade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc endc ifne P61_vib P61_vib2: move #$f00,d0 move P61_VibCmd(a5),d1 and d1,d0 lsr #3,d0 lsr #2,d1 and #$1f,d1 add d1,d0 move P61_Period(a5),d1 moveq #0,d2 move.b P61_vibtab(pc,d0),d2 tst.b P61_VibPos(a5) bmi.b .vibneg add d2,d1 bra.b P61_vib4 .vibneg:sub d2,d1 P61_vib4: move d1,6(a4) move.b t;;P61_VibCmd(a5),d0 lsr.b #2,d0 and #$3c,d0 add.b d0,P61_VibPos(a5) bra.w P61_contfxdone endc ifne P61_tre P61_tremo: move #$f00,d0 move P61_TreCmd(a5),d1 and d1,d0 lsr #3,d0 lsr #2,d1 and #$1f,d1 add d1,d0 move P61_Volume(a5),d1 moveq #0,d2 move.b P61_vibtab(pc,d0),d2 tst.b P61_TrePos(a5) bmi.b .treneg add d2,d1 cmp #64,d1 ble.b P61_tre4 moveq #64,d1 bra.b P61_tre4 .treneg: sub d2,d1 bpl.b P61_tre4 moveq #0,d1 P61_tre4: ifeq p61u<&yfade move d1,8(a4) else move d1,P61_Shadow(a5) endc move.b P61_TreCmd(a5),d0 lsr.b #2,d0 and #$3c,d0 add.b d0,P61_TrePos(a5) bra.w P61_contfxdone endc ifne (P61_vib+P61_tre) P61_vibtab: dc.b $00,$00,$00,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$00,$00,$00,$01,$01 dc.b $01,$01,$01,$01,$01,$01,$01,$01 dc.b $01,$01,$01,$01,$01,$01,$01,$01 dc.bv= $01,$01,$01,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$01,$01,$01,$02,$02 dc.b $02,$03,$03,$03,$03,$03,$03,$03 dc.b $03,$03,$03,$03,$03,$03,$03,$03 dc.b $02,$02,$02,$01,$01,$01,$00,$00 dc.b $00,$00,$01,$01,$02,$02,$03,$03 dc.b $04,$04,$04,$05,$05,$05,$05,$05 dc.b $05,$05,$05,$05,$05,$05,$04,$04 dc.b $04,$03,$03,$02,$02,$01,$01,$00 dc.b $00,$00,$01,$02,$03,$03,$04,$05 dc.b $05,$06,$06,$07,$07,$07,$07,$07 dc.b $07,$07,$07,$07,$07,$07,$06,$06 dc.b $05,$05,$04,$03,$03w>T,$02,$01,$00 dc.b $00,$00,$01,$02,$03,$04,$05,$06 dc.b $07,$07,$08,$08,$09,$09,$09,$09 dc.b $09,$09,$09,$09,$09,$08,$08,$07 dc.b $07,$06,$05,$04,$03,$02,$01,$00 dc.b $00,$01,$02,$03,$04,$05,$06,$07 dc.b $08,$09,$09,$0a,$0b,$0b,$0b,$0b dc.b $0b,$0b,$0b,$0b,$0b,$0a,$09,$09 dc.b $08,$07,$06,$05,$04,$03,$02,$01 dc.b $00,$01,$02,$04,$05,$06,$07,$08 dc.b $09,$0a,$0b,$0c,$0c,$0d,$0d,$0d dc.b $0d,$0d,$0d,$0d,$0c,$0c,$0b,$0a dc.b $09,$08,$07,$06,$05,$04,$02,$01 dc.b x?F3$00,$01,$03,$04,$06,$07,$08,$0a dc.b $0b,$0c,$0d,$0e,$0e,$0f,$0f,$0f dc.b $0f,$0f,$0f,$0f,$0e,$0e,$0d,$0c dc.b $0b,$0a,$08,$07,$06,$04,$03,$01 dc.b $00,$01,$03,$05,$06,$08,$09,$0b dc.b $0c,$0d,$0e,$0f,$10,$11,$11,$11 dc.b $11,$11,$11,$11,$10,$0f,$0e,$0d dc.b $0c,$0b,$09,$08,$06,$05,$03,$01 dc.b $00,$01,$03,$05,$07,$09,$0b,$0c dc.b $0e,$0f,$10,$11,$12,$13,$13,$13 dc.b $13,$13,$13,$13,$12,$11,$10,$0f dc.b $0e,$0c,$0b,$09,$07,$05,$03,$01 dc.b $00,$02,$04,$06,$08,y@톓$0a,$0c,$0d dc.b $0f,$10,$12,$13,$14,$14,$15,$15 dc.b $15,$15,$15,$14,$14,$13,$12,$10 dc.b $0f,$0d,$0c,$0a,$08,$06,$04,$02 dc.b $00,$02,$04,$06,$09,$0b,$0d,$0f dc.b $10,$12,$13,$15,$16,$16,$17,$17 dc.b $17,$17,$17,$16,$16,$15,$13,$12 dc.b $10,$0f,$0d,$0b,$09,$06,$04,$02 dc.b $00,$02,$04,$07,$09,$0c,$0e,$10 dc.b $12,$14,$15,$16,$17,$18,$19,$19 dc.b $19,$19,$19,$18,$17,$16,$15,$14 dc.b $12,$10,$0e,$0c,$09,$07,$04,$02 dc.b $00,$02,$05,$08,$0a,$0d,$0f,$11 dc.b $zA813,$15,$17,$18,$19,$1a,$1b,$1b dc.b $1b,$1b,$1b,$1a,$19,$18,$17,$15 dc.b $13,$11,$0f,$0d,$0a,$08,$05,$02 dc.b $00,$02,$05,$08,$0b,$0e,$10,$12 dc.b $15,$17,$18,$1a,$1b,$1c,$1d,$1d dc.b $1d,$1d,$1d,$1c,$1b,$1a,$18,$17 dc.b $15,$12,$10,$0e,$0b,$08,$05,$02 endc ifne P61_il P61_funk: moveq #$f,d0 and.b P61_Info(a5),d0 move.b d0,P61_Funkspd(a5) bra.w P61_fxdone P61_funk2: moveq #0,d0 move.b P61_Funkspd(a5),d0 beq.b P61_funkend move.b P61_FunkTable(pc,d0),d{B5u0 add.b d0,P61_Funkoff(a5) bpl.b P61_funkend move.b d7,P61_Funkoff(a5) move.l P61_Sample(a5),a1 move.l P61_RepeatOffset(a1),d1 move P61_RepeatLength(a1),d0 add.l d0,d0 add.l d1,d0 move.l P61_Wave(a5),a0 addq.l #1,a0 cmp.l d0,a0 blo.b P61_funkok move.l d1,a0 P61_funkok: move.l a0,P61_Wave(a5) not.b (a0) P61_funkend: rts P61_FunkTable: dc.b 0,5,6,7,8,10,11,13,16,19,22,26,32,43,64,128 endc ifeq copdma P61_dmason: ifeq p61system tst.b $bfdd00|C move #$2000,$dff09c move #$2000,$dff09c ifeq nowaveforms move.b #$19,$bfdf00 move.l a0,-(sp) move.l P61_vektori(pc),a0 move.l P61_intaddr(pc),(a0) move.l (sp)+,a0 endc move P61_dma(pc),$dff096 nop rte else move P61_dma(pc),$dff096 lea P61_server(pc),a3 addq #1,(a3) move.l P61_craddr(pc),a0 move.b #$19,(a0) bra P61_ohi endc endc ifeq nowaveforms P61_setrepeat: ifeq p61system tst.b $bfdd00 movem.l a0/a1,-(sp) lea $dff0a0,a1 move #}Dy$2000,-4(a1) move #$2000,-4(a1) else lea $dff0a0,a1 endc move.l P61_Sample+P61_temp0(pc),a0 addq.l #6,a0 move.l (a0)+,(a1)+ move (a0),(a1) ifgt channels-1 move.l P61_Sample+P61_temp1(pc),a0 addq.l #6,a0 move.l (a0)+,12(a1) move (a0),16(a1) endc ifgt channels-2 move.l P61_Sample+P61_temp2(pc),a0 addq.l #6,a0 move.l (a0)+,28(a1) move (a0),32(a1) endc ifgt channels-3 move.l P61_Sample+P61_temp3(pc),a0 addq.l #6,a0 move.l (a0)+,44(a1) mov~E}v!e (a0),48(a1) endc ifne p61system ifne p61cia lea P61_server(pc),a3 clr (a3) move.l P61_craddr+4(pc),a0 move.b P61_tlo(pc),(a0) move.b P61_thi(pc),$100(a0) endc bra P61_ohi endc ifeq p61system ifne p61cia move.l P61_vektori(pc),a0 move.l P61_tintti(pc),(a0) endc movem.l (sp)+,a0/a1 nop rte endc endc P61_temp0: dcb.b Channel_Block_Size-2,0 dc 1 P61_temp1: dcb.b Channel_Block_Size-2,0 dc 2 P61_temp2: dcb.b Channel_Block_Size-2,0 Firdc 4 P61_temp3: dcb.b Channel_Block_Size-2,0 dc 8 ifne split4 P61_temp0copy:dcb.b P61_Wave+4,0 P61_temp1copy:dcb.b P61_Wave+4,0 endc P61_cn: dc 0 P61_periods: ifne P61_ft dc.w $0358,$0358,$0328,$02fa,$02d0,$02a6,$0280,$025c dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d dc.w $0168,$0153,$0140,$012e,$011d,$010d,$00fe,$00f0 dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097 dc.w $008f,$0087,$007f,$0078,$0071,$0352,$0352,$0322 dc.w $02f5,$02cb,$02a2,G$027d,$0259,$0237,$0217,$01f9 dc.w $01dd,$01c2,$01a9,$0191,$017b,$0165,$0151,$013e dc.w $012c,$011c,$010c,$00fd,$00ef,$00e1,$00d5,$00c9 dc.w $00bd,$00b3,$00a9,$009f,$0096,$008e,$0086,$007e dc.w $0077,$0071,$034c,$034c,$031c,$02f0,$02c5,$029e dc.w $0278,$0255,$0233,$0214,$01f6,$01da,$01bf,$01a6 dc.w $018e,$0178,$0163,$014f,$013c,$012a,$011a,$010a dc.w $00fb,$00ed,$00e0,$00d3,$00c7,$00bc,$00b1,$00a7 dc.w $009e,$0095,$008d,$0085,$007d,$0076,$0070,$0346 dc.w $0346,$0317H(,$02ea,$02c0,$0299,$0274,$0250,$022f dc.w $0210,$01f2,$01d6,$01bc,$01a3,$018b,$0175,$0160 dc.w $014c,$013a,$0128,$0118,$0108,$00f9,$00eb,$00de dc.w $00d1,$00c6,$00bb,$00b0,$00a6,$009d,$0094,$008c dc.w $0084,$007d,$0076,$006f,$0340,$0340,$0311,$02e5 dc.w $02bb,$0294,$026f,$024c,$022b,$020c,$01ef,$01d3 dc.w $01b9,$01a0,$0188,$0172,$015e,$014a,$0138,$0126 dc.w $0116,$0106,$00f7,$00e9,$00dc,$00d0,$00c4,$00b9 dc.w $00af,$00a5,$009c,$0093,$008b,$0083,$007c,$0075 dc.w $006Izte,$033a,$033a,$030b,$02e0,$02b6,$028f,$026b dc.w $0248,$0227,$0208,$01eb,$01cf,$01b5,$019d,$0186 dc.w $0170,$015b,$0148,$0135,$0124,$0114,$0104,$00f5 dc.w $00e8,$00db,$00ce,$00c3,$00b8,$00ae,$00a4,$009b dc.w $0092,$008a,$0082,$007b,$0074,$006d,$0334,$0334 dc.w $0306,$02da,$02b1,$028b,$0266,$0244,$0223,$0204 dc.w $01e7,$01cc,$01b2,$019a,$0183,$016d,$0159,$0145 dc.w $0133,$0122,$0112,$0102,$00f4,$00e6,$00d9,$00cd dc.w $00c1,$00b7,$00ac,$00a3,$009a,$0091,$0089,$0081 dcJ`.w $007a,$0073,$006d,$032e,$032e,$0300,$02d5,$02ac dc.w $0286,$0262,$023f,$021f,$0201,$01e4,$01c9,$01af dc.w $0197,$0180,$016b,$0156,$0143,$0131,$0120,$0110 dc.w $0100,$00f2,$00e4,$00d8,$00cc,$00c0,$00b5,$00ab dc.w $00a1,$0098,$0090,$0088,$0080,$0079,$0072,$006c dc.w $038b,$038b,$0358,$0328,$02fa,$02d0,$02a6,$0280 dc.w $025c,$023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194 dc.w $017d,$0168,$0153,$0140,$012e,$011d,$010d,$00fe dc.w $00f0,$00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00KPa0 dc.w $0097,$008f,$0087,$007f,$0078,$0384,$0384,$0352 dc.w $0322,$02f5,$02cb,$02a3,$027c,$0259,$0237,$0217 dc.w $01f9,$01dd,$01c2,$01a9,$0191,$017b,$0165,$0151 dc.w $013e,$012c,$011c,$010c,$00fd,$00ee,$00e1,$00d4 dc.w $00c8,$00bd,$00b3,$00a9,$009f,$0096,$008e,$0086 dc.w $007e,$0077,$037e,$037e,$034c,$031c,$02f0,$02c5 dc.w $029e,$0278,$0255,$0233,$0214,$01f6,$01da,$01bf dc.w $01a6,$018e,$0178,$0163,$014f,$013c,$012a,$011a dc.w $010a,$00fb,$00ed,$00df,$00d3,$00c7,$0LD/0bc,$00b1 dc.w $00a7,$009e,$0095,$008d,$0085,$007d,$0076,$0377 dc.w $0377,$0346,$0317,$02ea,$02c0,$0299,$0274,$0250 dc.w $022f,$0210,$01f2,$01d6,$01bc,$01a3,$018b,$0175 dc.w $0160,$014c,$013a,$0128,$0118,$0108,$00f9,$00eb dc.w $00de,$00d1,$00c6,$00bb,$00b0,$00a6,$009d,$0094 dc.w $008c,$0084,$007d,$0076,$0371,$0371,$0340,$0311 dc.w $02e5,$02bb,$0294,$026f,$024c,$022b,$020c,$01ee dc.w $01d3,$01b9,$01a0,$0188,$0172,$015e,$014a,$0138 dc.w $0126,$0116,$0106,$00f7,$00e9,$MK00dc,$00d0,$00c4 dc.w $00b9,$00af,$00a5,$009c,$0093,$008b,$0083,$007b dc.w $0075,$036b,$036b,$033a,$030b,$02e0,$02b6,$028f dc.w $026b,$0248,$0227,$0208,$01eb,$01cf,$01b5,$019d dc.w $0186,$0170,$015b,$0148,$0135,$0124,$0114,$0104 dc.w $00f5,$00e8,$00db,$00ce,$00c3,$00b8,$00ae,$00a4 dc.w $009b,$0092,$008a,$0082,$007b,$0074,$0364,$0364 dc.w $0334,$0306,$02da,$02b1,$028b,$0266,$0244,$0223 dc.w $0204,$01e7,$01cc,$01b2,$019a,$0183,$016d,$0159 dc.w $0145,$0133,$0122,$0112,NP$0102,$00f4,$00e6,$00d9 dc.w $00cd,$00c1,$00b7,$00ac,$00a3,$009a,$0091,$0089 dc.w $0081,$007a,$0073,$035e,$035e,$032e,$0300,$02d5 dc.w $02ac,$0286,$0262,$023f,$021f,$0201,$01e4,$01c9 dc.w $01af,$0197,$0180,$016b,$0156,$0143,$0131,$0120 dc.w $0110,$0100,$00f2,$00e4,$00d8,$00cb,$00c0,$00b5 dc.w $00ab,$00a1,$0098,$0090,$0088,$0080,$0079,$0072 else dc.w $0358,$0358,$0328,$02fa,$02d0,$02a6,$0280,$025c dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d dc.w $0168,$015O4h~3,$0140,$012e,$011d,$010d,$00fe,$00f0 dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097 dc.w $008f,$0087,$007f,$0078,$0071 endc P61_dma: dc $8200 P61_rowpos: dc 0 P61_slen: dc 0 P61_speed: dc 0 P61_speed2: dc 0 P61_speedis1: dc 0 P61_spos: dc.l 0 ifeq p61system P61_vektori: dc.l 0 P61_oldlev6: dc.l 0 endc P61_ofilter: dc 0 P61_timers: dc.l 0 ifne p61cia P61_tintti: dc.l 0 P61_thi: dc.b 0 P61_tlo: dc.b 0 P61_thi2: dc.b 0 P61P' 8_tlo2: dc.b 0 P61_timer: dc.l 0 endc ifne P61_pl P61_plcount: dc 0 P61_plflag: dc 0 P61_plreset: dc 0 P61_plrowpos: dc 0 P61_looppos: dcb.b 12*channels,0 endc ifne P61_pde P61_pdelay: dc 0 P61_pdflag: dc 0 endc P61_samples: dcb.b 16*31,0 P61_emptysample: dcb.b 16,0 P61_positionbase: dc.l 0 P61_possibase: dc.l 0 P61_patternbase: dc.l 0 P61_intaddr: dc.l 0 ifne p61system P61_server: dc 0 P61_miscbase: dc.l 0 P61_audioopen: QZ dc.b 0 P61_sigbit: dc.b -1 P61_ciares: dc.l 0 P61_craddr: dc.l 0,0,0 P61_dat: dc $f00 P61_timerinterrupt: dc 0,0,0,0,127 P61_timerdata: dc.l 0,0,0 P61_timeron: dc 0 P61_allocport: dc.l 0,0 dc.b 4,0 dc.l 0 dc.b 0,0 dc.l 0 P61_reqlist: dc.l 0,0,0 dc.b 5,0 P61_allocreq: dc.l 0,0 dc 127 dc.l 0 P61_portti: dc.l 0 dc 68 dc.l 0,0,0 dc 0 P61_reqdata: dc.l 0 dc.l 1,0,0,0,0,0,0 dc 0 P61_audiodev: dc.b 'audio.device',0 P61_cianamSye: dc.b 'ciab.resource',0 P61_timeropen: dc.b 0 P61_timerint: dc.b 'P61_TimerInterrupt',0,0 endc P61_InitPos: dc.w 0 ifne use1Fx P61_PTrig:dc.w 0 endc ifne nowaveforms P61_NewDMA:dc.w 0 endc ifne copdma p61_DMApokeAddr:dc.l 0 endc P61_PattFlag:dc.w 0 P61_etu: ifne quietstart P61_Quiet:dc.w 0 endc ifne visuctrs P61_visuctr0:dc.w $4000 P61_visuctr1:dc.w $4000 P61_visuctr2:dc.w $4000 P61_visuctr3:dc.w $4000 endc P61E: samples: RSڷlkjihgfedcba`_^]\[ZYXWVUTS0E+xP6111-Example.SpRTZ ; #-----+-----------------------------------------# ; |Name:| P6111 Example Source | ; +-----+-----------------------------------------+ ; |V1.05| P6111,Edx fix,init/exit patch,Dxx note. | ; |V1.04| P6110 final, E6x command fix+new option | ; |V1.03| Final, compatibility changes only. | ; |V1.02| Made more user friendly | ; |V1.01| Plays the example P61 song until you | ; | | press the left mouse button. | ; +-----+-----------------------------------------+ ; RU | Photon/Scoopex | ; #-----------------------------------------------# ;Tutorial here: http://youtu.be/xBtHO-IuN9E ;Put it in your demo: http://youtu.be/JYLcIR6tyO4 ;I'm leaving the P61 project. Read sources and docs. ;I now strictly follow a "Don't ask, don't tell" policy :D ;If the song works here but not in your demo, the playroutine is okay. Check ;that you have selected the right mode. P61_Music is called automatically in ;p61mode 1 (CIA interrupt, remember?),so dRVon't call it anywhere in your source. ;older notes: ;NOTE: it is now extra important that you SET THE USECODE. See the Special Note ;in P6111-Play.i for why. TIP: using 80x for syncing (timing) instead of E8x ;won't make the song sound worse in non-legacy trackers. It's plug and play, ;just swap them out. ;This example demonstrates simple syncing Set visuctrs=1 to see them :) ;There also 3 commands you can use for module-controller syncing (80x recommen- ;ded), and an oscilloscopRWU2e ptrs option as well. ;This source demonstrates non-system, non-exec mode. (That means that it can ;also be used in trackmos where you're using ALL low chipmem ;) ) ;It uses an AGA compatible startup that shows a simple copper with a copper ;interrupt request trigger that you poll in the frame loop to wait for a raster ;position. (I.e. you can turn it into a proper copper interrupt). ;Compatibility: You can assemble with or without Label: option. ;Any case-sensitivity and "specRX͍:'ial operators" issues should be gone. ;Esau/Traktor sent me a nice module to include (thanks!), if it's too big for ;your chipmem left, try one of the smaller ones. ;IT CAN BE USED IN 4 MODES: ;------------------------- ; 1 CIA mode. Plays any song. Uses the CIA interrupt. ; - (default, P61_Music should not be called, easiest to use) ; 2 VBLANK mode. No F20 or higher commands must be used in the song. ; - (use when you want to decide when P61_Music should be called.) ; 3 COPPRY`ER mode. No F20 or higher commands must be used in the song. ; - (requires a timed call to P61_Music and a timed copper command ; 11 scanlines later to set sound DMA.) ; 4 MAXOPTI mode. No F20 or higher commands must be used in the song. ; - (requires a timed call to P61_Music and a timed copper command ; 11 scanlines later to set sound DMA. Maximum optimized.) P61mode =1 ;Try other modes ONLY IF there are no Fxx commands >= 20. ;(f.ex., P61.new_ditty only works withRZ* P61mode=1) ;; --- options common to all P61modes --- usecode =-1 ;CHANGE! to the USE hexcode from P61con for a big ;CPU-time gain! (See module usecodes at end of source) ;Multiple songs, single playroutine? Just "OR" the ;usecodes together! ;...STOP! Have you changed it yet!? ;) ;You will LOSE RASTERTIME AND FEATURES if you don't. P61pl=usecode&$400000 split4 =0 ;Great time gain, but INCOMPATIBLE with F03, F02, and F01 ;speeds in the song! That's the ONLY reR[3QJason it's default 0. ;So ==> PLEASE try split4=1 in ANY mode! ;Overrides splitchans to decrunch 1 chan/frame. ;See ;@@ note for P61_SetPosition. splitchans=1 ;#channels to be split off to be decrunched at "playtime frame" ;0=use normal "decrunch all channels in the same frame" ;Experiment to find minimum rastertime, but it should be 1 or 2 ;for 3-4 channels songs and 0 or 1 with less channels. visuctrs=0 ;enables visualizers in this example: P61_visuctr0..3.w ;contaR \ ining #frames (#lev6ints if cia=1) elapsed since last ;instrument triggered. (0=triggered this frame.) ;Easy alternative to E8x or 1Fx sync commands. asmonereport =0 ;ONLY for printing a settings report on assembly. Use ;if you get problems (only works in AsmOne/AsmPro, tho) p61system=0 ;1=system-friendly. Use for DOS/Workbench programs. p61exec =0 ;0 if execbase is destroyed, such as in a trackmo. p61fade =0 ;enable channel volume fading from your demo channels=4 ;<4 forR ]` game sound effects in the higher channels. Incompatible ; with splitchans/split4. playflag=0 ;1=enable music on/off capability (at run-time). .If 0, you can ;still do this by just, you know, not calling P61_Music... ;It's a convenience function to "pause" music in CIA mode. p61bigjtab=0 ;1 to waste 480b and save max 56 cycles on 68000. opt020 =0 ;1=enable optimizations for 020+. Please be 68000 compatible! ;splitchans will already give MUCH bigger gains, and you can ;trR ^ y the MAXOPTI mode. p61jump =0 ;0 to leave out P61_SetPosition (size gain) ;1 if you need to force-start at a given position fex in a game C =0 ;If you happen to have some $dffxxx value in a6, you can ;change this to $xxx to not have to load it before P61_Music. clraudxdat=0 ;enable smoother start of quiet sounds. probably not needed. optjmp =1 ;0=safety check for jump beyond end of song. Clear it if you ;play unknown P61 songs with erroneous Bxx/Dxx commands in them oscR _sillo =0 ;1 to get a sample window (ptr, size) to read and display for ;oscilloscope type effects (beta, noshorts=1, pad instruments) ;IMPORTANT: see ;@@ note about chipmem dc.w buffer. quietstart=0 ;attempt to avoid the very first click in some modules ;IMPORTANT: see ;@@ note about chipmem dc.w buffer. use1Fx=0 ;Optional extra effect-sync trigger (*). If your module is free ;from E commands, and you add E8x to sync stuff, this will ;change the usecode to include a wholR `<e code block for all E ;commands. You can avoid this by only using 1Fx. (You can ;also use this as an extra sync command if E8x is not enough, ;of course.) ;(*) Slideup values>116 causes bugs in Protracker, and E8 causes extra-code ;for all E-commands, so I used this. It's only faster if your song contains 0 ;E-commands, so it's only useful to a few, I guess. Bit of cyclemania. :) ;Just like E8x, you will get the trigger after the P61_Music call, 1 frame ;BEFORE it's heaRa8rd. This is good, because it allows double-buffered graphics ;or effects running at < 50 fps to show the trigger synced properly. ;; --- CIA mode options (default) --- ifeq P61mode-1 p61cia =1 ;call P61_Music on the CIA interrupt instead of every frame. lev6 =1 ;1=keep the timer B int at least for setting DMA. ;0="FBI mode" - ie. "Free the B-timer Interrupt". ;0 requires noshorts=1, p61system=0, and that YOU make sure DMA ;is set at 11 scanlines (700 usecs) after PRb 2761_Music is called. ;AsmOne will warn you if requirements are wrong. ;DMA bits will be poked in the address you pass in A4 to ;P61_init. (Update P61_DMApokeAddr during playing if necessary, ;for example if switching Coppers.) ;P61_Init will still save old timer B settings, and initialize ;it. P61_End will still restore timer B settings from P61_Init. ;So don't count on it 'across calls' to these routines. ;Using it after P61_Init and before P61_End is fine. noshorRcmts=0 ;1 saves ~1 scanline, requires Lev6=0. Use if no instrument is ;shorter than ~300 bytes (or extend them to > 300 bytes). ;It does this by setting repeatpos/length the next frame ;instead of after a few scanlines,so incompatible with MAXOPTI dupedec =0 ;0=save 500 bytes and lose 26 cycles - I don't blame you. :) ;1=splitchans or split4 must be on. suppF01 =1 ;0 is incompatible with CIA mode. It moves ~100 cycles of ;next-pattern code to the less busy 2nd frame of a nRd!8otestep. ;If you really need it, you have to experiment as the support ;is quite complex. Basically set it to 1 and try the various ;P61modes, if none work, change some settings. endc ;; --- VBLANK mode options --- ifeq P61mode-2 p61cia =0 lev6 =1 ;still set sound DMA with a simple interrupt. noshorts=0 ;try 1 (and pad short instruments if nec) for 1 scanline gain dupedec =0 suppF01 =P61pl ;if 1, split4=1 may cause sound errors. but try it anyway. :) endc ;; Re8V7--- COPPER mode options --- ifeq P61mode-3 p61cia =0 lev6 =0 ;don't set sound DMA with an interrupt. ;(use the copper to set sound DMA 11 scanlines after P61_Music) noshorts=1 ;You must pad instruments < 300 bytes for this mode to work. dupedec =0 suppF01 =P61pl ;if 1, split4=1 may cause sound errors. but try it anyway. :) endc ;; --- MAXOPTI mode options --- ifeq P61mode-4 p61cia =0 lev6 =0 noshorts=1 ;You must pad instruments < 300 bytes for this mode to work. dupedRfec =1 suppF01 =P61pl ;if 1, split4=1 may cause sound errors. but try it anyway. :) endc ********** CODE START ********** ;(slightly) modified from CIA_Example.G in P6106, credits to original author. section "P6110-Example",code movem.l d0-a6,-(sp) move $dff002,-(sp) ;Old DMA lea gfxname(pc),a1 ;Open graphics.library moveq #0,d0 move.l 4.w,a6 jsr -$228(a6) move.l d0,a6 move.l 34(a6),-(sp) ;Old view move.l a6,-(sp) sub.l a1,a1 jsr -$de(a6) ;LoadView jsr -$10e(a6) Rg, ;WaitTOF jsr -$10e(a6) ;WaitTOF lea $dff000,a6 move #$7ff,$96(a6) ;Disable DMAs move #%1000001111000000,$96(a6) ;Master,Copper,Blitter,Bitplanes move $1c(a6),-(sp) ;Old IRQ move #$7fff,$9a(a6) ;Disable IRQs move #$e000,$9a(a6) ;Master and lev6 ;NO COPPER-IRQ! moveq #0,d0 move d0,$106(a6) ;Disable AGA/ECS-stuff move d0,$1fc(a6) ;; --- Call P61_Init --- lea Module1,a0 sub.l a1,a1 sub.l a2,a2 moveq #0,d0 lea p61coppoke+3,a4 ;only used in P61mode >=3 jRh+ fsr P61_Init move.l #p61copper,$80(a6) ;; --- frame loop start --- wait: move $1e(a6),d0 ;Wait for Copper-bit in INTREQR and.l #$10,d0 beq.b wait move #$10,$9c(a6) ;Clear the bit (poll) ifeq p61cia move #$7f3,$180(a6) jsr P61_Music ;and call the playroutine manually. move #$003,$180(a6) endc ;; --- your demo code start --- ; ===> Put some cool stuff here :) <=== ;f.ex. visualizers :) ifne visuctrs lea P61_visuctr0(PC),a0 lea p61visupoke+6,a1 moveq #RiXchannels-1,d7 .l: moveq #15,d0 ;maxvalue sub.w (a0)+,d0 ;-#frames/irqs since instrument trigger bpl.s .ok ;below minvalue? moveq #0,d0 ;then set to minvalue .ok: move.w d0,(a1) ;poke blue color lea 16(a1),a1 ;next colorline in copper. dbf d7,.l endc ;; --- your demo code end --- btst #6,$bfe001 ;repeat until left mouse button pressed bne wait ;; --- frame loop end --- exit: btst #6,2(a6) ;Wait for blitter to finish, if used. bne.b exit ;; ---Rj>ݚ Call P61_End --- jsr P61_End ;; --- exit --- move #$7fff,$9a(a6) ;Restore system status move #$7ff,$96(a6) move (sp)+,d7 ;Old IRQs move.l (sp)+,a6 move.l (sp)+,a1 jsr -$de(a6) ;Old view move.l 38(a6),d3 ;3fd Copper1 move.l a6,a1 move.l 4.w,a6 jsr -$19e(a6) ;CLOSE graphics.library lea $dff000,a6 move.l d3,$80(a6) ;Set old Copper move d3,$88(a6) ;Trigger or #$8000,d7 move d7,$9a(a6) ;Old IRQs move (sp)+,d7 or #$8000,d7 move d7,$96(a6) ;Old DMARk5s s movem.l (sp)+,d0-a6 moveq #0,d0 ;No error code to CLI rts ********** DATA ********** gfxname: dc.b "graphics.library",0 even ********** PLAYROUTINE CODE ********** ;Note: if this is put in its own section (or compiled as separate binary), then ;jsr +P61_InitOffset,P61_MusicOffset,P61_EndOffset,P61_SetPositionOffset ;to call the routines. Playrtn: include "P6111-Play.i" ********** CHIP DATA ********** section "CHIPDATA",data_c p61copper: dc $100,$0200 dc $18Rl0,$003 dc $800f,$fffe ;The line to wait to dc $09c,$8010 ;Set Copper-bit in INTREQ ;; --- set dma --- ;(for instruments triggered this frame) dc $8b0f,$fffe p61coppoke: dc $096,$8000 ;sound DMA poke address (in P61mode>=3) ;; --- visualizers --- p61visupoke: dc.w $f007,$fffe dc.w $180,$003 dc.w $f107,$fffe dc.w $180,$003 dc.w $f407,$fffe dc.w $180,$003 dc.w $f507,$fffe dc.w $180,$003 dc.w $f807,$fffe dc.w $180,$003 dc.w $f907,$fffe dc.w $180,$003 dR Dc.w $fc07,$fffe dc.w $180,$003 dc.w $fd07,$fffe dc.w $180,$003 dc.w $ffff,$fffe Module1: ; incbin "P61.sowhat-intro" ;usecode $9410 ; incbin "P61.new_ditty" ;CIA, usecode $c00b43b incbin "P61.Dolphins-Dreamquest-by-Esau" ;CIA, usecode $1006bf5f mnlVponE+xP61.sowhat-intropmoZ(N95iTkAjAjjAAA* AAA"AA(A+A.* A5jAA8AAA* AAA!AQA'A*A-* A4AlAoAjAuAxA{* AAAAAAA* AAiAlAArAuAx* AAAAAAA* A jAAAAA* AAA!AA'A*A-* A * !%)%159* AAwAzCAAA* AAA]AAA* Az~z* eiquy* mp&۷******AD*E%A D'*E2A-D4*E?A:DA*2sssrB s!ssasA AABB"CAA)ssarsaA s!saCAA CAAC$C'AJBVB[CSAVAbA\BhBmCeAhAtCNAQAICWAZARC`AcA[CiClrs!rs!A ss!CAA CAAC$A's!CBCAAABBCAAAPAHCVAYAQC_AbAZChAkAcBq! CAAA, 䁈",:䁆6䁄260䁌,0(A!䁆:6:䁊202䁅A䁄Dd@䁄6䁈2mN$w䁄0䁄(䁂,(,AD6,䁆2䁁0䁁2d6䁎:䁎D@D䁐@d<䁄A:䁈:䁁<䁁:A@ApdjAdjdjd ,L(ʕ=<;:9876543210/.-,+*)('&%$#"!      qttHje~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONquuqqw7q . 6EPl@ Z @<4- e .W 6@R6 \ O} k   U I W/ fX /a Xmq cI qS r@ |D     )     | |-,jq\C B\*DcD ,jqe\C B\s86,jr \C B\*DcD , *A< ,BD,jpŌ\CtCwBzGmCdBgGZCQBTEGAq ,ByD8 |m,lA$,Aj$*rl(,(*,A,A/A*qx!NlA>AAljAl ,ASAVA,AbAeA'$,AqAtA6lAjArl( # ||m""bBAAq"lAAA ,AAAA"A,BAlBAAAH jAjl$ ,;?2,T,^$,2$,jlAS$#lj(#l#M| m,A A A" ,?/o"oooo|qy./xotopolohod` ,  ,#2$2 s#s$2<s$s!Bs!2LAFB"AAF+B.AA'F7B:A)s$s!FDBGA6A@FPBSABALF\B_ANAXFhBks!Ls!FvByAhArFBAtA~FBAAFBA5B#s!A$s!#<s!$As!A#2<s#AAs!A,s#s!s$A $A/s!A@B*A:A=s!AN#s$s#ALAOs!A` 2<A$Ads!AuBL!$Aus!A/2<A$As!ABPPAGC  qzP  AAs!ABAAs!BA$s!s!)s!!!!s!s#2<2<2<GAA!(((( (@l H!!2< s#A-(As#B"B%!(BF$@l!!2D~s#2L2L2Lstdots$` 2L2L22L2L2L22L2L2L2&2L2L 2L 262L 2L 2L <@DHLPTX\`dhlps!m80q{(s!ko_j{oz8s!v| |A A A A QRSTUq` ` A4D.Ujqlq c$CIU| | I  ) I A q qlr A i) qi i|  cI q IAr qiqiH,A,DNI nAAFAzFtN@ q|XHkAkCTiq HADhHACui xsI}8`/QdRdSTlnpAAAAAA"A%A,A/A6A9A@ACn n(r@($ AQRSC%.'.2 I  irI  r I q k-))is t slsliA At ))t)t lA(EgIUF7 #2A^: 1)),..,,))((%#"" "%##"#"Ž  " #&()+./4:757>@78GLIJPMOSVPRPGGJGA>:522.+&# q~t¿º¿ ) #..2114;=;:;C@A@>8872=C.,=C87A45>A8:842=GJ=.5D>:7188,2;=(&4,"",(%(#"   """ ")((()&(141,),58==4/8F>.(5JA11=:54=715112582#)//%"#&"   q R\    """&%)&%(,..../,17821/2=;125:;755=;42=>855:A;,/A@/,1785/+.4/()/+"# ¿ý¿   #(%#)."",/)())/4/,.212541/422454.5=51551/22./1,,/.)(.)&&(&#&&   q Ф=                              q 3C|                           q           "q 48~#""! ## ##!   #$$#"!!%'""""! β !#$&%$$$''&!    ߱  "#$$#&'&(((&$  !  軪qrM\ "$##$%%&)*)('(%!! ǩ "&%$&'&&)+*()*(#   զ  "$#&'''&))(*,+*((# 糜  "&%&''('*,**+++)**($   ⥛q  !%'(('&%(,-.-+)(*,++)    Ȱ ! #'*+)('&)-0/-+)(*,.,)%     ԻǷ  !!!"'))))(')---.-+**-,++)'$    羻ս !#"&))'&())-.,+),-,--,)'((((   q ÷»Ư $)))(('(+//-,+)*.0/,+('&*-+$   羵IJê !'*)((()+//-+++++./,*))(*,,)%   ήʶ !$&')))*+..---,,--,+,,**+,*()(%   Ϫð  !%&%&')++..--,-.--,***+,,-+('&'&"   q5庤Ѿ !%%%&%&'+/..,,,-//.-+))*./-+)'%%(%    Ǡֽ  $%&%$#&+...-+*+./.-+(')-.-,)&$&'%   !!ּů $&%$#'))./.,*,,,.-+)(+**-,*'&'"   !׵̴ #$$(**)(,-,-.-+)+**--+)'**)&   qfd@ ! ڷŰ  '*+)'&&(-0/,*'&(.0.+(&$%"    !#!Ⱥįų #(+*(&%&*./.+)'(+./-*'"   !! ʽưԼ  "&'('&'()+,++)+,,,,*(      о  ""%%&'''(')(*-,+,+q&     ũ  ! "$%%%''&&)+**+(   ȷ   #$##%'&&)*)&   ¨  !"#$#'(''#  !  ᮜq?2a "##%%%## М #&%#  "!! "&$ ر "#  ""##! ## !! ũ   !#"! ##  "!!  ǭq   !"!! !"#&&!   ##"!  Ḱ- 88+?jQYXVEW4K$G&3 Ƶ² *3DD?NndWoymcbZTJC<6,%˿͗ %-E1;.cE~cfhUReW[NIC84+" ׶΍ߞ &36P:rUXLrgvXjNR;\TVFnblXWTUKX5N:1.) qԞļĞéȵл $'1P?QDPaShTgZR]F\GJ;E08+& ѿȸ  5)4CITG_@hEnM:HWBF6K/'E/&-" ݳװ #&,51%P7U:AIL7K.&'7!="."( $ʹ .1+./-3&?35A1<#-):B!*  q<}ؾ !)-#*/$52+209*$""$!' *-**2%'-!    " 5  )     (                  qc:                                            qs                                            qDM&|                                              q}R                    qf                                            qy      +UOx(.]'..W3: 0@ > 7^M8< B/G]H )60I(#"),9+Ad,# , D  %8@=R)/C #EB*A %# "014*/.%% %<.  5,< ,( 6  !)#,F5 *"  Fq F"*/'$;%(-D5*6+ 4*) 6KCZ #8@!! )%'   !  , ; "'>%'!+ - , ! !% ')0+C  ' $ !  (%1+( !  $ "+7,0'"qR8  "0"'"                                     q |                       q!,*8ص<5`-$' X#?TTK' P`/7@]/_9ȹO ;T,?/4_?aȰ ?0 OP5ԀEV( 41i̤O8G@KW 8?ʞG@+8ȯW ^0Oǵ;H7 د?[ g ɨ5IOܯ7Zoب44K?`_Դ!1-; 7Hfu%*?08 Oh˜ '/)"8q"bOO]ܠ ( /* (C]& '5& ( ?Hܯ&0 (?@ؿ! 8  $#:0 0  5  " . #               q#rD         q$Bj     q%%fs     q&} q'lRq(+q)Zq*eq+"XZq,l        *&!$'       /2'0/   !8<626% +(q-vha !   $1NN7  /B?& +,    &GO? &69)  *%  && 1:;" 04'  % ͭ:SJ1&:;)*%$) -嵭:I%!ջ&  //     ӿ+2$        '             q/!                                       q0    #      (! &  #(%  # $., . &  ( #         !                 q1hl\S                        q2)$       2?% $,& (-$.6  ,)*ӫHgb: ӯ2IB(:1ĺ%CG)$ 61#4/!  $! .D1奚DgaAɢ>WE ,E:˺@R=  54",+ %ݭ@_Q1ٯ 7I'q3_A307#?= &)     &箥>`[=խ4;;:ɽ6A1  (,   '  ᱰ D[J)Զ /-'4"$32&& ˭'PJ+ ))"//  !    7PB! %! ,)(1%$+$!    ƴ4TN&վ ! 76 ,<) '-#q4gN7#   %ٱDTA$71') &+$  "  !幼@Q<"%@93* "0*     ݷ FP; .#% $&   Ͳ(KO9'-" )# "  '>=3   "   #   q5Pic` (51#      .2+   '%                    q6ofO>                      q7[RSJ                  q8C          !& % ('6A8?QL3, !&###4 .5 ( &K\[J%#ATP.4PS@ȳ(2)5 *q9) $@Q\R)8XV:)KTF.ܼ  +0"', 1+7Qj]2 5Y\C$>OL9Ѳ ˰  '#%5. 5.*  .Qp`4 1SXE11ENE, ޺1;/ $;2#*( % #WqZ3*LRI>" #9GH)龱 ȩ˹ -<=8-q:ύ'&3>&%@( " '[iT;.+?GKE)/EB̿ شػ 6KXK#"GM)+2!   8XUFA2'3DRK( (9*ǿ ᷜǰ(1SeT.!@<+)$3<# CQOTQ3.L\J+ Ģе)%-OZO=/%'6C+>0  (83$#*$ +$ /?& ºþ#6;1  *;H<( #'(&  .JWUN?) *75 3:0 %68-)-) 1"   #8JOJ;)q=<3M'"..'%*+!&*#!+1#  #$     5JK?5, ļ $!".5-"&',&   (">JA541  Ľ(43(#'(!$ "   !  " .DD:99. Ļ$14,%))  "!     q>zw! 4<:9@<+ ¸  +53.00$ $+     %-/4>C:& ο +2258,  0(       #,6==4( Ͼ%-8B>&&.    #/6894$ҽ&*! +?G<%""%.    q? " #-27:4 õ.1" $;?6+% 15    %# &,381ν02%,12522-   #  !-2+Ǿ(+%-:2!     "$ #&!&3, q@       !(#  "!        %#  $!        "$           $# qAع          "                             qB                                 qCƵ                              qDְ                    qE     qF    qGĐqH}a7K  %~\>+/C9953., ذ޳ ")"(PS<`MY\mbZLEOPYZsPj_jf_SSF;1$͸ $++B>>PPg]jiiiflUOI;2)! "&)9HBMXZ_ZjYi`\]UKH>1!Ǹ ")/8@BXVSco`]_f]ZSI?81&ʳ!",2?CLMX_\j_fe`bYRLC8.$Ȫ !,19?KOKZYcXf``]SXPEE8,$ ¸ $+5<>EFKIRV\UX`_fMUVUHH9>5,(")163?2/Ļ!&/29CFFSRSUc]`Z]V`SRRLCB83&! Ÿ"(3168E@BBEEKOOK@MKB@9/.&$"&15;?LIHPUY\b``el`]_XSPIIB;5.&!$.6>?LPR\biefomgmjcbc`YLIBE5/+! "&,59262+,$ ¸ ".33>BHKVSYYXZib_cccZVVRI@?22,"  "&38EKPY`ejlpmot}zwvyrl`YPOE;;2+ Ž $&.1;?ILRX]_``bcbbfb\XPSIHF;<51," $",25;BEKLLSPVVVPOPMHFC@>@61.& » $$)/6;?FKKLPRRSXRURUPOEEC>53/+%"¾!")/qNĐz/69>CEFMKRMKOMFEHF@>835/+(! "!%,26<;BBBHEICFI@HCFBB<955.,( Ľ !(+,29<@IKLPVVYZ]XVRRMLHF@?83+%$ Ļ !""$$(+,/.35563586861.+++)$!  %%,235<>??BEHEHFF@EC>;98//+$$ !()++,..11266666985332.,)+($" qO %))+./.128525323//.+($$$   "&(()+.//31256221.,+/++&"!  !&&(,/68889;88<<99655//,+($!  !$%((++,,,,,,))%)(&%$$!  %)+.2558<<<>>?>@>?9;9932/)((! qP#0 !$(,,268;>>@B@CCBCBC@<;<312.+(" "$&++,.2588;99;;;9536632/,+(%$ $),/389>@CBCFILLFIHCB@>;85.,)&! $(,/369>?CILMRRSRUUSPRMIEB@>93.&$ $%%%&&&&&(++.//111211,/,))+((%! qQlQ !"""&&(),,/125322322/,)((&""  !""%%$%&&%%$$$""! Wxkp-E V'T:Oh?o`8/D1̻-<0>>4]P %4g<#&IaD ,'<+0g0E:2@?QT@B8#1  ) F6'0qRȕ*ʲG8#RlJ # # -('98 %,Ch\."'13*C9  57;JI,$. 4)'>2   F0&D,8  &%,;F"  76!&(4%  ""*@+=@#  205 " #(/?-0  &.%   +;:&$**"/( &! !)'$1qSɕR,<,  "     2%-:"/  +0"(     #$'25 ("&2*!  ""3-" !!-3"&/,  ""!!$ )&ξ:<)(.# &) 5+½"/@2#27%  !0%+;7;#/  !    $ ((! -94018, qTʄ˶) +! +1  /*&7@1& ! &*& 60/7<@4$#& &!-$!   %<:=/60   !& &  "+7=<6+    .1+*  )=:55,#  '4"* *0<qU"2)F=%&!   )*-&. )&4B4'+ + ,   ,)*;6'$     ,,2=8(/#  ! ()3;8,#      !$+478,     ,%/?8$#    %&#+0-8<# #  qV̦^  *,(1:5(,   !$     *&.81)67! ',     !)64)-60*(#)#($ %  !.*120.86( #&&&% #' )/,055=@-!ÿ #/)(0-")% ,0/2778=1̿&(.793/$  *)  )('6<99;1& ʿ&&3;9?A,$'+/+"+03?H822#̺qW639CJD5!.)'50 !'19<:776! ô%6=>MLA* "==.(%% ,/?Q@()0# ȸ1=@IWJ6 &6798 %)787@8($  *?OBм $+9HJE4$ )?=0  ,6C7  )$"-+ .;6# %59=<1 %*"!'(  '?6("+4% '"#   );&  (0, -*%$ 0 -7)   )$$%$%      ,$   ( qYdM ..$  !   $)"$   (%   '61&''    )/(    "35..*% %%#.)    !-,&,8- 13#   $%'&097,(  %26,  #(01/9?5  ++%   !)+*3441)   %qZЂ    ,3$'1788"   -2)-36-+$     %656;, !  54-0-*(   %& !$/=7% $%    %,"!394,  %-  *-,++)  #&  $%)' q[JB?  '$  $    "!#       $%" !     $$    "  #(&  '"  $"%% #)'" !"#,'" #,, )+'%'/" q\Ңo#" 7*# #.+#"'0  /) "  /5.#!/) $%/97.  "!#) ("6:48)   '2;=6$       /0,6:*     !+0),4- $  "q]Jb=21("'1 %-$! &! **!+) !10'  )0, ! &"(,,.'!-5,  !  $31+( +,&,"  ,* %>B* /:/0*   #*%!%$+C@"!(0-8-%%( )74 #&*!$$   ! /5, q^ԫ$&*$+%   #  &:6 '+(   $)!'4(  +1+   #'$(&   '#   +-#   #!!   #6&     #/.!      '/$"      '/q_0&!"/#   $,/7 4-  &#/?GQH '98-5,/ ' '3?LM8,5221 #(  %-2CPB,#/154(##"* '06ML:$).3:0"!""-,1-?SE7 ..:<("#'5 %.)GP:3#*,qNJ;4"#&" "-8 /(3SH92 ''/?0$ '#  70-;T@:( %"5>($ '#$.A #%OV@= "%=:&% & ')=<  '/WP@4!-C6("丿 &,3B EZF@ 7A0% Ƶ +0?9#SRD4;=, ԰ #.;F  =YP@ -?8 "$/7IqI+9@  O[P8 5A2)Ъ!&3>H0/OVL0  5?0 *Ȩ&$6?F, /RVF( 6=(   +ฝ"'+8?@ ;TN<  94   Ԭ!)(39?<=J@1  0$  Ƞ )'%54=@?E63 % #, ĕ-#'7/?B?:3:,*'ܴ#$,./O@  D2784)) ' ԥqA- #, /Q0  8)5(8%(0 ̤%(9M$ '%/(,/=  ! $0Ȩ # 9B -0$+$ 3:'& '1д'&-B<"3@0-9= +3,  *( ھа " 6:-!#?M0(%<<$3;, +*ܻЬ3(!%-MV0 /;<(7B*%) еŬ0#-5WR  .49('GH ',('4?eT  ',/8&q/OD+,˱+"3<><(%CDİ/KF,  0+[fc\@1E4*84/:N: ֺ?F5 %";c^YP4;M(,488FP0q 69į'E4& &O`PSD0EJ'7>;OT(½?@.&  'WPIQ8.OH <4/OH<(%$% ?VFNH*?[0  7B*?^4*&+$  JI@B0'OP 'B-)OL $/ 'BD=2"3Q@ +0/Q4 '5 '?B0!%?M03,'?L 30 %?: 3EH(&#0%-C8 Ծ #: /D*);D<' q I**(;B$14 38/7?2 ,.&/?2  8( >(%57<(',+)88 /5  '0 -37:$5+23;05, 2$ #7174'0 6751"  /@ %, /1-:,3 #32.&  =< *8%+6$*2 -52(  п =$   30/2*7(,/+$  /@  q n "4 /638 (,)$س3@"#  #0-674&,& ķ ?@(.) +66)  '+ I8)3++34" )*Ա+G.+0 ! -1.  /)캷7=$/,$')& 2"Ь?*9$! ('.(#& +:""% µ9'C$ #"$3(' -?B )& q e`H*7K"  #)4 %&+0 NH1   ?D) *( %=0']@ '=  K@7 %%; ;_8 '8+M8/B #   'B Oc0;8  ;K,GN  /6W\$?0?D*/OP  /-+[P#=$ ̸+?4(;VH   3&;T8->")$°/.)/GX@   q fr&, ;J03>" 6(ڴ. %7GQ0 ")&769="-B(ܲٺ!)COR0 & ( &9*/M@ :<а̹;QVL '( .5 ?Q4/G8 ?ON< 7$)(?J,;H(԰Լ >IH8$7G(+I@$+OH)?JF2/KH"  !/J,7O4 ڰ3=ID0?X:/?:'KN  ij'3;GqyZD>W]2/( =(:T@&13?OLS`L,38%" #E@$'34CRSYXD;D2 7F.+$+/7MZ^^TLMD(?9 #4%-1?U_e]VYV@&#>(50Թ++7O[ej^Z_T:&#(-0;%)EY]jk\_bP2$(+  7 #4¿'KT]oiX_`D*'0*,-"q?: ̸;US_t`WieD068$" #2ıָ#GRWsv]g{`<:B81(%3 Ծ&' дŻ+IM_yiazR@JE&3<&#?@  )Һȫ +EMerhsuLHS@'?8"3M9)̭ ҵȸռ-5NUemopTWT07H0'ET4#,踲ű мɪ.=OScr}p_aP0+GL67[\23,ثƴƸƼ COOc{qg`H3;MH5?eb4+D,ʵȶɺȸì*GFGgxj\D=KTE;WtX-?qVP  ȹ!'H8?o|kZHFVT@Eo|P7UPıĸ/@(?}||hXJQZH6OtDGgHಿɾ3$O{psqbWO\Z:7kZ<_t8#ȳܴ Ƹܺ*_j[u~nhXS_P2?wzH?wl 7ک  àȭ'_TWxlk`]`J3Wh9[T5DЪ%ұظ ?P:_jnrc_`D=k|P?o|@!K@ '$Ȩȫ?<3kxequb\ZFGopBG{h03V0 /"© q"^>$/olg{xb\XIOk`@OqZ8CL  #. 踩(7mt^gzq^\VHSeT>UfL:F@0*ش?of_vpeh\MWcL=V`JBD0 )( ##ȹ 'Wi]j~nopZN[V:;SUIF9#** ?_b_yzovlTMSF3:MQJ@-#"&#,ʾ˴'K^\gxvzfRMJ9.7GQH2&*"+(̤7OY_svzx`NJ@,&/CJ8")5 .̜' 'G[[g}tYNH4%$.CF,+6Լ$qpĔ )+NVRg|wwhRNB(%9874ฑ '3!7_`[wxf^R8 :8?8ΰ#3OV_yyjZWN0#(.;0";N,̰ 3OOWwzrj^VP@ "!'/""?J ȴ 7LI[w{nh]TNB("( -I@  Ȭ ;FE]urf^TOJ8/D2  Ȯƽſ#<@E_th]TJH@ #34#   #55C_fZQEAA, q&'+$   %!Ŀ (+?WXPE<><*$ * $';SUL@;B2#(" '* !$7RRB:?@  '!)#3(  5MD47B8 (#( )0  9L<-;B(  '-  :C2.>8 ' &)  #72&/<(( !"'qK +40/98 #  %)1"  !,//39* ,' /3!!&.0.&   "%72#/-"  "%4&%0("   -.   -0  ' %#2& #"  /(   (".0 )  .#)& qam#T1(*,   '(%% %( #1(* $ ",.0   '"'& 3,! #:2  %#& ' '9 ) /;(   &';(+98"!к %#/6, <0"&   ("'=-/(-A3'&  ҽqdAo  & #;=&-87@.'! ʸ # 7E0';2?@,%    ʺ  '?: /C ?4&"  Ž !9J,#?@/=0'#   !! &C8'G(ȿ/0$"   "$').+#7Q<7L #   ',-19=4+CT4?L   #247=EG86RP()ND  qq'e )69=DOL=EaP*3T@Ƚ %29?GQP@KbJ&7V@ĵ -09CN_ZQ_lL4O`8ĺ #2CRY_bZ]ohB?_X$   #/EUX\a`iu`@G[Dؼ /GUX^gkopZHSY:ؼ " #7O[Z_nvwpXO[T0 к!$+"+?W][gzxqMh\^eR* Ǽ)&+5( %""/I[_arvjgliP,Ŀý.$3=.$'&)7M[[_wrlqrbH0$Ļ2&&>@.%**,=OXWcps~x`D2) #, +?:$!(''9IOSczjupTB90"Լ$&!/A4 !(%(9IMSg{tmpQH@6"Ҽ%%,;@1"%*&-.#))$-:BM[guvoyz`TRK8źq' !3AA9,%+)$+7BO[gqrr~rZUTH0 º9DA8*)/( '9EO[irszp`^YL0 '?E>1*-.$';GO[ipv~zld`YH0˼/A@6,*.+&7AJWcoy}zuld^XH0 к7D@80/2*-;CKU_o{y{{qd^V@)!$д#=@96431&#/9DLScwyv{yh]\P5%&$ ̰ )<81320, #+1;CMctpszr`YZF,'- Ȭ+3,-43,$%.9?Neomu{hW\Z@(+,ĮqG0ä--)/82( #/6>Oejmwt`V\P2+3( -+-7:0#"!'03?UcgmujYY\H015 ĺ!)(+79(" %,-=S^bindWZV@174 !$&/. $"!7OUZceYRTJ8480´")1"!9MMR[WNLI=475$ ξ "#-1?HFOUNJLF:8<2 ʼ ')0.% ?EELNKLJ@:>@1!% Ȼ"+-0(#$ qW0R/??DGHNNB;?D9('*º )-.-$"&/7=<9CJ<2;F@-)-Ƚ +++*%$  *22*2C@,/CB1*/( *+,*&%'2*$7F4';J@245 Ƶ #,-+*+$  )*%<6!+EF86;,ı'20(,-  * -<(9H<6>9   '0"#/$ $+,'?D9=A0 .)+  %*=87?:  q R*#  /54;?,  %&& %236<6  * $   +/5;9) !## &(/;:,  !  !$%5>0   $$"';>*    ,  '#.C@&   #' )-  (%/C9$ qG   ',".0 #*)5B8"   )* #1- ).-7C6$   (& %.(  &('7A4" !   (($)-( &#'9<, #"    #+*&+-&  $!-:7)#%  #!'20-02( &"!1:4*'*"  &")30-22&$%6:2+()!  ' )2,+2qg0$#"+:94/--$  Ƹ #(1603:8*"'$,&'7A@:544)Ȼʼ +(&7817A<.,0&),&/?EC>8:9( ( &963>B8+-751587;=43><*&*!мqc4'5:=BDBCB4,3945:87>=25>6)'% ̻ '58679:85;B90470(" %1BLNSVQH@<:89:66>@6263-'  ü $3ELNSWPD=<9789:<>:552.-(¸+;KPSYZPC??;7:<>>:664-+,q og# Ż#/CPTX^XJCD@99<=<<8760+-, ż &5CNS[\RHGF>78;987553,)+& ļ!-9GOW_[NIJF:5:<855550**,$ ¹&/LL:2>@0&)-$ ü*5?O]bca[]aR@GSE4;B4&&+& Ŀ %19GYbdd`^c\FCSM87C<(!)& ¼ !-7?O_egd`efTGRVD7?D2"&) )3;GYciiedjaNOZR@>H@(#*& &/7CS_flnjkm`SY^PBGK:*+/$ )/7GV\biigifXU\VFCKD3-2. ļq"A !(+:MUWajhff]UWXLDIK@234( !%,?NQU_gdb`XSURHINJ>672$Ļ "%3GNNYggb`ZTTTMINNE<<<0$"" º  !);JIN^gb_^VRSNFGLIB?A<.&&" ļ -?FCK^`XYXNKLF@CHE@??6*%&Ľ1A@=K[XQTQGEHA;?GB<<<3(%&  -945GSKFKF:;@94=C<7;:0((' Ⱦ /836JPFDIB7;?5/;A:6;:.&q#[G'$Ŀ /4.5IL@?D:.58.,;?54:6*&'"ƽ .1*5FD8;=0'/0$)98.170$#"Ⱦ  -,'5C<377(#*(%40&,1( "   '$%3<3-1, ##.(#,-"   &"%5:2.1+!*$!**   &"'35-+-&& '$    '20***!!  q$)0+&(&   $)&"$"     &(#!$     !))$%%    #)(#%"      #(%"$     #&"##    #" "     q%ܫ  "! "                                                            q&                                         q'GZ                       !             $#        !%#      "%  q(OTjo    $$     "     !&    "#   ""        q)(+ !"  !!!#%$$$$"    "##&((''&$"  "##%)**)(&$# #$$',-++*(&$  #%%+0/-.-*($  $%(/4112.+)%    #$*12011-)("  q*݅< ")/.,//)%$  "*,++-*$!  &++*,,(!  "(+**,+%  $)+,./,&"!  $(*,-,(#!  !&*,,+&"  !&)**($" q+qm")+,,(%$" %+-.,(%$!  #')*($#" #&))&"!   "$&%!   !$&(&""!   #&&#"! q,tmUU "%%#"!  !$"    " $#    $" !!  #%!   #      q-4                           q.v                       q/eV6<                 q0Ͻ  !   "#!  !"   !"%#   "#$&$   "##&&"   ###&$   q1!!!#!   !!#$!  !""#%$   !###%&#   !""#$$    !"""#%"    "#"#%%!  ! "###%'%! q2Ų !!"$$$%''$!!  " !#$$%')'$#!  !""##%&))'%$!  !!#%'((&&%  ""#%')+)))&  ! !#$$&()+,++*$   "##$')*,+,,(    ""#&()+,+,*$ q3  !!#%'(****&   !!!%()+---+&"  !"$')+-..-*&#   !"%')+-.-+($"   !#&)*,-+(&"    #&()**'$"   "%()**)&$#   q4$X_2 #&')))'$"!  !#&'(((%""    #$%%$!   "#$$"  !###!  !"#"!      q5KL!                q6u]                q7x                   q8tT                 q9                     q:5:                           q;q                 q<ƿk            q=s               q>k         q?/           q@H                qA|}l(           qB``U                    qC{u>               qD{zwI               qE`XO                qFǷ}               qGfdM              qHs        qI4           qJ~|s          qK       qLiqM qNJqO#qPqQ*qR qSɼ4     qT        qU      qV'       qW     qX     qY5 qZrhY q[,q\q]*-q^q_ȱ "   %2=CC@;50+'!´$6FQTL9#-MqdCȾκ !&)($  $1?IPTUUTPJD>82+#  0BS_ec\TMJHGGILOU^kv~~vj^K(ͫE`joxvfR9 +?NX^`a_\YXXXXVUSQOOPSUUPE5#÷ͽq`t@]klmvxl]K:(ˬ !/=KUZYTOMOSX\`fnv{{umd^ZWUSRRSSTSROKC9.#  $/8AIPV\`_XI5"%09AGLNNJD>72.*&" ϸ · -:IYemnh_VOIEA=6-# #%&&#&-5=DJMNLHD?91' !)043," 0DVbijhd^UK@5+! qaYbb    #'*,,,,+'"  ǽĽ",4;@AAA@?=82*"%-49>BGKMNMLIHECA><;98641/-,,,.//-+'#! !#&(*-/121/,)#  (18@EILMNOOONMKGB>:62/-+****)&#þ !##    "')+-025799::851-)'(+/5;@EJOTWYXUQLD;/!qb, h  %-6?HOTX]aglqvxyxvutvy|~xqiaZTK>0! !&*+($ $)/6=CGHHHGGIJLMNNOOPOONOQPMID@=;:84,! ɼ'/8@GKNOONKE>70)#    %'%   #-4763/+&qco*!  #).11-(" $*-./244/( "%+29?A?;8421247776666521/-*&!      *7BILMMKF?81+'$" ſ ",9FQZ_`]WPG>6.' #(,/247:>?=71,((+18?CFGFD@<83,# ƿŽqdgI "#&''#     $&$"!#',0356:>DFFEBBB>5*  "0;60-*'"  &-4:>BFHHF@:3+#  #'***+07=@A@@?<840,'!!$##"! ¿ !(.49>BFFD@<841.-07?HQZckqexorsqomnnlf^VPMNRY`egfd^UI=1%ÿ $0;CKRWWQG<1'       #(.5=DKQV[^acb_YQJEA;643/+()+-037861+% ½)18=AEJPUYZXUSNHBAAA>80( #)--,,,+("  #$!qfy/ !"     !"!   &-5;?AEJMMIC<5.'"     ',0246641110,&!   (07=ACCA>93-'! "&)+/5>FNV\bc_YSMGB<740*!   qg{ '-/0.+%    !#!        &&!   #$"  '06:>EMTY]`cccca^YOC5%Ÿ !#$%%#     $%%$%%%$!  (28:9874.("qh %*2:BIOUZ_cca\VOF=5.("  #(-.+%  "(,/369CHMRUXXWSOJEA=950-(!   qi X !$)07<>>>>??@@@?:4-%     "%&%%$%%#    þ   %(*++(#   "!  "&'()**(&$"  #',//+% !#%%%&&%"!!qj"###" !#$$$#$&),/0/..048=?><963/+&"        #*/34567751-*&"    &))'%#"   !-7@FGFC>6,! '-27<qkq3?@@@?;5.(# ½ !%)*)&#!#!   ù½ $09?A?<73/+(&#  #)07<@AA?=:8641/.-.--,+*&#! '-1342/+%    "&)++****)'#  !"#""""!!  qljib '08>AA@><:8777765443.' )17;=<83,%  ")/37:?CGJKKKIEA=952/.---/110-*$  !&*,--,)'&%#  $(*,--,**,/1110....///,&!$(*,-,+)'$    "&'''''&# qmlX:   !$(++)%           !"$&'&'(+-//.,*&      %*.26;>AAA?<:9863,%    $(,/1210.qnx4*" "(+,*($!  !!              $-5<@CBA=93-'  '19?DGGFDB?;730,($ qousO     $&()))))*,.01359;<=>??><:975421112330,&           "$%$#!qpb!$'),..-,)'%%%')+-./.,)% "$#"!   !$'+/35776532/+($  !$'*++*(&"  $'+/379;;963-(!   qqUR>  !&+035544333455310.-,*'$"!$&(*++)'#  "$'(('%#         qri  "%(+./-)$      $(+.1222220.,($           #%')+,--.-,,++*)&" qspdD     !%'))*))(&#          #%(*+*(#  qt8:9      !$&(((&$"!       !!!!"#$%&&&&&&'()*+,,*'$"!"$$$#!      qu   !""""!  !"""!   $)+--,+)(&#"     qvƥ    !!"###"!         !#$$#!   !"#$%&''''(())*)(&# qw!      !###"        qxUc[     !"#$$$#"       qyNI5          qzhhZ        q{E          q|          q}X      q~hpf     q ^_]       q ieW     q  i q     q 0  qq/q qHqqRqǼqqq q q!qqqqqqq q!q"$?HrYE+x P6111-Play.ipH= *)('&%$#"!      &zPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+T ; #-----+-----------------------------------------# ; |Name:| P6111 - Optimized Player 6.1 Playroutine| ; +-----+-----------------------------------------+ ; |V1.05| P6111, EDx fix,better init/exit,Dxx note| ; |V1.04| P6110, E6x command fix+new option | ; |V1.03| P6109, compatibility changes only. | ; |V1.02| Cleaned up P6108 with minor changes. | ; |V1.01| 2.4-3 scanlines faster than my p6107. | ; | | SLen (song length) bug fixed | ; | | lev6 implemented with "poske DMA here" | ; | | Two options for clickless sound start | ; | | P61_Osc precis samplewindow tracking | ; | | Many optimization options - read the | ; | | info or leave them at defaults. | ; +-----+-----------------------------------------+ ; | by Photon/Scoopex | ; #-----------------------------------------------# ;SPECIAL NOTE FOR THIS VERSION: ;----------------------------- ;Tutorial here: http://youtu.be/xBtHO-IuN9E ;Put it in your demo: http://youtu.be/JYLcIR6tyO4 ;I'm leaving the P61 project, feeling I've left it in good shape. ;There is nothing left to optimize, and I've gone through everything I could ;find that was bad and fixed it. ;I support this only with the readme.txt and all the comment documentation. ;Please follow the advice in my Youtube tutorial specifically made for adding ;P61 to your demo before deciding the playroutine is at fault. If you are sure ;you have found a bug, fix it yourself. ;A song must Nfail in the example source and play correctly in P61con, before ;you can suspect the playroutine is at fault. ;A note on syncing: apart from the new options for $1Fx, channel triggers, and ;oscilloscope ptrs I added, you should no longer ask musicians to scatter E8x ;commands in the song. Don't worry, it plays fine in P61 and always has. ;But some non-legacy trackers destroy the loop with a filter where E8x commands ;are used. 80x is an alternative, which works in all trackers, accL3ording to ;them. To use it, just replace E8x with 80x in the module and you need change ;nothing else. ;P6111: ;- Fix notedelay bug introduced in P6108 ;- Fix in legacy code, CIA regs were modified in init/exit even when p61_cia=0. ;- Verified that $9xx offset behavior takes effect at loop end, a behavior ;used by chip musicians. ;Dxx command: P61 has never implemented Dxx support other than for xx=00. ;I took a good look, and the way I see it, only pointers to previously ;decru=4nched notesteps are stored. This means patternloop backjumps work, but ;forward jumps to some offset from the pattern start pointer - doesn't. ;xx steps must first be decrunched. This will cause a spike in rastertime ;(CPU load) used, which is counter to my efforts to make the P61 playroutine ;match the performance of optimized normal Protracker playroutines. ;So I've decided to not implement it. Instead, musicians are recommended to ;copy the jumped-to pattern and delete xx notesy to make the offset=0. Then ;the Dxx command can be changed to a D00 command, which is supported. ;The copied pattern will only add 16 bytes or so to the filesize, and ;performance will remain excellent. ;Nested patternloops has not been implemented, even in the P61con player. ;An issue with F01 commands was introduced in P6108. I've added a patch for ;this. It is tested, but only with two modules. ;--- ;P6110: A bug regarding Patternloops (E6x) was introduced in P6108 when I `Stadded ;super optimization flags. This is fixed, but it also revealed the obvious: ;that Patternloop is incompatible with suppF01=0. The example will set this ;automatically for you, but you will not get the great speed gains if you try ;split4=1 unless you SET THE USECODE PROPERLY. ;Of course all modes will work properly if you leave everything at default ;in the example, but I recommend to set the usecode to get the most out of p61 ; - not just the size gain. ;Also, new option: s .3et visuctrs=1 to get elapsed time since last instrument ;trigger in P61visuctr0..3. ;NOTE: vasm users MUST turn optimizations off for the jmp xx(PC) instructions ;in the jump tables and at P61_motuuli. If not, the source will assemble ;without errors, but generate bra.b which WILL cause fatal run-time errors. ;May the Source be with you! //Photon ;Credits to Jarno for V6.1A, and bugfixers up to 6.1.0.6. ;(Notes from previous versions below.) * The Player 6.1A - by Guru / Sahara H Surfers * Interrupt problem with 060 fixed by NoName/Haujobb^Sector 7 * Some Enforcer Hits fixed by Platon42 * Memory trashing bug in routine P61_End fixed by Tolkien * Bug in routine P61_Init (when opt020=1) fixed by The Dark Coder/Trinity^Morbid Visions * for Devpac 3, ASM-One, PhxAss and maybe some other assemblers * * NEEDS: Default sizes must be words (ASM-One default...) * Preferably no optimizations on (the jump table must be word jumps) * * Tested with Devpac 3.04 b Ŗy Guru * Tested with PhxAss 4.14, Asm-Pro 1.1 and ASM-One 1.29 * * Note 1:All the bugfixes done after version 610.2 (the latest release from * Guru / Sahara Surfers) are marked with the comment "* BUGFIX" * followed by some explanations, so that if can quickly copy them * into a previous version tailored to your needs. * * Note 2:The unelegant double WRITE to INTREQ unforunately seems to be * the best solution to the "interrupt problem" that occurs on * some 0 *40/060 equipped Amiga. On many 040/060 Amigas it is enough * to put an access to whatever hardware register and a NOP between * the first write to INTREQ and he RTE. However we had reports that * on some Amiga it is really necessary to do a double write to INTREQ ******************************** * Player 6.1A * * All in one-version * * Version 610.6 * * 1992-95 Jarno Paananen * * All rights reserved * * Fixed by: NoName, P T!laton42, * * Tolkien and The Dark Coder * ******************************** F01patch=1 nowaveforms=noshorts copdma=1-lev6 Custom_Block_Size=16 ;d7 used to replace clr.* instead of this const ifnd player61_i player61_i:set 1 ifnd exec_types_i exec_types_i:set 1 include_version:equ 40 extern_lib:macro xref _lvo\1 endm structure:macro \1:equ 0 soffset:set \2 endm fptr:macro \1:equ soffset soffset:set soffset+4 endm bool:macro \1:equ soffset soffset:set soffset+2 endm byte:macro \1:equ soffset soffset:set soffset+1 endm ubyte:macro \1:equ soffset soffset:set soffset+1 endm word:macro \1:equ soffset soffset:set soffset+2 endm uword:macro \1:equ soffset soffset:set soffset+2 endm short:macro \1:equ soffset soffset:set soffset+2 endm ushort:macro \1:equ soffset soffset:set soffset+2 endm long:macro \1:equ soffset soffset:set soffset+4 endm ulong:macro \1:equ soffset soffset:set soffset+4 endm float:macro \1:equ soffset soffset:set soffset+4 endm doub\le:macro \1:equ soffset soffset:set soffset+8 endm aptr:macro \1:equ soffset soffset:set soffset+4 endm cptr:macro \1:equ soffset soffset:set soffset+4 endm rptr:macro \1:equ soffset soffset:set soffset+2 endm label:macro \1:equ soffset endm struct:macro \1:equ soffset soffset:set soffset+\2 endm alignword:macro soffset:set (soffset+1)&$fffffffe endm alignlong:macro soffset:set (soffset+3)&$fffffffc endm enum:macro ifc '\1','' eoffset:set 0 endc ifnc '\1','' eoffset:set \1K endc endm eitem:macro \1:equ eoffset eoffset:set eoffset+1 endm bitdef0:macro \1\3\2:equ \4 endm bitdef:macro bitdef0 \1,\2,b_,\3 \@bitdef:set 1<<\3 bitdef0 \1,\2,f_,\@bitdef endm library_minimum:equ 33 endc ;ifnd structure Player_Header,0 ulong P61_InitOffset ulong P61_MusicOffset ulong P61_EndOffset ulong P61_SetRepeatOffset ulong P61_SetPositionOffset uword P61_MasterVolume uword P61_UseTempo uword P61_PlayFlag uword P61_E8_info aptr P61_UseVBR uword P61_PosCӼ'ition uword P61_Pattern uword P61_Row aptr P61_Cha0Offset aptr P61_Cha1Offset aptr P61_Cha2Offset aptr P61_Cha3Offset label Player_Header_SIZE structure Channel_Block,0 ubyte P61_SN_Note ubyte P61_Command ubyte P61_Info ubyte P61_Pack aptr P61_Sample uword P61_OnOff aptr P61_ChaPos aptr P61_TempPos uword P61_TempLen uword P61_Note uword P61_Period uword P61_Volume uword P61_Fine uword P61_Offset uword P61_LOffset uword P61_ToPeriod uword P61_TPSpeed ubyte [P61_VibCmd ubyte P61_VibPos ubyte P61_TreCmd ubyte P61_TrePos uword P61_RetrigCount ubyte P61_Funkspd ubyte P61_Funkoff aptr P61_Wave uword P61_TData aptr P61_TChaPos aptr P61_TTempPos uword P61_TTempLen uword P61_Shadow ifne oscillo ;Filled in by P61_osc call (div ptrs by 4) aptr P61_oscptr ;points to end of current frame's sample-chunk. uword P61_oscptrrem ;remainder for precision (internal use only) aptr P61_oscptrWrap ;wrap (end) pointer for current Paula sound~loop endc uword P61_DMABit label Channel_Block_Size structure Sample_Block,0 aptr P61_SampleOffset uword P61_SampleLength aptr P61_RepeatOffset uword P61_RepeatLength uword P61_SampleVolume uword P61_FineTune label Sample_Block_SIZE P61_ft=usecode&1 P61_pu=usecode&2 P61_pd=usecode&4 P61_tp=usecode&40 P61_vib=usecode&80 P61_tpvs=usecode&32 P61_vbvs=usecode&64 P61_tre=usecode&$80 P61_arp=usecode&$100 P61_sof=usecode&$200 P61_vs=usecode&$400 P61_pj=usecode&$800 P61_vl=usecodem&/&$1000 P61_pb=usecode&$2800 P61_sd=usecode&$8000 P61_ec=usecode&$ffff0000 P61_fi=usecode&$10000 P61_fsu=usecode&$20000 P61_fsd=usecode&$40000 P61_sft=usecode&$200000 P61_pl=usecode&$400000&((1-split4)*$400000) ;incompatible with split4. P61_timing=usecode&$1000000 P61_rt=usecode&$2000000 P61_fvu=usecode&$4000000 P61_fvd=usecode&$8000000 P61_nc=usecode&$10000000 P61_nd=usecode&$20000000 P61_pde=usecode&$40000000 P61_il=usecode&$80000000 endc ifne asmonereport ********** REPORT ***i n******* printt "" printt "Options used:" printt "-------------" ifne p61fade printt "Mastervolume on" else printt "Mastervolume off" endc ifne p61system printt "System friendly" else printt "System killer" endc ifne p61cia printt "CIA-tempo on" else printt "CIA-tempo off" endc ifne p61exec printt "ExecBase valid" else printt "ExecBase invalid" endc ;; --- wicked nasty nested ifs --- ifne lev6 printt "Level 6 IRQ on" else ifeq (noshorts&(1-p61syϊstem)) printt "FAIL: Non-lev6 NOT available for p61system=1 or noshorts=0!" else printt "Non-lev6 implemented with 'poke DMAbits byte to a specified address'." printt "* READ DOCS for how to specify it and how it works." endc ;noshorts&(1-p61system) endc ;lev6 ;; --- end of wicked nasty nested ifs --- ifne opt020 printt "MC68020 optimizations" else printt "Normal MC68000 code" endc printt "Channels:" printv channels ifgt channels-4 printt "FAIL: More than 4 3channels." endc ifeq channels printt "FAIL: Can't have 0 channels." endc printt "UseCode:" printv usecode printt "Player binary size:" printv P61E-P61B ********** REPORT END ********** endc ;ifne asmonereport P61B: P61_motuuli: jmp P61_Init(PC) ifeq p61cia jmp P61_Music(PC) else rts rts endc jmp P61_End(PC) rts ;no P61_SetRepeat rts ifne p61jump jmp P61_SetPosition(PC) else rts rts endc P61_Master: dc.w 64 P61_Tempo: dc.w 1 P61_Play: dc.w 1 Pڏ61_E8: dc.w 0 P61_VBR: dc.l 0 P61_Pos: dc.w 0 P61_Patt: dc.w 0 P61_CRow: dc.w 0 P61_Temp0Offset: dc.l P61_temp0-P61_motuuli P61_Temp1Offset: dc.l P61_temp1-P61_motuuli P61_Temp2Offset: dc.l P61_temp2-P61_motuuli P61_Temp3Offset: dc.l P61_temp3-P61_motuuli P61_getnote:macro moveq #$7e,d0 and.b (a5),d0 beq.b .nonote ifne P61_vib clr.b P61_VibPos(a5) endc ifne P61_tre clr.b P61_TrePos(a5) endc ifne P61_ft add P61_Fine(a5),d0 endc move d0,P61_Note(a5) move (a2,d0),P61_Period(a5) .nonote: endm ifeq p61system ifne p61cia P61_intti: movem.l d0-a6,-(sp) tst.b $bfdd00 lea $dff000+C,a6 move #$2000,$9c-C(a6) move #$2000,$9c-C(a6) bsr P61_Music movem.l (sp)+,d0-a6 nop rte endc endc ifne p61system P61_lev6server: movem.l d2-d7/a2-a6,-(sp) lea P61_timeron(pc),a0 tst (a0) beq.b P61_ohi lea $dff000+C,a6 move P61_server(pc),d0 beq.b P61_musica subq #1,d0 beq P61_dmason ifeq nowaveforms bra P61_setrepeat else bra.b P61_ohi endcd\ P61_musica: bsr P61_Music P61_ohi: movem.l (sp)+,d2-d7/a2-a6 moveq #1,d0 rts endc ********** P61_Init ********** * Input: A0=P61-module addr. * A1 [LONG] = 0 if samples are internal to the module * Address of samples otherwise * A2 [LONG] = Address of sample buffer if the module uses packed * samples, otherwise can be left uninitialized * A4 [LONG] = Address where 'DMA ON' byte (low 8 bits of DMACON) * should be poked. ONLY used together with lev6=0. *4 D0 [WORD] = 0 autodetect CIA Timer frequency, if ExecBase * is valid otherwise assume PAL * 1 assume PAL * 2 assume NTSC * [Used only in CIA-enabled mode] * Uses: D0-A7, A6 set to $dff000+C (your custombase) at exit. * Returns: D0=0 if okay (i.e. P61 module!). No need to change D0.l. * NOTE: the define 'start' has been made runtime. move.w #,P61_InitPos instead. P61_Init: lea $dff000+C,a6 ifeq p61system ifne quietstart moveyà_.w #$f,$96-C(A6) ;audiodma off lea $a0-C(A6),a5 ;chan 0 lea P61_Quiet(PC),a3 moveq #0,d1 moveq #channels-1,d5 .choffl:move.l a3,(a5)+ ;ptr move.l #1<<16+124,(a5)+ ;len, 'fastest common' period move.l d1,(a5)+ ;quiet volume & audchan. addq.w #4,a5 dbf d5,.choffl endc endc cmp.l #"P61A",(a0)+ beq.b .modok subq.l #4,a0 .modok: ifne p61cia move d0,-(sp) endc moveq #0,d0 cmp.l d0,a1 bne.b .redirect move (a0),d0 lea (a0,d0.l),a1 .redirect: move.l a2,a6 lea 8(Fjna0),a2 moveq #$40,d0 and.b 3(a0),d0 bne.b .buffer move.l a1,a6 subq.l #4,a2 .buffer: lea P61_cn(pc),a3 move.w #$ff00,d1 move.w d1,P61_OnOff+P61_temp0-P61_cn(a3) ;stop active decsteps move.w d1,P61_OnOff+P61_temp1-P61_cn(a3) move.w d1,P61_OnOff+P61_temp2-P61_cn(a3) move.w d1,P61_OnOff+P61_temp3-P61_cn(a3) ifne copdma move.l a4,p61_DMApokeAddr-P61_cn(a3) endc moveq #$1f,d1 and.b 3(a0),d1 move.l a0,-(sp) ;; --- insert pan/echo in this loop --- lea P61_samples(32K of patterns move (a2)+,d0 ;and no movem-signextend. This code is correct. lea (a4,d0.l),a1 move.l a1,P61_ChaPos+P61_temp0-P61_cn(a3) move (a2)+,d0 lea (a4,d0.l),a1 move.l a1,P61_ChaPos+P61_temp1-P61_cn(a3) move (a2)+,d0 lea (a4,d0.l),a1 move.l a1,P61_ChaPos+P61_temp2-P61_cn(a3) move (a2)+,d0 lea (a4,d0.l),a1 move.l a1,P61_ChaPos+P61_temp3-P61_cn(a3) ifeq nowaveforms lea P61_setrepeat(pc),a0 move.l a0,P61_intaddr-P61_cn(a3) endc move #63,P61_row%1pos-P61_cn(a3) move #6,P61_speed-P61_cn(a3) move #5,P61_speed2-P61_cn(a3) clr P61_speedis1-P61_cn(a3) ifne P61_pl clr.l P61_plcount-P61_cn(a3) endc ifne P61_pde clr P61_pdelay-P61_cn(a3) clr P61_pdflag-P61_cn(a3) endc clr (a3) ;start frame of very first song note. ;"reused" patterns with effects coming out of nowhere ;at start of song require 0. Otherwise F0x speed-2 is ;ok, except if split4=1, set to F-speed - #channels. ;Don't change if you don't need 'the very quickes&~t click to start' speed. moveq #2,d0 and.b $bfe001,d0 move.b d0,P61_ofilter-P61_cn(a3) bset #1,$bfe001 ifeq p61system ifne p61exec move.l 4.w,a6 moveq #0,d0 btst d0,297(a6) beq.b .no68010 lea P61_liko(pc),a5 jsr -$1e(a6) .no68010: move.l d0,P61_VBR-P61_cn(a3) endc move.l P61_VBR-P61_cn(a3),a0 lea $78(a0),a0 move.l a0,P61_vektori-P61_cn(a3) move.l (a0),P61_oldlev6-P61_cn(a3) ifeq copdma lea P61_dmason(pc),a1 ;set 'dma-on-interrupt'. move.l a1,(a0) endc endc mo'~veq #$f,d0 lea $dff000+C,a6 ;a6 trashed above. ifeq quietstart moveq #$0,d1 ;original code move d1,$a8-C(a6) move d1,$b8-C(a6) move d1,$c8-C(a6) move d1,$d8-C(a6) move d0,$96-C(a6) endc ifne nowaveforms move.w d0,P61_NewDMA-P61_cn(a3) ;"NEXTframe setloop" to be triggered endc ifeq p61system ifeq copdma lea P61_dmason(pc),a1 ;again? move.l a1,(a0) endc move #$2000,$9a-C(a6) ;old timerb OFF lea $bfd000,a0 lea P61_timers(pc),a1 move.b #$7f,$d00(a0) ifne p61(áҨpcia ;only affect cia if actually used move.b #$10,$e00(a0) endc move.b #$10,$f00(a0) ifne p61cia move.b $400(a0),(a1)+ move.b $500(a0),(a1)+ else addq.w #2,a1 endc move.b $600(a0),(a1)+ move.b $700(a0),(a1) endc ifeq (p61system+p61cia) move.b #$82,$d00(a0) endc ifne p61cia move (sp)+,d0 subq #1,d0 beq.b P61_ForcePAL subq #1,d0 beq.b P61_NTSC ifne p61exec move.l 4.w,a1 cmp.b #60,$213(a1) beq.b P61_NTSC endc P61_ForcePAL: move.l #1773447,d0 bra.b P61_set)-cia P61_NTSC: move.l #1789773,d0 P61_setcia: move.l d0,P61_timer-P61_cn(a3) divu #125,d0 move d0,P61_thi2-P61_cn(a3) sub #$1f0*2,d0 move d0,P61_thi-P61_cn(a3) ifeq p61system move P61_thi2-P61_cn(a3),d0 move.b d0,$400(a0) lsr #8,d0 move.b d0,$500(a0) lea P61_intti(pc),a1 move.l a1,P61_tintti-P61_cn(a3) move.l P61_vektori(pc),a2 move.l a1,(a2) move.b #$83,$d00(a0) move.b #$11,$e00(a0) endc endc ifeq p61system ifeq copdma move #$e000,$9a-C(a6) ;level 6 timer B int*?@, at least for setloop else move #$c000,$9a-C(a6) ;no level 6 timer B int, please ;(bit 14 is cleared above.) endc ifne quietstart move.w #$800f,$96-C(A6) ;make all used channels start a quiet loop. endc moveq #0,d0 rts ifne p61exec P61_liko: dc.l $4E7A0801 rte endc endc ifne p61system move.l a6,-(sp) ifne p61cia clr P61_server-P61_cn(a3) else move #1,P61_server-P61_cn(a3) endc move.l 4.w,a6 moveq #-1,d0 jsr -$14a(a6) move.b d0,P61_sigbit-P61_cn(a3) bm+@1i P61_err lea P61_allocport(pc),a1 move.l a1,P61_portti-P61_cn(a3) move.b d0,15(a1) move.l a1,-(sp) suba.l a1,a1 jsr -$126(a6) move.l (sp)+,a1 move.l d0,16(a1) lea P61_reqlist(pc),a0 move.l a0,(a0) addq.l #4,(a0) clr.l 4(a0) move.l a0,8(a0) lea P61_dat(pc),a1 move.l a1,P61_reqdata-P61_cn(a3) lea P61_allocreq(pc),a1 lea P61_audiodev(pc),a0 moveq #0,d0 moveq #0,d1 jsr -$1bc(a6) tst.l d0 bne P61_err st.b P61_audioopen-P61_cn(a3) lea P61_timerint(pc),a1 move.l a1,,P61_timerdata-P61_cn(a3) lea P61_lev6server(pc),a1 move.l a1,P61_timerdata+8-P61_cn(a3) moveq #0,d3 lea P61_cianame(pc),a1 P61_openciares: moveq #0,d0 move.l 4.w,a6 jsr -$1f2(a6) move.l d0,P61_ciares-P61_cn(a3) beq.b P61_err move.l d0,a6 lea P61_timerinterrupt(pc),a1 moveq #0,d0 jsr -6(a6) tst.l d0 beq.b P61_gottimer addq.l #4,d3 lea P61_timerinterrupt(pc),a1 moveq #1,d0 jsr -6(a6) tst.l d0 bne.b P61_err P61_gottimer: lea P61_craddr+8(pc),a6 move.l P61_ciaaddr-mJ(pc,d3),d0 move.l d0,(a6) sub #$100,d0 move.l d0,-(a6) moveq #2,d3 btst #9,d0 bne.b P61_timerB subq.b #1,d3 add #$100,d0 P61_timerB: add #$900,d0 move.l d0,-(a6) move.l d0,a0 and.b #%10000000,(a0) move.b d3,P61_timeropen-P61_cn(a3) moveq #0,d0 ifne p61cia move.l P61_craddr+4(pc),a1 move.b P61_tlo(pc),(a1) move.b P61_thi(pc),$100(a1) endc or.b #$19,(a0) st P61_timeron-P61_cn(a3) P61_pois: move.l (sp)+,a6 rts P61_err:moveq #-1,d0 bra.b P61_pois P61_ciaaddr: dc.t$.l $bfd500,$bfd700 endc ********** P61_End ********** * Input: none. * Uses: D0-D1/A0-A1/A3/A6, A6 set to $dff000+C (your custombase) at exit. P61_End: lea $dff000+C,a6 moveq #0,d0 move d0,$a8-C(a6) move d0,$b8-C(a6) move d0,$c8-C(a6) move d0,$d8-C(a6) move #$f,$96-C(a6) and.b #%11111101,$bfe001 move.b P61_ofilter(pc),d0 or.b d0,$bfe001 ifeq p61system move #$2000,$9a-C(a6) move.l P61_vektori(pc),a0 move.l P61_oldlev6(pc),(a0) lea $bfd000,a0 lea P61_timers(pc),a1 / 7 ifne p61cia ;only affect cia if used move.b (a1)+,$400(a0) move.b (a1)+,$500(a0) else addq.w #2,a1 endc move.b (a1)+,$600(a0) move.b (a1)+,$700(a0) ifne p61cia move.b #$10,$e00(a0) endc move.b #$10,$f00(a0) else move.l a6,-(sp) lea P61_cn(pc),a3 moveq #0,d0 clr P61_timeron-P61_cn(a3) move.b P61_timeropen(pc),d0 beq.b P61_rem1 move.l P61_ciares(pc),a6 lea P61_timerinterrupt(pc),a1 subq.b #1,d0 jsr -12(a6) P61_rem1: move.l 4.w,a6 tst.b P61_audioopen-P61_cn(a0QC3) beq.b P61_rem2 lea P61_allocreq(pc),a1 jsr -$1c2(a6) clr.b P61_audioopen-P61_cn(a3) P61_rem2: moveq #0,d0 move.b P61_sigbit(pc),d0 bmi.b P61_rem3 jsr -$150(a6) st P61_sigbit-P61_cn(a3) P61_rem3: move.l (sp)+,a6 endc rts ;WHY not just cond-add mulu to where the finalvolume is set?? ;"Jag blir s matt." (c) The Big A/Phenomena. ifne p61fade P61_mfade: lea $dff0a8,a4 move P61_Master(pc),d0 move P61_temp0+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,(a4) ifgt c1vE%hannels-1 move P61_temp1+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,$10(a4) endc ifgt channels-2 move P61_temp2+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,$20(a4) endc ifgt channels-3 move P61_temp3+P61_Shadow(pc),d1 mulu d0,d1 lsr #6,d1 move d1,$30(a4) endc rts endc ifne oscillo ****************************************** ;Call directly after P61_Music to get ptr,count of samples playing THIS frame ;Input: a0=P61_temp0/1/2/3 (selects channel) ;Output: d2$q0-d1/d4/a2=WrapCount.w,Count.w,Replen=0,SamplePtr ;Only if d0.w>0:d2/d4/a1=LoopEndPtr,Replen,LoopStartPtr ;Destroys: d0-d4/a1-a2, a0 points to next channel in oscdata. ;Usage: ;If d1=0, this channel has not yet started playing sounds, and there is no ;usable data in the other registers. (I.e. don't start drawing oscilloscope ;for this chan yet.). D1 is tested at exit, so you can just beq to skip the ;channel. ;If d0<=0, just read d1 bytes from a2-ptr. ;If d0>0, subtract it from d3Ú[1 and read d1 bytes from a2-ptr. Backup Loopstart ;in a1 to (for example) a3. Then read d0 bytes from a1-ptr, if you hit the ;LoopEnd address in d2, then read the remaining bytes from Loopstart that ;you saved in a3. ;---------------- ;Most samples have a short loop at the end. If you extend all short loops to ;578 bytes, you won't have to check your sample-read-address vs the WrapPtr ;in d2 in your loop. ;A silent, short loop of 2 bytes at the end is common to end an instrument4]T. ;P61_emptyloop578 has been provided to save this check for you for all ;one-shot instruments. ;Set the oscextloops option to 0 if you haven't extended the other loops. This ;will enable an extra modulo div and disable P61_emptyloop578. You will also ;have to check for "end of replen" yourself in-loop, as mentioned. ;Bonus checkable things: ;If d4=0, the instrument has not yet reached its end loop. ;oscextloops=0: if d4=1, the instrument ended (playing quiet 2-byte loop) ;oscex5Atloops=1: only if d2=P61_emptyloop578E has the instrument ended. ;Some bragging: ;The sample-window start and end points are rounded for convenience. ;They are rounded so that the ptrs and counts generate sample-windows with no ;gap or overlap between each frame, for a perfect sequence of memory areas. ;Internally it calculates with an accuracy of 1/262144, or about 6-7 decimals. ;It supports 128KB samples with <64KB loops. ;It's fully possible to do per-frame mixing directly into 6}playing samples ;using this precision. oscextloops=0 ;this saves a modulo-div oscbigempty=0 ;optional buf regardless of oscextloops option ticksframePAL=70937*4+2 ;50.00028194 Hz ticksframeNTSC=59719*4+3 ;59.94005233 Hz P61_osc: move.w P61_Period(a0),d4 ;check for div0 bne.b .non0 .div0: lea Channel_Block_Size(a0),a0 ;next chan moveq #0,d1 ;return count of 0. rts .non0: lea P61_oscptr(a0),a0 move.l (a0)+,d0 ;ptr "x4" moveq #3,d3 and.l d0,d3 ;remainder for wrapcal7҂5c move.l d0,d2 addq.l #2,d2 lsr.l #2,d2 move.l d2,a2 ;ptr result. move.l #ticksframePAL,d2 ;for NTSC, use the NTSC constant above. divu d4,d2 ;count.w "x4", (ticks/frame) div period) moveq #0,d1 move.w d2,d1 ;'cleared hi word' clr.w d2 ;modulo in hi word (mod<<16)/period divu d4,d2 ;f.ex. 379/380 converted to 65536ths add.w d2,(a0)+ ;ptr.rem updated addx.l d1,d0 ;add count+"carry"=nextframe/'end' ptr move.l d0,-6(a0) ;saved. move.l d0,d1 addq.l #2,d1 lsr.l #2,8md1 sub.l a2,d1 ;correctly aliased sample-window byte count. moveq #0,d2 ;default replen 0->d4 later sub.l (a0)+,d0 ;loopend hit? blt.b .nowr ;; --- handle overshoot --- move.l P61_Sample-P61_DMABit(a0),a1 ;a1 "trashed" ifeq oscbigempty move.w 10(a1),d2 ;replen subq.w #1,d2 endc move.l 6(a1),a1 ;repptr ifne oscbigempty bne.b .nol1 lea P61_emptyloop578(PC),a1 ;replace with nice big loopbuffer. .nol1: endc ;; --- a1 loopstartptr result done --- ifeq oscbige9~Umpty addq.l #1,d2 ;128KB support but <64KB loops, see divu. add.l d2,d2 ;wordlen->bytelen else move.l #P61_emptyquiet578E-P61_emptyquiet578,d2 endc ;; --- d2 replen result done --- move.l a1,d4 ;loopstart lsl.l #2,d4 ;"x4" or.b d3,d4 ;keep round-bits, d3 usable now addq.w #2,d0 ;word size okay cos positive; hi word clr. lsr.w #2,d0 ;rounded count result. move.l d0,d3 ifeq oscextloops divu d2,d3 ;overshoot modulo replen. clr.w d3 ;(to not accumulate over:& ?shoot but stay in loop) swap d3 endc add.w d3,d3 ;unrounded count modulized, x4. add.w d3,d3 ;will be at most 578. add.l d4,d3 move.l d3,-10(a0) ;jump to near loopstart. remainder kept, ofc. move.l d2,d4 ;proper replen add.l a1,d2 ;LoopEndPtr result. move.l d2,d3 lsl.l #2,d3 move.l d3,-4(a0) ;new endptr(x4) for compare. bra.s .ct .nowr: move.l d2,d4 ;replen, also done in wrap, before adding a1. addq.l #2,d0 ;long cos negative and 128KB support. asr.l #2,d0 ;ro;unded wraplen result. .ct: addq.w #2,a0 ;skip P61_DMAbit tst.w d1 ;test the count. RTS ifne oscbigempty P61_emptyloop578: dcb.w 578/2,0 ;@@ this "sample" MUST be in chipmem! P61_emptyloop578E: endc endc ifne p61jump ****************************************** * P61_SetPosition ; Call P61_SetPosition to jump to a specific position in the song ; If called AFTER P61_Music, what's written below will be true but happen one ; frame later. ; OPTIONALLY Starts from the beginning<IlP if out of limits. * Input: D0.b=songposition. A6=your custombase ("$dff000") * Uses: D0-D1/A0-A1/A3 ;If you want to change pos 'at next note', call this when P61_cn=(P61_speed2-1) ;if you also need to change pos 'in rhythm', AND P61_CRow with f.ex. 2^n-1. ;if that equals 2^n-1 ("all 1s"), and cn is 'in tempo', you will get a smooth ;transition. If n is 64, you are sure to make the switch at pattern end. ;@@ NOTE: If you use this with split4=1, be aware that it must then decrun=٨ch ;up to 2 framesteps before starting to play the song (meaning the song won't ;start playing quite instantly). P61_SetPosition: lea P61_cn(pc),a3 ifne split4 move.w P61_speed2(PC),d1 ;if _Speedis1, _cn doesn't matter. subq.w #3,d1 ;allow 2 more pre-decrunch frames. else move.w P61_speed2(PC),d1 ;if _Speedis1, _cn doesn't matter. subq.w #1,d1 endc ;new pattern reaches your ears NEXT frame or CIA-int, or 3 frames later with ;the split4 option. move.w d1,(a3) ;instant >9vNSetPos, ie. decrunch next NOW ifne P61_pl clr P61_plflag-P61_cn(a3) endc moveq #0,d1 move.b d0,d1 move.l d1,d0 ifeq optjmp cmp P61_slen-P61_cn(a3),d0 blo.b .e moveq #0,d0 .e: endc move d0,P61_Pos-P61_cn(a3) add.l P61_possibase(pc),d0 move.l d0,P61_spos-P61_cn(a3) moveq #63,d0 ;yeah, the original SetPos is, like, wrong. move d0,P61_rowpos-P61_cn(a3) clr P61_CRow-P61_cn(a3) move.l P61_spos(pc),a1 move.l P61_patternbase(pc),a0 addq #1,P61_Pos-P61_cn(a3) move.b (?g$ma1)+,d0 move.l a1,P61_spos-P61_cn(a3) move.l P61_positionbase(pc),a1 move d0,P61_Patt-P61_cn(a3) lsl #3,d0 add.l d0,a1 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp0-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp1-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp2-P61_cn(a3) moveq #0,d0 ;actually faster than lea (@b>a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp3-P61_cn(a3) lea P61_temp0(PC),a3 clr.b P61_Pack+Channel_Block_Size*0(a3) ;force new take clr.b P61_Pack+Channel_Block_Size*1(a3) clr.b P61_Pack+Channel_Block_Size*2(a3) clr.b P61_Pack+Channel_Block_Size*3(a3) clr.b P61_TempLen+1+Channel_Block_Size*0(a3) ;force TakeNORM clr.b P61_TempLen+1+Channel_Block_Size*1(a3) clr.b P61_TempLen+1+Channel_Block_Size*2(a3) clr.b P61_TempLen+1+Channel_Block_Size*3(a3) moAwOve.w #$ff00,d0 move.w d0,P61_OnOff+Channel_Block_Size*0(a3) ;stop active decsteps move.w d0,P61_OnOff+Channel_Block_Size*1(a3) move.w d0,P61_OnOff+Channel_Block_Size*2(a3) move.w d0,P61_OnOff+Channel_Block_Size*3(a3) clr.b P61_dma+1-P61_temp0(a3) ;stop playing channels move.w #$000f,$96-C(A6) ;indeed, in speakers too. ifne nowaveforms clr P61_NewDMA-P61_temp0(a3) ;stop DMA next note endc ifne copdma move.l p61_DMApokeAddr(PC),a3 ;don't set DMA until playtime clr.b (B=a3) endc rts endc ********** Main entry point from CIA/VB int or frame loop ********** * Input: A6=your custombase ("$dff000") * Uses: D0-A7, A6 set to $dff000+C (your custombase) at exit. P61_Music: lea P61_cn(pc),a3 moveq #0,d7 ;replaced clr.* with move.* d7, lea $a0-C(a6),a4 ;Aud Chan Base. ifne playflag tst P61_Play-P61_cn(a3) ;set by init if CIA bne.b P61_ohitaaa ifne p61cia ifne p61system move.l P61_craddr+4(pc),a0 move.b P61_tlo2(pc),(a0) move.b P61_thi2(pc)Cx,$100(a0) endc endc rts endc P61_ohitaaa: ifne visuctrs ;easy visualizer counters. addq.w #1,P61_visuctr0-P61_cn(a3) ;inc elapsed #calls since last addq.w #1,P61_visuctr1-P61_cn(a3) addq.w #1,P61_visuctr2-P61_cn(a3) addq.w #1,P61_visuctr3-P61_cn(a3) endc ifne p61fade pea P61_mfade(pc) endc move.w (a3),d4 cmp.w P61_speed2(pc),d4 ;Really compares with P61_speed, 1 added later. beq.w P61_playtime ;if new note frame, handle ;; --- no new note --- ; bsr P61_SynD߇G[th ;synth/pan/echo cpu-mix routine. Not done yet. ;(note: re-cmp to d4 if you put something here.) ifeq suppF01 blt.b P61_nowrap ;otherwise last was not playtime-frame. endc ;; --- first frame of new step --- ;rolled over from playtime to frame after. incompatible with F01. ifeq suppF01 ifne nowaveforms move.b P61_dma+1-P61_cn(a3),P61_NewDMA+1-P61_cn(a3) ;or set by fx endc clr.w d4 subq #1,P61_rowpos-P61_cn(a3) ;next pattern-step bpl.b P61_nonewpatt P61_nextpattern:E>0 ifne P61_pl move d7,P61_plflag-P61_cn(a3) endc move.l P61_patternbase(pc),a0 moveq #63,d0 move d0,P61_rowpos-P61_cn(a3) move d7,P61_CRow-P61_cn(a3) move.l P61_spos(pc),a1 addq #1,P61_Pos-P61_cn(a3) move.b (a1)+,d0 bpl.b P61_dk move.l P61_possibase(pc),a1 move.b (a1)+,d0 move d7,P61_Pos-P61_cn(a3) P61_dk: move.l a1,P61_spos-P61_cn(a3) move d0,P61_Patt-P61_cn(a3) lsl #3,d0 move.l P61_positionbase(pc),a1 add.l d0,a1 move.w (a1)+,d0 ;no movem sign-extend... check. FṬrJ add.l a0,d0 move.l d0,P61_ChaPos+P61_temp0-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp1-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp2-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp3-P61_cn(a3) bra.b P61_nowrap P61_nonewpatt: moveq #63,d0 sub P61_rowpGp6os-P61_cn(a3),d0 move d0,P61_CRow-P61_cn(a3) endc ;; --- end of rolled over code --- P61_nowrap: addq.w #1,d4 ;NOW I do! move d4,(a3) P61_delay: ifne nowaveforms ;nd,rt,sof, or note triggered dmaoff move.w P61_NewDMA(PC),d5 ;on last P61_Music call? beq.b .nosetloops move.l P61_Sample+P61_temp0(PC),a0 move.l 6(a0),(a4) ;loop start move.w 10(a0),4(a4) ;loop len ifgt channels-1 move.l P61_Sample+P61_temp1(PC),a0 move.l 6(a0),$10(a4) ;loop start move.w 10(a0),$Hi14(a4) ;loop len endc ifgt channels-2 move.l P61_Sample+P61_temp2(PC),a0 move.l 6(a0),$20(a4) ;loop start move.w 10(a0),$24(a4) ;loop len endc ifgt channels-3 move.l P61_Sample+P61_temp3(PC),a0 move.l 6(a0),$30(a4) ;loop start move.w 10(a0),$34(a4) ;loop len endc move.w d7,P61_NewDMA-P61_cn(a3) ;poll (clear) .nosetloops: endc ifne p61cia ifne p61system move.l P61_craddr+4(pc),a0 move.b P61_tlo2(pc),(a0) move.b P61_thi2(pc),$100(a0) endc endc ********** mainIPafx handling ********** lea P61_temp0(pc),a5 moveq #channels-1,d5 P61_lopas: tst.b P61_OnOff+1(a5) beq.w P61_contfxdone moveq #$f,d0 and (a5),d0 ifeq opt020 add d0,d0 move P61_jtab2(pc,d0),d0 else move P61_jtab2(pc,d0*2),d0 endc jmp P61_jtab2(pc,d0) P61_jtab2: dc P61_contfxdone-P61_jtab2 ifne P61_pu dc P61_portup-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_pd dc P61_portdwn-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_tp dc P61_tonepoJ1&-2rt-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_vib dc P61_vib2-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_tpvs dc P61_tpochvslide-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_vbvs dc P61_vibochvslide-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_tre dc P61_tremo-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc ifne P61_arp dc P61_arpeggio-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc dc P61_contfxdone-P61K _jtab2 ifne P61_vs dc P61_volslide-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc dc P61_contfxdone-P61_jtab2 dc P61_contfxdone-P61_jtab2 dc P61_contfxdone-P61_jtab2 ifne P61_ec dc P61_contecommands-P61_jtab2 else dc P61_contfxdone-P61_jtab2 endc dc P61_contfxdone-P61_jtab2 ;; --- end of contfx table --- ifne P61_ec P61_contecommands: move.b P61_Info(a5),d0 and #$f0,d0 lsr #3,d0 move P61_etab2(pc,d0),d0 jmp P61_etab2(pc,d0) P61_etab2: dc P61_contfxdone-P61Lq_etab2 ifne P61_fsu dc P61_fineup2-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_fsd dc P61_finedwn2-P61_etab2 else dc P61_contfxdone-P61_etab2 endc dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 ifne P61_rt dc P61_retrig-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_fvu dc P61_finevup2-P61_etab2 else dc P61_contfxdoneM&R-P61_etab2 endc ifne P61_fvd dc P61_finevdwn2-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_nc dc P61_notecut-P61_etab2 else dc P61_contfxdone-P61_etab2 endc ifne P61_nd dc P61_notedelay-P61_etab2 else dc P61_contfxdone-P61_etab2 endc dc P61_contfxdone-P61_etab2 dc P61_contfxdone-P61_etab2 endc ifne P61_fsu P61_fineup2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 sub d0,P61_Period(a5) moveq #113,d0 cmp P61_Period(a5),d0 ble.NP{3b .jup move d0,P61_Period(a5) .jup: move P61_Period(a5),6(a4) bra.w P61_contfxdone endc ifne P61_fsd P61_finedwn2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 add d0,P61_Period(a5) cmp #856,P61_Period(a5) ble.b .jup move #856,P61_Period(a5) .jup: move P61_Period(a5),6(a4) bra.w P61_contfxdone endc ifne P61_fvu P61_finevup2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 add d0,P61_Volume(a5) moveq #64,d0 cmp P61_Volume(a5),Ov(1d0 bge.b .jup move d0,P61_Volume(a5) .jup: move P61_Volume(a5),8(a4) bra.w P61_contfxdone endc ifne P61_fvd P61_finevdwn2: tst (a3) bne.w P61_contfxdone moveq #$f,d0 and.b P61_Info(a5),d0 sub d0,P61_Volume(a5) bpl.b .jup move d7,P61_Volume(a5) .jup: move P61_Volume(a5),8(a4) bra.w P61_contfxdone endc ifne P61_nc P61_notecut: moveq #$f,d0 and.b P61_Info(a5),d0 cmp (a3),d0 bne.w P61_contfxdone ifeq p61fade move d7,8(a4) else move d7,P61_Shadow(a5) endc move d7,PP61_Volume(a5) bra.w P61_contfxdone endc ifne P61_nd P61_notedelay: moveq #$f,d0 and.b P61_Info(a5),d0 cmp (a3),d0 bne.w P61_contfxdone moveq #$7e,d0 and.b (a5),d0 beq.w P61_contfxdone move P61_DMABit(a5),d0 move d0,$96-C(a6) ;turn chan dma off or d0,P61_dma-P61_cn(a3) ;flag for turnon later ifne nowaveforms or d0,P61_NewDMA-P61_cn(a3) ;no interrupt needed, done next frame. endc move.l P61_Sample(a5),a1 ;set new ptr len already ifeq oscillo move.l (a1)+,(a4) moveQj (a1),4(a4) else ;; --- wohoo oscilloscope ptrs --- moveq #0,d1 move.l (a1)+,d0 move (a1),d1 move.l d0,(a4) move.w d1,4(a4) subq.w #1,d1 addq.l #1,d1 ;128KB support for sample endptr lsl.l #2,d0 ;clear remainder. move.l d0,P61_oscptr(a5) move.w d7,P61_oscptrrem(a5) ;clear remainder. lsl.l #3,d1 add.l d0,d1 move.l d1,P61_oscptrWrap(a5) ;wrap endptr for compare. endc ; move P61_Period(a5),(a4) ; subq.l #6,a4 move P61_Period(a5),6(a4) ;bugfix from P6108+ ifnR+-e copdma move.l p61_DMApokeAddr(PC),a0 move.b P61_dma+1-P61_cn(a3),(a0) ;keep updated. endc ifeq copdma&nowaveforms ;both must be on to skip int. ifeq p61system ;int starter. lea P61_dmason(pc),a1 move.l P61_vektori(pc),a0 move.l a1,(a0) move.b #$f0,$bfd600 move.b #$01,$bfd700 move.b #$19,$bfdf00 else move #1,P61_server-P61_cn(a3) move.l P61_craddr+4(pc),a1 move.b #$f0,(a1) move.b #1,$100(a1) endc endc bra.w P61_contfxdone endc ifne P61_rt P61_retrig: subq #SP1,P61_RetrigCount(a5) bne.w P61_contfxdone move P61_DMABit(a5),d0 move d0,$96-C(a6) or d0,P61_dma-P61_cn(a3) ifne nowaveforms or d0,P61_NewDMA-P61_cn(a3) ;no interrupt needed, done next frame. endc move.l P61_Sample(a5),a1 ifeq oscillo move.l (a1)+,(a4) move (a1),4(a4) else ;; --- wohoo oscilloscope ptrs --- moveq #0,d1 move.l (a1)+,d0 move (a1),d1 move.l d0,(a4) move.w d1,4(a4) subq.w #1,d1 addq.l #1,d1 ;128KB support for sample endptr lsl.l #2,d0 ;cleaTr remainder. move.l d0,P61_oscptr(a5) move.w d7,P61_oscptrrem(a5) ;clear remainder. lsl.l #3,d1 add.l d0,d1 move.l d1,P61_oscptrWrap(a5) ;wrap endptr for compare. endc ifne copdma move.l p61_DMApokeAddr(PC),a0 move.b P61_dma+1-P61_cn(a3),(a0) ;keep updated. endc ifeq copdma&nowaveforms ;both must be on to skip int. ifeq p61system ;int starter. lea P61_dmason(pc),a1 move.l P61_vektori(pc),a0 move.l a1,(a0) move.b #$f0,$bfd600 move.b #$01,$bfd700 move.b #$19,$bfdU6+f00 else move #1,P61_server-P61_cn(a3) move.l P61_craddr+4(pc),a1 move.b #$f0,(a1) move.b #1,$100(a1) endc endc moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_RetrigCount(a5) bra.w P61_contfxdone endc ifne P61_arp P61_arplist: dc.b 0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0 dc.b 1,-1,0,1,-1,0,1,-1,0,1,-1,0,1,-1,0,1 P61_arpeggio: move (a3),d0 move.b P61_arplist(pc,d0),d0 beq.b .arp0 bmi.b .arp1 move.b P61_Info(a5),d0 lsr #4,d0 bra.b .arp3 .arp0: move P61_Note(a5),d0Vb move P61_periods-P61_cn(a3,d0),6(a4) bra.w P61_contfxdone .arp1: moveq #$f,d0 and.b P61_Info(a5),d0 .arp3: add d0,d0 add P61_Note(a5),d0 move P61_periods-P61_cn(a3,d0),6(a4) bra.w P61_contfxdone endc ;; --- period table move to before P61_cn --- ifne P61_vs P61_volslide: move.b P61_Info(a5),d0 sub.b d0,P61_Volume+1(a5) bpl.b .test move d7,P61_Volume(a5) ifeq p61fade move d7,8(a4) else move d7,P61_Shadow(a5) endc bra.w P61_contfxdone .test: moveq #64,d0 cmpW P61_Volume(a5),d0 bge.b .ncs move d0,P61_Volume(a5) ifeq p61fade move d0,8(a4) else move d0,P61_Shadow(a5) endc bra.w P61_contfxdone .ncs: ifeq p61fade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc bra.w P61_contfxdone endc ifne P61_tpvs P61_tpochvslide: move.b P61_Info(a5),d0 sub.b d0,P61_Volume+1(a5) bpl.b .test move d7,P61_Volume(a5) ifeq p61fade move d7,8(a4) else move d7,P61_Shadow(a5) endc bra.b P61_toneport .test: moveq #64,Xus {d0 cmp P61_Volume(a5),d0 bge.b .ncs move d0,P61_Volume(a5) .ncs: ifeq p61fade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc endc ifne P61_tp P61_toneport: move P61_ToPeriod(a5),d0 beq.w P61_contfxdone move P61_TPSpeed(a5),d1 cmp P61_Period(a5),d0 blt.b .topoup add d1,P61_Period(a5) cmp P61_Period(a5),d0 bgt.b .setper move d0,P61_Period(a5) move d7,P61_ToPeriod(a5) move d0,6(a4) bra.b P61_contfxdone .topoup: sub d1,P61_Period(a5) cmp P6YpÐ1_Period(a5),d0 blt.b .setper move d0,P61_Period(a5) move d7,P61_ToPeriod(a5) .setper: move P61_Period(a5),6(a4) else nop endc bra.w P61_contfxdone ifne P61_pu P61_portup: moveq #0,d0 move.b P61_Info(a5),d0 ifne use1Fx cmp.b #$f0,d0 bhs.b P61_contfxdone endc sub d0,P61_Period(a5) moveq #113,d0 cmp P61_Period(a5),d0 ble.b .skip move d0,P61_Period(a5) move d0,6(a4) bra.b P61_contfxdone .skip: move P61_Period(a5),6(a4) bra.w P61_contfxdone endc ifne P61_pd P61ZM_portdwn: moveq #0,d0 move.b P61_Info(a5),d0 add d0,P61_Period(a5) cmp #856,P61_Period(a5) ;max period=6.95 (7) scanlines per two samples. ble.b .skip move #856,d0 move d0,P61_Period(a5) move d0,6(a4) bra.b P61_contfxdone .skip: move P61_Period(a5),6(a4) ; bra.w P61_contfxdone endc ********** MainFX returns here from all fx ********** P61_contfxdone: ifne P61_il bsr.w P61_funk2 endc lea Channel_Block_Size(a5),a5 lea Custom_Block_Size(a4),a4 dbf d5,P61_lopas ;; ---[( splitchans or normal decrunch --- ifeq split4 cmp P61_speed2(PC),d4 ;'decrunch frame'? (1 before playtime) bne.w P61_ret2 P61_preplay2: .pr: ifle (channels-splitchans) printt "splitchans >= channels! Must be less." else moveq #(channels-splitchans)-1,d5 ;do preplay "first" half lea P61_temp0(pc),a5 bra.w P61_preplay endc else ;split4 ;; --- split4 decrunch --- ;Copies relevant chandata from a0 to a5 CHANCPY: macro movem.l (a0),d0-d4 movem.l d0-d4,(a5) ifn\%e P61_ft move.l P61_Volume(a0),P61_Volume(a5) ;vol+ft else move.w P61_Volume(a0),P61_Volume(a5) ;vol endc ifne P61_sof move.w P61_Offset(a0),P61_Offset(a5) endc ifne P61_il move.l P61_Wave(a0),P61_Wave(a5) endc endm P61_split4: move.w P61_speed2(PC),d5 cmp.w d5,d4 beq.b .pr2 subq.w #1,d5 cmp.w d5,d4 beq.b .pr1 subq.w #1,d5 cmp.w d5,d4 bne.w P61_ret2 ;last decrunchframe is in playtime .pr0: lea P61_temp0copy(PC),a5 ;dst lea P61_temp0(PC),a0 ;src CHANCPY br]:a.w P61_preplay ;decrunches to copy .pr1: ifgt channels-1 lea P61_temp1copy(PC),a5 ;dst lea P61_temp1(PC),a0 ;src CHANCPY bra.w P61_preplay ;decrunches to copy else rts endc .pr2: lea P61_temp0copy(PC),a0 ;src lea P61_temp0(PC),a5 ;dst CHANCPY ifgt channels-1 lea P61_temp1copy(PC),a0 ;src lea P61_temp1(PC),a5 ;dst CHANCPY endc ifgt channels-2 lea P61_temp2(PC),a5 ;...and decrunch this chan to normal bra.w P61_preplay else rts endc endc ;if split4 ****^****** My Jump Table ********** P61_MyJpt:;jump table,%x1111xxx,%x111xxxx,%x11xxxxx=note,cmd,all - else empty ; REPT 12 jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) jmp P61_all(PC) _\jmp P61_all2(PC) jmp P61_all(PC) jmp P61_all2(PC) ; ENDR jmp P61_cmd(PC) jmp P61_cmd2(PC) jmp P61_cmd(PC) jmp P61_cmd2(PC) jmp P61_noote(PC) jmp P61_note2(PC) jmp P61_empty(PC) jmp P61_empty2(PC) ; REPT 12 jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_all`Y~S(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) jmp P61_allS(PC) jmp P61_all2S(PC) ; ENDR jmp P61_cmdS(PC) jmp P61_cmd2S(PC) jmp P61_cmdS(PC) jmp P61_cmd2S(PC) jmp P61_noteS(PC) jmp P61_note2S(PC) jmp P61_emptyS(PC) ; jmp P61_empty2S(PC) ********** END OF MYJPT ********** P61_empty2S: move d7,(a5)+ move.b d7,(a5)+ ;; --- alt exit --- P61_proccompS: move.b (a0)+,d1 move.b d1,d0 a8add.b d1,d1 bpl.b P61_permexit ;bit 6 was 0 ;; --- stay in chan, repeat --- .b6set: bcs.b .bit16 .bit8: move.b d7,(a5) subq.l #3,a5 ;stay tuned to this channel! and.w d4,d0 ;nec to clr hi byte move.b d0,P61_TempLen+1(a5) move.b (a0)+,d0 ;hi word is clear. (constant) move.l a0,P61_ChaPos(a5) ;dupe of above sub.l d0,a0 ;this 'repeats' same but doesnt update! .jedi1: move.b (a0)+,d0 ;used in .empty etc moveq #-8,d1 ;if sign, new P61_pack, retaddr-2 and.b d0,db11 jmp P61_MyJpt+256(PC,d1.w) .bit16: move.b d7,(a5) subq.l #3,a5 and.w d4,d0 ;nec to clr hi byte move.b d0,P61_TempLen+1(a5) ifeq opt020 move.b (a0)+,d0 ;hi word is clear. (constant) lsl #8,d0 move.b (a0)+,d0 else move.w (a0)+,d0 ;(potentially) odd-address word-read. endc move.l a0,P61_ChaPos(a5) ;dupe of above sub.l d0,a0 ;this 'repeats' same but doesnt update! .jedi2: move.b (a0)+,d0 ;used in .empty etc moveq #-8,d1 ;if sign, new P61_pack, retaddr-2 and.cH~O$fe00..$fffe (if big jtab) move P61_jtab(PC,d0),d0 jmp P61_jtab(PC,d0) P61_fxdone: ;this sets dma and paula values moveq #$7e,d0 and.b (a5),d0 beq.b P61_nocha ifne P61_vib move.b d7,P61_VibPos(a5) endc ifne P61_tre move.b d7,P61_TrePos(a5) endc ifne P61_ft add P61_Fine(a5),d0 endc move d0,P61_Note(a5) move P61_periods-P61_cn(a3,d0),P61_Period(a~5) P61_zample: ;also direct target for finetune retrig ifne P61_sof tst P61_Offset(a5) bne.w P61_pek endc ;; --- check DMA-mask for pan/echo samplestarts, modify it, mix. --- ; bsr P61_Synth ;synth/pan/echo cpu-mix routine. Not done yet. ;; --- modify below code to not touch synth/pan/echo fixchans --- or P61_DMABit(a5),d4 ;accumulate channels touched move.l P61_Sample(a5),a1 ;skipped if nocha ifeq oscillo move.l (a1)+,(a4) move (a1),4(a4) else ;; --- wohoo E 7*oscilloscope ptrs --- moveq #0,d1 move.l (a1)+,d0 move (a1),d1 move.l d0,(a4) move.w d1,4(a4) subq.w #1,d1 addq.l #1,d1 ;128KB support for sample endptr lsl.l #2,d0 ;clear remainder. move.l d0,P61_oscptr(a5) move.w d7,P61_oscptrrem(a5) ;clear remainder. lsl.l #3,d1 add.l d0,d1 move.l d1,P61_oscptrWrap(a5) ;wrap endptr for compare. endc ;oscillo P61_nocha: ifeq p61fade move.l P61_Period(a5),6(a4) else move P61_Period(a5),6(a4) move P61_Volume(a5),P61_Shadow( i~a5) endc P61_skip: ifne P61_il bsr.w P61_funk2 endc DBF d5,P61_los P61_chansdone: ifne clraudxdat move.w d4,d5 lsl.w #3,d5 add.b d5,d5 bpl.b .noch3 move.w d7,$da-C(A6) ;clear AUDxDAT .noch3: add.b d5,d5 bpl.b .noch2 move.w d7,$ca-C(A6) ;clear AUDxDAT .noch2: add.b d5,d5 bpl.b .noch1 move.w d7,$ba-C(A6) ;clear AUDxDAT .noch1: add.b d5,d5 bpl.b .noch0 move.w d7,$aa-C(A6) ;clear AUDxDAT .noch0: endc move d4,$96-C(a6) ;DMAclear - changed to not be written 4 times!* ifne visuctrs lea P61_visuctr0+channels*2(PC),a0 moveq #channels-1,d5 .visul: subq.w #2,a0 btst d5,d4 beq.s .noctr0 move.w d7,(a0) .noctr0: dbf d5,.visul endc ifne copdma move.l p61_DMApokeAddr(PC),a0 move.b d4,(a0) ;only the low byte is poked, allowing other dma endc move.b d4,P61_dma+1-P61_cn(a3) ;; --- non-rolled over code --- compatible with F01. ifne suppF01 ;moved to here in P6110. ifne nowaveforms move.b d4,P61_NewDMA+1-P61_cn(a3) ;or set by fx en"릉dc move.w d7,(a3) ;clr p61_cn ifne P61_pl tst.b P61_plflag+1-P61_cn(a3) beq.b P61_ohittaa lea P61_temp0(pc),a1 lea P61_looppos(pc),a0 moveq #channels-1,d0 .talt: move.b 1(a0),3(a1) addq.l #2,a0 move.l (a0)+,P61_ChaPos(a1) move.l (a0)+,P61_TempPos(a1) move (a0)+,P61_TempLen(a1) lea Channel_Block_Size(a1),a1 dbf d0,.talt move P61_plrowpos(pc),P61_rowpos-P61_cn(a3) move.b d7,P61_plflag+1-P61_cn(a3) moveq #63,d0 sub P61_rowpos-P61_cn(a3),d0 move d0,P61_CRow-P61_cn#M(a3) rts P61_ohittaa: ;nextrow endc subq #1,P61_rowpos-P61_cn(a3) ;next pattern-step bpl.b P61_nonewpatt P61_nextpattern: ifne P61_pl move d7,P61_plflag-P61_cn(a3) endc move.l P61_patternbase(pc),a0 moveq #63,d0 move d0,P61_rowpos-P61_cn(a3) move d7,P61_CRow-P61_cn(a3) move.l P61_spos(pc),a1 addq #1,P61_Pos-P61_cn(a3) move.b (a1)+,d0 bpl.b P61_dk move.l P61_possibase(pc),a1 move.b (a1)+,d0 move d7,P61_Pos-P61_cn(a3) P61_dk: move.l a1,P61_spos-P61_cn(a3) mov$q=e d0,P61_Patt-P61_cn(a3) lsl #3,d0 move.l P61_positionbase(pc),a1 add.l d0,a1 move.w (a1)+,d0 ;no movem sign-extend... check. add.l a0,d0 move.l d0,P61_ChaPos+P61_temp0-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 ;for some reason this code doesn't add.l a0,d0 ;use 'ifgt channels-1' etc. Kept as is. move.l d0,P61_ChaPos+P61_temp1-P61_cn(a3) moveq #0,d0 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp2-P61_cn(a3) moveq #0,%,mYd0 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp3-P61_cn(a3) rts P61_nonewpatt: moveq #63,d0 sub P61_rowpos-P61_cn(a3),d0 move d0,P61_CRow-P61_cn(a3) ;; --- end of non-rolled over code --- endc ;suppF01 rts ;end of P61_playtime. ********** FX routines ********** ifne use1Fx P61_Trigger: move.b P61_Info(a5),d0 cmp.b #$f0,d0 blo.w P61_fxdone move.b d0,P61_PTrig+1-P61_cn(a3) bra.w P61_fxdone endc ifne P61_tp P61_settoneport: move.b P61_Info(a5),d0&wF beq.b P61_toponochange move.b d0,P61_TPSpeed+1(a5) P61_toponochange: moveq #$7e,d0 and.b (a5),d0 beq.w P61_nocha add P61_Fine(a5),d0 move d0,P61_Note(a5) move P61_periods-P61_cn(a3,d0),P61_ToPeriod(a5) bra.w P61_nocha endc ifne P61_sof P61_sampleoffse: moveq #0,d1 move #$ff00,d1 and 2(a5),d1 bne.b .deq move P61_LOffset(a5),d1 .deq: move d1,P61_LOffset(a5) add d1,P61_Offset(a5) moveq #$7e,d0 and.b (a5),d0 beq.w P61_nocha move P61_Offset(a5),d2 add d1,P61_Offs'!et(a5) move d2,d1 ifne P61_vib move.b d7,P61_VibPos(a5) endc ifne P61_tre move.b d7,P61_TrePos(a5) endc ifne P61_ft add P61_Fine(a5),d0 endc move d0,P61_Note(a5) move P61_periods-P61_cn(a3,d0),P61_Period(a5) bra.b P61_hup P61_pek: moveq #0,d1 move P61_Offset(a5),d1 P61_hup: or P61_DMABit(a5),d4 ;don't write 4 times, please. move.l P61_Sample(a5),a1 move.l (a1)+,d0 add.l d1,d0 move.l d0,(a4) lsr #1,d1 move (a1),d6 sub d1,d6 bpl.b P61_offok move.l -4(a1),(a4(ѹ) moveq #1,d6 P61_offok: move d6,4(a4) ifne oscillo ;; --- wohoo oscilloscope ptrs --- moveq #0,d1 move.w d6,d1 subq.w #1,d1 addq.l #1,d1 ;128KB support for sample endptr lsl.l #2,d0 ;clear remainder. move.l d0,P61_oscptr(a5) move.w d7,P61_oscptrrem(a5) ;clear remainder. lsl.l #3,d1 add.l d0,d1 move.l d1,P61_oscptrWrap(a5) ;wrap endptr for compare. endc ;oscillo bra.w P61_nocha ;continues to where ints etc is handled endc ifne P61_vl P61_volum: move)L.b P61_Info(a5),P61_Volume+1(a5) bra.w P61_fxdone endc ifne P61_pj P61_posjmp: moveq #0,d0 move.b P61_Info(a5),d0 ifeq optjmp cmp P61_slen-P61_cn(a3),d0 blo.b .e moveq #0,d0 endc .e: move d0,P61_Pos-P61_cn(a3) add.l P61_possibase(pc),d0 move.l d0,P61_spos-P61_cn(a3) endc ifne P61_pb P61_pattbreak: ;needs to be execd if posjmp, and P61_pj>0. moveq #64,d0 move d0,P61_rowpos-P61_cn(a3) move d7,P61_CRow-P61_cn(a3) P61_Bc: move.l P61_spos(pc),a1 move.l P61_patternbase*j(pc),a0 addq #1,P61_Pos-P61_cn(a3) move.b (a1)+,d0 bpl.b P61_dk2 move.l P61_possibase(pc),a1 move.b (a1)+,d0 move d7,P61_Pos-P61_cn(a3) P61_dk2: move.l a1,P61_spos-P61_cn(a3) move.l P61_positionbase(pc),a1 move d0,P61_Patt-P61_cn(a3) lsl #3,d0 add.l d0,a1 move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp0-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp1-P61_cn(a3) moveq #0,d0 ;actually+l* faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp2-P61_cn(a3) moveq #0,d0 ;actually faster than lea (a0,d0.l) move.w (a1)+,d0 add.l a0,d0 move.l d0,P61_ChaPos+P61_temp3-P61_cn(a3) bra.w P61_fxdone endc ifne P61_vib P61_vibrato: move.b P61_Info(a5),d0 beq.w P61_fxdone move.b d0,d1 move.b P61_VibCmd(a5),d2 and.b #$f,d0 beq.b P61_vibskip and.b #$f0,d2 or.b d0,d2 P61_vibskip: and.b #$f0,d1 beq.b P61_vibskip2 and.b #$f,d2 or.b d1,ȑB,d2 P61_vibskip2: move.b d2,P61_VibCmd(a5) bra.w P61_fxdone endc ifne P61_tre P61_settremo: move.b P61_Info(a5),d0 beq.w P61_fxdone move.b d0,d1 move.b P61_TreCmd(a5),d2 moveq #$f,d3 and.b d3,d0 beq.b P61_treskip and.b #$f0,d2 or.b d0,d2 P61_treskip: and.b #$f0,d1 beq.b P61_treskip2 and.b d3,d2 or.b d1,d2 P61_treskip2: move.b d2,P61_TreCmd(a5) bra.w P61_fxdone endc ifne P61_ec P61_ecommands: move.b P61_Info(a5),d0 and.w #$f0,d0 lsr #3,d0 move P61_etab(pc,d0),-jEd0 jmp P61_etab(pc,d0) P61_etab: ifne P61_fi dc P61_filter-P61_etab else dc P61_fxdone-P61_etab endc ifne P61_fsu dc P61_fineup-P61_etab else dc P61_fxdone-P61_etab endc ifne P61_fsd dc P61_finedwn-P61_etab else dc P61_fxdone-P61_etab endc dc P61_fxdone-P61_etab ;e3 dc P61_fxdone-P61_etab ;e4 ifne P61_sft ;e5 dc P61_setfinetune-P61_etab else dc P61_fxdone-P61_etab endc ifne P61_pl ;e6,patternloop dc P61_patternloop-P61_etab else dc P61_fxdone-P6.?Z1_etab endc dc P61_fxdone-P61_etab ;e7 ifne P61_timing dc P61_sete8-P61_etab else dc P61_fxdone-P61_etab endc ifne P61_rt dc P61_setretrig-P61_etab else dc P61_fxdone-P61_etab endc ifne P61_fvu dc P61_finevup-P61_etab else dc P61_fxdone-P61_etab endc ifne P61_fvd dc P61_finevdwn-P61_etab else dc P61_fxdone-P61_etab endc dc P61_fxdone-P61_etab ifne P61_nd dc P61_ndelay-P61_etab else dc P61_fxdone-P61_etab endc ifne P61_pde dc P61_pattdelay-P61_etab e/-c.lse dc P61_fxdone-P61_etab endc ifne P61_il dc P61_funk-P61_etab else dc P61_fxdone-P61_etab endc endc ifne P61_fi P61_filter: move.b P61_Info(a5),d0 and.b #$fd,$bfe001 or.b d0,$bfe001 bra.w P61_fxdone endc ifne P61_fsu P61_fineup: P61_getnote moveq #$f,d0 and.b P61_Info(a5),d0 sub d0,P61_Period(a5) moveq #113,d0 cmp P61_Period(a5),d0 ble.b .jup move d0,P61_Period(a5) .jup: moveq #$7e,d0 and.b (a5),d0 bne.w P61_zample bra.w P61_nocha endc ifne P61_fsd P610qtwT_finedwn: P61_getnote moveq #$f,d0 and.b P61_Info(a5),d0 add d0,P61_Period(a5) cmp #856,P61_Period(a5) ble.b .jup move #856,P61_Period(a5) .jup: moveq #$7e,d0 and.b (a5),d0 bne.w P61_zample bra.w P61_nocha endc ifne P61_sft P61_setfinetune: moveq #$f,d0 and.b P61_Info(a5),d0 ifeq opt020 add d0,d0 move P61_mulutab(pc,d0),P61_Fine(a5) else move P61_mulutab(pc,d0*2),P61_Fine(a5) endc bra.w P61_fxdone P61_mulutab: dc 0,74,148,222,296,370,444,518,592,666,740,814,888,1bI962,1036,1110 endc ;; --- E6x start --- ifne P61_pl P61_patternloop: moveq #$f,d0 and.b P61_Info(a5),d0 ;E6x, x=0? beq.b P61_setloop ;then set loop start point ONLY tst.b P61_plflag-P61_cn(a3) ;not first encounter? bne.b P61_noset ;then don't set start count move d0,P61_plcount-P61_cn(a3) ;set start count st.b P61_plflag-P61_cn(a3) ;and flag P61_noset: tst P61_plcount-P61_cn(a3) ;loop count expired? bne.b P61_looppaa move.b d7,P61_plflag-P61_cn(a3) ;then clear 2fDflag and done bra.w P61_fxdone P61_looppaa: st.b P61_plflag+1-P61_cn(a3) ;else special-flag jump later subq #1,P61_plcount-P61_cn(a3) ;and dec loop count bra.w P61_fxdone P61_setloop: tst.b P61_plflag-P61_cn(a3) ;flag already set? bne.w P61_fxdone ;then do nothing move P61_rowpos(pc),P61_plrowpos-P61_cn(a3) ;else set pos lea P61_temp0+P61_TData(pc),a1 ;& prep chans lea P61_looppos(pc),a0 moveq #channels-1,d0 .talt: move.l (a1)+,(a0)+ move.l (a1)+,(a0)+ move.l (a13`/),(a0)+ lea Channel_Block_Size-8(a1),a1 dbf d0,.talt bra.w P61_fxdone ;and done. endc ;; --- E6x end --- ifne P61_fvu P61_finevup: moveq #$f,d0 and.b P61_Info(a5),d0 add d0,P61_Volume(a5) moveq #64,d0 cmp P61_Volume(a5),d0 bge.w P61_fxdone move d0,P61_Volume(a5) bra.w P61_fxdone endc ifne P61_fvd P61_finevdwn: moveq #$f,d0 and.b P61_Info(a5),d0 sub d0,P61_Volume(a5) bpl.w P61_fxdone move d7,P61_Volume(a5) bra.w P61_fxdone endc ifne P61_timing P61_sete8:4㮎 moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_E8-P61_cn(a3) bra.w P61_fxdone endc ifne P61_rt P61_setretrig: moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_RetrigCount(a5) bra.w P61_fxdone endc ifne P61_nd P61_ndelay: moveq #$7e,d0 and.b (a5),d0 beq.w P61_skip ifne P61_vib move.b d7,P61_VibPos(a5) endc ifne P61_tre move.b d7,P61_TrePos(a5) endc ifne P61_ft add P61_Fine(a5),d0 endc move d0,P61_Note(a5) move P61_periods-P61_cn(a3,d0),P61_Period(a5) ifeq p615bfade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc bra.w P61_skip endc ifne P61_pde P61_pattdelay: moveq #$f,d0 and.b P61_Info(a5),d0 move d0,P61_pdelay-P61_cn(a3) st P61_pdflag-P61_cn(a3) bra.w P61_fxdone endc ifne P61_sd P61_cspeed: moveq #0,d0 move.b P61_Info(a5),d0 ifne p61cia tst P61_Tempo-P61_cn(a3) beq.b P61_VBlank cmp.b #32,d0 bhs.b P61_STempo endc P61_VBlank: cmp.b #1,d0 beq.b P61_jkd move.b d0,P61_speed+1-P61_cn(a3) subq.b 6뒅Q#1,d0 move.b d0,P61_speed2+1-P61_cn(a3) move d7,P61_speedis1-P61_cn(a3) bra.w P61_fxdone P61_jkd: move.b d0,P61_speed+1-P61_cn(a3) move.b d0,P61_speed2+1-P61_cn(a3) st P61_speedis1-P61_cn(a3) bra.w P61_fxdone ifne p61cia P61_STempo: move.l P61_timer(pc),d1 divu d0,d1 move d1,P61_thi2-P61_cn(a3) sub #$1f0*2,d1 move d1,P61_thi-P61_cn(a3) ifeq p61system move P61_thi2-P61_cn(a3),d1 move.b d1,$bfd400 lsr #8,d1 move.b d1,$bfd500 endc bra P61_fxdone endc endc ifne P617j+j_vbvs P61_vibochvslide: move.b P61_Info(a5),d0 sub.b d0,P61_Volume+1(a5) bpl.b P61_test62 move d7,P61_Volume(a5) ifeq p61fade move d7,8(a4) else move d7,P61_Shadow(a5) endc bra.b P61_vib2 P61_test62: moveq #64,d0 cmp P61_Volume(a5),d0 bge.b .ncs2 move d0,P61_Volume(a5) .ncs2: ifeq p61fade move P61_Volume(a5),8(a4) else move P61_Volume(a5),P61_Shadow(a5) endc endc ifne P61_vib P61_vib2: move #$f00,d0 move P61_VibCmd(a5),d1 and d1,d0 lsr #3,d0 lsr #2,d1 and #8ptP$1f,d1 add d1,d0 move P61_Period(a5),d1 moveq #0,d2 move.b P61_vibtab(pc,d0),d2 tst.b P61_VibPos(a5) bmi.b .vibneg add d2,d1 bra.b P61_vib4 .vibneg:sub d2,d1 P61_vib4: move d1,6(a4) move.b P61_VibCmd(a5),d0 lsr.b #2,d0 and #$3c,d0 add.b d0,P61_VibPos(a5) bra.w P61_contfxdone endc ifne P61_tre P61_tremo: move #$f00,d0 move P61_TreCmd(a5),d1 and d1,d0 lsr #3,d0 lsr #2,d1 and #$1f,d1 add d1,d0 move P61_Volume(a5),d1 moveq #0,d2 move.b P61_vibtab(pc,d0),d2 tst.9(b P61_TrePos(a5) bmi.b .treneg add d2,d1 cmp #64,d1 ble.b P61_tre4 moveq #64,d1 bra.b P61_tre4 .treneg: sub d2,d1 bpl.b P61_tre4 moveq #0,d1 P61_tre4: ifeq p61fade move d1,8(a4) else move d1,P61_Shadow(a5) endc move.b P61_TreCmd(a5),d0 lsr.b #2,d0 and #$3c,d0 add.b d0,P61_TrePos(a5) bra.w P61_contfxdone endc ifne (P61_vib+P61_tre) P61_vibtab: ; incbin "vibtab" dc.b $00,$00,$00,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$00,$00,$0:xy 0,$00,$00 dc.b $00,$00,$00,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$00,$00,$00,$01,$01 dc.b $01,$01,$01,$01,$01,$01,$01,$01 dc.b $01,$01,$01,$01,$01,$01,$01,$01 dc.b $01,$01,$01,$00,$00,$00,$00,$00 dc.b $00,$00,$00,$01,$01,$01,$02,$02 dc.b $02,$03,$03,$03,$03,$03,$03,$03 dc.b $03,$03,$03,$03,$03,$03,$03,$03 dc.b $02,$02,$02,$01,$01,$01,$00,$00 dc.b $00,$00,$01,$01,$02,$02,$03,$03 dc.b $04,$04,$04,$05,$05,$05,$05,$05 dc.b $05,$05,$05,$05,$05,$05,$04,$04 dc.b $04,$03,$03,$02,;L;$02,$01,$01,$00 dc.b $00,$00,$01,$02,$03,$03,$04,$05 dc.b $05,$06,$06,$07,$07,$07,$07,$07 dc.b $07,$07,$07,$07,$07,$07,$06,$06 dc.b $05,$05,$04,$03,$03,$02,$01,$00 dc.b $00,$00,$01,$02,$03,$04,$05,$06 dc.b $07,$07,$08,$08,$09,$09,$09,$09 dc.b $09,$09,$09,$09,$09,$08,$08,$07 dc.b $07,$06,$05,$04,$03,$02,$01,$00 dc.b $00,$01,$02,$03,$04,$05,$06,$07 dc.b $08,$09,$09,$0a,$0b,$0b,$0b,$0b dc.b $0b,$0b,$0b,$0b,$0b,$0a,$09,$09 dc.b $08,$07,$06,$05,$04,$03,$02,$01 dc.b $00,$01,$0<2,$04,$05,$06,$07,$08 dc.b $09,$0a,$0b,$0c,$0c,$0d,$0d,$0d dc.b $0d,$0d,$0d,$0d,$0c,$0c,$0b,$0a dc.b $09,$08,$07,$06,$05,$04,$02,$01 dc.b $00,$01,$03,$04,$06,$07,$08,$0a dc.b $0b,$0c,$0d,$0e,$0e,$0f,$0f,$0f dc.b $0f,$0f,$0f,$0f,$0e,$0e,$0d,$0c dc.b $0b,$0a,$08,$07,$06,$04,$03,$01 dc.b $00,$01,$03,$05,$06,$08,$09,$0b dc.b $0c,$0d,$0e,$0f,$10,$11,$11,$11 dc.b $11,$11,$11,$11,$10,$0f,$0e,$0d dc.b $0c,$0b,$09,$08,$06,$05,$03,$01 dc.b $00,$01,$03,$05,$07,$09,$0b,$0c dc.b $0e,=j+$0f,$10,$11,$12,$13,$13,$13 dc.b $13,$13,$13,$13,$12,$11,$10,$0f dc.b $0e,$0c,$0b,$09,$07,$05,$03,$01 dc.b $00,$02,$04,$06,$08,$0a,$0c,$0d dc.b $0f,$10,$12,$13,$14,$14,$15,$15 dc.b $15,$15,$15,$14,$14,$13,$12,$10 dc.b $0f,$0d,$0c,$0a,$08,$06,$04,$02 dc.b $00,$02,$04,$06,$09,$0b,$0d,$0f dc.b $10,$12,$13,$15,$16,$16,$17,$17 dc.b $17,$17,$17,$16,$16,$15,$13,$12 dc.b $10,$0f,$0d,$0b,$09,$06,$04,$02 dc.b $00,$02,$04,$07,$09,$0c,$0e,$10 dc.b $12,$14,$15,$16,$17,$18,$19,$19 dc.>Pb $19,$19,$19,$18,$17,$16,$15,$14 dc.b $12,$10,$0e,$0c,$09,$07,$04,$02 dc.b $00,$02,$05,$08,$0a,$0d,$0f,$11 dc.b $13,$15,$17,$18,$19,$1a,$1b,$1b dc.b $1b,$1b,$1b,$1a,$19,$18,$17,$15 dc.b $13,$11,$0f,$0d,$0a,$08,$05,$02 dc.b $00,$02,$05,$08,$0b,$0e,$10,$12 dc.b $15,$17,$18,$1a,$1b,$1c,$1d,$1d dc.b $1d,$1d,$1d,$1c,$1b,$1a,$18,$17 dc.b $15,$12,$10,$0e,$0b,$08,$05,$02 endc ifne P61_il P61_funk: moveq #$f,d0 and.b P61_Info(a5),d0 move.b d0,P61_Funkspd(a5) bra.w P61_fxdone ?bKP61_funk2: moveq #0,d0 move.b P61_Funkspd(a5),d0 beq.b P61_funkend move.b P61_FunkTable(pc,d0),d0 add.b d0,P61_Funkoff(a5) bpl.b P61_funkend move.b d7,P61_Funkoff(a5) move.l P61_Sample(a5),a1 move.l P61_RepeatOffset(a1),d1 move P61_RepeatLength(a1),d0 add.l d0,d0 add.l d1,d0 move.l P61_Wave(a5),a0 addq.l #1,a0 cmp.l d0,a0 blo.b P61_funkok move.l d1,a0 P61_funkok: move.l a0,P61_Wave(a5) not.b (a0) P61_funkend: rts P61_FunkTable: dc.b 0,5,6,7,8,10,11,13,16,19,22,2@կC6,32,43,64,128 endc ********** rest is NOT part of P61_music ********** ********** timing interrupt entry point ********** ;; --- first int, DMAs on again. --- ifeq copdma P61_dmason: ifeq p61system tst.b $bfdd00 move #$2000,$dff09c move #$2000,$dff09c ifeq nowaveforms move.b #$19,$bfdf00 ;retrigger to chain replen int. move.l a0,-(sp) move.l P61_vektori(pc),a0 ;put another int in '$78.w' move.l P61_intaddr(pc),(a0) move.l (sp)+,a0 endc move P61_dma(pc),$dff096A ;on only. includes $8200. nop rte else move P61_dma(pc),$dff096 ;on only. includes $8200. lea P61_server(pc),a3 addq #1,(a3) move.l P61_craddr(pc),a0 move.b #$19,(a0) bra P61_ohi endc endc ;ifeq copdma ;; --- second chained int, replen --- ifeq nowaveforms P61_setrepeat: ifeq p61system tst.b $bfdd00 movem.l a0/a1,-(sp) lea $dff0a0,a1 move #$2000,-4(a1) move #$2000,-4(a1) else lea $dff0a0,a1 endc move.l P61_Sample+P61_temp0(pc),a0 addq.l #6,a0 move.l B2(a0)+,(a1)+ move (a0),(a1) ifgt channels-1 move.l P61_Sample+P61_temp1(pc),a0 addq.l #6,a0 move.l (a0)+,12(a1) move (a0),16(a1) endc ifgt channels-2 move.l P61_Sample+P61_temp2(pc),a0 addq.l #6,a0 move.l (a0)+,28(a1) move (a0),32(a1) endc ifgt channels-3 move.l P61_Sample+P61_temp3(pc),a0 addq.l #6,a0 move.l (a0)+,44(a1) move (a0),48(a1) endc ifne p61system ifne p61cia lea P61_server(pc),a3 clr (a3) move.l P61_craddr+4(pc),a0 move.b P61_tlo(pc),(a0) move.b CpP61_thi(pc),$100(a0) endc bra P61_ohi endc ifeq p61system ifne p61cia move.l P61_vektori(pc),a0 move.l P61_tintti(pc),(a0) endc movem.l (sp)+,a0/a1 nop rte endc endc ;ifeq nowaveforms P61_temp0: dcb.b Channel_Block_Size-2,0 dc 1 P61_temp1: dcb.b Channel_Block_Size-2,0 dc 2 P61_temp2: dcb.b Channel_Block_Size-2,0 dc 4 P61_temp3: dcb.b Channel_Block_Size-2,0 dc 8 ifne split4 P61_temp0copy: dcb.b P61_Wave+4,0 ;temp storage for split4. P61_temp1copy: dcb.b P61_WD\ave+4,0 endc P61_cn: dc 0 P61_periods: ifne P61_ft ; incbin "A:INC/SND/periods" dc.w $0358,$0358,$0328,$02fa,$02d0,$02a6,$0280,$025c dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d dc.w $0168,$0153,$0140,$012e,$011d,$010d,$00fe,$00f0 dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097 dc.w $008f,$0087,$007f,$0078,$0071,$0352,$0352,$0322 dc.w $02f5,$02cb,$02a2,$027d,$0259,$0237,$0217,$01f9 dc.w $01dd,$01c2,$01a9,$0191,$017b,$0165,$0151,$013e dc.w $012c,$011c,$010c,$00EW fd,$00ef,$00e1,$00d5,$00c9 dc.w $00bd,$00b3,$00a9,$009f,$0096,$008e,$0086,$007e dc.w $0077,$0071,$034c,$034c,$031c,$02f0,$02c5,$029e dc.w $0278,$0255,$0233,$0214,$01f6,$01da,$01bf,$01a6 dc.w $018e,$0178,$0163,$014f,$013c,$012a,$011a,$010a dc.w $00fb,$00ed,$00e0,$00d3,$00c7,$00bc,$00b1,$00a7 dc.w $009e,$0095,$008d,$0085,$007d,$0076,$0070,$0346 dc.w $0346,$0317,$02ea,$02c0,$0299,$0274,$0250,$022f dc.w $0210,$01f2,$01d6,$01bc,$01a3,$018b,$0175,$0160 dc.w $014c,$013a,$0128,$0118Fp0,$0108,$00f9,$00eb,$00de dc.w $00d1,$00c6,$00bb,$00b0,$00a6,$009d,$0094,$008c dc.w $0084,$007d,$0076,$006f,$0340,$0340,$0311,$02e5 dc.w $02bb,$0294,$026f,$024c,$022b,$020c,$01ef,$01d3 dc.w $01b9,$01a0,$0188,$0172,$015e,$014a,$0138,$0126 dc.w $0116,$0106,$00f7,$00e9,$00dc,$00d0,$00c4,$00b9 dc.w $00af,$00a5,$009c,$0093,$008b,$0083,$007c,$0075 dc.w $006e,$033a,$033a,$030b,$02e0,$02b6,$028f,$026b dc.w $0248,$0227,$0208,$01eb,$01cf,$01b5,$019d,$0186 dc.w $0170,$015b,$0148,$0135,$G2)0124,$0114,$0104,$00f5 dc.w $00e8,$00db,$00ce,$00c3,$00b8,$00ae,$00a4,$009b dc.w $0092,$008a,$0082,$007b,$0074,$006d,$0334,$0334 dc.w $0306,$02da,$02b1,$028b,$0266,$0244,$0223,$0204 dc.w $01e7,$01cc,$01b2,$019a,$0183,$016d,$0159,$0145 dc.w $0133,$0122,$0112,$0102,$00f4,$00e6,$00d9,$00cd dc.w $00c1,$00b7,$00ac,$00a3,$009a,$0091,$0089,$0081 dc.w $007a,$0073,$006d,$032e,$032e,$0300,$02d5,$02ac dc.w $0286,$0262,$023f,$021f,$0201,$01e4,$01c9,$01af dc.w $0197,$0180,$016b,$0156,$01Hy Z?43,$0131,$0120,$0110 dc.w $0100,$00f2,$00e4,$00d8,$00cc,$00c0,$00b5,$00ab dc.w $00a1,$0098,$0090,$0088,$0080,$0079,$0072,$006c dc.w $038b,$038b,$0358,$0328,$02fa,$02d0,$02a6,$0280 dc.w $025c,$023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194 dc.w $017d,$0168,$0153,$0140,$012e,$011d,$010d,$00fe dc.w $00f0,$00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0 dc.w $0097,$008f,$0087,$007f,$0078,$0384,$0384,$0352 dc.w $0322,$02f5,$02cb,$02a3,$027c,$0259,$0237,$0217 dc.w $01f9,$01dd,$01c2,$01a9,$0191I4y[,$017b,$0165,$0151 dc.w $013e,$012c,$011c,$010c,$00fd,$00ee,$00e1,$00d4 dc.w $00c8,$00bd,$00b3,$00a9,$009f,$0096,$008e,$0086 dc.w $007e,$0077,$037e,$037e,$034c,$031c,$02f0,$02c5 dc.w $029e,$0278,$0255,$0233,$0214,$01f6,$01da,$01bf dc.w $01a6,$018e,$0178,$0163,$014f,$013c,$012a,$011a dc.w $010a,$00fb,$00ed,$00df,$00d3,$00c7,$00bc,$00b1 dc.w $00a7,$009e,$0095,$008d,$0085,$007d,$0076,$0377 dc.w $0377,$0346,$0317,$02ea,$02c0,$0299,$0274,$0250 dc.w $022f,$0210,$01f2,$01d6,$01bc,$J,[01a3,$018b,$0175 dc.w $0160,$014c,$013a,$0128,$0118,$0108,$00f9,$00eb dc.w $00de,$00d1,$00c6,$00bb,$00b0,$00a6,$009d,$0094 dc.w $008c,$0084,$007d,$0076,$0371,$0371,$0340,$0311 dc.w $02e5,$02bb,$0294,$026f,$024c,$022b,$020c,$01ee dc.w $01d3,$01b9,$01a0,$0188,$0172,$015e,$014a,$0138 dc.w $0126,$0116,$0106,$00f7,$00e9,$00dc,$00d0,$00c4 dc.w $00b9,$00af,$00a5,$009c,$0093,$008b,$0083,$007b dc.w $0075,$036b,$036b,$033a,$030b,$02e0,$02b6,$028f dc.w $026b,$0248,$0227,$0208,$01eb,$01K[cf,$01b5,$019d dc.w $0186,$0170,$015b,$0148,$0135,$0124,$0114,$0104 dc.w $00f5,$00e8,$00db,$00ce,$00c3,$00b8,$00ae,$00a4 dc.w $009b,$0092,$008a,$0082,$007b,$0074,$0364,$0364 dc.w $0334,$0306,$02da,$02b1,$028b,$0266,$0244,$0223 dc.w $0204,$01e7,$01cc,$01b2,$019a,$0183,$016d,$0159 dc.w $0145,$0133,$0122,$0112,$0102,$00f4,$00e6,$00d9 dc.w $00cd,$00c1,$00b7,$00ac,$00a3,$009a,$0091,$0089 dc.w $0081,$007a,$0073,$035e,$035e,$032e,$0300,$02d5 dc.w $02ac,$0286,$0262,$023f,$021f,$0201Lp ,$01e4,$01c9 dc.w $01af,$0197,$0180,$016b,$0156,$0143,$0131,$0120 dc.w $0110,$0100,$00f2,$00e4,$00d8,$00cb,$00c0,$00b5 dc.w $00ab,$00a1,$0098,$0090,$0088,$0080,$0079,$0072 else ; incbin "periods.nft" dc.w $0358,$0358,$0328,$02fa,$02d0,$02a6,$0280,$025c dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d dc.w $0168,$0153,$0140,$012e,$011d,$010d,$00fe,$00f0 dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097 dc.w $008f,$0087,$007f,$0078,$0071 endc P61_dma: dc $8200 P61_rMAowpos: dc 0 P61_slen: dc 0 P61_speed: dc 0 P61_speed2: dc 0 P61_speedis1: dc 0 P61_spos: dc.l 0 ifeq p61system P61_vektori: dc.l 0 P61_oldlev6: dc.l 0 endc P61_ofilter: dc 0 P61_timers: dc.l 0 ifne p61cia P61_tintti: dc.l 0 P61_thi: dc.b 0 P61_tlo: dc.b 0 P61_thi2: dc.b 0 P61_tlo2: dc.b 0 P61_timer: dc.l 0 endc ifne P61_pl P61_plcount: dc 0 P61_plflag: dc 0 P61_plreset: dc 0 P61_plrowpos: dc 0 P61_looppos: dcb.b 12*channels,0 endc ifne P61_pde P61_pdelay: N1l dc 0 P61_pdflag: dc 0 endc P61_samples: dcb.b 16*31,0 P61_emptysample: dcb.b 16,0 P61_positionbase: dc.l 0 P61_possibase: dc.l 0 P61_patternbase: dc.l 0 P61_intaddr: dc.l 0 ifne p61system P61_server: dc 0 P61_miscbase: dc.l 0 P61_audioopen: dc.b 0 P61_sigbit: dc.b -1 P61_ciares: dc.l 0 P61_craddr: dc.l 0,0,0 P61_dat: dc $f00 P61_timerinterrupt: dc 0,0,0,0,127 P61_timerdata: dc.l 0,0,0 P61_timeron: dc 0 P61_allocport: dc.l 0,0 dc.b 4,0 dc.l 0 dc.b 0,0 dc.l 0 O.P61_reqlist: dc.l 0,0,0 dc.b 5,0 P61_allocreq: dc.l 0,0 dc 127 dc.l 0 P61_portti: dc.l 0 dc 68 dc.l 0,0,0 dc 0 P61_reqdata: dc.l 0 dc.l 1,0,0,0,0,0,0 dc 0 P61_audiodev: dc.b 'audio.device',0 P61_cianame: dc.b 'ciab.resource',0 P61_timeropen: dc.b 0 P61_timerint: dc.b 'P61_TimerInterrupt',0,0 endc P61_InitPos: dc.w 0 ;P61_Init starts playing the song from this position. ;; --- optional declares --- ifne use1Fx P61_PTrig: dc.w 0 ;Poll this Custom trigger, usinPg 'Bxx',pos $80-$ff endc ifne nowaveforms P61_NewDMA: dc.w 0 endc ifne copdma p61_DMApokeAddr:dc.l 0 endc P61_PattFlag: dc.w 0 P61_etu: ifne quietstart P61_Quiet: dc.w 0 ;@@this "sample" MUST be in chipmem! endc ifne visuctrs P61_visuctr0: dc.w $4000 ;pretend long elapsed time at start P61_visuctr1: dc.w $4000 ;(to not show inital trigger on all channels.) P61_visuctr2: dc.w $4000 P61_visuctr3: dc.w $4000 endc P61E: ;end of player binary samples: ;ds.b 65536 <--declare2=, some space if used. Q RmZ^]\[ZYXWVUTSRTE+x P6111.readmepQS K=Short: The Player playroutine 610.11 ("P6111"), a fix, an improvement, and a note. Author: Photon,NoName,Platon42,Tolkien,The Dark Coder Uploader: photon scoopex1988 org Type: mus/misc Architecture: m68k-amigaos The Player 6.1A 610.11 / 09.06.14 Copyright 1992-95 Jarno Paananen Guru / Sahara Surfers A Sahara Surfers Product 1995 Fixed 1998-04 by NoName, PQTX_qlaton42, Tolkien and The Dark Coder Optimized, bugfixed, improved 2010-2014 by Photon/Scoopex Packaged single-include easy-to-use archive with examples and comments. New in 610.11 ------------- Tutorial here: http://youtu.be/xBtHO-IuN9E Put it in your demo: http://youtu.be/JYLcIR6tyO4 For more help, read docs and sources. I leave development of P61 as of this version. - fixed EDx command - fixed an unwanted feature in legacy init/exit code (CIA poked when p61cQUlia=0) - Dxx was never implemented, except for where xx=00. Implementing it will cause spikes in rastertime. See sources for the technical details. - E8x and 8xx work identically. E8x will cause filtered loops in non-legacy trackers if the module is ripped. 8xx recommended therefore. New in 610.10 ------------- - fixed E6x command bug introduced (by me) in 610.8. See notes in P6110-Play.i. - new option: visuctrs=1 for easy visualizers (demonstrated in P6110-Example.S) - final cleanQVup and passed all tests. New in 610.9 ------------ No functional changes from P6108. Cleaned up version for ease of use and compatibility. - 'start' define replaced with P61_InitPos. Works the same way but at runtime. - Cleaned up, easier to include and use. - A few of the options have been prefixed with "p61" to avoid common name conflicts. - Fixed remaining case sensitivity and Label: issues. - More compatible directives and operators. NOTE: this means you will only be infQWKɝormed of FAILs in AsmOne/AsmPro. (only checks channels and splitchans for insane values, so don't panic.) - Assembles in AsmOne, AsmPro, Devpac, PhxAss, and vasm. (Optimize jmp(PC) must be off in vasm.) - new option: p61bigjtab=0 to save 480 bytes and lose max 56 cycles. New in 610.8 ------------ This is also not a minor update... but the numbering has been kept for historical reasons. In short, SLen variable in P61_Init always wrote SongLength+1. It was bugfixed, so PosJmp tQXo last track works, for example. If you have any code that subtracts 1 from songlength, you need to unfix it for this version. Also, the playroutine has two "big" optimization options, splitchans and split4. Split4 doesn't work with songs with speed F03 or faster, obviously. To split decrunch over 4 frames requires at least 4 frames per notestep ;) Splitchans works with all speeds and splits decrunch in half, basically. There are no speed restrictions. Both Split4 and SplitchanQY1s works with CIA and Vblank. Non lev6 mode added for the first time, as "poke DMAs to a byte address". You can for example set a copper wait 11 scanlines after Vblank and load DMAcon, and give the address in a4 to P61_Init. (If you run the playroutine at Vblank of course.) All measurements done with 68000 running at full speed without interfering bitplane or blitter DMA, when used 'in action' the raster time gained might be greater, but still 25 percent. Timing measurement andQZ @ testing done on >12 random modules, with the above results. Optimization has been made only with regards to the maximum raster- time consumed, as it is this which affects a demo's or game's performance. But gain should be near to the above also for average time consumed. (I have no idea what the gain will be if you set use=-1. Set it to the value in the P61.#? file comment! All modules have been tested with use=-1, of course, so laziness is not a problem, just a raster time loss.Q [ݑX) It has also been tested in 68040 mode on my accelerated OCS A500, and WinUAE 2.0.2b15. Not that it means anything. I've made no changes that would work differently on any Amiga. GLOBAL CHANGES: - restructuring changes, all based on the used new options. CHANGES IN P61_MUSIC: - removed the usage of A2, so 16 cycles saved if called in an interrupt :) CHANGES IN P61_POSJMP: - none. Everything worked when SLen was corrected :) CHANGES IN P61_SETPOSITION: - none. Everything worQ \';ked when SLen was corrected :) - actually, I added an improvement for click free soundoff/posjmp and soundon... - split4/splitchans option handling added for correct functioning. Read comments. OTHER CHANGES: - anal optimization on everything that affects maxtime. I dare an alien from an advanced civilization to gain more than 16 cycles on the maxtime. See it as a challenge, not as arrogance. A warning: You will become obsessive compulsive... like me... - oscillo option added. ThiQ ]s will give you extremely exact sample windows of the samples played each frame, exact enough to allow you to mix channels while Paula is playing the samples... or you can make the best oscilloscope effect yet... I wrote a separate demopart oscilloscope effect to test it, let me know if you want the example source. ADDED FEATURES: - see options in P6108-MaxTimeOptiOptions.S. Use them wisely. For example by reading their comments! DOCUMENTATION: - See extensive comments in P61-PQ ^ tlay.S and P61-Example.S. FEEDBACK: - I am confident every module that works in P6107 works in P6108. I've tested even more modules this time :) - If you find a module that doesn't or want to give feedback, email photon scoopex1988 org. - If you want me to answer questions about P61 playroutines in general, ask me soon, before I forget. Best before date is 1 week from release date. :P WISHLIST/FUTURE: - 2-channel cross-Pan/Echo/Delay. Will be in next version. Or you can make it Q t2yourself, see plugin comments in P6108-Play.S - 1-2 Extra synth or sample channels. You can do this with P61_Osc. But buffered is more effective. Framework is there, see plugin comments. An example buffered mixing routine will be in next version. Released during Amiga Demo Compo on BP2010. Haujobb rulez :) Greetings to NoName for finding me at the party :) //Photon _`=tdcba`E+xSCX.nfop_a o + . + . . o o : . + | o ! + _ _|_________ _______ _______ _______ . _______ ______ _:____ ______ | _ |/ _ \:/ _ \_/ _ \!/ _ \_/ _ \_ _/ _/ __ | \_ | \_ | \_ | \_ | \_ | \_ | \_ | __ \___ | | | | | | | | | _bR | | | | ___/ | |____| |____| | | | | | | |____| | | | \| | | | | | | | | / | | | _\_____ \ | | | | | | _| | ___/__|___ ___| \_ | | | | | | | | \/ | \_ _/ . \_ | | | | | | | | | | | | | | | |_ | | ___| | | | | \______| | | | | __cV0| _|/ | _|/ | _| | _| | !NE7 | _| | | |__ / | \/ | \/ ! \/ ! \/ | | | \/ | | |_ \ \ |_________|\_______/ \_______/.\_______/|____| |________/|___/|_____/ / \_________ : _______ . _______ ! ____________ ! ____________ : __________/ ! ! . + . . o o _d %X + present ---------------------------------------- =======[ The Player playroutine 6.1.11 ]======= =======[ Released at DERP 2014 ]======= ---------------------------------------- I hereby leave this project and hope that you can use this easily in some excellent demos for your Amigas! Greets to the guys at the party and all who have _])(pestered me with stubborn modules :) ! . o : o : . + | o ! + . + . . o o +