Article on programming the Saturn in 1995

Started by Sadler, 01/03/2013, 12:28 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Sadler

Ran across this article on programming the Saturn in 1995. Thought it was pretty interesting so I figured I'd share it here. :D

JoshTurboTrollX

Quote from: Saturn Assembly on 09/16/1973, 04:56 PM/**************************************************************/
/* Trigger jumping if needed, also variable height jump logic */

Man_JumpTrigger()
{
  if ( Man.JumpFudge )
  {
    Man.JumpFudge--;
  }

  if ( Man.Mode != M_Crouch || Man_StandingRoom() )    // ok if not crouched, or there is headroom
  {
    if (Pad_Jump->Pressed)               /* jump button pressed */
    {
      if ((Man.Contact || (Man.Mode == M_Hang) || Man.JumpFudge) && Pad_Jump->Triggered && !Man.Blocking) /* and not already jumping */
      {
        if (Man.Mode == M_Hang && Pad1.Down.Pressed)
        {
          Man.Contact=0;
          Man.Mode=M_Jump;
          Man.AnimBase = LS_Jumping;    /* Change base anim to jumping */
          Man_TriggerSeq(LS_Jump);    /* start the jumping start anim */
          Man.YV.f = 0x10000;           /* and have no YV */
          Man.Y.i += 4;           /* and have no YV */
        }
        else
        {
          Pad_Jump->Triggered = 0;
          if ( !JetPacCheat )
            Man.YV.f = -0x00080000;     /* Initial jump speed */
          else
            Man.YV.f = -0x00008000;     // Initial speed in Jetpac mode
          Man.Contact = 0;          /* not on the ground any more */
          Man.JumpTime = 0;         /* just started jumping */
          Man.AnimBase = LS_Jumping;    /* Change base anim to jumping */
          Man_TriggerSeq(LS_Jump);    /* start the jumping start anim */
          Man.XV.f+=Man.FlyVel;

          if (Man.HangEnd && Man.Mode == M_Hang)  // if hanging
          {                   // and on the end of a path
            Man.HangEnd = 0;
            Man.X.i += 12*Man.Facing; // the move past end of path
            Man.JumpTime = -3;      // bit more fixed v jump time
          }
          Man.Mode = M_Jump;    /* change mode to jumping */

        }
      }
      else                        /* Already jumping */
      {
        if (Man.JumpTime++ < MaxJumpTime) /* Still in initial jump period */
          Man.YV.f -= 0x0005000;        /* So can maintain jump YV */
      }
    }
    else                      /* jump button not pressed */
    {
      Man.JumpTime = MaxJumpTime+1;     /* so can't alter YV again until landed */
    }

  }

}
I always heard that the Saturn was hard to program for... but damn.
Jossshhhhh...Legendary TurboTrollX-16: He revenge-bans PCE Developers/Ys IV Localizers from PCE Facebook groups and destroyed 2 PC Engine groups: one by Aaron Lambert on Facebook, then the other by Aaron Nanto!!! Josh and PCE Aarons don't have a good track record together! Both times he blamed the Aarons and their staff in a "Look-what-you-made-us-do?!" manner (extortion/blackmail!), never himself nor his deranged, destructive, toxic turbo troll gang!

OldRover

Meh, that's pretty basic stuff right there... very clean, standard C. The code in question is clearly a state controller with some very basic math. I'm more puzzled by the fact that the forum says "Quote from: Saturn Assembly on September 16, 1973, 04:56:45 PM"... 1973? ...really?
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

SignOfZeta

The Saturn is OG.

I thought you knew...
IMG

JoshTurboTrollX

Quote from: OldRover on 01/05/2013, 03:07 AMMeh, that's pretty basic stuff right there... very clean, standard C. The code in question is clearly a state controller with some very basic math. I'm more puzzled by the fact that the forum says "Quote from: Saturn Assembly on September 16, 1973, 04:56:45 PM"... 1973? ...really?
LOL I was screwing around with this bit of the 'quote' section= date=1357373259

Not sure how to make it go to 1995 or 1996.  :P
Jossshhhhh...Legendary TurboTrollX-16: He revenge-bans PCE Developers/Ys IV Localizers from PCE Facebook groups and destroyed 2 PC Engine groups: one by Aaron Lambert on Facebook, then the other by Aaron Nanto!!! Josh and PCE Aarons don't have a good track record together! Both times he blamed the Aarons and their staff in a "Look-what-you-made-us-do?!" manner (extortion/blackmail!), never himself nor his deranged, destructive, toxic turbo troll gang!

NecroPhile

Ultimate Forum Bully/Thief/Saboteur/Clone Warrior! BURN IN HELL NECROPHUCK!!!

Arkhan Asylum

Quote from: JoshTurboTrollX-16 on 01/08/2013, 03:22 PM
Quote from: The Old Rover on 01/05/2013, 03:07 AMMeh, that's pretty basic stuff right there... very clean, standard C. The code in question is clearly a state controller with some very basic math. I'm more puzzled by the fact that the forum says "Quote from: Saturn Assembly on September 16, 1973, 04:56:45 PM"... 1973? ...really?
LOL I was screwing around with this bit of the 'quote' section= date=1357373259

Not sure how to make it go to 1995 or 1996.  :P
That's Epoch time.


http://www.epochconverter.com/


GET SOME, BITCH
This "max-level forum psycho" (:lol:) destroyed TWO PC Engine groups in rage: one by Aaron Lambert on Facebook "Because Chris 'Shadowland' Runyon!," then the other by Aaron Nanto "Because Le NightWolve!" Him and PCE Aarons don't have a good track record together... Both times he blamed the Aarons in a "Look-what-you-made-us-do?!" manner, never himself nor his deranged, destructive, toxic turbo troll gang!

spenoza

Quote from: JoshTurboTrollX-16 on 01/04/2013, 04:06 PMI always heard that the Saturn was hard to program for... but damn.
Looks pretty clean to me. I don't necessarily follow all of it, but the comments help clear much of it up. The Saturn was hard to program for if you wanted optimized code that actually took advantage of its horsepower and features (which was in abundance, if you could figure out how to use it). If you're just programming something pretty basic it is likely just like any other system.