scene.org File Archive

File download

<root>­/­mirrors­/­amigascne­/­Scrollers­/­X-Groupstext­/­X-Trade/X_Trade-TCCSlide.txt

File size:
69 175 bytes (67.55K)
File date:
2013-02-18 23:04:31
Download count:
all-time: 352

Preview

               HELLO LOOSERS TERMINATOR OF EQX IS BACK IN A NEW SLIDESHOW... DONT REBOOT U COMPUTER UNTIL MY 
SCROLL IS DEAD HAHAHAHA.... CUT THIS BULL OF AND LET ME TO GREET THE FOLLOWING PEOPLE... A BIG LUCK TO ZCANDALER
 WITH HIS 40MB HARDISK... AND GUARDIAN (PIZZAMAN) WITH UNICORN BBS IN GBG HAHAHA... DEXTER U LOOSER CALL MY 
FUCKING BOARD AND TRADE SOME WAREZ... BIG BOSS U AMOS CODER HAHAHAHA (FA LABA GREA)... A BIG KISS TO CRE8OR FOR
 THE IDEA AT THE GBG PARTY... AND NOW ARE WE GONNA CUT THIS BULSHIT OFF SO AFTER THIS NICE CALL ARE U GONNA TAKE
 U SWE-BBS.LIST AND LOOK AFTER (TECHNO CITY).......          


                 OK, NOW DESECRATOR PUNISHING DA KEYS, WELL I HAVEN'T GOT MUCH TO WRITE AND I'M PRETTY TIRED, 
BUT I SURE WOULDN'T MIND SUM $$$...... OK  EHH WELL SUM PERSONAL GREETZ TO MY FRINDS.... HELLHOUND THE DARKEST 
GOD RACIST IN THE SCENE, BUTTFUCKING 'RISTRAMPARE' SEEMS KEWL TO ME HAHA, WELL CATEYE SORRY THAT YAR HARDDISK 
FUCKED UP, I BET IT DEPENDS ON YOUR BLIZZARD!!!, JOMI, BLIZZARD SUX!!!, DON'T YA EVER LEARN??, AND I HOPE THAT 
YA GET OVER YOUR FEAR OF $$$..... PAIN, HAMBURGERS WITHOUT DRESSING AND SALLAD MUST TASTE SHIT... SACKO, SORRY 
THAT YAR DEMO DIDN'T MAKE TO THE 10 BEST... TOMPA HOW IS IT DARK IN THE WOODS??..... KITCHO, KEEP UPLOADING....
 AND A MESSAGE TO ALL TECHNO FUCKUPS... GET SUM PROFESSIONAL HELP, U NEED IT.... OK, WELL AFTER 20 HOURS OF NO 
SLEEP, I THINK IT'S TIME TO GET SUM SLEEP.. OK, DESECRATOR SIGNING OFF... KEEP THE & FLOWING AND THE $'S HOT.. 
L8ER GUYS.....                  



              CYBERTRON ONLINE! ABOUT 1 MINUTE AGO I WENT 2 SEE KID AND BALLES NEW VIDEO DEMO... I WAS DESEPOINTED!
 I THOUGHT THEY COULD DO MORE THAN THAT! WELL WELL YA CANT GET EVERYTHING! WHEN THE SHOW WAS ON SOME LAMER STOLE 
AN A-1200 WITH 85MB HD! AFTER ALL IT WASENT MY COMPUTER! MABEY NEXT TIME....BUT I DONT THINK SO COZE I HAVE A LOCK
 ON MY AMIGA AND A PW ON MY HD!...DOSENT THIS PLACE HAVE A 'PARTY BBS' ? NAH I DONT THINK SOO,2 BAD...THE COMP IN 
DECORATION IS NOT GOING SOO BAD! WELL IT AINT BEAUTIFULL BUT ITS COOL! 2 BAD 'BULT' AINT LEFT IN X-TRADE COZE IF 
HE WOULD BE WITH US NOW WE WOULD HAVE WON THE COMP! BUT WE GOT 'SCUBA' BUT HE IS IN GERMANY 4 THE MOMENT.... (HE 
LIVES THERE) BESIDE ME I GOT A REAL GOOD MUZICAN! ILL TALK ABOUT JOINING HIM IN THE CREW L8ER ON WITH ORGASMATRON!
 (4 THE MOMENT ORGASMATRON IS  S L E A P I N G !) ...WHAT NOW??!! KIDCURRY SLEAPING UNDER THE TABLE...WITH ALL THE
 'COKE' CANS! WELL YA GOT 2 SLEEP SOME WHERE!(BETER THAN IN A PET SEMEATRY!) WHAT THE FUCK?... MORE ACTION? TV? 
W8 A MINUTE!...... 'AKTUELLT'! SUDENLEY THE NOISE FROM THE SPEAKERS ARE GETTING LOUDER...AND EVERYBODEY TURNS ON
 'ULTIMATHULE' ORE SOMETHING! MOAH! I WONDER WHY THEY DO THAT?...HEHEH THEY ARE STANDING OVER THERE WITH 
'ZONDERKOMMAND' AND FILMING THOSE BEAUTIFULL SWEDISH FLAGGS! OK I HAVE 2 GOO AND CHECK IT OUT! SO HERE COMES MY 
GREETINGZ: THE GREETINGS WILL GOO 2 THE FOLLOWING PEOPLES.....: EVERYBODEY I KNOW!!!!!!! SEE YA IN OUR NEXT 
RELEASE!...             



               HELLO THIS IS CHUCKY OF X-TRADE WRITING A LITTLE TEXT...   WELL FINALLY I HAVE QUIT THAT FUCKING 
ARMY SHIT AND ARE AT THE TCC PARTY IN GOTHENBURG...     THE PLACE IS QUITE BIG BUT ITS JUST TOO NOISY AND I THINK 
THAT IT WILL BE A PROBLEM SLEEPING HERE..  BUT AS IM NO PUSSY I WILL SLEEP ANYWAY... (MAYBE CAUZE I WILL BE SO 
DRUNK SO I WILL PASS OUT.. HEHE!)   WELL WELL  I ARRIVED TO THIS PLACE SOME HOURS AGO AND I HAVE MET SOME COOL 
DUDES AND I THINK I WILL HAVE A GOOD TIME HERE..  BUT THATS JUST CAUZE ITS GOTHENBURG AS ITS MY FAVORITE CITY IN 
SWEDEN...    STOCKHOLM CAN JUST FUCK OFF... ONE REALLY STRANGE THING IS THAT IM ACTUALLY SOBER RIGHT NOW BUT I WILL
 DRINK SOME & LATER AND VODKA SO MY BRAIN WILL ONLY BE INTERSTED IN $ AND & NOTHING ELSE...  WELL OK MAYBE SOME 
HAMBURGERS ASWELL.  ONE EXTREMELY BAD THING WITH THIS PARTY IS THE LACK OF PARKING LOTS!    24 HOURS OF PARKING 
HERE COSTS 70 SEK!!!!!    THATS FUCKING JUST TOO MUCH! (AT HOME I PAY 90SEK TO GET A PARKING LOT FOR ONE MONTH!)
 AND ITS NOT ENOUGH OF PEOPLE HERE BUT WELL I THINK IT WILL COME MORE GUYS LATER TODAY ATLEAST I KNOW THAT (WELL 
HOPE ANYWAY) THAT CONQUEROR WILL COME AS WE WAS IN THE SAME PLATOON IN THE ARMY SO WE HAVE SOME SERIOUS PARTYING
 TO DO!  (IF HE CAN!  HEHE HE WAS DRUNK YESTERDAY AND THE DAY BEFORE... HHEE IT WAS A SIGHT TO SEE HIM AT 05:30 
ON THE FRIDAY WHEN WE TURNED IN THE LAST ARMY SHIT!)  I JUST WANT ONE THING BACK FROM THE ARMY JUST FOR 10 MINUTES
 AND THATS MY K-PIST... I WANT TO SHOOT SOME SPEAKERS AS THEY PLAY MUSIC JUST A LITTLE TOO LOUD..  OK ITS COOL 
MUZAK BUT I WANT TO THINK SOMETHING ASWELL....   WELL OK THEY ARE PLAYING SOME TECHNO SIMILIAR STUFF BUT JUST FOR
10 SECOUNDS AND THEN THEY PLAY ANOTHER SONG OR EVEN TYPE OF MUSIC... ITS JUST TOO FUCKING ANNOYING FOR ME...    
OK  WELL WHAT NOW?  I CAN DO SOME ADVERTISMENT FOR MY BBS?   OK!    CALL IT FOR FUCK SAKE.    GANGBANG    
+46 554 12133   16.8 DS POWER!   1 GIGABYTE OF HD SPACE   OVER 1500 MODULES    OVER 300MB OF XRATED FILES     
NODE 2 WILL COME SOON WITH A ZYXEL 1496E+ MODEM!  THATS 19.2 KBPS V32 POWER!      OK I THINK I HAVE TO STOP SOON 
FOR SOME HOURS TO GET DRUNK AND HAPPY... AND AFTER THAT I CAN WRITE SOME MORE OF BULLSHIT TALKING HERE IN THIS 
SCROLLER....                  



                  HI... THIS IS CHUCKY OF X-TRADE WRITING..  DRUNK AS USUAL AT THE PARTY IN GOTHENBURG..  WELL  
WHAT CAN I TALK ABOUT????   THIS NIGHT?? WELL OK!   IT STARTED WITH A QUITE BOORIRNG TIME AS I HAD TO GUARD MY 
AMIGA 1200 FROM NOT TO BE STOLEN! (OR THAT 2GIGABYTE HARDDRIVE IN MY BAG!) BUT AT 03:00 SOMETHING THE FUN STARTED
 AS I STARTED TO BOOZE AND NOW IM KINDA DRUNK.. NOT THAT DRUNK BUT ANYWAY  DRUNK!   THATS CAUZE OF VODKA!   I 
PREFER VODKA BEFORE & ACTUALLY!   BUT I LOOOOOVE $.. AND I REAL FEELS THAT I NEED A REAL GOOD N WET $ RIGHT NOW.. 
I EVEN KNOW THAT I WILL GET ONE GOOD $ ON MONDAY WHEN IM COMING ! HOME! HEHE!  DID U GET DA POINT THERE?    HAHA!
  WELL! I AND ORGASMATRON HAVE FUN SHOUTING SOME WORDS HERE LIKE:   X-TRADE, VAKNA, LAMER AND SVERIGE     OK IT 
SEEMS LIKE ORGASMATRON HAVE SOMETHING TO WRITE ABOUT SO I LET HIM TO THE KEYS ON THIS A1200!   OK HERE HE COMES!:
 ORGASMATRON IS MY FUCKING HANDLE AND I LOVE TO COME.. IN A BIG WET $ OR SO. THE MAIN PROBLEM WITH GETTING A $ IS
 TO HUNT THEM IN THE BARS AND SO... WELL ME AND MY FRIEND VOCO IS HAVING A GOOD TIME WITH HAVING FUN IN THE BARS.
 THIS NIGHT..(THE FIRST PARTY NIGHT!). WE WAS ON A PLACE CALLED GOLDEN DAYS. HMM.. WELL, NOOT A GOOD PLACE, THE
 DANCE FLOOR IS 2 SQUARE METRERS BIG AND THE BAR IS EXPENSIVE FOR MY LITTLE WALLET. BUT THE GIRLS!!! NO WORDS CAN
 DESCRIBE THE GIRLS. THEY WERE JUST TO LOVELY. I WANT TO SAY HELLO TO ALL GIRLS THAT I'VE MEET DURING THEESE LAST
 24 HOURS! I DONT REMEBER ALL YOUR NAMES, BUT FIRST OF ALL A BIG HUG WILL GO TO THE GIRL WHO JUST SAID THAT SHE 
JUST HAD ENDED UP A RELATION WITH SOME BOY FRIEND. HEY GIRL I LIKE YOU I DON'T WANT TO BE YOUR BOYFRIEND, BUT I 
WANT TO KNOW YOU AS YOU ARE. PS...ME AND ANDERS DID REALY NOT THINK THAT YOU WAS BAD LOOKING OR SO......NOOOOO!.
 YOU WERE A REALY NATUARLY BEATY. TO BE HONEST. I DONT WANT YOUR $, I WANT YOUR LOVE IF I WANT SOMETHING FROM 
