Zospo
Campeón del Alto Mando
Cuando en pregunté si se podía cambiar de forma fuera de combate me enviaron este tuto Development: Forms and Formes - Page 3 - The PokéCommunity Forums (la rutina de giratina y arceus está al final) y intenté insertar y utilizar esta rutina para que arceus y giratina cambien de formas utilizando sus respectivos objetos, pero después de hacerlo no pasa nada. Al final del post donde esta el tuto de la rutina pone que hay que poner tus valores de pokemon y objetos en hexadecimal y luego pone esto
No se que significa asi que no le hice caso, no se si ese es el problema o si hay que hacer algo más aparte de insertar sin más la rutina.
Si a alguien le sirve este es el codigo
Y este es el codigo editado con mis valores
/* 00 49 08 47 xx+1 xx xx 08 at 08040780 with xx xx xx being the reversed address of your routine*/
Si a alguien le sirve este es el codigo
.thumb
.thumb_func
.equ GriseousIndex, 0x____
.equ GiratinaIndex, 0x____
.equ GiratinaOIndex, 0x____
.equ ArceusNormal, 0x____
.equ FistPlateIndex, 0x____
.equ ArceusFight, 0x____
.equ SkyPlateIndex, 0x____
.equ ArceusFly, 0x____
.equ ToxicPlateIndex, 0x____
.equ ArceusPoison, 0x____
.equ EarthPlateIndex, 0x____
.equ ArceusGround, 0x____
.equ StonePlateIndex, 0x____
.equ ArceusRock, 0x____
.equ InsectPlateIndex, 0x____
.equ ArceusBug, 0x____
.equ SpookyPlateIndex, 0x____
.equ ArceusGhost, 0x____
.equ IronPlateIndex, 0x____
.equ ArceusSteel, 0x____
.equ FlamePlateIndex, 0x____
.equ ArceusFire, 0x____
.equ SplashPlateIndex, 0x____
.equ ArceusWater, 0x____
.equ ZapPlateIndex, 0x____
.equ ArceusElectric, 0x____
.equ MeadowPlateIndex, 0x____
.equ ArceusGrass, 0x____
.equ IciclePlateIndex, 0x____
.equ ArceusIce, 0x____
.equ DracoPlateIndex, 0x____
.equ ArceusDragon, 0x____
.equ DreadPlateIndex, 0x____
.equ ArceusDark, 0x____
.equ PixiPlateIndex, 0x____
.equ ArceusFairy, 0x____
Start:
ldrb r1, [r4]
ldrb r0, [r4, #1]
lsl r0, r0, #8
add r1, r1, r0
mov r0, r8
strh r1, [r0, #2]
push {r0-r7}
Initialising:
ldrh r2, [r0]
ldr r6, GiratinaO
cmp r2, r6
beq GrisCheck
ldr r6, Giratina
cmp r2, r6
beq GrisCheck2
LoadGivenItem:
mov r6, #6
adr r5, Table
add r5, #4
mov r7, r1
bl LoopLoad
cmp r6, #0
bne ItemInTable
ItemNotInTable:
adr r5, Table
add r5, #6
mov r6, #6
mov r7, r2
bl LoopLoad
cmp r6, #1
bne Return
ldrh r4, [r5, #2]
b Changing
GrisCheck:
ldr r6, GriseousOrb
cmp r1, r6
beq LoadGivenItem
ldr r4, Giratina
b Changing
GrisCheck2:
ldr r6, GriseousOrb
cmp r1, r6
bne LoadGivenItem
ldr r4, GiratinaO
b Changing
ItemInTable:
ldrh r3, [r5, #2]
mov r7, r2
mov r6, #6
adr r5, Table
bl LoopLoad
cmp r6, #1
bne Return
mov r4, r3
b Changing
Return:
pop {r0-r7}
Return3:
ldr r0, Back
bx r0
Return2:
ldr r0, Back2
bx r0
Changing:
strh r4, [r0]
pop {r0-r7}
ldr r3, Limit
cmp r0, r3
bhi Return3
mov r0, r7
ldr r3, pokemon_calc_checksum
bl Call
strh r0, [r7, #0x1C]
mov r0, r7
ldr r3, pokemon_encrypt
bl Call
mov r0, r7
ldr r3, pokemon_calculate_stats
bl Call
b Return2
LoopLoad:
push {lr}
Looping:
ldrh r4, [r5]
cmp r4, #0
beq Nope
cmp r4, r7
beq Yep
add r5, r6
b Looping
Nope:
mov r6, #0
pop {pc}
Yep:
mov r6, #1
pop {pc}
Call:
mov pc, r3
.align 2
GriseousOrb: .word GriseousIndex
Giratina: .word GiratinaIndex
GiratinaO: .word GiratinaOIndex
pokemon_calc_checksum: .word 0x0803E3E8+1
pokemon_encrypt: .word 0x0803F8F8+1
pokemon_calculate_stats: .word 0x0803E47C+1
Back: .word 0x08040ADA+1
Back2: .word 0x08040AEE+1
Limit: .word 0x02024540
Table:
.hword ArceusNormal, ArceusNormal, FistPlateIndex, ArceusFight, ArceusNormal, SkyPlateIndex, ArceusFly, ArceusNormal, ToxicPlateIndex
.hword ArceusPoison, ArceusNormal, EarthPlateIndex, ArceusGround, ArceusNormal, StonePlateIndex, ArceusRock, ArceusNormal, InsectPlateIndex
.hword ArceusBug, ArceusNormal, SpookyPlateIndex, ArceusGhost, ArceusNormal, IronPlateIndex, ArceusSteel, ArceusNormal, FlamePlateIndex
.hword ArceusFire, ArceusNormal, SplashPlateIndex, ArceusWater, ArceusNormal, ZapPlateIndex, ArceusElectric, ArceusNormal, MeadowPlateIndex
.hword ArceusGrass, ArceusNormal, IciclePlateIndex, ArceusIce, ArceusNormal, DracoPlateIndex, ArceusDragon, ArceusNormal, DreadPlateIndex
.hword ArceusDark, ArceusNormal, PixiPlateIndex, ArceusFairy, ArceusNormal, 0x0, 0x0, 0x0, 0x0
.thumb_func
.equ GriseousIndex, 0x____
.equ GiratinaIndex, 0x____
.equ GiratinaOIndex, 0x____
.equ ArceusNormal, 0x____
.equ FistPlateIndex, 0x____
.equ ArceusFight, 0x____
.equ SkyPlateIndex, 0x____
.equ ArceusFly, 0x____
.equ ToxicPlateIndex, 0x____
.equ ArceusPoison, 0x____
.equ EarthPlateIndex, 0x____
.equ ArceusGround, 0x____
.equ StonePlateIndex, 0x____
.equ ArceusRock, 0x____
.equ InsectPlateIndex, 0x____
.equ ArceusBug, 0x____
.equ SpookyPlateIndex, 0x____
.equ ArceusGhost, 0x____
.equ IronPlateIndex, 0x____
.equ ArceusSteel, 0x____
.equ FlamePlateIndex, 0x____
.equ ArceusFire, 0x____
.equ SplashPlateIndex, 0x____
.equ ArceusWater, 0x____
.equ ZapPlateIndex, 0x____
.equ ArceusElectric, 0x____
.equ MeadowPlateIndex, 0x____
.equ ArceusGrass, 0x____
.equ IciclePlateIndex, 0x____
.equ ArceusIce, 0x____
.equ DracoPlateIndex, 0x____
.equ ArceusDragon, 0x____
.equ DreadPlateIndex, 0x____
.equ ArceusDark, 0x____
.equ PixiPlateIndex, 0x____
.equ ArceusFairy, 0x____
Start:
ldrb r1, [r4]
ldrb r0, [r4, #1]
lsl r0, r0, #8
add r1, r1, r0
mov r0, r8
strh r1, [r0, #2]
push {r0-r7}
Initialising:
ldrh r2, [r0]
ldr r6, GiratinaO
cmp r2, r6
beq GrisCheck
ldr r6, Giratina
cmp r2, r6
beq GrisCheck2
LoadGivenItem:
mov r6, #6
adr r5, Table
add r5, #4
mov r7, r1
bl LoopLoad
cmp r6, #0
bne ItemInTable
ItemNotInTable:
adr r5, Table
add r5, #6
mov r6, #6
mov r7, r2
bl LoopLoad
cmp r6, #1
bne Return
ldrh r4, [r5, #2]
b Changing
GrisCheck:
ldr r6, GriseousOrb
cmp r1, r6
beq LoadGivenItem
ldr r4, Giratina
b Changing
GrisCheck2:
ldr r6, GriseousOrb
cmp r1, r6
bne LoadGivenItem
ldr r4, GiratinaO
b Changing
ItemInTable:
ldrh r3, [r5, #2]
mov r7, r2
mov r6, #6
adr r5, Table
bl LoopLoad
cmp r6, #1
bne Return
mov r4, r3
b Changing
Return:
pop {r0-r7}
Return3:
ldr r0, Back
bx r0
Return2:
ldr r0, Back2
bx r0
Changing:
strh r4, [r0]
pop {r0-r7}
ldr r3, Limit
cmp r0, r3
bhi Return3
mov r0, r7
ldr r3, pokemon_calc_checksum
bl Call
strh r0, [r7, #0x1C]
mov r0, r7
ldr r3, pokemon_encrypt
bl Call
mov r0, r7
ldr r3, pokemon_calculate_stats
bl Call
b Return2
LoopLoad:
push {lr}
Looping:
ldrh r4, [r5]
cmp r4, #0
beq Nope
cmp r4, r7
beq Yep
add r5, r6
b Looping
Nope:
mov r6, #0
pop {pc}
Yep:
mov r6, #1
pop {pc}
Call:
mov pc, r3
.align 2
GriseousOrb: .word GriseousIndex
Giratina: .word GiratinaIndex
GiratinaO: .word GiratinaOIndex
pokemon_calc_checksum: .word 0x0803E3E8+1
pokemon_encrypt: .word 0x0803F8F8+1
pokemon_calculate_stats: .word 0x0803E47C+1
Back: .word 0x08040ADA+1
Back2: .word 0x08040AEE+1
Limit: .word 0x02024540
Table:
.hword ArceusNormal, ArceusNormal, FistPlateIndex, ArceusFight, ArceusNormal, SkyPlateIndex, ArceusFly, ArceusNormal, ToxicPlateIndex
.hword ArceusPoison, ArceusNormal, EarthPlateIndex, ArceusGround, ArceusNormal, StonePlateIndex, ArceusRock, ArceusNormal, InsectPlateIndex
.hword ArceusBug, ArceusNormal, SpookyPlateIndex, ArceusGhost, ArceusNormal, IronPlateIndex, ArceusSteel, ArceusNormal, FlamePlateIndex
.hword ArceusFire, ArceusNormal, SplashPlateIndex, ArceusWater, ArceusNormal, ZapPlateIndex, ArceusElectric, ArceusNormal, MeadowPlateIndex
.hword ArceusGrass, ArceusNormal, IciclePlateIndex, ArceusIce, ArceusNormal, DracoPlateIndex, ArceusDragon, ArceusNormal, DreadPlateIndex
.hword ArceusDark, ArceusNormal, PixiPlateIndex, ArceusFairy, ArceusNormal, 0x0, 0x0, 0x0, 0x0
Y este es el codigo editado con mis valores
.thumb
.thumb_func
.equ GriseousIndex, 0x63
.equ GiratinaIndex, 0x21C
.equ GiratinaOIndex, 0x235
.equ ArceusNormal, 0x222
.equ FistPlateIndex, 0x3C
.equ ArceusFight, 0x237
.equ SkyPlateIndex, 0x58
.equ ArceusFly, 0x238
.equ ToxicPlateIndex, 0x5C
.equ ArceusPoison, 0x239
.equ EarthPlateIndex, 0x39
.equ ArceusGround, 0x23A
.equ StonePlateIndex, 0x3E
.equ ArceusRock, 0x23B
.equ InsectPlateIndex, 0x3B
.equ ArceusBug, 0x23C
.equ SpookyPlateIndex, 0x38
.equ ArceusGhost, 0x23D
.equ IronPlateIndex, 0x35
.equ ArceusSteel, 0x23E
.equ FlamePlateIndex, 0x3D
.equ ArceusFire, 0x23F
.equ SplashPlateIndex, 0x37
.equ ArceusWater, 0x240
.equ ZapPlateIndex, 0x3A
.equ ArceusElectric, 0x242
.equ MeadowPlateIndex, 0x5B
.equ ArceusGrass, 0x241
.equ IciclePlateIndex, 0x59
.equ ArceusIce, 0x244
.equ DracoPlateIndex, 0x36
.equ ArceusDragon, 0x245
.equ DreadPlateIndex, 0x57
.equ ArceusDark, 0x246
.equ PixiPlateIndex, 0x5A
.equ ArceusFairy, 0x243
Start:
ldrb r1, [r4]
ldrb r0, [r4, #1]
lsl r0, r0, #8
add r1, r1, r0
mov r0, r8
strh r1, [r0, #2]
push {r0-r7}
Initialising:
ldrh r2, [r0]
ldr r6, GiratinaO
cmp r2, r6
beq GrisCheck
ldr r6, Giratina
cmp r2, r6
beq GrisCheck2
LoadGivenItem:
mov r6, #6
adr r5, Table
add r5, #4
mov r7, r1
bl LoopLoad
cmp r6, #0
bne ItemInTable
ItemNotInTable:
adr r5, Table
add r5, #6
mov r6, #6
mov r7, r2
bl LoopLoad
cmp r6, #1
bne Return
ldrh r4, [r5, #2]
b Changing
GrisCheck:
ldr r6, GriseousOrb
cmp r1, r6
beq LoadGivenItem
ldr r4, Giratina
b Changing
GrisCheck2:
ldr r6, GriseousOrb
cmp r1, r6
bne LoadGivenItem
ldr r4, GiratinaO
b Changing
ItemInTable:
ldrh r3, [r5, #2]
mov r7, r2
mov r6, #6
adr r5, Table
bl LoopLoad
cmp r6, #1
bne Return
mov r4, r3
b Changing
Return:
pop {r0-r7}
Return3:
ldr r0, Back
bx r0
Return2:
ldr r0, Back2
bx r0
Changing:
strh r4, [r0]
pop {r0-r7}
ldr r3, Limit
cmp r0, r3
bhi Return3
mov r0, r7
ldr r3, pokemon_calc_checksum
bl Call
strh r0, [r7, #0x1C]
mov r0, r7
ldr r3, pokemon_encrypt
bl Call
mov r0, r7
ldr r3, pokemon_calculate_stats
bl Call
b Return2
LoopLoad:
push {lr}
Looping:
ldrh r4, [r5]
cmp r4, #0
beq Nope
cmp r4, r7
beq Yep
add r5, r6
b Looping
Nope:
mov r6, #0
pop {pc}
Yep:
mov r6, #1
pop {pc}
Call:
mov pc, r3
.align 2
GriseousOrb: .word GriseousIndex
Giratina: .word GiratinaIndex
GiratinaO: .word GiratinaOIndex
pokemon_calc_checksum: .word 0x0803E3E8+1
pokemon_encrypt: .word 0x0803F8F8+1
pokemon_calculate_stats: .word 0x0803E47C+1
Back: .word 0x08040ADA+1
Back2: .word 0x08040AEE+1
Limit: .word 0x02024540
Table:
.hword ArceusNormal, ArceusNormal, FistPlateIndex, ArceusFight, ArceusNormal, SkyPlateIndex, ArceusFly, ArceusNormal, ToxicPlateIndex
.hword ArceusPoison, ArceusNormal, EarthPlateIndex, ArceusGround, ArceusNormal, StonePlateIndex, ArceusRock, ArceusNormal, InsectPlateIndex
.hword ArceusBug, ArceusNormal, SpookyPlateIndex, ArceusGhost, ArceusNormal, IronPlateIndex, ArceusSteel, ArceusNormal, FlamePlateIndex
.hword ArceusFire, ArceusNormal, SplashPlateIndex, ArceusWater, ArceusNormal, ZapPlateIndex, ArceusElectric, ArceusNormal, MeadowPlateIndex
.hword ArceusGrass, ArceusNormal, IciclePlateIndex, ArceusIce, ArceusNormal, DracoPlateIndex, ArceusDragon, ArceusNormal, DreadPlateIndex
.hword ArceusDark, ArceusNormal, PixiPlateIndex, ArceusFairy, ArceusNormal, 0x0, 0x0, 0x0, 0x0
.thumb_func
.equ GriseousIndex, 0x63
.equ GiratinaIndex, 0x21C
.equ GiratinaOIndex, 0x235
.equ ArceusNormal, 0x222
.equ FistPlateIndex, 0x3C
.equ ArceusFight, 0x237
.equ SkyPlateIndex, 0x58
.equ ArceusFly, 0x238
.equ ToxicPlateIndex, 0x5C
.equ ArceusPoison, 0x239
.equ EarthPlateIndex, 0x39
.equ ArceusGround, 0x23A
.equ StonePlateIndex, 0x3E
.equ ArceusRock, 0x23B
.equ InsectPlateIndex, 0x3B
.equ ArceusBug, 0x23C
.equ SpookyPlateIndex, 0x38
.equ ArceusGhost, 0x23D
.equ IronPlateIndex, 0x35
.equ ArceusSteel, 0x23E
.equ FlamePlateIndex, 0x3D
.equ ArceusFire, 0x23F
.equ SplashPlateIndex, 0x37
.equ ArceusWater, 0x240
.equ ZapPlateIndex, 0x3A
.equ ArceusElectric, 0x242
.equ MeadowPlateIndex, 0x5B
.equ ArceusGrass, 0x241
.equ IciclePlateIndex, 0x59
.equ ArceusIce, 0x244
.equ DracoPlateIndex, 0x36
.equ ArceusDragon, 0x245
.equ DreadPlateIndex, 0x57
.equ ArceusDark, 0x246
.equ PixiPlateIndex, 0x5A
.equ ArceusFairy, 0x243
Start:
ldrb r1, [r4]
ldrb r0, [r4, #1]
lsl r0, r0, #8
add r1, r1, r0
mov r0, r8
strh r1, [r0, #2]
push {r0-r7}
Initialising:
ldrh r2, [r0]
ldr r6, GiratinaO
cmp r2, r6
beq GrisCheck
ldr r6, Giratina
cmp r2, r6
beq GrisCheck2
LoadGivenItem:
mov r6, #6
adr r5, Table
add r5, #4
mov r7, r1
bl LoopLoad
cmp r6, #0
bne ItemInTable
ItemNotInTable:
adr r5, Table
add r5, #6
mov r6, #6
mov r7, r2
bl LoopLoad
cmp r6, #1
bne Return
ldrh r4, [r5, #2]
b Changing
GrisCheck:
ldr r6, GriseousOrb
cmp r1, r6
beq LoadGivenItem
ldr r4, Giratina
b Changing
GrisCheck2:
ldr r6, GriseousOrb
cmp r1, r6
bne LoadGivenItem
ldr r4, GiratinaO
b Changing
ItemInTable:
ldrh r3, [r5, #2]
mov r7, r2
mov r6, #6
adr r5, Table
bl LoopLoad
cmp r6, #1
bne Return
mov r4, r3
b Changing
Return:
pop {r0-r7}
Return3:
ldr r0, Back
bx r0
Return2:
ldr r0, Back2
bx r0
Changing:
strh r4, [r0]
pop {r0-r7}
ldr r3, Limit
cmp r0, r3
bhi Return3
mov r0, r7
ldr r3, pokemon_calc_checksum
bl Call
strh r0, [r7, #0x1C]
mov r0, r7
ldr r3, pokemon_encrypt
bl Call
mov r0, r7
ldr r3, pokemon_calculate_stats
bl Call
b Return2
LoopLoad:
push {lr}
Looping:
ldrh r4, [r5]
cmp r4, #0
beq Nope
cmp r4, r7
beq Yep
add r5, r6
b Looping
Nope:
mov r6, #0
pop {pc}
Yep:
mov r6, #1
pop {pc}
Call:
mov pc, r3
.align 2
GriseousOrb: .word GriseousIndex
Giratina: .word GiratinaIndex
GiratinaO: .word GiratinaOIndex
pokemon_calc_checksum: .word 0x0803E3E8+1
pokemon_encrypt: .word 0x0803F8F8+1
pokemon_calculate_stats: .word 0x0803E47C+1
Back: .word 0x08040ADA+1
Back2: .word 0x08040AEE+1
Limit: .word 0x02024540
Table:
.hword ArceusNormal, ArceusNormal, FistPlateIndex, ArceusFight, ArceusNormal, SkyPlateIndex, ArceusFly, ArceusNormal, ToxicPlateIndex
.hword ArceusPoison, ArceusNormal, EarthPlateIndex, ArceusGround, ArceusNormal, StonePlateIndex, ArceusRock, ArceusNormal, InsectPlateIndex
.hword ArceusBug, ArceusNormal, SpookyPlateIndex, ArceusGhost, ArceusNormal, IronPlateIndex, ArceusSteel, ArceusNormal, FlamePlateIndex
.hword ArceusFire, ArceusNormal, SplashPlateIndex, ArceusWater, ArceusNormal, ZapPlateIndex, ArceusElectric, ArceusNormal, MeadowPlateIndex
.hword ArceusGrass, ArceusNormal, IciclePlateIndex, ArceusIce, ArceusNormal, DracoPlateIndex, ArceusDragon, ArceusNormal, DreadPlateIndex
.hword ArceusDark, ArceusNormal, PixiPlateIndex, ArceusFairy, ArceusNormal, 0x0, 0x0, 0x0, 0x0