Mastermind_X
ASM-Hacker
- 92
- Posts
- 18
- Years
- Germany
- Seen Apr 18, 2013
Hi @ all. I was asked how it could be possible to create pokemon with predefined obedient-bit, ID, secret-id and so on.
Therefore, I wrote a little script + commented it out. Hope, it helps. (originally for FR US v1.0)
greetz
MX
Therefore, I wrote a little script + commented it out. Hope, it helps. (originally for FR US v1.0)
greetz
MX
Mastermind_X said:Okay. Your ASM script is this one:
Code:00B00000h: 00 B5 04 48 00 68 04 49 09 18 04 48 28 22 0B DF ; .µ.H.h.I...H(".ß 00B00010h: 01 BC 00 47 10 50 00 03 E4 79 00 00 00 20 B0 08 ; .¼.G.P..äy....°.
The bytes do have some meanings. I'll explain them one by one. (The important ones)
[00 B5 04 48 00 68 04 49 09 18 04 48]
remains still the same... they calculate destination. (DON'T CHANGE IT!!)
[28]
Is the length of the data to be copied in 16bits. e.g. we want to copy 80 bytes, so it's 80 / 2 = 40 halfwords. #40 = 0x28
(changable, but since pokemondata always has a length of 80 bytes, it doesn't make sense to enter an other value...)
[22 0B DF 01 BC 00 47]
remains always the same. copies the data itself and returns. (don't change them!!)
[10 50 00 03]
reverse it => 0x03005010 its the location for the dma adresses. (DON'T CHANGE IT!!)
[E4 79 00 00]
defines the slot in which the pokemon will be deposited. It's 0x4 + (80 bytes * pokecount).
So for example Box 14 Slot 1:
1 Box contains 30 pokemon
30 * 13 = 390
1 pokemon equals 80 bytes, so it's
390 * 80 = 31200
31200 + 4 = 31204 = 0x79E4
That's the value.
[00 20 B0 08]
reverse it => 0x08B02000
That declares the source of the 80 pokebytes. So you would have to enter the 80 bytes @ 0xB020000 - 0xB020050
Okay. Let's say, your ASM script is located @ 0x00B00000 like mine. Then you would have to call it in a pokescript like this:
23 01 00 B0 08
23 = callasm
01 00 B0 08 = reversed location of the ASM script. IMPORTANT: since i wrote a thumb routine, the location has to end with an odd number. For me it's 01, for you just (location+1).
Last edited: