Nop, like 00 00
To clarify what GoGo said, basically type 8 00s (meaning, 16 0s) at that location. 00 actually corresponds to a THUMB instruction (pretty sure it's lsl r0,#0x0 or something like that) which shifts r0 zero bits to the left - practically nothing. You have to use this, as ARMv4 THUMB doesn't have a NOP instruction like 65816 ASM does (that's the ASM variant which the SNES uses).
Actually the defined nop instruction in Thumb is mov r8, r8. Many other instructions raise something called flags.
The instruction lsl, for example, raises the Zero flag, Carry flag and Sign flag. In the case of lsl r0, r0, #0x0, you won't set the carry flag but the other two can be set. This kind of practice could create unexpected results, so it's much better to use mov r8, r8 instead. That's the bytes "C0 46 C0 46".
Castform Stuff
Originally Posted by Zaazaa0 https://www.pokecommunity.com/posts/9114016/
Castform Stuff
Navel Rock is where you can get Ho-oh and Lugia, Tanoby Chambers and Mt. Ember are only in Fire Red and I think are inaccessible.
0x1C68F4-0x1C6E7F is the move animation table
0x1C6E80 is a continuation of the move animation table.
0x1D53D9 - cartoonish hit mark on the enemy
0x1D5A44 - poison animation on yourself
0x1D5A6F - confusion birds
0x1D5A78 - burn status
0x1D5AA8 - three hearts rising from self, probably infatuation
0x1D5ADD - sleep 'Z's rising
0x1D5B09 - paralyze static stuff
0x1D5B23 - large blocks of ice over opponent, probably freeze animation
0x1D5B3E - ghost rises, curse effect
0x1D5B63 - another ghost rises? different ghost, same sound effect
playanimation stuff:
0x1D5B88 - transform animation, makes your palette black
0x1D5BBE - nothing
0x1D5BC7 - slowly vanishes, then reappears by sliding in from the side
0x1D5C04 - turns self into pokedoll
0x1D5C0C - turns into a black hexagon, enemy bounces twice. maybe pokeblock throwing?
0x1D5C54 - bag falls out of enemy, bounces to the right
0x1D5C5F - wrap effect
0x1D5DF2 - bides twice, stars, then circle around user
0x1D5E66 - puffs of smoke appear all over your sprite, then you disappear
0x1D5F42 - slowly turns red and backs to the left(right if it's the enemy) and then goes to normal position
0x1D5F8F - rain
0x1D5FD8 - sunlight
0x1D5FDD - sandstorm
0x1D5FE2 - hail
0x1D5FE7 - hits self with absorb?
0x1D5FF5 - same as 0x1D52D9
0x1D6026 - bag pops out of your pokemon, it lands on you, wiggles, then vanishes.
0x1D604B - opponent flies around the screen in a circle
0x1D60A9 - psychic background, enemy shakes
0x1D6108 - background fades to white, gray streaks appear, enemy explodes
0x1D61CD - storing energy
0x1D620D - absorbing particles from enemy
0x1D6250 - glittering particles around you, healing sound
0x1D628A - turns blue, shakes, water comes out of you
0x1D6301 - scary face appears above enemy, enemy does extrasensory effect, you then perform 0x1D628A
0x1D637B - transform animation, turns into enemy. it keeps the direction the enemy was facing and doesn't change palette.
0x1D6394 - turns into a rock, throwing sound, hitting sound, then the game freezes.
0x1D63DC - tilts sideways twice, then goes back to normal.
Some other table, can be used by playanimation as well
0x1D64B6 - level up sound and whatnot, only effects the bar on the sides.
0x1D64D7 - animation looks like you're going back into your pokeball
0x1D64E8 - goes back into pokeball, comes back after the enemy is defeated, but lower and pink.
0x1D64F9 - throws pokeball, other pokemon goes inside of the ball, then immediately comes out.
0x1D657B - turns into a pokeball, the game freezes.
0x1D6594 - slides out, then back in.
0x1D659E - slides out, then a substitute slides back in.
About time I finally decide to actually find something on my own! Put 00 00 00 00 at 080F8121, 080F8168, 08056C96 and 080F82BE to completely skip looking for location previews. Useful for people who don't want them and don't want to wipe out the table. I've tested it pretty well and I haven't yet noticed any side effects from doing it. And just a warning, I haven't confirmed whether the table (it's at 0x0843E9E8 by the way) actually gets read or not, so I'd advise against using it as free space.
That's because the first four bytes are not a pointer.Branching off of this post, the Location Preview table is structured with four pointers for each entry. I don't know what the first pointer is exactly (but I believe it has something to do with which map name the Location Preview appears in upon entering). The second pointer is to the image of the preview, the third is to a Tilemap for the image, and the last is to the image's palette.
Spoiler:
1. Viridian Forest
2. Mt. Moon
3. Diglett's Cave
4. Rock Tunnel
5. Pokemon Tower
6. Safari Zone
7. Seafoam Islands
8. Pokemon Mansion
9. Rocket Hideout (Kanto)
10. Silph Co.
11. Victory Road
13. Cerulean Cave
14. Power Plant
15. Mt. Ember
16. Rocket Hideout (Sevii Isles)
17. Tanoby Ruins
18. Dotted Hole
19. Berry Forest
20. Icefall Cave
21. Lost Cave
22. Altering Cave
23. Another location using the Viridian Forest Preview
24. One of the Tanoby Chambers
25. One of the Tanoby Chambers
26. One of the Tanoby Chambers
27. One of the Tanoby Chambers
28. One of the Tanoby Chambers
29. One of the Tanoby Chambers
I haven't been able to successfully insert a new Location Preview, or change the maps that they appear on (if anybody has any info on that I'd love to know), but I'm sure it's probably possible.
Changing the pre-existing images on the pre-existing maps with Location Previews is as easy as copying the image, tilemap and palette pointers and replacing another entry on the list with them.
0x0: map_name (byte)
0x1: map_transition (byte)
0x2: worldmap_flag (short)
0x4: img_ptr (long)
0x8: tile_ptr (long)
0xC: palettes_ptr (long)
Some of this is documented here (that's where I got the table offset from). This is nice though, as that post doesn't really mention the purpose of the first couple of bytes that much (what does the game need the world map flag for, though?). Just so people don't have to go there to see, the map_transition is 0 for caves (screen fades to white and then transitions to black before fading out) and 1 for everything else (screen just fades to the map). Other values make the game ignore the picture (according to the post; I'll research that a bit, because I'm not sure how much the author of that post knew about the table's structure, so maybe other values do mean something else or can be hooked into).That's because the first four bytes are not a pointer.
Examples:Code:0x0: map_name (byte) 0x1: map_transition (byte) 0x2: worldmap_flag (short) 0x4: img_ptr (long) 0x8: tile_ptr (long) 0xC: palettes_ptr (long)
worldmap flag 0x8A5 = Viridian Forest
worldmap flag 0x8A9 = Mt. Moon
worldmap flag 0x8B0 = Rock Tunnel
I don't know what specifically it needs the worldmap flag for. I only know because I saw it load the halfword then use it as an argument for the flag check routine. See 0x080F8582. I didn't really read beyond that, as it seems sufficient for any table extension you'd want to do.Some of this is documented here (that's where I got the table offset from). This is nice though, as that post doesn't really mention the purpose of the first couple of bytes that much (what does the game need the world map flag for, though?). Just so people don't have to go there to see, the map_transition is 0 for caves (screen fades to white and then transitions to black before fading out) and 1 for everything else (screen just fades to the map). Other values make the game ignore the picture (according to the post; I'll research that a bit, because I'm not sure how much the author of that post knew about the table's structure, so maybe other values do mean something else or can be hooked into).
[B][COLOR="Red"]3F 98 31 08[/COLOR][/B] [B][COLOR="Blue"]71 54 1B 08[/COLOR][/B] 00 9F 31 08 71 54 1B 08
21 A4 31 08 71 54 1B 08 0A 9B 31 08 71 54 1B 08
61 9A 31 08 71 54 1B 08 73 98 31 08 71 54 1B 08
43 A6 31 08 71 54 1B 08 EF 9D 31 08 71 54 1B 08
90 9C 31 08 71 54 1B 08 1B 9C 31 08 71 54 1B 08
36 A6 31 08 71 54 1B 08 0C A2 31 08 71 54 1B 08
57 9E 31 08 71 54 1B 08 2A A3 31 08 71 54 1B 08
Emerald: 0x08615CA0 (14 field moves available)
FireRed: 0x0845A6A8 (12 field moves available)
LeafGreen: 0x0845A138 (12 field moves available)
Ruby: 0x0839F4FC (14 field moves available)
Sapphire: 0x0839F344 (14 field moves available)
Emerald: 0x081B5471
FireRed: 0x081245A5
LeafGreen: 0x081245F5
Ruby: 0x0808A9A5
Sapphire: 0x0808A9A5
R/S/E: FR/LG:
Cut Flash
Flash Cut
Rock Smash Fly
Strength Strength
Surf Surf
Fly Rock Smash
Dive Waterfall
Waterfall Teleport
Teleport Dig
Dig Milk Drink
Secret Power Softboiled
Milk Drink Sweet Scent
Softboiled
Sweet Scent
.text
.align 2
.thumb
.thumb_func
.global fieldmovetable
@ Insert entire data at 0x08615CA0
.equ NewMoveTable, 0x0831977C @ Insert the offset of your new Move Name table location.
.equ SuchPointer, 0x081B5471 @ I dunno what it does but will investigate it later. No need to change.
.equ StringLimit, 0xD @ Character limit of each slot from the Move Name table. No need to change.
.equ CutID, 0xF
.equ FlashID, 0x94
.equ RockSmashID, 0xF9
.equ StrengthID, 0x46
.equ SurfID, 0x39
.equ FlyID, 0x13
.equ DiveID, 0x123
.equ WaterfallID, 0x7F
.equ TeleportID, 0x64
.equ DigID, 0x5B
.equ SecretPowerID, 0x122
.equ MilkDrinkID, 0xD0
.equ SoftboiledID, 0x87
.equ SweetScentID, 0xE6
Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
Dive: .word NewMoveTable + (StringLimit * DiveID), SuchPointer
Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
SecretPower: .word NewMoveTable + (StringLimit * SecretPowerID), SuchPointer
MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer
.text
.align 2
.thumb
.thumb_func
.global fieldmovetable
@ Insert entire data at 0x0845A6A8
.equ NewMoveTable, 0x08247094 @ Insert the offset of your new Move Name table location.
.equ SuchPointer, 0x081245A5 @ I dunno what it does but will investigate it later.
.equ StringLimit, 0xD
.equ FlashID, 0x94
.equ CutID, 0xF
.equ FlyID, 0x13
.equ StrengthID, 0x46
.equ SurfID, 0x39
.equ RockSmashID, 0xF9
.equ WaterfallID, 0x7F
.equ TeleportID, 0x64
.equ DigID, 0x5B
.equ MilkDrinkID, 0xD0
.equ SoftboiledID, 0x87
.equ SweetScentID, 0xE6
Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer
.text
.align 2
.thumb
.thumb_func
.global fieldmovetable
@ Insert entire data at 0x0845A138
.equ NewMoveTable, 0x082470E0 @ Insert the offset of your new Move Name table location.
.equ SuchPointer, 0x081245F5 @ I dunno what it does but will investigate it later.
.equ StringLimit, 0xD
.equ FlashID, 0x94
.equ CutID, 0xF
.equ FlyID, 0x13
.equ StrengthID, 0x46
.equ SurfID, 0x39
.equ RockSmashID, 0xF9
.equ WaterfallID, 0x7F
.equ TeleportID, 0x64
.equ DigID, 0x5B
.equ MilkDrinkID, 0xD0
.equ SoftboiledID, 0x87
.equ SweetScentID, 0xE6
Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer
.text
.align 2
.thumb
.thumb_func
.global fieldmovetable
@ Insert entire data at 0x0839F4FC
.equ NewMoveTable, 0x081F8338 @ Insert the offset of your new Move Name table location.
.equ SuchPointer, 0x0808A9A5 @ I dunno what it does but will investigate it later. No need to change.
.equ StringLimit, 0xD @ Character limit of each slot from the Move Name table. No need to change.
.equ CutID, 0xF
.equ FlashID, 0x94
.equ RockSmashID, 0xF9
.equ StrengthID, 0x46
.equ SurfID, 0x39
.equ FlyID, 0x13
.equ DiveID, 0x123
.equ WaterfallID, 0x7F
.equ TeleportID, 0x64
.equ DigID, 0x5B
.equ SecretPowerID, 0x122
.equ MilkDrinkID, 0xD0
.equ SoftboiledID, 0x87
.equ SweetScentID, 0xE6
Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
Dive: .word NewMoveTable + (StringLimit * DiveID), SuchPointer
Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
SecretPower: .word NewMoveTable + (StringLimit * SecretPowerID), SuchPointer
MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer
.text
.align 2
.thumb
.thumb_func
.global fieldmovetable
@ Insert entire data at 0x0839F344
.equ NewMoveTable, 0x081F82C8 @ Insert the offset of your new Move Name table location.
.equ SuchPointer, 0x0808A9A5 @ I dunno what it does but will investigate it later. No need to change.
.equ StringLimit, 0xD @ Character limit of each slot from the Move Name table. No need to change.
.equ CutID, 0xF
.equ FlashID, 0x94
.equ RockSmashID, 0xF9
.equ StrengthID, 0x46
.equ SurfID, 0x39
.equ FlyID, 0x13
.equ DiveID, 0x123
.equ WaterfallID, 0x7F
.equ TeleportID, 0x64
.equ DigID, 0x5B
.equ SecretPowerID, 0x122
.equ MilkDrinkID, 0xD0
.equ SoftboiledID, 0x87
.equ SweetScentID, 0xE6
Cut: .word NewMoveTable + (StringLimit * CutID), SuchPointer
Flash: .word NewMoveTable + (StringLimit * FlashID), SuchPointer
RockSmash: .word NewMoveTable + (StringLimit * RockSmashID), SuchPointer
Strength: .word NewMoveTable + (StringLimit * StrengthID), SuchPointer
Surf: .word NewMoveTable + (StringLimit * SurfID), SuchPointer
Fly: .word NewMoveTable + (StringLimit * FlyID), SuchPointer
Dive: .word NewMoveTable + (StringLimit * DiveID), SuchPointer
Waterfall: .word NewMoveTable + (StringLimit * WaterfallID), SuchPointer
Teleport: .word NewMoveTable + (StringLimit * TeleportID), SuchPointer
Dig: .word NewMoveTable + (StringLimit * DigID), SuchPointer
SecretPower: .word NewMoveTable + (StringLimit * SecretPowerID), SuchPointer
MilkDrink: .word NewMoveTable + (StringLimit * MilkDrinkID), SuchPointer
Softboiled: .word NewMoveTable + (StringLimit * SoftboiledID), SuchPointer
SweetScent: .word NewMoveTable + (StringLimit * SweetScentID), SuchPointer
stuff
I found this stuff for FR and expanded it successfully. Check the ASM resource thread, I have a post there titled field moves, it may be useful as it's probably 1:1 with EM. Also we need a better organisation of things discovered. That's like the 5th person who's trying to expand field moves now :DSo, I'll be addressing Emerald. The actual table starts at 0x08615C08 and contains all pokemon menu options. It goes like this:
ptr to text
ptr to function to execute
Field moves are also in that table. It seems the order of those options displayed is determined somewhere else.
0x081B5470 is a function that's executed upon selecting a field move. This function checks obtained badges, whether you can use the move here, executes appropriate script, etc. I may try to look around to find the limiter.