Originally Posted by
siestacat
Why would it only work on the emulator? Slightly different addresses? Anyway... I guess thats where Toolkit comes in rather handy...
I'm not sure...I'm guessing switching where it loads the button address is "too powerful" for the regular game.
I had it simply loading from a line in my ASM routine, which works fine in the rom but on the actual game it freezes for some reason...
So I'll have to find another method. Hopefully I won't have to dig around too much.
If you wanted to remap, you could have the game button routine look for your custom address and have a constant loop checking the 4XXXXXXX address (i/o keys I don't know off the top of my head) to see which buttons are pressed. Your code would say if A is actually pressed, have it say B is pressed at your custom address. Stuff like that. Wouldn't be too complicated at all to put together.
That probably wouldn't work on the actual game either. I'm thinking of looking for the "cmp if B is pressed" and just setting the compare to "true" when I want to pull a weed, and setting it back when I pulled it.
That way nothing is really changed other than a single instruction so it shouldn't cause problems on the actual game.
My routine changes the "IOKeys" from 0x4000130 to whatever address every half second and then back. So it simulates B being pressed and released over and over again.
Edit:
Code:
020E7E4C E1D120B0 - load from hardware buttons ldrh r2, [r1]
020E7E4C E3E02002 - fake "B" being pressed mvn r2, #2
I need a break before I get carried away with this. I'll work on other games for awhile XD
Edit: i got it to work on the actual game XD
Code:
023FF090 012FFF11
E0000000 000000D4
E28F2001 E12FFF12
482BA431 4B2D4D2E
290178A1 DC45D03E
24308802 42220124
A42BD149 70A12101
2200601D 21FF4824
310F0109 2B1F8803
2B21D00A 2B24DB01
3201DD06 39013002
2100D5F4 477070A1
03092121 23201C0D
24FF021B 40220A10
25031C04 402C08A0
43581C0D 182D0100
0124435C 240F1909
40220910 182D4358
1889435A 6800480D
00D222A9 60011A80
47706085 70A12102
6018480C 01122220
47708022 39018821
2210D4BC 80210112
D1004291 4770601D
04000130 021C6DEC
021E3124 020E7E4C
E1D120B0 E3E02002
00000000 00000000
023FF090 E3520003
I'll work on shortening it...Not that anyone would probably use this code but it's awesome.