![]() |
I've located a table that is possibly useful for ASM hackers (certainly those doing abilities). It controls the end of turn effects that tend to do damage such as Leech Seed, Burn, Poison and Nightmare (among other things).
In Fire Red it is located at 0182FC, and in Emerald at 0409C8. I'm compiling a list of effects that will correspond to the relevant 4 byte entries (they're just pointers that get loaded). Spoiler:
|
Change the order that badges appear on the trainer card (untested)
Simply makes the loop read from a lookup table before checking for the badge. Spoiler:
|
Quote:
like "TM1 x1" to "TM1 " |
Is there a method to remove the 100 EV cap on the EV-enhancing medicines (Protein, etc.), for FireRed?
|
1 Attachment(s)
I'm not sure if this is the right place as such for this, but I guess it's sort of Research...
But anyway, the Egg hatching graphics are actually completely independent from the 'Pokemon' Egg sprite which has the index 19C. You can find this graphics in the HUD navigation for Fire Red but I thought I'd post the offsets here as well as the necessary image to replace them with in NSE. Just insert sprite Image+Palette and save the image and the palette to the Rom. It doesn't need any repointing, and the image is indexed. Fire Red Palette: 25F842 Image: 25F862 Emerald Palette: 32B70C Image: 32B72C |
Quote:
If you want that every mew/deoxys obey, just insert this 0D E0 at 0x08045C6C. |
Quote:
|
Quote:
Quote:
|
Sorry for repost but it should be deserved to be here now.
Emerald Encounter MusicI have been using Hopeless Trainer Editor as my current trainer editor in use to edit trainer data and to change encounter music assigned on trainers as well. I also wondered which songs (Sappy number does each value uses). I have researched that on. And, guess what? Just like in FireRed, an assigned encounter music number plays a certain theme. I was also using Unnamed Trainer Editor and since didn't listed up for Emerald so, here is the list: Encounter Themes:
0xE until 0xFF (14 until 255) plays the Bug Maniac encounter theme which music number is 0x1A7. Alright! That goes for a while. I still need to research them more since there are further information about them on how they work and how they are listed up. I have seen its table around but it is not as dynamic to be easily repointed. I will update this post as soon as I have gathered information. One important thing: During the process on expanding the Pokedex for Emerald, the ninth step messes up the load of 0x8 encounter music which I have discovered earlier. It seems that in the first twenty-nine 81 01 00 00-s includes the 0x8 encounter theme. To fix the 0x8 encounter music once again: go to 0xB1C30 then type 81 01 00 00. To conclude this, you can have no longer translating the Controlling/Extending Encounter Music which is only for FireRed. You can have fourteen kinds of encounter music in Emerald (than FireRed being three unless you have applied that hack). You have too much already so expanding it on Emerald is pointless. Emerald Overworld and Battle TextboxesGetting lazy jogging down stuff from VBA's Logs? There are few people ask about that. Alright! For being fair, here are the data you need... again for Emerald: Emerald Overworld Textbox: 0x08DDD768 (uncompressed image) Emerald Overworld Textbox Palette: 0x08DDD728 (uncompressed palette) Emerald Battle Textbox: 0x08C00000 (compressed image) Emerald Battle Textbox Pal: 0x08C004E0 (compressed palette) I guess you know what compressed and uncompressed images and palettes are? Good! |
Hi! If you are using a 32x32px overworld for the PLAYER(NDS style) you will notice that it will look weird when you choose your name.
http://i.imgur.com/qB8ZxAH.png To fix it just go to the direction 083A3BC0 and put 18 instead 10 It makes the PLAYER and GARY overworlds look like a 32x32px. http://i.imgur.com/7HNuVBd.png Credits to daniilS |
Encrypted CountersFR saves 64 hidden words after the variables space. Apparently, only the first 51 of them are actually used (still their purpose is unknown) and have a max value of 0x00FFFFFF (16 millions). You can access them by using variable 0x4100 + [counter id * 2, only lower halfword] (but you need to disable the security key to read the actual value) and increment by 1 using the scripting command cmdc3 [id] and battle script command cmd60 [id]. Here's the list of counters i found: Code:
|
Quote:
|
Quote:
|
Hey guys, I just wanted to post a warning about a PKSV bug which occurs quite commonly when testing out routines with callasm (perhaps it happens in XSE too, I haven't tried).
Steps to produce bug: Write a routine and insert it into ROM Write Script with callasm which uses said routine, compile it Close PKSV - Normally around here, I give my routines a game test - Open a new PKSV and decompile the script Make modifications to the routine Make modification to the script and compile Result: Modification to the routine are undone. To avoid the bug you need to always reinsert the routine after compiling a script which uses the routine. |
I've finally updated this thread, too! Again, notify me if I missed something. I too shall be more diligent in keeping this thread updated. :D
|
The palette used for sandy footprints is at 0x398FA8 in FireRed and 0x398F88 in LeafGreen. :)
|
Quote:
|
I'm not sure if this has already been discussed here, but, would it be possible to port the breakable tiles from Sky Pillar (R/S/E) to Fire Red? I mean, to make them only able to be surpassed using the bike and non stopping.
|
Quote:
|
I just made a little discovery for Pokédex hacking to add on to this post. What's been really bugging me is how you can change the amount of items the National Pokédex has, but the byte for the Regional one isn't known. Well, the 0x13 at 0x452010 is that "missing unknown value". Of course, the amount of items in the National Pokédex is at 0x4520C8, just like Chaos Rush discovered.
|
Just a reminder that this thread is not for asking questions, unless it is directly asking a question about a previous post. If you want help, use the Beginner's Lounge and its relevant stickied threads. If you have a small amount of (previously undocumented in this thread or forum) new research and want people to help with it, then that is probably the only acceptable case to ask questions here. Please keep this in mind!
|
some useful RAM stuff
emerald RAM offsets for map bank, map number, and x and y coordinates 0x02025A0C stores the current player map bank 0x02025A0D stores the current player map number 0x02025A08 stores the player's x coordinate 0x02025A0A stores the player's y coordinate roaming legendary RAM offsets for their current location RS: 0x02079303 FRLG: 0x0203F3AE E: 0x0207BC86 |
Quote:
|
I know it's nothing hard, nothing WOOOOW, but that's something and my first alone-research-area collaboration. This is for Fire Red:
INFINITE SAFARI TIMESimply go to 0xA0F1A and replace the 01 38 there, for 00 38. The game will still give you 600 steps, but it won't decrease, so you will be there until you retire or run out of Safari Balls. When I figure out how to hide the step count in the start menu, I'll edit this post. |
Well, this is what I did, while learning how to do stuff like debugging and doing new mechanics changes in the game.
Thanks to Touched-sensei, who helped me through the entire process. Thanks to daniilS and kleenexfeu, who also helped in the very end. This is for Fire Red: REUSABLE POKÉBALLS- First, go to 0xA1E30. Change 01 21 to 00 21 (with this, Pokéballs won't be deleted when you select them in your bag); - Now, find some free space and insert this routine there: Spoiler:
Here's a compiled version: Spoiler:
This is the code that deletes the Pokéball; - Finally, go to 0x2D924 and paste write this "00 48 00 47 XX XX XX 08" there. It's a hook to the routine you just inserted. Change the XX XX XX for the pointer to the offset you placed the above routine. Remember to +1 the offset before changing it to a pointer. With this hack, you won't spend Pokéballs if you don't capture a wild Pokémon. I wanted to do it inspired in the anime. Again, simple, some people will think it's a broken functionality, but it will do well for that time when you encounter a shiny Pokémon with that one single Pokéball in your bag. =P Thanks again, everybody. Hope it's helpful. EDIT: Thanks to mbcn10ww, I fixed this hack. Unfortunately, I couldn't test it on the Safari area, as it's saying other saves are not compatible (but I don't know why, since I might have tried to use saves of games with other different hacks. It's been more than a semester I don't even see my games). Nevertheless, I tested it on regular places and areas, and it is still working. From the previous hack, I set a new condition before removing item from the bag. I call the removing routine anyway. The difference is that I pass on a 0 value as the number of items to be deleted if it's not a pokeball. The "cmp r0, #0xC" compares the last item used with the last pokeball index (Premier Ball). If it is lower or equal to that, it is a pokeball. Else, r1 receives 0 and no item should be deleted. Thanks for the heads up, mbcn10ww! If anyone can test the Safari part, jumping straight there, or anything, I would appreciate! |
Player Names in FireredAt 0x46308C, there is a table which lists all the generated player names for when you leave the name entry screen blank. There are 19 entries for each gender, and the table is simply made up of pointers to strings for each possible name. Spoiler:
The name strings are all located at 0x1C574F if you wish to edit them without repointing. Note that there is also a string for LEAF which is not used in Firered. |
The roamer in FR is released into the world by special 0x129, at x141D9C.
Its species is chosen from the bytes at x141caa, x141cb4, or x141cb8 (xF3, xF4, xF5 respectively) based on your starter choice (var x4013). Its level is dependent on the bytes at x141cc8 and x141cdc. I advise changing both to the same value; if only the former is changed it gets generated as a level 50 mon with incorrect HP. The ability to track the roamer in the dex is specific to Raikou, Entei, and Suicune. There is a table at x4642F4 that maps values of var x4013 to dex entries that should instead check the roamer. To make the dex acknowledge one roamer and disregard starter choice, change the first value in the table to your roamer's ID, and put four 00s at x13cb80. |
Quote:
|
Quote:
To elaborate for the people who don't understand what this is about, it is setting the limiters for the maximum number of EVs a Pokémon can have per stat. Because only four EVs translate into a single stat point, having 255 EVs per stat is pointless, as the last three EVs do not make any difference. |
Emerald move effects command table 0x31BD10.
|
We (almost) all know how BSP is useful, though it can't decompile every battlescript in the game because all the commands haven't been implemented.
To change that, I documented on what kind of argument each commands take, I don't know yet what they all do, but we can at least decompile every script. There's still few command undocumented, I'll update the post as I find what argument they take, and what the other commands do. UPDATE: Now we know the arguments taken by every single command. The only issue is that BSP doesn't prevent infinite loop. Other than that, you can decompile every single Battlescript in the game. The commands : Spoiler:
|
Quote:
In my eyes, with this bug and the ASM bug, PKSV has stopped becoming a viable script editor. XSE is bad too, but PKSV is currently worse. I recommend Red Alien atm. Of course, if you use PKSV for non-ASM projects and for non-money scripts it's still usable. |
Quote:
|
This post- http://www.pokecommunity.com/showpost.php?p=7209316&postcount=251
I know it works for FireRed, but can it be applied to Emerald as well? |
Quote:
Quote:
EDIT: Well, even if it is just me (which it isn't going to be looking at this code), it's pretty big of an issue in my eyes. I did a little bit of digging around, and figured out the source. I thought I'd post the fix here. Replace the bytes at 0x2D990 with: 00 49 08 47 C7 D9 02 08 |
Quote:
|
Quote:
EDIT: Boys and girls. I did a +1 by accident and caused the bug. If you're having the same issue, don't +1 any of the offsets. This never happened btw <3 |
Quote:
|
This post is to make public some research I did trying to auto-decrypt the things that are encrypted with the security key and disable the DMA in Emerald based on the information in this post on doing the same to Firered. I believe I've also found where to disable the Pokemon Substructure Permutations as well, so that they will always be in the right order instead of shuffled around.
Before anything, I'd like to thank FBI, Touched, GoGo, and kleenexfeu for showing me how to find what I was looking for (FBI), actually finding the security key routine (GoGo), showing me how to verify what I did was working (Touched), and just talking me through some stuff and letting me bounce things off of them (basically everyone, but mostly kleenexfeu). Thanks guys! And of course, thanks to Sagiri for the original research. To Automatically Decrypt Anything Encrypted with the Security Key in Emerald: Head to 076CD6 in your hex editor. Change the 24 08 that is there to 00 24. Upon the next map refresh, everything encrypted by the security key will be decrypted and remain that way. Your money, for example, will now sit unencrypted at 02025E90. To Disable the DMA in Emerald: Head to 076BEE in your hex editor. Change the 04 40 that is there to 00 24. Upon the next map refresh, your DMA protected information will be moved to a static location and remain there permanently. To Disable the Pokemon Substructure Permutations in Emerald: Head to 076BEC in your hex editor. Change the 7C that is there to 00. Incidentally, to disable the substructure permutations in Firered, head to 04C062 and change that 7C to 00 as well. Credits to Knizz's Firered.idb for that one, I'm posting it here because I haven't seen it anywhere other than the idb. The New Static Locations in RAM: All of these can be edited easily through the memory viewer now, none are encrypted or dynamically moved. Spoiler:
|
Been digging into the "easy-chat system" for Emerald and noting down what bytes make what word(s) and stuff like that. List is nowhere near done. Nor are they in any order.
They are mostly used in the Battle Frontier/Tents and Trainers Hill too so if you look up a trainers name from those places in a hex editor you could find the intro/win/lose quotes (12 bytes each, should be just after trainer name) and edit them if you really wanted to. Not really useful but whatever. Spoiler:
|
If you've ever inserted a new map in Advance map, you might have noticed that you are unable to use fly on this map. The fix for this is simple: in the map header, swap to professional editing view using CTRL+H. Locate the byte in the image below, and if it is 00 change it to 01.
http://i.imgur.com/aouZWaB.png Note that the other bytes in your map header will likely be different to mine, this is the only one you have to be concerned about. |
Quote:
At any rate, this inspired me to work out how to get rid of the encryption surrounding them (all offsets for FR): To unscramble the order, write 00 20 00 00 00 00 at x3F94C. This will always put them in order 0, (growth, attacks, EVs, misc.). To remove the XOR encryption used for them, put 00 00 at x3F92A, x3F930, x3F906, x3F90C. To remove the checksum reads, allowing for easy memory editor usage to tweak values, put 0B E0 at x3FDA8 and 0E E0 at x40530. To remove the checksum writes, effectively adding two more bytes to the Pokemon structure to be used for whatever you feel like, put 00 00 at x40AE6. For obvious reasons, this will ruin existing saves, but makes memory editing and Pokemon hacking simpler in addition to adding two more bytes to the Pokemon struct. |
Quote:
Theorically, this should do the same for Emerald : put 00 00 at 0x806A236, 0x806A23C, 0x806A25A and 0x806A260 put 00 20 00 00 00 00 at 0806A27C 0B E0 at 0x806A6D8, 0E E0 at 0x806ADFC and 00 00 at 0x806B3E4 Thanks Doesnt EDIT : I can confirm it works, edit the data of the pokemon is easier than ever! |
Quote:
Spoiler:
Credits: JPAN for the original research Turtl3skulll for writing the Fire Red's dummies tutorial jiangzhengwenjzw for helping me to fix the 7 digit display problem |
Quote:
|
Quote:
|
Quote:
|
1 Attachment(s)
Quote:
http://www.pokecommunity.com/attachment.php?attachmentid=76846&stc=1&d=1445096375 |
2 Attachment(s)
Quote:
|
Quote:
It might to be 2D1 in hex. |
Quote:
|
I've looked into FireRed's menu descriptions. You know, the blue box that tells you what each entry does. I'm trying to figure out how to get rid of it and I've made some discoveries, nothing complete though.
0x083A7394 is table of pointers to the descriptions. You can repoint each one of them if you want. There's two offsets which point to it - 0806F104 and 0806F30A. They're referenced a couple of bytes back by ldr r2 opcodes. The first pointer seems to be part of a routine which loads the description of the first entry. Changing stuff in it only breaks opening the menu. Changing options works fine. The second pointer to the table seems to be part of a routine which loads the description of any entry you go to after opening the menu. There's a bunch of branching in there and screwing around with it seems to break either selecting options you've already went through or moving the cursor down in the menu. Don't know which of the two because I didn't test it. While this may not be useful as it is, it's a least a start. One thing I do know is that I've found the routines which load the darn thing. Now to figure out where they start and stub them. |
Quote:
To remove the descriptions, I think you can just nop out function calls to 08113018. Try writing 4 bytes of 0x0s to 0806F2CE, 0806F31C, and 080F798E. |
For Emerald, if you want to enable the trainer's national Pokemon in the contests before beating the Elite Four, do the following changes:
Put 00 00 00 00 00 00 at 0xDABA6 (for removing the entire flag checking command). |
Quote:
|
Quote:
0x98998 = number of new items 0x9a8ae = 00 00 00 00 |
|
Changing the pre-battle, post-battle and switch-in text in Emerald (BPEE) and FireRed (BPRE)
This post focuses on changing the challenge, defeat, and switch-in text strings that appear during battle in Emerald and FireRed. To clarify, I'm talking about these: Quote:
Quote:
Quote:
Green denotes Emerald offsets. Red denotes FireRed offsets. This is the default challenge text, found in 0x5CBB9C, and has pointers at 0x14E228 and 0x14E264. Located at 0x3FD366 and the pointer at 0xD73C0 for FireRed. Code:
For FireRed, it's at 0x3FD1C7 with pointers at 0xD776C and 0x3FE410. Code:
On FireRed, it's at 0x3FD186 and the pointer located at 0x3FE374. This exact form is only present in ROMs that have not been decapitalized. Code:
Code:
Challenge text: http://i.imgur.com/ogx5bDo.png Code:
Defeat text: http://i.imgur.com/5jXzqhX.png Code:
http://i.imgur.com/TXAV8aV.pnghttp://i.imgur.com/YG2yKqT.png Code:
|
Not sure if anyone else has found this yet but meh
So to upgrade your pokedex to the national dex in ruby you put this is an xse script Code:
well this kinda does the job but leaves it like this Spoiler:
in order to fix that we need to add another line to the script so it becomes this (with changes in bold) Code:
Spoiler:
|
Previous post has been updated to include offsets for FireRed!
------------------------------------------------------------------------------- In an attempt to further modernize the strings in the battle system, I've also looked into the text that prints whenever something happens with the opponent's Pokemon, namely the term "Foe." Basically, in-battle dialogue such as: Quote:
Quote:
It's located at 0x5CBD8B and has quite a few pointers: 0x14EB28, 0x14EC9C, 0x14ED38, 0x14EDD4, 0x14EE70, 0x14EF0C, 0x14F390, 0x14F784. This doesn't cover the Screen move strings though (Light Screen and Reflect). On FireRed, the text is at 0x3FD55B and pointers at 0xD7B7C, 0xD7CA4, 0xD7D18, 0xD7D8C, 0xD7E00, 0xD7E74, 0xD82C0, 0xD8554. Changing it is pretty much the same as the ones on my previous post, but note that you're only changing one word and not the messages themselves. Once again, I'll be putting up an example. This replaces "Foe" with "The opposing". Remember, insert into free space and re-point accordingly! http://i.imgur.com/hbqFX3N.png Code:
Emerald: https://i.imgur.com/AUGR96R.png https://i.imgur.com/RarvsgZ.png https://i.imgur.com/2BRATiH.png Code:
Code:
EDIT 2: Added Skill Swap fix for Emerald. Have yet to find FireRed equivalents. |
Special 0x167 is used by the printer in the Game Corner in vanilla FireRed to add the icons of your party to your Trainer Card.
Vars 0x4043 - 0x4048 correspond to the six Pokémon icons on the back of the Trainer Card. You can change them at x89a78, but note that special 0x167 assumes they will be consecutively stored (and it will take the starting variable as the one stored at xCC3C0. 0x4042 is also used by the special, but it just appears to be a clone of 0x8004, which determines what colour the icons should use. 0x4049 - 0x404B controls the three stickers on the back of the Trainer Card. You can change them at x89a6c. They're checked by the script of the sticker kid on Four Island, too, so just change them there like usual too. |
This post is a little extension to JPAN's document on Battle Structs for Fire Red (link here). The bolded ones are the new ones found during my research.
Spoiler:
I'll update this post after researching more locations. |
Code:
EDIT: In Emerald, Command 0xD5 actually uses a halfword as its argument (meaning XSE is correct) for Emerald Also, XSE states that D4 (bufferitems) only exists in FRLG, meaning that for Emerald, it's probably only used in this strange context |
Quote:
cmdD3 does some nasty checking of the map tile ID. All those arrow panels are tile 0x298 and above. They're in groups of 8. Right, Down, Let, Up, Trigger, and then three blanks. D3 checks what group you're activating and rotates all the NPCs on those tiles in the correct directions. It uses movement scripts at 861269C, 86126A0, 86126A4 and 8612698 to accomplish this NPC movement. It also keeps track of their coordinates in the saveblock. I would guess this command also rotates the relevant tiles. cmdD4 updates the facing of all relevant NPCs with applymovements and updates their behaviours so that they are facing the correct direction. cmdD5 allocates memory for this whole process (if there is no memory already allocated). cmdD6 frees that memory, and updates the player's overworld sprite. It also waits for some task. For all these scripts, you'll see a cmdD5 first, then a cmdD6 at the end. Summary: cmdD3 - mossdeep gym trap rotate: takes a halfword (variable or number) of the trap type (panel colour) cmdD4 - mossdeep gym trap update: no arguments cmdD5 - mossdeep gym trap begin: takes a halfword (variable or number). true indicates trick house (panels start at 0x298), false indicates mossdeep gym (panels start at block id 0x250) cmdD6 - mossdeep gym trap end: no arguments |
I've made a quick research about the background of the Oak's intro screen in Fire Red, to be accurate, this background
http://i289.photobucket.com/albums/ll219/Jameika314159/LP%20Pokemon%20Liquid%20Crystal/1636-PokemonFireRedUSquirrels_103.png Tileset of Background: 0x460CA4 Tilemap:0x460CE8 Palletes: 0x460568 Tilemap size (In NTME): 30x20 (240x160) Amount of colors: 16 I really don't understand why the Oak's intro uses 256 colors if a lot of colors aren't used. |
For Emerald
Proper cry for limbo slotsThis should theorically allow the limbo slots (between Celebi and Treecko) to have their proper cry, could be useful for forms etc, since the emerald expansion isn't finished yet : Update : put C0 46 C0 46 C0 46 at 0x806D51C A repoint might be needed, sadly I can't test on my PC as I don't have sound Tbh the engine handles the cry weirdly, if someone has more information about how to repoint the tables correctly, please share. Thanks PurpleOrange : Quote:
The game displays the default sprite, icon and base stats for Deoxys01 BC 00 47 at 0x8034C32 for the sprite. C0 46 C0 46 C0 46 C0 46 at 0x8068A2C for the stats. C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x80D3030 for the icon. |
Quote:
Quote:
regardless, with your method, you'd still need to repoint and expand the cry table, no? EDIT: It should be noted with this method the repointed table must include the the national dex number of the first 251 pokemon in hex -1 followed by 25 lots of 00 00 (which can be changed for new cries), then followed by the index numbers of the hoenn pokemon (in their weird order) |
Quote:
I just negate the function that replaces limbos cries with unown cries |
Quote:
|
I don't think this has been posted here, but if it has, sorry.
The step counter for the Safari Zone is at 02039996. It's completely unprotected by DMA and you can change it with cheat codes or ASM routines. |
Sorry for the double post, but this is something completely different and has nothing to do with the Safari Zone. I'm okay with it being merged though.
I've found a couple of graphics offsets for FireRed's slot machines. Maybe I'll post the palette offsets too later. Code:
Spoiler:
|
so I found this "table" in FireRed at 0x08466C58
Code:
|
In PMD: Red Rescue, the tilemap that contains the letters and symbols in the game is located at 302088 and is 9E0 bytes long.
This is a dump of the first tile, a #, that fingerprints the sheet. Code:
Code:
EDIT: I suspect the Palette is controlled by ASM because I can't even find it saved in the rom. There might be more tiles before and after but I'm not 100% sure about anything outside this range. EDIT 2: I think I found the beginning of the tile map at 302048 which is just a one pixel column of black on the left and the rest is the transparent green. Original: Code:
Code:
Original: Code:
Code:
EDIT 3: Changed 48 20 30 to 48 20 40, there doesn't seem to be a visual effect. Conclusion: this is not a pointer (probably). |
I'll just point out two things.
02036E58 contains the direction the player is facing. It's got the same key as 0x800C (1: down, 2: up, 3: left, 4: right), except that you can't change it (changing it will make it flip back to what it should be, so that makes me believe it's updated every frame) and it's also reliable. I haven't looked at it in a memory viewer, but 0x800C seems to behave funnily if you want to check the player's facing and not change it. Ergo, you should do something like comparefarbytetobyte 0x2036E58 0x2 instead of compare PLAYERFACING 0x2 in scripts. The second I haven't looked into a lot, so I'm not sure if it's got truth in it, but type 0x7 level scripts seem to run only on menu close and not when the map is loaded (AdvanceMap 1.92 says they also run on map load). Maybe someone can confirm/reject this? |
Quote:
For your inquiry about level script 0x7, I think they are all going to activate on map reload (just a guess). You can confirm by setting a break point at "08069940" with 0x7 as the only level script. See if it's breaking on the map reload/menu open-close :) edit: I thought I'd drop this here for archival purposes for anyone trying to do this: http://www.pokecommunity.com/showpost.php?p=9028130&postcount=4 |
I'm going to post this here because I'm sick of working on it and it should be so simple.
I have been trying to find the location of the routine called when you use fly from the pokemon menu in Emerald. FBI found it at 0xC4EF8 in FireRed and a simple callasm script makes it work perfectly. After spending hours looking for byte similarities between FireRed and Emerald I found nothing of value. So then I moved on to making breakpoints for 'FLY', 'FLY to where?' and for cities names as well as breakpoints for the map tilesets and tilemaps, after hours the thing I keep getting is that it's around 0x124600. KDS spent some time helping me out and he pointed out the routine at 0x124690. Callasming 0x124691 produces a black screen, every other routine I've tried does nothing. Maybe something has to be set before the callasm? That's all the information I have, I would really appreciate help. Thank You |
Quote:
|
Quote:
Edit: Don't know why it never occured to me to find a pointer to the routine, there is a pointer for 0x124691 at 0x1B5620. Oh that's where 081B5470 came from, didn't think the routine would be that big. Edit2: If I set a breakpoint at 08124691, 081B5620 or 081B5470 the game doesn't break when I use fly. Am I doing it wrong or does that mean it's not there? |
The series of checks at x5613C check if the player is in a map with the name VICTORY ROAD (map name ID 0x84), ROUTE 23 (map name ID 0x7B) or INDIGO PLATEAU (map name ID 0x61). If they are, then the SURFing music will not play.
This becomes an issue, though, if you have maps on there that aren't supposed to be climactic or whatever; just change the map name IDs at that location to whichever map name you want to prevent SURFing music from playing on, or simply paste 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 to nop that entire series of checks out at x5613C. This is for FireRed. |
Unsure if this has been done already, but whatever. If you want Pokémon to not show their Pokédex number as ??? on the summary screen before getting the National Pokédex, make the following changes:
0x6E272: 00 00 00 00 0x6E280: 00 00 00 00 0x1360F7: E0 EDIT: also this 0x43FA6: 00 00 04 E0 This is for FireRed. |
Quote:
|
Quote:
0x43FA6: 00 00 04 E0 |
To fix the broken sprite behaviour 0xC, which Advance Map labels as Face Down, you can put B5 FF 05 08 at x39fbf8, and the sprite behaviour will then actually make the sprite face down and not risk the game crashing etc. If you want to make it hide the NPC like it does in RSE, put F1 31 06 08 there instead.
|
Changing the second byte in the battle flags in Emerald (02022FEC) to 02 will activate the Wally AI. This means Wally can go against trainers..
I'm not posting this so it goes anywhere or develops further, I just thought it was funny |
This is kinda useless to everyone, but I'm posting it so that I don't lose this info. This is all for FireRed.
When the player enters a battle, the player's backsprite slides in from the right and stops. To change the position from which the backsprite starts sliding (that is, the sprite's initial position as the screen fades in) change the byte at 0x0323C0. By default, it's F0. Higher than F0 will start the sprite further to the right (depending on how high you put the value, the player may wrap around to the other side of the screen). Lower than F0 will start the sprite further to the left. Regardless, the sprite will stop at the same position. If I can find how to edit this position, or other battle intro stuff, I'll edit this post. EDIT: To disable the showing of map names when crossing to a new map regardless of the setting in AMap, write 00 00 00 00 to 0x055910. As an aside, the function knizz's idb labelled "show_new_mapname", located at 0x098110, is probably the key to getting unique graphics to show for each map name. Some of the function calls look promising (to my untrained eye) for messing with what bg is loaded. EDIT3: It appears that you still have to set A-Map to not show the name. Granted, in FireRed, the names showed even with that set for me, and nulling out that function call finally stopped them from popping down. EDIT2: To disable the descriptions of items on the start menu (that little blue box that spans the bottom of the screen) regardless of your options settings, write 00 00 00 00 to 0x113034. |
Emerald Wally battle
Spoiler:
|
no Pokemon Ruby?
|
I don't know if this has been posted before, but whatevs. It came to my attention today that the bag in FireRed crashes if a "main" pocket has more than 42 items (the normal max for regular items). I had always assumed the malloc was done based on a multiple of the numbers inputted at the routine beginning 0x08099E44, because the TM pocket works fine even with over 100 items, but apparently the berry/TM cases mean they run off of something different. Anyhow, to allow for sufficient malloc requests, change ".equ largest_pocket_size" to your new max and insert this:
Code:
Info on 0x08099E44: http://www.pokecommunity.com/showpost.php?p=9014911&postcount=2018 |
Pokemon Emerald Trading Information:
0x08338ED0 is a table with info related to trading. Each entry is 0x3C bytes, used as such: Spoiler:
There's also traded mail table. It starts at 0x08338FC0 and is 18 bytes long. Each entry is a halfword that's a word being displayed in Mail screen ending with 0x0000. Mail Index in the above struct is responsible for choosing correct entry in mails. FF is used when held item isn't a mail. |
To remove the black bar animation, cry and Pokémon sprite and all, that shows when you use a HM, do the following:
Quote:
|
The RAM byte which checks for the current maps type is found at:
FR:0x02036E13 (credits to FBI) Em:0x0203732F Useful for custom scripts to check if the player is underwater/underground/secret base etc |
I guess I'm just on a roll, huh? I'll post the code to Github when I learn how to use it (and the code for follow me as well) |
So I have been looking to make the various search categories (A to Z, Type, Lighest, Smallest) work for expanded Pokemon in Fire Red. This is what I found.
The 'lighest list' is from 4442f6 - 4449ef. A to Z seems to be at 3e7d94, although it weirdly seems to skip some Pokemon. Type is at 4448fe. The Smallest list I can't find. Now, taking the Lightest category, I found the pointer to it at 1037cc. Then at 1037D4 there's 81 01 (385, number of dex entries minus 1). Expanding and repointing the lighest table and changing the number at 1037D4 did seem to expand the list, but it only shows Gen III Pokemon in the slots I added. So, with these findings, a smarter person than me might be able to figure out how to make the categories work for expanded Pokemon? I reckon there must be limiting bytes somewhere, just as with the National Dex list in the Pokedex Expanding tutorial. Anyone? :) |
Quote:
Ruby: 0x081DDECC (if not, destinjagold or any other Ruby hackers, correct me) FireRed: 0x081DD0C8 Emerald: 0x082E0104 If you just want to go where to replace C5, go to one byte after it. ;) |
Mods, just let me know if you want me to separate this post into multiple ones for easier archival in the first post.
This is not my research, but I stumbled upon it and thought that it would be useful for locating the Emerald equivalents, as well as tracking down where other Record Mixed data is stored in the save. This is all for Ruby and Sapphire. Spoiler:
This wiki also has some interesting information on R/S/E's RTC chip, some of which we already have documented in various places, but some of the information is new to me, so it may be new to others as well. I'll leave links to what I've found: First, a Glitch City Forum topic about the R/S Berry Glitch that sheds some light on how the RTC works internally. Second, a page on Furlock's Forest Wiki which explains how the time is stored in the save, and why simply replacing your RTC battery will not restart time-based events. This link also includes a program that can be loaded up in a flashcart and used to modify the RTC of your retail R/S/E's internal time to whatever the user desires. The source for the program is included. The wiki doesn't look maintained anymore, by the way, so someone may want to archive everything in the event that it's taken down. |
The fanfare and waitfanfare commands in Pokémon Emerald (not sure about other games) work based on a table. The table is at 0x085248BC and works like this:
http://i.snag.gy/zSJxS.jpg If you don't understand what's going on here, the table looks like this: http://i.snag.gy/Z6q9N.jpg First halfword is the song, second halfword is the length that waitfanfare waits (in ticks or frames, I don't know the term). The limiter for this table is at 0x080A310C. Change 0x11 to the new amount of fanfares if you're expanding this table. Fanfare playing works like this if you're interested: http://i.snag.gy/KACDp.jpg Basically it loops through the table and gets the first halfword each time, then checks if the song you're trying to play is in the table. If not, it just plays the first fanfare in the table (which by default, is the level-up theme) |
Quote:
|
Quote:
|
Quote:
|
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". |
| All times are GMT -8. The time now is 8:53 AM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.