YOU! THATS TRUE! SECOND A WORD TO A GIRL I MEET A TIME AGO.. HELLO ANNA GUSTAVSSON!, YOU ARE A WONDERFUL GIRL. 
YOU ARE A REALY GOOD ONE. YOU LIKE THE RIGHT KIND OF MUSIC, YOU HAVE SAME KIND OF THOUGHTS ABOUT THE LIFE AND SO!.. 
I LIKE YOU A LOT GIRL... HOPE YOU ARE AWARE ABOUT THAT. I THINK YOU ARE ONE IN A MILLION. I HAVENT WON ANYTHING A 
BINGOLOTTO YET, BUT I WANT TO WIN Y O U ! ! ! NOTHING ELSE MATHERS!.......................WELL YOU MAYBE THINK THAT
 LOVE IS FOR SUCKERS. HA!, I TELL YA! IF YOU NEVER EVER HAVENT TESTED THE WHOLE LOVE THING. YOU HAVE MISSED ONE OF 
THE BEST THINGS IN THE LIFE. THIS IS ONE OF THE ONLY THINGS IN THE WORLD THAT CAN MAKE ME PUT MY BOARD TO SLEEP AND
 NEVER OPEN IT AGAIN.........OKEY TIME TO SPEAK ABOUT SOMETHING OTHER!!!! NO MORE LOVE OR $ TALKING RIGHT NOW, 
MAYBE L8ER BUT NOT NOW!............. SOME HELLOS INSTEAD. NECRO-MAN, YOU ARE A CRAZY GUY AND I HOPE YOU'LL STAY 
CRAZY AS EVER! SNUFFY OF ONTARION: WELL WE DID MAKE A GREAT JOB WITH DESTROYING THE FOOD AT THE FOOD PLACE, DIDNT
 WE! TV 21 RULEZ!!!.. LAST OF ALL BUT NOT LEAST. A HELLO TO THE GERMAN PORNO PHREAKS WHO SOLD ME A BOTTLE OF SOOME
 KIND OF CHEAP GERMAN BEER!.....SHIT IM TOO SLEEPY NOW. THINK I AM GOING TO LET OVER THE KEYBOARD TOO CHUCKY WHEN 
HE ARRIVES FROM HIS SLEEPING BEATTY SLEEP. WELL, IN HIS CASE HE WILL HAVE TO SLEEP FOR ATLEAST 500 YEARS IF HE HAS 
SOME SHITTY CRAPPY IDEAS OF GETTING NICE AND BEATUIFUL!                                     








IDEAS_for_VoCo.txt



--------------------------------------------------------------------------
IDEAS FOR THE X-TRADE DEMO ( DEMO-COMPETITION X-MAS '92) BY  MANTA & SCUBA
      Some were inspirated by the demo-ideas for 'World Of Confusion'
--------------------------------------------------------------------------
	    ___   ________ ______   /\  ______   ______
	    \  \ / /\     \)  __ \ /  \ )____ \  ) __ /
	   __\  Y /  \/ /\/  /_/_// /\ \_/\_ \ \/___/Y
	   \    / \__/ /_/  //  \/  \/  (  /_/ / \____
	    \  /\__\  / \  / \___\  /Y\_ \  _ /\  _ _/
	     \/    Y\/   \/ SbA  Y\/    \/\/ Y  \/ Y

After 5 hard hours and beers, Manta and Scuba finnaly reached this ideas
for our glory demo.... lets go..

P.S. Hey VoCo ! Teach your Girlfriend Assembler.. hehehe
     have got about 2,5 months left to code and design all this stuff !
     Fucking short...

  DIRECTORY:
 ------------

-   Detailed Explanation of all routines and their row in presenting
-   Short Overview over the whole demo
-   List of GFX



1. INTRODUCTION
---------------
  As a music we choose a music as it is done in a `normal` movie-an
  atmospheric tune with orchestra-samples,... (like in INDIANA JONES III)

  What we see first is A DRAWN PLANET. A huge VECTOR-SPACECRAFT is flying
  towards the planet. 
      a)  It`s getting smaller and smaller and at last there`s
          only the PLANET left. The screen fades to black and
          the next part will be shown ( VECTORLANDSCAPE ).         -->-o
                                                                       |
      b)  It would become cooler if the PLANET is ZOOMING towards      |
          the spacecraft. So we would need a ZOOMING-ROUTINE which     |
          zooms the planet so big that at last only one big,zoomed     |
          pixel fills the whole screen. The spacecraft flys through    |
          this pixel, and a TUNNEL is developping from the middle      |
          of the screen. The spacecraft flys very fast through the     |
          tunnel ( LOOPINGS! hehe ). You could say that the tunnel     |
          stands for the `catacombs`, `the underground-world` of the   |
          planet.                                                      |
          The tunnel leads the spacecraft onto the surface of the      |
          planet ( VECTORLANDSCAPE ).                              -->-|
                                                                       |
  The Vectorlandscape               <----------------------------------o
  -------------------
  This one should develop from the Coder's ideas. Perhaps some futuristic-
  looking houses, driving cars/smaller flying spacecrafts,... This is an
  opportunity for VOCO to use the remaining rastertime (make the best out
  of it! It`s a competition! hehe)
  Don`t let the flight through the landscape become TOO long (in Enigma,
  for example it soon became boring I think).
  Finally the spacecraft is flying towards one certain building... 
  THE CINEMA (also in a futuristic style).  
  The spacecraft stops besides this CINEMA. (To create an illusion of a
  LANDING spacecraft, the spacecraft is shown with a shadow). Then we`re
  rotated around 90° and we see the CINEMA IN FRONT of us. The door opens
  and we`re flying through the corridor and up the STAIRS (slightly in
  a curve). At last we fly through the last door and over the chairs. The
  inner room (IFF-Picture) is shown, and the curtain opens.
      a) The screen fades to black and the PRESENTATION is shown.  -->-o
                                                                       |
      b) The screen is ZOOMED until the whole screen is black.         |
         Now the PRESENTATION is shown.                            -->-o
                                                                       |
  The Presentation                  <----------------------------------o
  ----------------
  Here we show some small TEXTSCREENS. As CHARSET we should take the
  CROISSANT-CHAR by Manta. All the textscreens shouldn`t be shown for
  TOO long !!! About 2-3 seconds for 1 screen !!! The text fades like
  this: - The letters appear fastly in a pure white color exactly
          in the middle of the screen 
        - Then the white letters fade fastly back to their
          original color (golden palette)
        - The text is shown for a short time
        - The text fades back to black (not too fast, not too slow)
        - Now the next text fades in (again EXACTLY in the middle
          of the screen)
  
  The 'playlist' of the screen-fadings is like that:

        1. ' IT IS DONE ! '                (2 seconds, then fadeout,...)
        2. '   IN 1992    '                (2 seconds,...)
        3. The first X-TRADE LOGO is shown ( about 3 seconds )
        4. '   PRESENTS   '                (2 seconds)
        5. The first ALIEN! PICTURE is shown. Perhaps this is not
           only a picture, but also picture with animated parts
           of the green alien (not sure yet).

  Of course it would be good to load the picture (anim) and the logo
  before the PRESENTATION is started.
  After the picture (anim) is finished, some SMALL CREDIDS are shown.
        6. '  KODING  ' + a small VOCO-logo behind it
           
              SCUBA                      '  GRAFIX  '
                +     - logos +          '    +     '
              MANTA                      '  D-SIGN  '
            
           '  MJUSIC  ' + a small VAIN and/or KALASHNIKOV-logo
  All the credits should be on one screen, and they should appear line
  by line ( First 'KODING by Voco' , second 'GFX+DESIGN by ...',...).
  Perhaps we'll sample or record a small sound-effect which appears when
  a new line is shown (this effect only in the credits-part).
  The credits fade out at once.
Now the whole INTRODUCTION is finished. We`ll go over to the MAIN-PART

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2. MAIN-PART
------------
You`ll get the exact specifications (GFX-size,....) as soon as we`ve drawn
them.  guess you have enough to do with the introduction now, where you have
nearly all gfx + music (except the small logos and the orchestra tune).

  Now people want to have AEKSCHN (action) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  We've had enough text-screens now. (Even though they have been reduced
  to a limit!). So we won`t write `now comes ....`. We'll show some FUCKING
  GREAT ROUTINES RAPIDLY AFTER EACH OTHER... hehehe AND HOPEFULLY WIN THE
  FUCKING COMPETITION ! YEAHR !
  Okay... here we go...

1.-Some balls (=DRAWN BOBS) come jumping onto the screen.And at in the end
   there should be about 70 bobs on the screen, at the same time.
   The 70 pixel balls explode and you get a lot of NORMAL LORES-PIXELS.
   These normal pixels will be put together to a LOGO if the  shown logo
   needs more pixels than available, some more pixels will join from outside
   the screen without attracting attention.
  -After the logo is shown for about 3 seconds, the logo explodes to the
   pixels again, and the pixels put themselves together to a DOT-VECTOR 
   (perhaps lightsourced,...) in 4 colors.  
  -One pixel forming this dot-vector is centered in the middle of the screen,
   and the `camera` zooms into this pixel. the pixel becomes a large plain 
   filled circle. At last the anti-aliasing is put around the ball to make it
   look better and a scroller appears in it (like in the S.O.S-Demo from
   Crystal).  
   SCROLLTEXT:
    'Guess what ? Nothing ! Schwabenbraeu-Beer rules ! Flump !!!'
                                                        |
        That`s how it sounds when you open a bottle of Schwabenbraeu!


2.-The large circle becomes smaller again and splits. We get 4 DRAWN BOBS 
   of the same size ( the same balls as above ).                             
   Fast a normal LINE-VECTOR-BOX (Enigma!) comes flying onto the screen and
   surrounds the 4 balls. The balls hop around for a while (5 secs) without
   doing anything special. Then the following action starts...:
   When the jumping balls hit a line in the vector, this line flashes up 
   (it becomes brigher for a short time) and then this line disappears.This
   happens until every 12 lines are `executed`.
  -At last the bobs jump aside out of the screen
  
3.-A TRAILBLAZER (scrolling chessfield) appears on the lower half of the 
   screen. The small difference to other demos is that we don`t fly over
   some pre-calculated colorfields, but over an IFF-PICTURE. This means
   every pixel stands for one field in the trailblazer, and the color stays
   the same.
   To make it short... you fly over a normal IFF-picture, Lo-Res 32 (or 16)
   colors, 160 x 160 pixels large. We don`t always fly straight, but we turn
   around in curves and stuff like that. So we`ll see every section of the
   picture within a short time.
   Now the trailblazing-picture flips from the horizontal to the vertical
   position. ( The trailblazing-picture develops to a normal IFF-Graphic
   like you would see it in DPaint).

4.-Here we`ll show the 3D-SCROLLER for which you get the charset with
   disk. (Like in 'IN THE KITCHEN' from Anarchy). Again the text should
   not become too long. It`s only to show the effect, not to tell a real
   message.
   SCROLLTEXT: 'Some special beershakes burp over to Deicide/TRSI, Kreator/
                Devils, D-TECT, Schwabenpower, Ektar/TSB and all other close
                friends and girl-friends.'


   Text:' AND NOW PREPARE FOR SUMTHING REAL COOL! ' (Croissant-Char)

5.-A Vector-Ball (Dragonball) and a glenz-cube inside it are rotating.
   The cube exists out of 24 (better 48!! hehe) triangles.... it`s this
   normal glenz-cube you can see everywhere.
   Inside the cube there`s a lightsource (a bob). Now the light-rays
   shine through the unfilled triangles of the cube onto the surface of
   the Vector-Ball.This means you get 12 (or 24!!) triangles projected
   onto the ball (instead of the stars of the Dragon-Ball in HumanTarget).
   When you rotate the whole story you get the 3D-Effect of the Vector-Ball.

   Text:' WASN`T IT NEAT ? '
        ' AND NOW EVEN BETTER... '

   The lighsource-bob doesn`t stay at the same point... it even moves around
   inside the cube. So all triangles on the ball are shown in another
   perspective / distortion.
   (Only if possible.... please call if you have any problems)

   Another cool variation woulde be to move the lightsource outside the cube
   but still inside the ball, but this would probably cause many calculations..
   So ask me for any details, if you dont understand anything..
   If the Vectorball is really too difficult to code, we could do the same
   effect with a big cube out of many triangles, so it also looks nearly like
   a `ball`... 

6.-A Trailblazer again, but this time not just a `usual` and not over a picture,
   BUT it is a TUNNEL-TRAILBLAZER... this means a chessfield fold together
   to a tunnel (the inside of the tunnel are the chessfields). And it
   looks like you are flying `into` this tunnel (like into pussy ! haha)
   from the back are now flying 3 BALLS (1 red, 1 blue, 1 green).
   Those balls `COLORIZE` the Trailblazer-Tunnel (like in Guardian Dragon II
   on the ball).. This looks very nice, becoz we do it not just on a plane
   field but in the tunnel as there are the balls shaking inside this tunnel.
   Princip: Tunnel is grey in beginning -> tunnel gets colorized from those
            3 BALLS (only sourounding where the balls are..)
   At the top of the screen maybe a little X-TRADE logo to remind again to
   our glory name.. hahaha

7.-A nice picture by Scuba will be shown (probably Interlace, 64cols,
   full overscan).

 --> Textscreen: (Croisant-Charset always)

    TEXT: `Yeahhhr! Hey thanx to all who`
	  ` voted for me in Eurocharts! `
	  `    Keep Voting, ya`know..   `
          `                             `
          ` A fucking drunken Scuba...  `

