Announcement

Collapse
No announcement yet.

[PS2] Is it possible to cycle through a code list with a button activator?

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

  • [PS2] Is it possible to cycle through a code list with a button activator?

    I'm currently playing Castlevania: Lament of Innocence for PS2. I have these fives lines of Raw code. They set the sub-weapon to the Knife/Axe/Holy Water/Crystal/Cross, and only one code can be active at a time.

    My goal is to be able to cycle through the five sub-weapons by pressing the L3 button. Is it possible for a button activator to loop through values like this?

    Code:
    20B6482C 000000AA
    20B6482C 000000AB
    20B6482C 000000AC
    20B6482C 000000AD
    20B6482C 000000AE

  • #2
    I'm not familiar with PS2 hacking, but I know if you can load the value that's currently in the "Sub-Weapon" you could add 0x1 to that value per button press (if you're increasing the value) and another activator for subtracting by 0x1 or adding 0xFFFFFFF. I would say that assembly is the best way to go with cycle codes because it is more powerful with handling it.
    I only bother with things that interest me.

    Comment


    • #3
      Just like the NDS and more modern systems you can, here is a link to our friends at CMP with all the info http://www.codemasters-project.net/g...hp?e=4&catid=2
      Spoiler Alert! Click to view...

      THE BAD GUY!!!!!!

      Comment


      • #4
        Simple little ASM routine can get it done for ya.

        Comment


        • #5
          Just find the "scesifsendcmd" function, change the "jr ra" to jump to this stuff, find the button activator, and it should work perfect.

          lui t9, $0??? = button activator address
          lhu, t9, $????(t9) = button activator address
          lui t8, $0010
          ori t6, 0, $FFFD
          bne t6, t9, $0016
          lbu t7, $FFFF(t8)
          bne t7, 0, $0014
          lui t9, $00B6
          lbu t7, $482C(t9)
          ori t6, 0, $0001
          ori t5, 0, $00AA
          ori t4, 0, $00AE
          blt t5, t7, $0004
          nop
          stb t5, $482C(t9)
          jr ra
          stb t6, $FFFF(t8)
          bge t4, t7, $0004
          nop
          stb t5, $482C(t9)
          jr ra
          stb t6, $FFFF(t8)
          addiu t7, t7, $0001
          stb t7, $482C(t9)
          jr ra
          stb t6, $FFFF(t8)
          stb 0, $FFFF(t8)
          jr ra
          Last edited by bungholio; 10-02-2011, 02:45:35 PM.
          July 7, 2019

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

          Comment


          • #6
            I would link you to Pyriel's CodeBreaker wiki to understand the increment/decrement commands in more detail, but I can't access the site at the moment. It may be down or my ISP is to blame.

            Comment


            • #7
              The increment code type won't do the trick. You can't tell it not to cycle below "AA" or not to go higher than "AE". Another problem is that you can't control how fast that will cycle through things, so you can tap a button and it might increase over 1000 times. The code I posted fixes those 2 problems. It won't go below "AA", it won't go higher than "AE", and it only goes up a number 1 time when you press L3.
              July 7, 2019

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

              Comment


              • #8
                Originally posted by Hacc View Post
                I would link you to Pyriel's CodeBreaker wiki to understand the increment/decrement commands in more detail, but I can't access the site at the moment. It may be down or my ISP is to blame.
                Its down

                I quickly made a poor mirrior image
                http://www.codemasters-project.net/g...ntry.php?e=847

                Originally posted by bungholio View Post
                The increment code type won't do the trick. You can't tell it not to cycle below "AA" or not to go higher than "AE". Another problem is that you can't control how fast that will cycle through things, so you can tap a button and it might increase over 1000 times.
                most code h@ckers just use the Button activators (D/E) codetype just do this up+L3, down+L3, left+L3, right+L3.
                lee4 Does Not Accept Codes Requests !
                When lee4 asks a question it does not mean lee4 will look at your game
                *How to create and use SegaCD codes >click here<*
                >)

                Comment


                • #9
                  I don't know why this didn't occur to me before, but this should work perfectly assuming I correctly used the comparison type bits.

                  E001DFFF 1??????? (This checks if you are holding only L3 and executes the next line if you aren't holding only L3.)
                  000FFFFF 00000000 (This sets this unused address to 0.)
                  E1070000 000FFFFF (This checks if that address's value is 0, and if it is it then executes the next 7 lines.)
                  E006DFFF 0??????? (This checks if you are holding only L3, and executes the next 6 lines if you are holding only L3.)
                  E00100AA 20B6482C (This checks the value of your sub weapon, and executes the next line if it's value is less than "AA".)
                  00B6482C 000000AA (It's value was less than "AA", so it is now set to "AA".)
                  30000001 00B6482C (This adds 1, so you get the next highest sub weapon.)
                  E00100AE 30B6482C (This checks the value of your sub weapon, and if it is higher than "AE", it sets it to "AA".)
                  00B6482C 000000AA (It was higher than "AE", so it is now set to "AA".)
                  000FFFFF 00000001 (This sets a byte to 1 that I'm using to tell the game not to activate this whole code again until you stop holding only L3. Once you stop holding L3, the first 2 lines will set it to 0 which means the game will let you use this again.)
                  July 7, 2019

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

                  Comment


                  • #10
                    @ bungholio: I'm aware of those issues. I rarely use this command, though. I'll have to try out your code some time. It should be possible to modify the code handler for the command to customize the speed.

                    @ lee4: OK. Thanks for the mirror. You have the docs saved offline? I have them saved offline, but wasn't sure if I should upload them.

                    Comment

                    Working...
                    X