Announcement

Collapse
No announcement yet.

Dragon Ball Z: Supersonic Warriors 2 (E) Touch screen mapping code

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

  • Dragon Ball Z: Supersonic Warriors 2 (E) Touch screen mapping code

    Hey everyone!

    Me and my friends have been playing a lot of supersonic warriors 2 lately and I've modded my DS with the capture mod (so that I can do TV out) and also with an adapter so that we can use PS2 controllers on the system. The game would be perfect to play on the television except for the fact that you need to press the touchscreen to tag in and out and to do the team super attacks.

    I've been trying to figure out a way to hack a code so that X+B = Tagging the second team mate in and Y+A = Tagging the 3rd team mate in (with X+B defaulting to tagging in the first team mate if the second team mate is already in, etc.).

    I've been using Desmume and the cheat search function to try and figure this out...

    So far I've found the addresses that track which buttons are being pushed and what I assume to be the act of you pressing on the screen (using Ram watch I've noticed the values changing when I press the screen and only changing depending on where I move it, I'm assuming those are the coordinates).

    Regardless I've put together a code that says when Y is pressed, then change the values to the same numbers that = the coordinates of the screen tap.... but it doesn't work =/.

    I've tried to find the tag and team attack "functions" in the code through searches, but I've had no luck.

    Does anybody here have any idea what I'm doing wrong or what I could do differently to make this happen? Any help would be greatly greatly appreciated!

    Thanks for reading!

  • #2
    Well, think of it this way, if you hooked into some Windows program and tried to fake the "New File" tool button being clicked by just changing the mouse coordinates when someone presses the "~" key, it wouldn't work. Firstly because in Windows that sort of tracking isn't handled by individual applications, but leaving that aside, you'd also have to fake the left-click message and ensure that your fake coordinates were available to the application's message loop. I suspect there's a similar set of no-tap vs. tap vs. drag detection on the DS, so simply changing coordinates won't work unless the game detects or is informed of a tap at that location.

    I don't know how much of the peripheral device interface is relegated to a *visor on the DS, but if you can find some documentation on how the touchscreen is handled, you might be able to make your first attempt work. Although, it might be easier to find where the game is responding to controller/touchscreen input, and change the conditions for that particular task from "tap touchscreen at XY" to just "button A+Y". If I had to guess, though, I imagine the pad and the touchscreen will be dealt with somewhat separately, so that won't be terribly convenient.

    Comment


    • #3
      Thanks for the insight on the touchscreen stuff. I hadn't thought about that and it's something I'll keep in mind going forward. I assumed that it was happening within what would be considered the DS code/architecture since I notice the values changing when I look at the memory in the ARM9, but I'm pretty sure you're right. Especially when it comes to the idea about dragging because if I keep the left click pressed down (which functions as the stylus being held onto the screen) and I move it even off the DS window, the value is still changing as I drag when it's not on the screen at all.

      Originally posted by Pyriel View Post
      Although, it might be easier to find where the game is responding to controller/touchscreen input, and change the conditions for that particular task from "tap touchscreen at XY" to just "button A+Y". If I had to guess, though, I imagine the pad and the touchscreen will be dealt with somewhat separately, so that won't be terribly convenient.
      That's actually what I meant when I said I was trying to find the tag and team attack "functions". My fault for not wording it better, but I'm trying to do exactly what I quoted from your post and I'm having no luck at all. I honestly have been trying to figure it out by doing a comparative search with me tagging in and then searching for differences there.. So far I keep getting the addresses for the animations or other stuff.

      Does anybody know of a better way that I could be looking for this?

      Thanks Pyriel for you insight, I really appreciate it!

      Comment


      • #4
        The DS isn't my particular forte, but if there's documentation available on how it retrieves and handles input, you can probably spot the input handlers for various game states with a little work and luck. With really good luck, the pad input and touch screen input will be handled as part of the same block, so you can reasonably swap the touchscreen checks for button presses.

        You're talking about going at it from the bottom up, which is fine, but since you're having trouble, I'm suggesting top down. Working top-down from the input handler will hopefully let you use known quantities, e.g., button mask values and library functions. If you can make it work, it's theoretically more direct too. In order to hook that functionality and assign it to different inputs, you'd very likely need to trace back to the input handler anyway because if you start at the bottom and don't work up to it, you'll be flying sort of blind, trying to recreate all the necessary logic.

        Comment


        • #5
          Ok so I have tried it from both angles and I still can't crack this.

          I've used the ram watch feature to accurately pinpoint exactly the address values that are changing both when I click on an area of the touch screen and when the touch screen is being "pressed down on" and moved around and when I write a code that says to press on that part of the touch screen when a button is pressed, it still does not work.

          The 7 Addresses I've found are:

          020DE208
          020E512C
          020E5130
          0210782C
          023FFFA8
          023FFFAC

          (Listing them in case someone else happens by this thread and can use the info to possibly help)

          Furthermore I've found out that there are two universal addresses that handle both the input from the GBA buttons (L,R,B,A) and the DS exclusive buttons (Y, X and even the touchscreen) and when I use my code, pressing the button does in fact change that address as well to reflect what happens when you press on the touch screen, but it still does noting in game.

          The closest I've got is finding what seems to be the address that determines which character is actually in a match, though when I map that to a button press and press said button, the character on screen goes to leave and then the game freezes. I've tried messing around with other values around them but it always results in a freeze.

          Going back to what you said in your very first post, I'm wondering if this is something that can even be hacked on an emulator since there's the whole "emulating a screen click through a program"-thing you briefly wondered about..

          Then again I've seen touch screen to d-pad/button hacks that were way more complicated than this (like the Star Fox Command and Zelda Spirit Track) hacks, and I'm pretty sure the Star Fox one was created on an emulator.. Do you or anyone else know if hacking codes on different emulators vs using the codes on an actual DS makes a difference?

          Comment


          • #6
            Originally posted by Rockman2DN View Post
            Hey everyone!

            Me and my friends have been playing a lot of supersonic warriors 2 lately and I've modded my DS with the capture mod (so that I can do TV out) and also with an adapter so that we can use PS2 controllers on the system. The game would be perfect to play on the television except for the fact that you need to press the touchscreen to tag in and out and to do the team super attacks.

            I've been trying to figure out a way to hack a code so that X+B = Tagging the second team mate in and Y+A = Tagging the 3rd team mate in (with X+B defaulting to tagging in the first team mate if the second team mate is already in, etc.).

            I've been using Desmume and the cheat search function to try and figure this out...

            So far I've found the addresses that track which buttons are being pushed and what I assume to be the act of you pressing on the screen (using Ram watch I've noticed the values changing when I press the screen and only changing depending on where I move it, I'm assuming those are the coordinates).

            Regardless I've put together a code that says when Y is pressed, then change the values to the same numbers that = the coordinates of the screen tap.... but it doesn't work =/.

            I've tried to find the tag and team attack "functions" in the code through searches, but I've had no luck.

            Does anybody here have any idea what I'm doing wrong or what I could do differently to make this happen? Any help would be greatly greatly appreciated!

            Thanks for reading!
            I have no experience hacking the DS. I do know that most cheat engines or memory editors tend to not be updated as fast as the user input is processed. If you do actually have the correct coordinates, a small subroutine hooked from a hook that is executed faster then the user input, would work. Just an idea, I can't really give to much advice on something I have never hacked. I have has similar issues in the past.
            Last edited by Cronotrigga; 05-05-2016, 05:37:00 PM.

            Comment


            • #7
              Originally posted by Cronotrigga View Post
              a small subroutine hooked from a hook that is executed faster then the user input, would work.
              That sounds interesting. My question is, how would I go about finding a hook that's executed faster than the user input? Also please excuse me if this post is coming in later or as a double post as all my posts have to be approved by a mod before they show up and the last one I sent hasn't gone through yet.

              Thanks for all the help you guys are giving me!

              Comment


              • #8
                Originally posted by Rockman2DN View Post
                That sounds interesting. My question is, how would I go about finding a hook that's executed faster than the user input? Also please excuse me if this post is coming in later or as a double post as all my posts have to be approved by a mod before they show up and the last one I sent hasn't gone through yet.

                Thanks for all the help you guys are giving me!
                In my experience if you can find the entry point of the game and follow that to the main loop you can find ether a function to hook from or a hook list that is executed constantly.

                Comment


                • #9
                  Well, I've been trying for most of last week and this weekend and I just can't get it to work.

                  Its a shame too since the game inherently has a problem with its multiplayer where it drops games VERY easily, so keeping the systems pretty much right on top of each other while playing Versus mode severely lessens the chances of the game randomly disconnecting... But to do that obviously using the controller mod I made would be perfect as me and my friends wouldn't have to hold the DSes in our hands =/.

                  Not going to give up totally, and thanks for all the help both Cronotrigga and Pyriel have given me, but this might be a dead issue =(.

                  Anybody with any DS hacking knowledge have any ideas? I'd really really appreciate hearing them!

                  Thanks.

                  Comment

                  Working...
                  X