8.-Imagine this: A cube is like a mirror, and you can see all other objects
   on it which it is flying around.. I thought we have a little gallery
   with `mirrors`.. 
   -----> look on disk, there is an IFF-picture to explain it !
   The mirror cube flys a curve through the mirror gallery and the cube shines
   in all the different mirrors, and the morror-image of the cube in the
   mirrors shine back on the mirror cube. cool eh ?
   if it is to complicated to do it with the `cube` also in `mirror`, then we
   just use a normal cube (maybe then GLENZ ?) which just shines in the mirrors.
   Another cool effect would be if we had different colors of the mirror,
   so that the different mirror-images of the cube show in another color...
   maybe we could let the cube lets fall to pieces like when glas breaks
   also with the sound of breaking a mirror... with this effect this part
   would be `faded out`...

9.-In the middle of the screen a VECTOR-EQUALIZER (see RSI-MEGADEMO) appears.
   One equalizer1 (Channel1) bumps to the left, one to the right (Channel2),
   one to the top (Ch.3) and one to the bottom (Ch.4). A PIXELSCROLLER
   appears and circles around the equalizers. When an equalizer hits the
   scroller, the scroller takes the impulse and suddenly bends to the top,
   left, right, or bottom (depends on which equalizer hits it).

   Scrolltext: `Hahahahha ! Hey suckers ! Color Crime II will kill you`
               `down... Release in Summer... Special greets to my`
               `graphic-friends.... Invisible/Devils  **  Thorion/TRSI  **`
               `Ben/Pleasure  **  RWO/Kefrens  **  BULT/X-TRADE...`
               `Lets kick some ass....`

----> Advertisment part:

   At the Top a X-TRADE logo (max. 32 cols,LoRes)

   Text in a small 8x8 Font (4 or 8 colors, only big letters):
   TEXT:
-----------

  `  X-TRADE  MAIL GHQ      X-TRADE  MAIL SHQ `
  `    PLK 0562521-D        MIDSOMMARVAGEN 35 `
  `   7106 NEUENSTADT          95149 LULEA    `
  `  JUNITED GERMANSKI        I LOVE SWEDEN   `
  `  (JOINING,GFX ETC)         (SWAPPING)     `
  `                                           `
  `      Give these cool boards a call...     `
  `                                           `
  ` X-TRADE UNIVERSE HQ  +49 (0) 713-936-81   `
  ` X-TRADE WORLD    HQ  +49 (0) 711-777-5990 `
  ` X-TRADE GERMAN   HQ  +49 (0) 723-278-321  `
  ` X-TRADE U.S.A.   HQ  + 1 (0) 201-256-4604 `
  ` X-TRADE EUROPEAN HQ  +46 (0) 521-133-87   `
  ` X-TRADE SWEDISH  HQ  +46 (0) 213-577-00   `
  ` X-TRADE ITALIAN  HQ  +39 (0) 297-291-781  `


10.-Imagine a lightsourced DOT-VECTORBALL like in enigma. it is like normal
    but around it will fly 3 other, smaller vector-dot-balls in 3 different
    colors (green, red, blue). those are flying around the big ball like
    planets do, and they give the big ball the colors in which the small
    shine. even cooler would be if there could fly also some even smaller
    ones around the 3 colored balls... And of coz all this stuff is flying
    around over the whole screen...

11.-Animated Vector-Cube (IFF animations), nothing special to code, just
    playing an animation of IFF-Pictures. Not sure yet if this part will show
    up or not. (Depends on Manta)

12.-The next we show is THE STARWARS-SCROLLER. In Enigma was also a scroller
    like this, but fucking lame. ours is moving FAST, flipps up and down
    and is flying a `curve` like in car racings.. !!!!!! It should be used
    to show our greetings (only the best so that it does not take so long).
    The colors of it should change all the time, so maybe every new line
    scolling in should use another color.. to the back the scroll should get
    `darker` to make the illusion that it is far away. Also an X-TRADE or
    Greetings logo is at the top jumping into the screen (not just fading).



