04-29-2023, 08:24 PM
(This post was last modified: 04-29-2023, 08:25 PM by LightKingdom666.)
(04-28-2023, 04:01 AM)Vega Wrote: You cannot 'make' one code using two hook instructions. It would be two ASM codes. Each code using its respective hook address.
But, once both codes have been created, I was referring to whether they could be combined to make it one, something like this:
Code:
C335639C 00000003
2C030001 40820008
38000000 90050224
60000000 00000000
C218B300 00000003
2C040000 4082000C
3D803F80 9185010C
C3E5010C 00000000
#The first 4 lines represent the first code (Basketball) and the last 4 lines represent the second code (Volleyball, Dodgeball and Hockey).
(04-28-2023, 04:01 AM)Vega Wrote: That first one is kinda odd that it's only for 0 or 5. There is definitely an instruction that exists for the other values in basketball, you just have to find it.
Well, in fact, it does exist, I just discarded it for purely aesthetic reasons (although I don't know if that represents a problem), since said code when I wanted the bar not to fill up, it would fill up anyway (although it was only purely aesthetic, when it got crowded, it didn't really do anything), and with the other code the bar was not filled, although in the opposite case when I wanted the bar to always be full, in both codes it was filled and it worked too. Yes, I know that maybe it's silly, but I wanted the basketball code to be aesthetically on a par with the one that works for other sports.
The code is actually this:
Code:
8018b4c8 stfs f3, 0x010C (r3)
(04-28-2023, 04:01 AM)Vega Wrote: You have the right idea. It's possible that you may have the wrong GVR or the values for Blue vs Red aren't what you assume to be. Your example codes are fundamentally correct from an Assembly standpoint.
Yes, you are indeed right, the GVR was wrong, although I assume that the values for blue and red will always be 0x0 and 0x1 respectively (since I just created a different code for this game with those two values).
A somewhat strange thing is that I use registers 3 and 4 for the two codes respectively, and what's so strange about that? Well, it is assumed that r3 and r4 do not belong to the GVRs (the GVRs go from r14 to r31), so I don't understand why (if you ask me, I tried to use one of the registers from r14 to r31, but none of them worked for me).
Another thing is that in the first code, when I want it to affect the blue team, it works, but if I want it to affect the red team, it works too, but the code that previously affected the blue team no longer works (this is very strange too), this also works in the second code, but in a different way, since when I want the code to affect so that the blue team always has a full bar, the red team's bar is automatically always empty, even though it doesn't even create another code for it.
(04-28-2023, 04:01 AM)Hackwiz Wrote: LightKingdom666, just to be clear, you are wanting to make the codes for the NTSC version correct?
Well, I think the version to which these codes belong is irrelevant (although in this case I'm only creating codes for NTSC-U, but maybe if I don't have difficulties with the creation of later codes, I could port them to the other versions too), I suppose that what really matters is how these codes were created for a better understanding of the subject, and although I have come to understand some things and created some other code, the truth is that there are some things that I still do not understand very well (and that also prevent me from creating slightly more difficult codes).