Announcement

Collapse
No announcement yet.

Trouble with Ps2dis

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble with Ps2dis

    I am making an object move from one place to another along the X plane. Instead of having to subtract the initial X value from the wanted value, then divide until I find a fitting number in which to add to the address (to achieve a slow progression along the plane). Now I did my research to find that the BGE operation should work for my purposes. However, I changed my previous command (beq t1, t6, $000ae92c) to bge t1, t6, $000ae92c and sadly Ps2dis did not recognize it (or the syntax is wrong?). The result was the previous command of beq t1, t6, $000ae92c. I am wondering if the BGE operation is incompatible with Ps2dis, or that my syntax is wrong and someone would correct my errors. Thank you very much.
    Last edited by dnawrkshp; 06-29-2012, 02:53:36 AM.

  • #3
    Thanks for the links dlevere. Decided to subtract t6 from t1 and make it a BGEZ op. So when t1 is larger than t6 it will stop.

    Comment


    • #4
      You're welcome.
      The Hackmaster

      Comment


      • #5
        http://www.herrvillain.com/codebreaker/inst_0e.pdf

        This is the full instruction set for the PS2. There is no BGE operation, aside from the one that uses zero. Reason being that RISC has goals that make a complex operation like that undesirable. What you did with the subtract works. Another method would be to use the SLT operations (Set on Less Than).

        There are a few operations that PS2Dis doesn't handle properly. However, in the main, if you try something and PS2Dis doesn't take it, it's probably because your syntax is wrong somehow.

        Comment


        • #6
          Originally posted by Pyriel View Post
          There is no BGE operation, aside from the one that uses zero. Use the SLT operations (Set on Less Than).
          Those are the exact things I was going to say, since that exact thing happened to me too. It would be nice if they had a branch if greater than sort of operation, but instead you need 2 lines that are a "slt" or "slti" operation with a branch if greater than (or equal to) zero operation.
          July 7, 2019

          https://www.4shared.com/s/fLf6qQ66Zee
          https://www.sendspace.com/file/jvsdbd

          Comment


          • #7
            Doing it that way would run counter to the goals of RISC in the strictest sense. It's more complex than the individual instruction needs to be, i.e., one op code needs to carry out some arithmetic operation, check its status or results, and then branch; for the sake of completeness, it necessitates multiple permutations of the same operation that wouldn't otherwise be needed; the complexity adds time to the operation's execution, and it could have been accomplished more simply by separating out the individual functions. And the ultimate, unachievable goal of RISC is that every operation takes 1 cycle to execute. You get farther away from that goal when you fold unnecessary complexity into the instruction set.

            The only reason zero-based instructions exist is because it's easy to check that all register bits are LOW, and if you want to check if a register contains less than zero, you need only check the state of the sign bit.

            Truthfully, the reason it bothers you is because you have to work at this low a level, and sometimes you have to figure out how to insert two operations in order to achieve an effect. If none of us were hacking, we'd barely need to be aware of these issues because the compilers would shield us from it.

            Comment

            Working...
            X