OVERVIEW
--------

  1. INTRODUCTION (Planetzoom, Tunnel, Landscape, Cinema, Presentation)

  2. MAIN-PART
     2.01 Bobs -> Logo --> Dot-Vector --> Circle --> Scroller (SOS-Demo)
     2.02 Line-Vector-Box with bobs inside --> Box disappears --> Bobs
          leave the screen
     2.03 Trailblazer --> Picture develops out of trailblazer
     2.04 3D-Line-Scroller
  ----->    Textscreen
     2.05 Vector-Ball with Cube & Lightsource in its body
     2.06 Color-sourced Trailblazer-Tunnel
     2.07 Picture by ScUBa 
  ----->    Textscreen
     2.08 Vector-Mirrow-Cube
     2.09 Vectorequlizers and Pixelscroller
  ----->    Advertisment part (Addresses & BBS #)
     2.10 Color-Sourced Dot-Vector-Balls with small balls moving around
     2.11 Animated Vector-Cube (IFF animations)
     2.12 The StarWars-Scroller

  3. THE END-PART
     3.01 A cool fading or routine shows the `Stone Cold Sober` picture by Scuba
          Also probably with some animated parts of the picture...
     3.02 The detailed Credits are showing, we are not sure yet, how to make
          this right now, but I (Scuba) try to draw some cool Cartoons of
          ourselves for the credits. More detailed information about
          the credits part later.

 
So this was the design by Manta & Scuba...
You receive within this letter the updated grafix in form how the are
done so far

FINAL FINNISHED GRAFIX NOW:
---------------------------
* ALIEN!
* ACT-III (Cinema)
* CROISANT-CHARSET
* BEER-ICON  (Should be shown sometimes in the upper left corner hehehe)
* X-TRADE LOGOS
* Picture by Scuba (be careful ! It is so far also my GFX-Compo picture !)


GRAFIX UNDER WORK:
------------------
* STONE COLD SOBER - END PICTURE , Full overscan, 64 colors
* 3D-LINE-SCROLL-CHAR 32 colors, probably reduced to 16 colors for you !


GRAFIX NOT STARTED SO FAR:
--------------------------
* Small Bobs for the pixel effect-routine
* 160x160 lores picture for Picture-Trailblazer routine
* Drawn circle with antialiasing for the S.O.S Scroller in the beginning
* all the other little crap grafix.
* Animations of the Animated Vector
* Animations of the Alien pictures


Finally some short hellos to all our Members in Sweden !
I count on you all ! X-TRADE stays fighting....
Sorry to all about the delays with the T-Shirts... I have sent them today.
Blame me for my lazyness to go to the post !
I am just a little Gfx-addicted alcoholican... hahaha
Keep fighting, also without BB...
OVER AND OUT

Greet all swedish Girls and keep the VODKA cool... hehehe 
(Lyrics by ScUBa)

CIAO

ScUBa & MaNTa in `92






Chessboxah8.S





************************
*      CHESSBOXAH      *
************************
*  1-frame transparent *
*      vectorcube      *
************************
* Coded by TPP/X-Trade *
************************

**-**-**-**-**-**-**-**-**-**-**-**
* SCREEN	- Shown dis frame *
* SCREENBUF1	- Clear and draw  *
* SCREENBUF2	- Fill		  *
**-**-**-**-**-**-**-**-**-**-**-**

	AUTO E\J

;*****************
;*   Constants   *
;*****************

OldOpenLibrary	= -408
CloseLibrary	= -414

DMASET=	%1000000111000000
;	 -----a-bcdefghij

;	a: Blitter Nasty
;	b: Bitplane DMA (if this isn't set, sprites disappear!)
;	c: Copper DMA
;	d: Blitter DMA
;	e: Sprite DMA
;	f: Disk DMA
;	g-j: Audio 3-0 DMA

BLTAPTR=$dff050
BLTBPTR=$dff04c
BLTCPTR=$dff048
BLTDPTR=$dff054
BLTCON0=$dff040
BLTCON1=$dff042
BLTADAT=$dff074
BLTBDAT=$dff072
BLTCDAT=$dff070
BLTAMOD=$dff064
BLTBMOD=$dff062
BLTCMOD=$dff060
BLTDMOD=$dff066
BLTAFWM=$dff044
BLTALWM=$dff046
BLTSIZE=$dff058


START:
	MOVEM.L	D0-D7/A0-A6,-(A7)	; Put registers on stack

;***********************************
;*   CLOSE ALL SYSTEM INTERRUPTS   *
;*                                 *
;*      START DEMO INTERRUPTS      *
;***********************************

	MOVE.L	$4.W,A6			; Exec pointer to A6
	LEA.L	GfxName(PC),A1		; Set library pointer
	MOVEQ	#0,D0
	JSR	OldOpenLibrary(A6)	; Open graphics.library
	MOVE.L	D0,A1			; Use Base-pointer
	MOVE.L	$26(A1),OLDCOP1		; Store copper1 start addr
	MOVE.L	$32(A1),OLDCOP2		; Store copper1 start addr
	JSR	CloseLibrary(A6)	; Close graphics library

	LEA	$DFF000,A6
	MOVE.W	$1C(A6),INTENA		; Store old INTENA
	MOVE.W	$2(A6),DMACON		; Store old DMACON
	MOVE.W	$10(A6),ADKCON		; Store old ADKCON

	MOVE.W	#$7FFF,$9A(A6)		; Clear interrupt enable

	BSR.L	Wait_Vert_Blank

	MOVE.W	#$7FFF,$96(A6)		; Clear DMA channels
	MOVE.L	#COPLIST,$80(A6)	; Copper1 start address
	MOVE.W	#DMASET!$8200,$96(A6)	; DMA kontrol data
	MOVE.L	$6C.W,OldInter		; Store old inter pointer
	MOVE.L	#INTER,$6C.W		; Set interrupt pointer

	MOVE.W	#$7FFF,$9C(A6)		; Clear request
	MOVE.W	#$C020,$9A(A6)		; Interrupt enable

;; ***********************************************
;  ************     Custom inits     *************
;  ***********************************************



;  ***********************************************

LOOP:
	TST.B	STARTMAIN
	BEQ.S	LOOP

	move.b	#0,startmain

;; ***********************************************
;  ************     MAIN LOOOOOOOP     ***********
;  ***********************************************

	bsr	clrbuf
	bsr	fill
	bsr	zoomin
	bsr	changecols
	bsr	rotate
	bsr	coords
	bsr	mirror
	bsr	scale
	bsr	drawdashit
;	move.w	#$0f00,$dff180

;  ***********************************************

	BTST	#6,$BFE001		; Test left mouse button
	BNE.S	LOOP

;; ***********************************************
;  ************ Custom anti-inits (!) ************
;  ***********************************************





;*****************************************
;*					 *
;*   RESTORE SYSTEM INTERRUPTS ECT ECT   *
;*					 *
;*****************************************

	LEA	$DFF000,A6

	MOVE.W	#$7FFF,$9A(A6)		; Disable interrupts

	BSR.W	Wait_Vert_Blank

	MOVE.W	#$7FFF,$96(A6)
	MOVE.L	OldCop1(PC),$80(A6)	; Restore old copper1
	MOVE.L	OldCop2(PC),$84(A6)	; Restore old copper1
	MOVE.L	OldInter(PC),$6C.W	; Restore inter pointer
	MOVE.W	DMACON,D0		; Restore old DMACON
	OR.W	#$8000,D0
	MOVE.W	D0,$96(A6)		
	MOVE.W	ADKCON,D0		; Restore old ADKCON
	OR.W	#$8000,D0
	MOVE.W	D0,$9E(A6)
	MOVE.W	INTENA,D0		; Restore inter data
	OR.W	#$C000,D0
	MOVE.W	#$7FFF,$9C(A6)
	MOVE.W	D0,$9A(A6)
	MOVEM.L	(A7)+,D0-D7/A0-A6	; Get registers from stack
	RTS

***********
* DA SUBS *
***********

******* COORDS ********
*(USES D0-D7/A0/A4-A6)*

coords	lea.l	obj,a0
	lea.l	rotated,a4
	lea.l	sinus,a5
	lea.l	cosinus,a6
	movem.w	xrot,d5-d7
	asl.w	#1,d5
	asl.w	#1,d6
	asl.w	#1,d7
morecoords
	movem.w	(a0)+,d0-d2
	cmpi.w	#$8000,d0
	bne.s	apnight
	rts

apnight
;Y = cos(z.)*y+sin(z.)*x
;X = cos(z.)*x-sin(z.)*y
	move.w	(a6,d7.w),d3
	move.w	d3,d4
	muls	d1,d3
	muls	d0,d4
	swap	d3
	swap	d4
	rol.l	#4,d3
	rol.l	#4,d4
	move.w	d3,yy
	move.w	d4,xx
	move.w	(a5,d7.w),d3
	move.w	d3,d4
	muls	d0,d3
	muls	d1,d4
	swap	d3
	swap	d4
	rol.l	#4,d3
	rol.l	#4,d4
	sub.w	d3,yy
	add.w	d4,xx
	move.w	yy,d1
	move.w	xx,d0
	
;Y = cos(x.)*y+sin(x.)*z
;Z = cos(x.)*z+sin(x.)*y
	move.w	(a6,d6.w),d3
	move.w	d3,d4
	muls	d1,d3
	muls	d2,d4
	swap	d3
	swap	d4
	rol.l	#4,d3
	rol.l	#4,d4
	move.w	d3,yy
	move.w	d4,zz
	move.w	(a5,d6.w),d3
	move.w	d3,d4
	muls	d2,d3
	muls	d1,d4
	swap	d3
	swap	d4
	rol.l	#4,d3
	rol.l	#4,d4
	sub.w	d3,yy
	add.w	d4,zz
	move.w	zz,d2

;X = cos(y.)*x-sin(y.)*z
;Z = cos(y.)*z+sin(y.)*x
	move.w	(a6,d5.w),d3
	move.w	d3,d4
	muls	d0,d3
	muls	d2,d4
	swap	d3
	swap	d4
	rol.l	#4,d3
	rol.l	#4,d4
	move.w	d3,xx
	move.w	d4,zz
	move.w	(a5,d5.w),d3
	move.w	d3,d4
	muls	d2,d3
	muls	d0,d4
	swap	d3
	swap	d4
	rol.l	#4,d3
	rol.l	#4,d4
	sub.w	d3,xx
	add.w	d4,zz

	move.w	xx,(a4)+
	move.w	yy,(a4)+
	move.w	zz,(a4)+
	bra	morecoords

******************************

rotate	movem.w	xadd,d0-d2
	add.w	d0,xrot
	add.w	d1,yrot
	add.w	d2,zrot
	andi.w	#$1ff,xrot
	andi.w	#$1ff,yrot
	andi.w	#$1ff,zrot
	rts

******************************

mirror
	lea.l	rotated,a1			; X-Y
	movem.w	(a1),d0-d2	;origo
	movem.w	12(a1),d3-d5
	sub.w	d0,d3		;xoffs
	sub.w	d1,d4
	sub.w	d2,d5
	movem.w	d3-d5,xoffs3
	movem.w	d3-d5,xoffs1
	movem.w	d3-d5,xoffsneg1
	movem.w	d3-d5,xoffsneg3
	asl.w	#1,d3
	asl.w	#1,d4
	asl.w	#1,d5
	add.w	d3,xoffsneg3
	add.w	d4,xoffsneg3+2
	add.w	d5,xoffsneg3+4
	add.w	d3,xoffs3
	add.w	d4,xoffs3+2
	add.w	d5,xoffs3+4
	neg.w	xoffsneg1
	neg.w	xoffsneg1+2
	neg.w	xoffsneg1+4
	neg.w	xoffsneg3
	neg.w	xoffsneg3+2
	neg.w	xoffsneg3+4

	movem.w	6(a1),d3-d5
	sub.w	d0,d3		;yoffs
	sub.w	d1,d4
	sub.w	d2,d5
	movem.w	d3-d5,yoffs3
	movem.w	d3-d5,yoffs1
	movem.w	d3-d5,yoffsneg1
	movem.w	d3-d5,yoffsneg3
	asl.w	#1,d3
	asl.w	#1,d4
	asl.w	#1,d5
	add.w	d3,yoffsneg3
	add.w	d4,yoffsneg3+2
	add.w	d5,yoffsneg3+4
	add.w	d3,yoffs3
	add.w	d4,yoffs3+2
	add.w	d5,yoffs3+4
	neg.w	yoffsneg1
	neg.w	yoffsneg1+2
	neg.w	yoffsneg1+4
	neg.w	yoffsneg3
	neg.w	yoffsneg3+2
	neg.w	yoffsneg3+4

	lea.l	mirrorlist1,a0
	lea.l	mirror1,a1
	lea.l	xoffs,a2
	lea.l	yoffs,a3
merasex	move.w	(a0)+,d6
	bmi	mirrorzy
	move.w	d6,d7
	asl.w	#2,d6
	asl.w	#1,d7
	add.w	d6,d7	;*6
	movem.w	(a2,d7.w),d3-d5
	add.w	d0,d3
	add.w	d1,d4
	add.w	d2,d5

	move.w	(a0)+,d6
	move.w	d6,d7
	asl.w	#2,d6
	asl.w	#1,d7
	add.w	d6,d7	;*6
	add.w	(a3,d7.w),d3
	add.w	2(a3,d7.w),d4
	add.w	4(a3,d7.w),d5

	move.w	d3,(a1)+
	move.w	d4,(a1)+
	move.w	d5,(a1)+
	bra	merasex


mirrorzy
	lea.l	rotated,a1			; Z-Y
	movem.w	18(a1),d0-d2	;origo
	movem.w	30(a1),d3-d5
	sub.w	d0,d3		;zoffs
	sub.w	d1,d4
	sub.w	d2,d5
	movem.w	d3-d5,zoffs1
	movem.w	d3-d5,zoffsneg1
	neg.w	zoffsneg1
	neg.w	zoffsneg1+2
	neg.w	zoffsneg1+4

	movem.w	24(a1),d3-d5
	sub.w	d0,d3		;yoffs
	sub.w	d1,d4
	sub.w	d2,d5
	movem.w	d3-d5,yoffs3
	movem.w	d3-d5,yoffs1
	movem.w	d3-d5,yoffsneg1
	movem.w	d3-d5,yoffsneg3
	asl.w	#1,d3
	asl.w	#1,d4
	asl.w	#1,d5
	add.w	d3,yoffsneg3
	add.w	d4,yoffsneg3+2
	add.w	d5,yoffsneg3+4
	add.w	d3,yoffs3
	add.w	d4,yoffs3+2
	add.w	d5,yoffs3+4
	neg.w	yoffsneg1
	neg.w	yoffsneg1+2
	neg.w	yoffsneg1+4
	neg.w	yoffsneg3
	neg.w	yoffsneg3+2
	neg.w	yoffsneg3+4

	lea.l	mirrorlist2,a0
	lea.l	mirror2,a1
	lea.l	zoffs,a2
	lea.l	yoffs,a3
mersex2 move.w	(a0)+,d6
	bmi	mirrorxz
	move.w	d6,d7
	asl.w	#2,d6
	asl.w	#1,d7
	add.w	d6,d7	;*6
	movem.w	(a2,d7.w),d3-d5
	add.w	d0,d3
	add.w	d1,d4
	add.w	d2,d5

	move.w	(a0)+,d6
	move.w	d6,d7
	asl.w	#2,d6
	asl.w	#1,d7
	add.w	d6,d7	;*6
	add.w	(a3,d7.w),d3
	add.w	2(a3,d7.w),d4
	add.w	4(a3,d7.w),d5

	move.w	d3,(a1)+
	move.w	d4,(a1)+
	move.w	d5,(a1)+
	bra	mersex2


mirrorxz
	lea.l	rotated,a1			; X-Z
	movem.w	36(a1),d0-d2	;origo
	movem.w	48(a1),d3-d5
	sub.w	d0,d3		;xoffs
	sub.w	d1,d4
	sub.w	d2,d5
	movem.w	d3-d5,xoffs1
	movem.w	d3-d5,xoffsneg1
	neg.w	xoffsneg1
	neg.w	xoffsneg1+2
	neg.w	xoffsneg1+4

	movem.w	42(a1),d3-d5
	sub.w	d0,d3		;zoffs
	sub.w	d1,d4
	sub.w	d2,d5
	movem.w	d3-d5,zoffs1
	movem.w	d3-d5,zoffsneg1
	neg.w	zoffsneg1
	neg.w	zoffsneg1+2
	neg.w	zoffsneg1+4

	lea.l	mirrorlist3,a0
	lea.l	mirror3,a1
	lea.l	xoffs,a2
	lea.l	zoffs,a3
mersex3 move.w	(a0)+,d6
	bmi	negera
	move.w	d6,d7
	asl.w	#2,d6
	asl.w	#1,d7
	add.w	d6,d7	;*6
	movem.w	(a2,d7.w),d3-d5
	add.w	d0,d3
	add.w	d1,d4
	add.w	d2,d5

	move.w	(a0)+,d6
	move.w	d6,d7
	asl.w	#2,d6
	asl.w	#1,d7
	add.w	d6,d7	;*6
	add.w	(a3,d7.w),d3
	add.w	2(a3,d7.w),d4
	add.w	4(a3,d7.w),d5

	move.w	d3,(a1)+
	move.w	d4,(a1)+
	move.w	d5,(a1)+
	bra	mersex3


negera	
	move.w	#2,d7
	lea.l	mirror1,a0		;transfer 16*3 words
	lea.l	mirror4,a1		;(the blitter IS busy at da
horror	move.l	(a0)+,(a1)+		; moment, if youre wondering
	move.l	(a0)+,(a1)+		; why i use da processor...)
	move.l	(a0)+,(a1)+		;(How da hell did ya get into
	move.l	(a0)+,(a1)+		; this source anyway?)
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	dbf	d7,horror

	move.w	#2,d7
	lea.l	mirror4,a0		;neg 16*3 words
terror	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	dbf	d7,terror

	lea.l	mirror2,a0		;transfer 8*3 words
	lea.l	mirror5,a1
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+

	lea.l	mirror5,a0		;neg 8*3 words
	move.w	#2,d7
gurgel	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	dbf	d7,gurgel

	lea.l	mirror3,a0		;transfer 4*3 words
	lea.l	mirror6,a1
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+
	move.l	(a0)+,(a1)+

	lea.l	mirror6,a0		;neg 4*3 words
	move.w	#2,d7
blubb	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	neg.w	(a0)+
	dbf	d7,blubb
	rts

***********************************

scale	movem.w	xhor,d3-d5
	lea.l	mirror1,a0		;change these
	lea.l	scaled1,a1		;change these
	move.w	#16*2+8*2+4*2-1,d7	;change these
merskal	movem.w	(a0)+,d0-d2
	add.w	d5,d2
	ext.l	d2
	ext.l	d0
	ext.l	d1
	asl.l	#6,d0
;	asl.l	#1,d0
	asl.l	#6,d1
;	asl.l	#1,d1
	divs	d2,d0
	divs	d2,d1
	add.w	d3,d0
	add.w	d4,d1
	move.w	d0,(a1)+
	move.w	d1,(a1)+
	dbf	d7,merskal
	rts

************************

plottah		;debugging puropses only! REMOVE!!!!
	move.l	screenbuf,a0
	lea.l	scaled1,a1
	move.w	#16-1,d7			;#16-1,d7
	bsr	meradot
	lea.l	scaled4,a1
	move.w	#16-1,d7
	bsr	meradot
	lea.l	scaled2,a1
	move.w	#8-1,d7
	bsr	meradot
	lea.l	scaled5,a1
	move.w	#8-1,d7
	bsr	meradot
	rts

meradot	clr.l	d0
	movem.w	(a1)+,d0-d1
	move.w	d1,d2
	asl.w	#5,d2
	asl.w	#3,d1
	add.w	d2,d1
	ror.l	#4,d0
	lsl.w	#1,d0
	add.w	d0,d1
	clr.w	d0
	rol.l	#4,d0
	move.w	#$8000,d2
	lsr.w	d0,d2
	or.w	d2,(a0,d1.w)
	dbf	d7,meradot
	rts


************************

	CUT=4

clrbuf	
	bsr	waitblit
	move.w	#$01f0,BLTCON0
	move.w	#$0000,BLTCON1
	move.w	#4*CUT,BLTDMOD
	move.w	#$0000,BLTADAT
	move.l	screenbuf,a0
	adda.w	#2*CUT,a0
	move.l	a0,BLTDPTR
	move.w	#$2654-2*CUT,BLTSIZE

	move.l	screenbuf,a0
	adda.w	#2*40*153,a0
	move.w	#9,d7
	clr.l	d0
	clr.l	d1
	clr.l	d2
	clr.l	d3
	clr.l	d4
	clr.l	d5
	clr.l	d6
	sub.l	a1,a1
	move.l	a1,a2
	move.l	a1,a3
	move.l	a1,a4
	move.l	a1,a5
	move.l	a1,a6
rensa	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	movem.l	d0-d6/a1-a6,-(a0)
	dbf	d7,rensa
	rts

************************

fill
	bsr	waitblit
	move.w	#$09f0,BLTCON0
	move.w	#$000a,BLTCON1
	move.w	#-1,BLTAFWM
	move.w	#4*CUT,BLTAMOD
	move.w	#4*CUT,BLTDMOD
	move.l	screenbuf2,a0
	adda.w	#2*153*40-2*CUT,a0
	move.l	a0,BLTAPTR
	move.l	a0,BLTDPTR
	move.w	#$4c94-2*CUT,BLTSIZE
	rts

************************

waitblit
	btst	#14,$dff002
	bne	waitblit
	rts

************************

drawdashit
	lea.l	scaled1,a2

	lea.l	frontvis,a1
	bsr	chksurf
	bsr	initline
	lea.l	frontconnect,a1
	bsr	drawsurf

	lea.l	rightvis,a1
	bsr	chksurf
	lea.l	rightconnect,a1
	bsr	drawsurf

	lea.l	rearvis,a1
	bsr	chksurf
	lea.l	rearconnect,a1
	bsr	drawsurf

	lea.l	leftvis,a1
	bsr	chksurf
	lea.l	leftconnect,a1
	bsr	drawsurf

	lea.l	upvis,a1
	bsr	chksurf
	lea.l	upconnect,a1
	bsr	drawsurf

	lea.l	downvis,a1
	bsr	chksurf
	lea.l	downconnect,a1
	bsr	drawsurf

	rts

chksurf	move.w	(a1),d7
	subq	#1,d7
	asl.w	#2,d7
	movem.w	(a2,d7.w),d0-d1
	move.w	2(a1),d7
	subq	#1,d7
	asl.w	#2,d7
	movem.w	(a2,d7.w),d2-d3
	move.w	4(a1),d7
	subq	#1,d7
	asl.w	#2,d7
	movem.w	(a2,d7.w),d4-d5
	sub.w	d0,d2
	sub.w	d0,d4
	sub.w	d1,d3
	sub.w	d1,d5
	muls	d4,d3
	muls	d2,d5
	sub.w	d5,d3
	bpl.s	ytanebakom
	move.l	screenbuf,a4
	rts
ytanebakom
	move.l	screenbuf,a4
	adda.w	#40*153,a4
	rts

drawsurf
nyyta	movem.w	(a1),d4-d5
	tst.w	d4
	bpl	merayta
	rts
merayta	subq	#1,d4
	subq	#1,d5
	asl.w	#2,d4
	asl.w	#2,d5
	movem.w	(a2,d4.w),d0-d1
	movem.w	(a2,d5.w),d2-d3
	bsr	drawline
	movem.w	2(a1),d4-d5
	subq	#1,d4
	subq	#1,d5
	asl.w	#2,d4
	asl.w	#2,d5
	movem.w	(a2,d4.w),d0-d1
	movem.w	(a2,d5.w),d2-d3
	bsr	drawline
	movem.w	4(a1),d4-d5
	subq	#1,d4
	subq	#1,d5
	asl.w	#2,d4
	asl.w	#2,d5
	movem.w	(a2,d4.w),d0-d1
	movem.w	(a2,d5.w),d2-d3
	bsr	drawline
	move.w	6(a1),d4
	move.w	(a1),d5
	subq	#1,d4
	subq	#1,d5
	asl.w	#2,d4
	asl.w	#2,d5
	movem.w	(a2,d4.w),d0-d1
	movem.w	(a2,d5.w),d2-d3
	bsr	drawline
	adda.w	#8,a1
	bra	nyyta

;********************
;*  Init line draw  *
;********************

SINGLE = 2		; 2 = SINGLE BIT WIDTH
BYTEWIDTH = 40

; The below registers only have to be set once each time
; you want to draw one or more lines.

INITLINE:
	LEA.L	$DFF000,A6

.WAIT:	BTST	#$E,$2(A6)
	BNE.S	.WAIT

	MOVEQ	#-1,D1
	MOVE.L	D1,$44(A6)		; FirstLastMask
	MOVE.W	#$8000,$74(A6)		; BLT data A
	MOVE.W	#BYTEWIDTH,$60(A6)	; Tot.Screen Width
	MOVE.W	#$FFFF,$72(A6)
	move.w	#bytewidth,d6
	RTS

;*****************
;*   DRAW LINE   *
;*****************
; USES D0/D1/D2/D3/D4/D5/D6/A0/A4/A6

DRAWLINE:
;  A4 - Plane
;  A6 - $DFF000
;  D6 - width of bpl
;  D0-D4 - coords

		move.l	a4,a0
		move.l	d6,d5

draw:		cmp.w	d1,d3
		bgt.s	line1
		exg	d0,d2
		exg	d1,d3
		beq.s	out
line1:		move.w	d1,d4
		muls	d5,d4
		move.w	d0,d5
		add.l	a0,d4
		asr.w	#3,d5
		add.l	d5,d4
		moveq	#0,d5
		sub.w	d1,d3
		sub.w	d0,d2
		bpl.s	line2
		moveq	#1,d5
		neg.w	d2
line2:		move.w	d3,d1
		add.w	d1,d1
		cmp.w	d2,d1
		dbhi	d3,line3
line3:		move.w	d3,d1
		sub.w	d2,d1
		bpl.s	line4
		exg	d2,d3
line4:		addx.w	d5,d5
		add.w	d2,d2
		move.w	d2,d1
		sub.w	d3,d2
		addx.w	d5,d5
		and.w	#15,d0
		ror.w	#4,d0
		or.w	#$a4a,d0
waitblt:	btst	#$E,2(a6)
		bne.s	waitblt
		move.w	d2,$52(a6)
		sub.w	d3,d2
		lsl.w	#6,d3
		addq.w	#2,d3
		move.w	d0,$40(a6)
		move.b	oct(PC,d5.w),$43(a6)
		move.l	d4,$48(a6)
		move.l	d4,$54(a6)
		movem.w	d1/d2,$62(a6)
		move.w	d3,$58(a6)
out		rts

oct:		dc.l	$3431353,$b4b1757   

*************************

changecols
	btst	#1,framecount+2
	beq	colup
	cmp.w	#$0902,colorah+2
	ble	bajbaj
	btst	#0,framecount+3
	beq	bajbaj
	sub.w	#$0100,colorah+2
bajbaj	rts
colup	cmp.w	#$0f02,colorah+2
	bge	byebye
	btst	#0,framecount+3
	beq	byebye
	add.w	#$0100,colorah+2
byebye	rts

***************************

zoomin
	sub.w	#80,zhor
	cmp.w	#1000,zhor
	bgt	zoombaj
	move.w	#1000,zhor
zoombaj	rts

;*** WAIT VERTICAL BLANK ***

Wait_Vert_Blank:
	BTST	#0,$5(A6)
	BEQ.S	Wait_Vert_Blank
.loop	BTST	#0,$5(A6)
	BNE.S	.loop
	RTS

;*** DATA AREA ***

GfxName		DC.B	'graphics.library',0
startmain	dc.b	0
		even
DosBase		DC.L	0
OldInter	DC.L	0
OldCop1		DC.L	0
OldCop2		DC.L	0
INTENA		DC.W	0
DMACON		DC.W	0
ADKCON		DC.W	0

;; ***********************************************
;  ************    CUSTOM DATA AREA    ***********
;  ***********************************************


xrot	dc.w	0
yrot	dc.w	0
zrot	dc.w	0

xadd	dc.w	1
yadd	dc.w	2
zadd	dc.w	4

xx	dc.w	0
yy	dc.w	0
zz	dc.w	0

xhor	dc.w	160
yhor	dc.w	75
zhor	dc.w	$3000		;  -> 1600

obj	dc.w	0,0,-450,0,150,-450,150,0,-450
	dc.w	450,0,0,450,150,0,450,0,150
	dc.w	0,450,0,0,450,150,150,450,0
objend	dc.w	$8000

coordno	equ (objend-obj)/6

screen		dc.l	bpls
screenbuf	dc.l	bpls+40*153*2
screenbuf2	dc.l	bpls+40*153*4

mirrorlist1	dc.w	0,3,1,3,2,3,3,3		;xmultiplier,ymultipl.
		dc.w	0,2,1,2,2,2,3,2
		dc.w	0,1,1,1,2,1,3,1
		dc.w	0,0,1,0,2,0,3,0
		dc.w	$ffff

mirrorlist2	dc.w	1,3,2,3
		dc.w	1,2,2,2
		dc.w	1,1,2,1
		dc.w	1,0,2,0
		dc.w	$ffff

mirrorlist3	dc.w	1,2,2,2
		dc.w	1,1,2,1
		dc.w	$ffff

xoffs
xoffsneg3	blk.w	3,0
xoffsneg1	blk.w	3,0
xoffs1		blk.w	3,0
xoffs3		blk.w	3,0

yoffs
yoffsneg3	blk.w	3,0
yoffsneg1	blk.w	3,0
yoffs1		blk.w	3,0
yoffs3		blk.w	3,0

zoffs
zoffsneg3	blk.w	3,0
zoffsneg1	blk.w	3,0
zoffs1		blk.w	3,0
zoffs3		blk.w	3,0


frontconnect	dc.w	1,2,6,5			;Front
		dc.w	3,4,8,7
		dc.w	6,7,11,10
		dc.w	9,10,14,13
		dc.w	11,12,16,15
		dc.w	$ffff

rightconnect	dc.w	17,18,20,19		;Right
		dc.w	8,19,21,12
		dc.w	20,9+28,5+28,22
		dc.w	21,22,24,23
		dc.w	$ffff

rearconnect	dc.w	1+28,2+28,6+28,5+28	;Back
		dc.w	3+28,4+28,8+28,7+28
		dc.w	6+28,7+28,11+28,10+28
		dc.w	9+28,10+28,14+28,13+28
		dc.w	11+28,12+28,16+28,15+28
		dc.w	$ffff
	
leftconnect	dc.w	23+28,24+28,22+28,21+28	;Left
		dc.w	12+28,21+28,19+28,8+28
		dc.w	22+28,5,9,20+28
		dc.w	19+28,20+28,18+28,17+28
		dc.w	$ffff

upconnect	dc.w	15+28,14+28,26,25
		dc.w	23+28,25,27,24+28
		dc.w	26,18,17,28
		dc.w	27,28,3,2
		dc.w	$ffff

downconnect	dc.w	3+28,2+28,27+28,28+28
		dc.w	17+28,28+28,26+28,18+28
		dc.w	27+28,24,23,25+28
		dc.w	26+28,25+28,15,14
		dc.w	$ffff

frontvis	dc.w	1,4,16
rightvis	dc.w	4,18,24		;4,13+28,11+28
rearvis		dc.w	13+28,16+28,4+28
leftvis		dc.w	16+28,1,13
upvis		dc.w	16+28,13+28,4
downvis		dc.w	13,16,1+28

framecount	dc.l	0

;**********************************
;*				  *
;*    INTERRUPT ROUTINE. LEVEL 3  *
;*				  *
;**********************************

INTER:
	MOVEM.L	D0-D7/A0-A6,-(A7)	; Put registers on stack

	add.l	#1,framecount
;	btst	#0,framecount+3
;	beq	noframe

	MOVE.B	#1,STARTMAIN

	move.l	screenbuf2,a0
	move.l	screenbuf,screenbuf2
	move.l	screen,screenbuf
	move.l	a0,screen

noframe	LEA.L	$DFF000,A6
	move.l	screen,d0
	move.w	d0,bplptr+6
	swap	d0
	move.w	d0,bplptr+2
	swap	d0
	add.l	#40*153,d0
	move.w	d0,bplptr+14
	swap	d0
	move.w	d0,bplptr+10

;; ***********************************************
;  ************    CUSTOM INTERRUPT    ***********
;  ***********************************************



;  ***********************************************

	lea.l	$DFF000,A6
	MOVE.W	#$4020,$9C(A6)		; Clear interrupt request
	MOVEM.L	(A7)+,D0-D7/A0-A6	; Get registers from stack
	RTE

;*****************************
;*			     *
;*      COPPER1 PROGRAM      *
;*			     *
;*****************************

	SECTION	Copper,DATA_C

COPLIST:
	DC.W	$0100,$0000	; Bit-Plane control reg.
	DC.W	$0102,$0000	; Hor-Scroll
	DC.W	$0104,$0010	; Sprite/Gfx priority
	DC.W	$0108,$0000	; Modolu (odd)
	DC.W	$010A,$0000	; Modolu (even)
	DC.W	$008E,$2C81	; Screen Size
	DC.W	$0090,$2CC1	; Screen Size
	DC.W	$0092,$0038	; H-start
	DC.W	$0094,$00D0	; H-stop

	DC.W	$0180,$0005	; %00
	DC.W	$0182,$0602	; %01		;REAR
colorah	dc.w	$0184,$0f02	; %10		;FRONT
	dc.w	$0186,$0f02	; %11		;BOTH

	dc.w	$5401,$ff00
	dc.w	$0180,$000f
bplptr:	dc.w	$00e0,$0000
	dc.w	$00e2,$0000
	dc.w	$00e4,$0000
	dc.w	$00e6,$0000

	dc.w	$5501,$ff00
	dc.w	$0100,$2000
	dc.w	$0180,$0200

	dc.w	$ee01,$ff00
	dc.w	$0100,$0000
	dc.w	$0180,$000f
	dc.w	$ef01,$ff00
	dc.w	$0180,$0005
	DC.L	$FFFFFFFE

;*****************************
;*			     *
;*      SCREEN DATA AREA     *
;*			     *
;*****************************

	SECTION	Screen,BSS_C

	ds.b	10*40		;SEC BUFFER
BPLS	DS.B	40*153*2*3
	ds.b	10*40		;SEC BUFFER

	SECTION Fettso,BSS_P

rotated	ds.w	3*coordno
mirror1 ds.w	16*3		; (1-16)
mirror2 ds.w	8*3		; (17-24)
mirror3	ds.w	4*3		; (25-28)
mirror4 ds.w	16*3		; (1'-16')
mirror5 ds.w	8*3		; (17'-24')
mirror6	ds.w	4*3		; (25'-28')

scaled1	ds.w	16*2
scaled2	ds.w	8*2
scaled3	ds.w	4*2
scaled4	ds.w	16*2
scaled5	ds.w	8*2
scaled6	ds.w	4*2


	SECTION	Fett,DATA_P

sinus
	dc.w	0,50,100,150,201,251,301,351
	dc.w	401,451,501,551,600,650,700,749
	dc.w	799,848,897,946,995,1043,1092,1140
	dc.w	1188,1236,1284,1332,1379,1427,1474,1520
	dc.w	1567,1613,1659,1705,1751,1796,1841,1886
	dc.w	1930,1974,2018,2062,2105,2148,2191,2233
	dc.w	2275,2317,2358,2399,2439,2479,2519,2559
	dc.w	2598,2636,2675,2712,2750,2787,2824,2860
	dc.w	2896,2931,2966,3000,3034,3068,3101,3133
	dc.w	3165,3197,3228,3259,3289,3319,3348,3377
	dc.w	3405,3432,3460,3486,3512,3538,3563,3587
	dc.w	3611,3635,3658,3680,3702,3723,3744,3764
	dc.w	3783,3802,3821,3838,3856,3872,3888,3904
	dc.w	3919,3933,3947,3960,3972,3984,3995,4006
	dc.w	4016,4026,4035,4043,4051,4058,4064,4070
	dc.w	4075,4080,4084,4087,4090,4092,4094,4095
cosinus	dc.w	4095,4095,4094,4092,4090,4087,4084,4080
	dc.w	4075,4070,4064,4058,4051,4043,4035,4026
	dc.w	4016,4006,3995,3984,3972,3960,3947,3933
	dc.w	3919,3904,3888,3872,3856,3838,3821,3802
	dc.w	3783,3764,3744,3723,3702,3680,3658,3635
	dc.w	3611,3587,3563,3538,3512,3486,3460,3432
	dc.w	3405,3377,3348,3319,3289,3259,3228,3197
	dc.w	3165,3133,3101,3068,3034,3000,2966,2931
	dc.w	2895,2860,2824,2787,2750,2712,2675,2636
	dc.w	2598,2559,2519,2479,2439,2399,2358,2316
	dc.w	2275,2233,2191,2148,2105,2062,2018,1974
	dc.w	1930,1886,1841,1796,1751,1705,1659,1613
	dc.w	1567,1520,1473,1426,1379,1332,1284,1236
	dc.w	1188,1140,1092,1043,995,946,897,848
	dc.w	798,749,700,650,600,551,501,451
	dc.w	401,351,301,251,200,150,100,50
	dc.w	0,-50,-100,-150,-200,-251,-301,-351
	dc.w	-401,-451,-501,-551,-600,-650,-700,-749
	dc.w	-799,-848,-897,-946,-995,-1043,-1092,-1140
	dc.w	-1188,-1236,-1284,-1332,-1379,-1426,-1473,-1520
	dc.w	-1567,-1613,-1659,-1705,-1751,-1796,-1841,-1886
	dc.w	-1930,-1974,-2018,-2062,-2105,-2148,-2191,-2233
	dc.w	-2275,-2316,-2358,-2399,-2439,-2479,-2519,-2559
	dc.w	-2598,-2636,-2675,-2712,-2750,-2787,-2824,-2860
	dc.w	-2895,-2931,-2966,-3000,-3034,-3068,-3101,-3133
	dc.w	-3165,-3197,-3228,-3259,-3289,-3319,-3348,-3377
	dc.w	-3405,-3432,-3460,-3486,-3512,-3538,-3563,-3587
	dc.w	-3611,-3635,-3658,-3680,-3702,-3723,-3744,-3764
	dc.w	-3783,-3802,-3821,-3838,-3856,-3872,-3888,-3904
	dc.w	-3919,-3933,-3947,-3960,-3972,-3984,-3995,-4006
	dc.w	-4016,-4026,-4035,-4043,-4051,-4058,-4064,-4070
	dc.w	-4075,-4080,-4084,-4087,-4090,-4092,-4094,-4095
	dc.w	-4095,-4095,-4094,-4092,-4090,-4087,-4084,-4080
	dc.w	-4075,-4070,-4064,-4058,-4051,-4043,-4035,-4026
	dc.w	-4016,-4006,-3995,-3984,-3972,-3960,-3947,-3933
	dc.w	-3919,-3904,-3888,-3872,-3856,-3838,-3821,-3802
	dc.w	-3783,-3764,-3744,-3723,-3702,-3680,-3658,-3635
	dc.w	-3611,-3587,-3563,-3538,-3512,-3486,-3460,-3432
	dc.w	-3405,-3377,-3348,-3319,-3289,-3259,-3228,-3197
	dc.w	-3165,-3133,-3101,-3068,-3034,-3000,-2966,-2931
	dc.w	-2895,-2860,-2823,-2787,-2750,-2712,-2675,-2636
	dc.w	-2598,-2559,-2519,-2479,-2439,-2399,-2358,-2316
	dc.w	-2275,-2233,-2191,-2148,-2105,-2062,-2018,-1974
	dc.w	-1930,-1886,-1841,-1796,-1751,-1705,-1659,-1613
	dc.w	-1567,-1520,-1473,-1426,-1379,-1332,-1284,-1236
	dc.w	-1188,-1140,-1092,-1043,-995,-946,-897,-848
	dc.w	-798,-749,-700,-650,-600,-551,-501,-451
	dc.w	-401,-351,-301,-251,-200,-150,-100,-50
	dc.w	0,50,100,150,201,251,301,351
	dc.w	401,451,501,551,600,650,700,749
	dc.w	799,848,897,946,995,1043,1092,1140
	dc.w	1188,1236,1284,1332,1379,1427,1474,1520
	dc.w	1567,1613,1659,1705,1751,1796,1841,1886
	dc.w	1930,1974,2018,2062,2105,2148,2191,2233
	dc.w	2275,2317,2358,2399,2439,2479,2519,2559
	dc.w	2598,2636,2675,2712,2750,2787,2824,2860
	dc.w	2896,2931,2966,3000,3034,3068,3101,3133
	dc.w	3165,3197,3228,3259,3289,3319,3348,3377
	dc.w	3405,3432,3460,3486,3512,3538,3563,3587
	dc.w	3611,3635,3658,3680,3702,3723,3744,3764
	dc.w	3783,3802,3821,3838,3856,3872,3888,3904
	dc.w	3919,3933,3947,3960,3972,3984,3995,4006
	dc.w	4016,4026,4035,4043,4051,4058,4064,4070
	dc.w	4075,4080,4084,4087,4090,4092,4094,4095






FMRKpt3.0.s



*****************************************************************
*               »» Protracker 3.00B playroutine ««              *
* Written by Tom "Outland" Bech and Ivar "Heatseeker" J. Olsen. *
* Based upon Protracker 1.1A playroutine written by Lars Hamre. *
*          VBlank version. Not optimised in any way.            *
*****************************************************************
* Call pt_InitMusic before start. Then call pt_PlayMusic at VB. *
* To stop the music, call pt_StopMusic.                         *
* Please note that in this version, all SetTempo commands are   *
* ignored. This assembly language program has been tested with  *
* the Devpac 3.0, AsmOne 1.2, MCAsm 1.5 and a68k assemblers and *
* may have to be modified for other assemblers.			*
*****************************************************************

; FileFormat offsets
sd_songname	EQU	0	;songname offset
sd_sampleinfo	EQU	20	;first sample starts here
sd_numofpatt	EQU	950	;number of patterns are stored here
sd_pattpos	EQU	952	;pattern positions table is here
sd_mahokakt	EQU	1080	;"M.K." :)
sd_patterndata	EQU	1084	;first pattern starts at this position

; Song offsets. W/L/B means word/longword/byte length.
n_note		EQU	0  	;W
n_cmd		EQU	2  	;W
n_cmdlo		EQU	3  	;low B of cmd
n_start		EQU	4  	;L
n_length	EQU	8  	;W
n_loopstart	EQU	10 	;L
n_replen	EQU	14 	;W
n_period	EQU	16 	;W
n_finetune	EQU	18 	;B
n_volume	EQU	19 	;B
n_dmabit	EQU	20 	;W
n_toneportdirec	EQU	22 	;B
n_toneportspeed	EQU	23 	;B
n_wantedperiod	EQU	24 	;W
n_vibratocmd	EQU	26 	;B
n_vibratopos	EQU	27 	;B
n_tremolocmd	EQU	28 	;B
n_tremolopos	EQU	29 	;B
n_wavecontrol	EQU	30 	;B
n_glissfunk	EQU	31 	;B
n_sampleoffset	EQU	32 	;B
n_pattpos	EQU	33 	;B
n_loopcount	EQU	34 	;B
n_funkoffset	EQU	35 	;B
n_wavestart	EQU	36 	;L
n_reallength	EQU	40 	;W
n_trigger	EQU	42 	;B
n_samplenum	EQU	43 	;B

pt_InitMusic
	MOVEM.L	D0-D3/A0-A2,-(SP)
	LEA	pt_data,a0
	MOVE.L	A0,pt_SongDataPtr
	LEA	sd_pattpos(A0),A1
	MOVEQ	#128-1,D0
	MOVEQ	#0,D1
	MOVEQ	#0,D2
	moveq	#$1e,d3
pt_lop2 MOVE.B	(A1)+,D1
	CMP.B	D2,D1
	BLE.B	pt_lop
	MOVE.L	D1,D2
pt_lop	DBRA	D0,pt_lop2
	ADDQ.W	#1,d2
	ASL.L	#8,D2
	ASL.L	#2,D2
	LEA	4(A1,D2.L),A2
	LEA	pt_SampleStarts(PC),A1
	ADD.W	#2*20+2,A0		;find first sample length
	MOVEQ	#31-1,D0
pt_lop3 MOVE.L	A2,(A1)+
	MOVEQ	#0,D1
	MOVE.W	(A0),D1
	ASL.L	#1,D1
	ADD.L	D1,A2
	ADD.L	D3,A0
	DBRA	D0,pt_lop3
	MOVE.B	#6,pt_Speed		;default speed
	OR.B	#2,$BFE001
	MOVEQ	#0,D0
	LEA	$DFF000,A0
	MOVE.W	D0,$A8(A0)
	MOVE.W	D0,$B8(A0)
	MOVE.W	D0,$C8(A0)
	MOVE.W	D0,$D8(A0)
	CLR.B	pt_SongPos
	CLR.B	pt_Counter
	CLR.B	pt_PattPos
	MOVEM.L	(SP)+,D0-D3/A0-A2
	RTS

pt_StopMusic
	MOVEM.L	D0/A0,-(SP)
	MOVEQ	#0,D0
	LEA	$DFF000,A0
	MOVE.W	D0,$A8(A0)
	MOVE.W	D0,$B8(A0)
	MOVE.W	D0,$C8(A0)
	MOVE.W	D0,$D8(A0)
	MOVE.W	#$000F,$DFF096		;stop AudioDMA activity
	MOVEM.L	(SP)+,D0/A0
	RTS

pt_PlayMusic
	MOVEM.L	D0-D7/A0-A6,-(SP)
	MOVE.L	pt_SongDataPtr(PC),A0
	ADDQ.L	#1,pt_Counter
	MOVE.L	pt_Counter(PC),D0
	CMP.L	pt_CurrSpeed(PC),D0
	BLO.B	pt_NoNewNote
	CLR.L	pt_Counter
	TST.B	pt_PattDelayTime2
	BEQ.B	pt_GetNewNote
	BSR.B	pt_NoNewAllChannels
	BRA.W	pt_dskip

pt_NoNewNote
	BSR.B	pt_NoNewAllChannels
	BRA.W	pt_NoNewPositionYet

pt_NoNewAllChannels
	LEA	pt_audchan1temp(PC),A6
	LEA	$DFF0A0,A5
	BSR.W	pt_CheckEffects
	LEA	pt_audchan2temp(PC),A6
	LEA	$DFF0B0,A5
	BSR.W	pt_CheckEffects
	LEA	pt_audchan3temp(PC),A6
	LEA	$DFF0C0,A5
	BSR.W	pt_CheckEffects
	LEA	pt_audchan4temp(PC),A6
	LEA	$DFF0D0,A5
	BRA.W	pt_CheckEffects

pt_GetNewNote
	LEA	12(A0),A3
	LEA	sd_pattpos(A0),A2
	LEA	sd_patterndata(A0),A0
	MOVEQ	#0,D1
	MOVE.L	pt_SongPosition(PC),D0
	MOVE.B	0(a2,D0.W),D1
	ASL.L	#8,D1				;*1024
	ASL.L	#2,D1

	ADD.L	pt_PatternPosition(PC),D1
	MOVE.L	D1,pt_PatternPtr
	CLR.W	pt_DMACONtemp
	LEA	$DFF0A0,A5
	LEA	pt_audchan1temp(PC),A6
	MOVEQ	#1,D2
	BSR.W	pt_PlayVoice
	MOVEQ	#0,D0
	MOVE.B	n_volume(A6),D0
	MOVE.W	D0,8(A5)
	LEA	$DFF0B0,A5
	LEA	pt_audchan2temp(PC),A6
	MOVEQ	#2,D2
	BSR.B	pt_PlayVoice
	MOVEQ	#0,D0
	MOVE.B	n_volume(A6),D0
	MOVE.W	D0,8(A5)
	LEA	$DFF0C0,A5
	LEA	pt_audchan3temp(PC),A6
	MOVEQ	#3,D2
	BSR.B	pt_PlayVoice
	MOVEQ	#0,D0
	MOVE.B	n_volume(A6),D0
	MOVE.W	D0,8(A5)
	LEA	$DFF0D0,A5
	LEA	pt_audchan4temp(PC),A6
	MOVEQ	#4,D2
	BSR.B	pt_PlayVoice
	MOVEQ	#0,D0
	MOVE.B	n_volume(A6),D0
	MOVE.W	D0,8(A5)
	BRA.W	pt_SetDMA

pt_CheckMetronome
	CMP.B	pt_MetroChannel,D2
	BNE.W	pt_Return
	MOVE.B	pt_MetroSpeed,D2
	BEQ.W	pt_Return
	MOVE.L	pt_PatternPosition,D3
	LSR.L	#4,D3
	DIVU	D2,D3
	SWAP	D3
	TST.W	D3
	BNE.W	pt_Return
	AND.L	#$00000FFF,(A6)
	OR.L	#$10D6F000,(A6) 	;Play sample $1F at period $0D6 (214)
	RTS

pt_PlayVoice
	TST.L	(A6)
	BNE.B	pt_plvskip
	BSR.W	pt_PerNop
pt_plvskip
	MOVE.L	0(a0,D1.L),(A6)		;Read one track from pattern
	BSR.B	pt_CheckMetronome
	ADDQ.L	#4,D1
	MOVEQ	#0,D2
	MOVE.B	n_cmd(A6),D2		;Get lower 4 bits of instrument
	AND.B	#$F0,D2
	LSR.B	#4,D2
	MOVE.B	(A6),D0			;Get higher 4 bits of instrument
	AND.B	#$F0,D0
	OR.B	D0,D2
	TST.B	D2
	BEQ.B	pt_SetRegisters		;Instrument was zero
	MOVEQ	#0,D3
	LEA	pt_SampleStarts(PC),A1
	MOVE	D2,D4
	MOVE.B	D2,n_samplenum(A6)
	SUBQ.L	#1,D2
	LSL.L	#2,D2
	MULU	#30,D4
	MOVE.L	0(a1,D2.L),n_start(A6)
	MOVE.W	0(a3,D4.L),n_length(A6)
	MOVE.W	0(a3,D4.L),n_reallength(A6)
	MOVE.B	2(A3,D4.L),n_finetune(A6)
	MOVE.B	3(A3,D4.L),n_volume(A6)
	MOVE.W	4(A3,D4.L),D3 		;Get repeat
	TST.W	D3
	BEQ.B	pt_NoLoop
	MOVE.L	n_start(A6),D2		;Get start
	ASL.W	#1,D3
	ADD.L	D3,D2			;Add repeat
	MOVE.L	D2,n_loopstart(A6)
	MOVE.L	D2,n_wavestart(A6)
	MOVE.W	4(A3,D4.L),D0		;Get repeat
	ADD.W	6(A3,D4.L),D0		;Add replen
	MOVE.W	D0,n_length(A6)
	MOVE.W	6(A3,D4.L),n_replen(A6)	;Save replen
	BRA.B	pt_SetRegisters

pt_NoLoop
	MOVE.L	n_start(A6),D2
	ADD.L	D3,D2
	MOVE.L	D2,n_loopstart(A6)
	MOVE.L	D2,n_wavestart(A6)
	MOVE.W	6(A3,D4.L),n_replen(A6)	;Save replen
pt_SetRegisters
	MOVE.W	(A6),D0
	AND.W	#$0FFF,D0
	BEQ.W	pt_CheckMoreEffects	;If no note ->
	MOVE.W	2(A6),D0
	AND.W	#$0FF0,D0
	CMP.W	#$0E50,D0 		;finetune?
	BEQ.B	pt_DoSetFineTune
	MOVE.B	2(A6),D0
	AND.B	#$0F,D0
	CMP.B	#3,D0			;TonePortamento?
	BEQ.B	pt_ChkTonePorta
	CMP.B	#5,D0			;TonePortamento + VolSlide?
	BEQ.B	pt_ChkTonePorta
	CMP.B	#9,D0			;Sample Offset?
	BNE.B	pt_SetPeriod
	BSR.W	pt_CheckMoreEffects
	BRA.B	pt_SetPeriod

pt_DoSetFineTune
	BSR.W	pt_SetFineTune
	BRA.B	pt_SetPeriod

pt_ChkTonePorta
	BSR.W	pt_SetTonePorta
	BRA.W	pt_CheckMoreEffects

pt_SetPeriod
	MOVEM.L	D0-D1/A0-A1,-(SP)
	MOVE.W	(A6),D1
	AND.W	#$0FFF,D1
	LEA	pt_PeriodTable(PC),A1
	MOVEQ	#0,D0
	MOVEQ	#$24,D7
pt_ftuloop
	CMP.W	0(a1,D0.W),D1
	BHS.B	pt_ftufound
	ADDQ.L	#2,D0
	DBRA	D7,pt_ftuloop
pt_ftufound
	MOVEQ	#0,D1
	MOVE.B	n_finetune(A6),D1
	MULU	#37*2,D1
	ADD.L	D1,A1
	MOVE.W	0(a1,D0.W),n_period(A6)
	MOVEM.L	(SP)+,D0-D1/A0-A1

	MOVE.W	2(A6),D0
	AND.W	#$0FF0,D0
	CMP.W	#$0ED0,D0
	BEQ.W	pt_CheckMoreEffects

	MOVE.W	n_dmabit(A6),$DFF096
	BTST	#2,n_wavecontrol(A6)
	BNE.B	pt_vibnoc
	CLR.B	n_vibratopos(A6)
pt_vibnoc
	BTST	#6,n_wavecontrol(A6)
	BNE.B	pt_trenoc
	CLR.B	n_tremolopos(A6)
pt_trenoc
	MOVE.W	n_length(A6),4(A5)	;Set length
	MOVE.L	n_start(A6),(A5)	;Set start
	BNE.B	pt_sdmaskp
	CLR.L	n_loopstart(A6)
	MOVEQ	#1,D0
	MOVE.W	D0,4(A5)
	MOVE.W	D0,n_replen(A6)
pt_sdmaskp
	MOVE.W	n_period(A6),D0
	MOVE.W	D0,6(A5)		;Set period
	ST	n_trigger(A6)
	MOVE.W	n_dmabit(A6),D0
	OR.W	D0,pt_DMACONtemp
	BRA.W	pt_CheckMoreEffects
 
pt_SetDMA
	move.b	pt_timeout,$bfe701	;TimerB HI
	move.b	pt_timeout+1,$bfe601	;TimerB LO
	move.b	#%000011001,$bfef01	;set commandbits: OneShot & CLK & Start
pt_timerwait1
	btst	#0,$bfef01		;timeout on timerB? (ICR TimerB)
	bne.s	pt_timerwait1		;nope...
	MOVE.W	pt_DMACONtemp,D0
	AND.W	pt_ActiveChannels,D0	;mask out inactive channels
	OR.W	#$8000,D0
	MOVE.W	D0,$DFF096
	move.b	pt_timeout,$bfe701	;TimerB HI
	move.b	pt_timeout+1,$bfe601	;TimerB LO
	move.b	#%000011001,$bfef01	;set commandbits: OneShot & CLK & Start
pt_timerwait2
	btst	#0,$bfef01		;timeout on timerB? (ICR TimerB)
	bne.s	pt_timerwait2		;nope...
	LEA	$DFF000,A5
	LEA	pt_audchan4temp(PC),A6
	MOVE.L	n_loopstart(A6),$D0(A5)
	MOVE.W	n_replen(A6),$D4(A5)
	LEA	pt_audchan3temp(PC),A6
	MOVE.L	n_loopstart(A6),$C0(A5)
	MOVE.W	n_replen(A6),$C4(A5)
	LEA	pt_audchan2temp(PC),A6
	MOVE.L	n_loopstart(A6),$B0(A5)
	MOVE.W	n_replen(A6),$B4(A5)
	LEA	pt_audchan1temp(PC),A6
	MOVE.L	n_loopstart(A6),$A0(A5)
	MOVE.W	n_replen(A6),$A4(A5)

pt_dskip
	ADD.L	#16,pt_PatternPosition
	MOVE.B	pt_PattDelayTime,D0
	BEQ.B	pt_dskpc
	MOVE.B	D0,pt_PattDelayTime2
	CLR.B	pt_PattDelayTime
pt_dskpc
	TST.B	pt_PattDelayTime2
	BEQ.B	pt_dskpa
	SUBQ.B	#1,pt_PattDelayTime2
	BEQ.B	pt_dskpa
	SUB.L	#16,pt_PatternPosition
pt_dskpa
	TST.B	pt_PBreakFlag
	BEQ.B	pt_nnpysk
	SF	pt_PBreakFlag
	MOVEQ	#0,D0
	MOVE.B	pt_PBreakPosition(PC),D0
	LSL.W	#4,D0
	MOVE.L	D0,pt_PatternPosition
	CLR.B	pt_PBreakPosition
pt_nnpysk
	CMP.L	#1024,pt_PatternPosition
	BNE.B	pt_NoNewPositionYet
pt_NextPosition	
	MOVEQ	#0,D0
	MOVE.B	pt_PBreakPosition(PC),D0
	LSL.W	#4,D0
	MOVE.L	D0,pt_PatternPosition
	CLR.B	pt_PBreakPosition
	CLR.B	pt_PosJumpAssert
	ADDQ.L	#1,pt_SongPosition
	AND.L	#$7F,pt_SongPosition
	MOVE.L	pt_SongPosition(PC),D1
	MOVE.L	pt_SongDataPtr(PC),A0
	CMP.B	sd_numofpatt(A0),D1
	BLO.B	pt_NoNewPositionYet
	CLR.L	pt_SongPosition
pt_NoNewPositionYet
	TST.B	pt_PosJumpAssert
	BNE.B	pt_NextPosition
	MOVEM.L	(SP)+,D0-D7/A0-A6
	RTS

pt_CheckEffects
	BSR.B	pt_chkefx2
	MOVEQ	#0,D0
	MOVE.B	n_volume(A6),D0
	MOVE.W	D0,8(A5)
	RTS

pt_chkefx2
	BSR.W	pt_UpdateFunk
	MOVE.W	n_cmd(A6),D0
	AND.W	#$0FFF,D0
	BEQ.B	pt_Return
	MOVE.B	n_cmd(A6),D0
	AND.B	#$0F,D0
	TST.B	D0
	BEQ.B	pt_Arpeggio
	CMP.B	#1,D0
	BEQ.W	pt_PortaUp
	CMP.B	#2,D0
	BEQ.W	pt_PortaDown
	CMP.B	#3,D0
	BEQ.W	pt_TonePortamento
	CMP.B	#4,D0
	BEQ.W	pt_Vibrato
	CMP.B	#5,D0
	BEQ.W	pt_TonePlusVolSlide
	CMP.B	#6,D0
	BEQ.W	pt_VibratoPlusVolSlide
	CMP.B	#$E,D0
	BEQ.W	pt_ECommands
pt_SetBack
	MOVE.W	n_period(A6),6(A5)
	CMP.B	#7,D0
	BEQ.W	pt_Tremolo
	CMP.B	#$A,D0
	BEQ.W	pt_VolumeSlide
pt_Return
	RTS

pt_PerNop
	MOVE.W	n_period(A6),6(A5)
	RTS

pt_Arpeggio
	MOVEQ	#0,D0
	MOVE.L	pt_Counter(PC),D0
	DIVS	#3,D0
	SWAP	D0
	CMP.W	#1,D0
	BEQ.B	pt_Arpeggio1
	CMP.W	#2,D0
	BEQ.B	pt_Arpeggio2
pt_Arpeggio0
	MOVE.W	n_period(A6),D2
	BRA.B	pt_ArpeggioSet

pt_Arpeggio1
	MOVEQ	#0,D0
	MOVE.B	n_cmdlo(A6),D0
	LSR.B	#4,D0
	BRA.B	pt_ArpeggioFind

pt_Arpeggio2
	MOVEQ	#0,D0
	MOVE.B	n_cmdlo(A6),D0
	AND.B	#15,D0
pt_ArpeggioFind
	ASL.W	#1,D0
	MOVEQ	#0,D1
	MOVE.B	n_finetune(A6),D1
	MULU	#37*2,D1
	LEA	pt_PeriodTable(PC),A0
	ADD.L	D1,A0
	MOVEQ	#0,D1
	MOVE.W	n_period(A6),D1
	MOVEQ	#$24,D7
pt_arploop
	MOVE.W	0(a0,D0.W),D2
	CMP.W	(A0),D1
	BHS.B	pt_ArpeggioSet
	ADDQ.L	#2,A0
	DBRA	D7,pt_arploop
	RTS

pt_ArpeggioSet
	MOVE.W	D2,6(A5)
	RTS

pt_FinePortaUp
	TST.L	pt_Counter
	BNE.B	pt_Return
	MOVE.B	#$0F,pt_LowMask
pt_PortaUp
	MOVEQ	#0,D0
	MOVE.B	n_cmdlo(A6),D0
	AND.B	pt_LowMask,D0
	MOVE.B	#$FF,pt_LowMask
	SUB.W	D0,n_period(A6)
	MOVE.W	n_period(A6),D0
	AND.W	#$0FFF,D0
	CMP.W	#$0071,D0
	BPL.B	pt_PortaUskip
	AND.W	#$F000,n_period(A6)
	OR.W	#$0071,n_period(A6)
pt_PortaUskip
	MOVE.W	n_period(A6),D0
	AND.W	#$0FFF,D0
	MOVE.W	D0,6(A5)
	RTS

pt_FinePortaDown
	TST.L	pt_Counter
	BNE.W	pt_Return
	MOVE.B	#$0F,pt_LowMask
pt_PortaDown
	CLR.W	D0
	MOVE.B	n_cmdlo(A6),D0
	AND.B	pt_LowMask,D0
	MOVE.B	#$FF,pt_LowMask
	ADD.W	D0,n_period(A6)
	MOVE.W	n_period(A6),D0
	AND.W	#$0FFF,D0
	CMP.W	#$0358,D0
	BMI.B	pt_Portadskip
	AND.W	#$F000,n_period(A6)
	OR.W	#$0358,n_period(A6)
pt_Portadskip
	MOVE.W	n_period(A6),D0
	AND.W	#$0FFF,D0
	MOVE.W	D0,6(A5)
	RTS

pt_SetTonePorta
	MOVE.L	A0,-(SP)
	MOVE.W	(A6),D2
	AND.W	#$0FFF,D2
	MOVEQ	#0,D0
	MOVE.B	n_finetune(A6),D0
	MULU	#37*2,D0
	LEA	pt_PeriodTable(PC),A0
	ADD.L	D0,A0
	MOVEQ	#0,D0
pt_StpLoop
	CMP.W	0(a0,D0.W),D2
	BHS.B	pt_StpFound
	ADDQ.W	#2,D0
	CMP.W	#37*2,D0
	BLO.B	pt_StpLoop
	MOVEQ	#35*2,D0
pt_StpFound
	MOVE.B	n_finetune(A6),D2
	AND.B	#8,D2
	BEQ.B	pt_StpGoss
	TST.W	D0
	BEQ.B	pt_StpGoss
	SUBQ.W	#2,D0
pt_StpGoss
	MOVE.W	0(a0,D0.W),D2
	MOVE.L	(SP)+,A0
	MOVE.W	D2,n_wantedperiod(A6)
	MOVE.W	n_period(A6),D0
	CLR.B	n_toneportdirec(A6)
	CMP.W	D0,D2
	BEQ.B	pt_ClearTonePorta
	BGE.W	pt_Return
	MOVE.B	#1,n_toneportdirec(A6)
	RTS

pt_ClearTonePorta
	CLR.W	n_wantedperiod(A6)
	RTS	
 
pt_TonePortamento
	MOVE.B	n_cmdlo(A6),D0
	BEQ.B	pt_TonePortNoChange
	MOVE.B	D0,n_toneportspeed(A6)
	CLR.B	n_cmdlo(A6)
pt_TonePortNoChange
	TST.W	n_wantedperiod(A6)
	BEQ.W	pt_Return
	MOVEQ	#0,D0
	MOVE.B	n_toneportspeed(A6),D0
	TST.B	n_toneportdirec(A6)
	BNE.B	pt_TonePortaUp
pt_TonePortaDown
	ADD.W	D0,n_period(A6)
	MOVE.W	n_wantedperiod(A6),D0
	CMP.W	n_period(A6),D0
	BGT.B	pt_TonePortaSetPer
	MOVE.W	n_wantedperiod(A6),n_period(A6)
	CLR.W	n_wantedperiod(A6)
	BRA.B	pt_TonePortaSetPer

pt_TonePortaUp
	SUB.W	D0,n_period(A6)
	MOVE.W	n_wantedperiod(A6),D0
	CMP.W	n_period(A6),D0
	BLT.B	pt_TonePortaSetPer
	MOVE.W	n_wantedperiod(A6),n_period(A6)
	CLR.W	n_wantedperiod(A6)

pt_TonePortaSetPer
	MOVE.W	n_period(A6),D2
	MOVE.B	n_glissfunk(A6),D0
	AND.B	#$0F,D0
	BEQ.B	pt_GlissSkip
	MOVEQ	#0,D0
	MOVE.B	n_finetune(A6),D0
	MULU	#37*2,D0
	LEA	pt_PeriodTable(PC),A0
	ADD.L	D0,A0
	MOVEQ	#0,D0
pt_GlissLoop
	CMP.W	0(a0,D0.W),D2
	BHS.B	pt_GlissFound
	ADDQ.W	#2,D0
	CMP.W	#37*2,D0
	BLO.B	pt_GlissLoop
	MOVEQ	#35*2,D0
pt_GlissFound
	MOVE.W	0(a0,D0.W),D2
pt_GlissSkip
	MOVE.W	D2,6(A5) 		;Set period
	RTS

pt_Vibrato
	MOVE.B	n_cmdlo(A6),D0
	BEQ.B	pt_Vibrato2
	MOVE.B	n_vibratocmd(A6),D2
	AND.B	#$0F,D0
	BEQ.B	pt_vibskip
	AND.B	#$F0,D2
	OR.B	D0,D2
pt_vibskip
	MOVE.B	n_cmdlo(A6),D0
	AND.B	#$F0,D0
	BEQ.B	pt_vibskip2
	AND.B	#$0F,D2
	OR.B	D0,D2
pt_vibskip2
	MOVE.B	D2,n_vibratocmd(A6)
pt_Vibrato2
	MOVE.L	A4,-(SP)
	MOVE.B	n_vibratopos(A6),D0
	LEA	pt_VibratoTable(PC),A4
	LSR.W	#2,D0
	AND.W	#$001F,D0
	MOVEQ	#0,D2
	MOVE.B	n_wavecontrol(A6),D2
	AND.B	#$03,D2
	BEQ.B	pt_vib_sine
	LSL.B	#3,D0
	CMP.B	#1,D2
	BEQ.B	pt_vib_rampdown
	MOVE.B	#255,D2
	BRA.B	pt_vib_set
pt_vib_rampdown
	TST.B	n_vibratopos(A6)
	BPL.B	pt_vib_rampdown2
	MOVE.B	#255,D2
	SUB.B	D0,D2
	BRA.B	pt_vib_set
pt_vib_rampdown2
	MOVE.B	D0,D2
	BRA.B	pt_vib_set
pt_vib_sine
	MOVE.B	0(A4,D0.W),D2
pt_vib_set
	MOVE.B	n_vibratocmd(A6),D0
	AND.W	#15,D0
	MULU	D0,D2
	LSR.W	#7,D2
	MOVE.W	n_period(A6),D0
	TST.B	n_vibratopos(A6)
	BMI.B	pt_VibratoNeg
	ADD.W	D2,D0
	BRA.B	pt_Vibrato3
pt_VibratoNeg
	SUB.W	D2,D0
pt_Vibrato3
	MOVE.W	D0,6(A5)
	MOVE.B	n_vibratocmd(A6),D0
	LSR.W	#2,D0
	AND.W	#$003C,D0
	ADD.B	D0,n_vibratopos(A6)
	MOVE.L	(SP)+,A4
	RTS

pt_TonePlusVolSlide
	BSR.W	pt_TonePortNoChange
	BRA.W	pt_VolumeSlide

pt_VibratoPlusVolSlide
	BSR.B	pt_Vibrato2
	BRA.W	pt_VolumeSlide

pt_Tremolo
	MOVE.L	A4,-(SP)
	MOVE.B	n_cmdlo(A6),D0
	BEQ.B	pt_Tremolo2
	MOVE.B	n_tremolocmd(A6),D2
	AND.B	#$0F,D0
	BEQ.B	pt_treskip
	AND.B	#$F0,D2
	OR.B	D0,D2
pt_treskip
	MOVE.B	n_cmdlo(A6),D0
	AND.B	#$F0,D0
	BEQ.B	pt_treskip2
	AND.B	#$0F,D2
	OR.B	D0,D2
pt_treskip2
	MOVE.B	D2,n_tremolocmd(A6)
pt_Tremolo2
	MOVE.B	n_tremolopos(A6),D0
	LEA	pt_VibratoTable(PC),A4
	LSR.W	#2,D0
	AND.W	#$001F,D0
	MOVEQ	#0,D2
	MOVE.B	n_wavecontrol(A6),D2
	LSR.B	#4,D2
	AND.B	#$03,D2
	BEQ.B	pt_tre_sine
	LSL.B	#3,D0
	CMP.B	#1,D2
	BEQ.B	pt_tre_rampdown
	MOVE.B	#255,D2
	BRA.B	pt_tre_set
pt_tre_rampdown
	TST.B	n_vibratopos(A6)
	BPL.B	pt_tre_rampdown2
	MOVE.B	#255,D2
	SUB.B	D0,D2
	BRA.B	pt_tre_set
pt_tre_rampdown2
	MOVE.B	D0,D2
	BRA.B	pt_tre_set
pt_tre_sine
	MOVE.B	0(A4,D0.W),D2
pt_tre_set
	MOVE.B	n_tremolocmd(A6),D0
	AND.W	#15,D0
	MULU	D0,D2
	LSR.W	#6,D2
	MOVEQ	#0,D0
	MOVE.B	n_volume(A6),D0
	TST.B	n_tremolopos(A6)
	BMI.B	pt_TremoloNeg
	ADD.W	D2,D0
	BRA.B	pt_Tremolo3
pt_TremoloNeg
	SUB.W	D2,D0
pt_Tremolo3
	BPL.B	pt_TremoloSkip
	CLR.W	D0
pt_TremoloSkip
	CMP.W	#$40,D0
	BLS.B	pt_TremoloOk
	MOVE.W	#$40,D0
pt_TremoloOk
	MOVE.W	D0,8(A5)
	MOVE.B	n_tremolocmd(A6),D0
	LSR.W	#2,D0
	AND.W	#$003C,D0
	ADD.B	D0,n_tremolopos(A6)
	MOVE.L	(SP)+,A4
	ADDQ.L	#4,SP
	RTS

pt_SampleOffset
	MOVEQ	#0,D0
	MOVE.B	n_cmdlo(A6),D0
	BEQ.B	pt_sononew
	MOV