Thread: Development: Wild double / triple battles
View Single Post
  #36    
Old June 3rd, 2011 (02:36 PM). Edited May 1st, 2012 by sonic1.
sonic1's Avatar
sonic1 sonic1 is offline
ASM is my life now...
 
Join Date: May 2008
Location: Portugal
Age: 20
Gender: Male
Nature: Timid
Posts: 79
At 01065c put a branch to this routine:~
Code:
.thumb
.align 2

main:
LDR     R5, =0x20370CA  ' var 8009 adress. Chose this one because its not used often
LDRB    R5, [R5]
CMP     R5, #0xF 'If var 8009 is 0xF then go to new code. Else continue original code.
BEQ     new_code
STR     R1, [R2]
LDR     R1, =0x2023E82
MOV     R0, #0xF
STRB    R0, [R1]
LDR     R4, =0x8010665
BX      R4

new_code:        'What this code does is basically setting the double battle bit.
PUSH   {R7}
MOV     R7, #1  ' see the line up
ORR     R1, R7
POP    {R7}
STR     R1, [R2]'----------Rest of the routine
LDR     R1, =0x2023E82
MOV     R0, #0xF
STRB    R0, [R1]
LDR     R4, =0x8010665
BX      R4
Presto! With var 8009 with value 0xF set, you can now have double battles. Any double battles: Wild, trainer, wireless, safari, blah blah blah.

~Sonic1
__________________
This signature has been disabled.
over 350px high
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote