![]() |
Emerald Info Archive
Hey guys...
As you probably know, Emerald has the most features and would be awesome to hack. As you probably also know, not much is known about Emerald, and thus not many people want to hack it. Also, I want to find out about Animations, but that's a different story. However, I can't stand not having all the features, so I decided to make a ROM map. Spoiler:
---------------------------- WANTED - Any Dynamic Memory Allocation routines (e.g. realloc(), calloc(), free())(like, really) - Integer (rounds toward zero) Arithmetic Routines (Already have Division, Modulus) - Offsets and lengths of scripts that are not main-story (like Tile Behavior Bytes) - Any Standard C functions you see; basically anything that someone would use often - Some Cleanup help :\ ------------------------- Anyways, this is what I have: Spoiler:
For the awesome BIOS and pre-installed functions I've done my best to see that they're accurate. However, I can't guarantee 100%, and frankly you shouldn't be playing with it anywho. Progress: 13.5804%/32.1086% (0x5232AFb) as of March 17, 2012 Don't be afraid to put stuff up; if you have even one new offset, it's very much appreciated. ---------------------- Credits I would like to thank these fellow PokéCommunity Members for contributing to this "project" (if you would even call it that), however small their contribution: Spoiler:
|
do you want full routines or just offsets?
also: 0x98E - 0x99D IRQ BIOS branch 1 (0xFb) unsure! -pretty sure this is the header part of malloc()(and it starts at 8000988) |
Quote:
Yeah, Some of the BIOS functions might be wrong, as the routines there run into each other quite a lot. I'll change that, thanks! |
e: nvm, gonna go ahead and start putting stuff up.
80003A4-8000466 - AgbMain(800042A-80004BE, main loop) 82E70AC-82E70B8 - soft reset 80B5144 - 80B516E - battle test 80004c4 - 80004d6 - callbackMain 80004d8 - 80004fc - define callback pointers 82e7be0 - 82e7c9e - doMod 80b4984 - 80b4a88 - feebas + feebas tile setup 80005bc - 80005d6 - initCounters 8000684 - 80006cc - initIRQ 80005e4 - 800061c - input handler 8000248 - 8000398 - intrMain 80fc0a0 - 80fc0ae - in safari zone check 8000988 - 800099c - malloc header (A3A3, etc) 8000b1c - 8000b2c - initMalloc 80009b8 - 8000a1c - mallocMain 8000b38 - 8000b46 - malloc() 82e93d4 - 82e9430 - memcpy(void *pDest, void *pSrc, u32 length) i'll grab the rest from my database and post it in a bit. e: i just noticed you linked over to my work on project pokemon. good stuff. and i have a lot more disassembly to do for emerald to get more code laid out, etc in IDA. once i do, i'm sure i'll have quite a bit more to add. also, someone should do this for black and white. i have 675 functions labelled from the arm9 binary alone. srsly. |
Oh hey looky I didn't recognize you, you were the one that found almost all the offsets for Emerald ^^
(and if you're still on Project Pokémon you should help do some clean up btw) Anyways, thanks, I'll look over them asap |
clean up what? not sure what you mean. here are the rest from my database, btw:
8067e90 - 8067ef4 - method H pid gen 806d088 - 806d096 - get nature from temp pids 80b4d78 - 80b4e64 - nature setup 80fc3b8 - 80fc3e4 - pokeblock check 80b4a98 - 80b4aa8 - alternate rng 80b4ac8 - 80b4b80 - set encounter slot 806f5cc - 806f5e4 - rand() (main @ 0x3005d80) 806f620 - 806f630 - rand() (secondary @ 0x3005d84) 8000204 - 8000234 - reset vector 8000560 - 800057a - seed main rng (this function never runs) 80006fc - 8000700 - callbackA+0x10 8000708 - 800070C - callbackA+0x14 800072c - 8000730 - callbackA+0x18 80006f0 - 80006f4 - callbackA+0x0C 8000540 - 800054e - callbackB 80b4c74 - 80b4cf4 - set level for wild+ 806f5f8 - 806f606 - setRNG (also never runs) 806f610 - 806f618 - set secondary rng (runs for daycare) 82e04dc - 82e0592 - set up sound + buffer @ 3006380 82e70a8 - 82e70aa - register ram reset 82e7084 - 82e7086 - cpuset 82e7090 - 82e7092 - lz77uncompwram 8000554 - 800055a - set timer1CNT 8000738 - 80007da - vblank handler 8000588 - 800058C - fetch result from 0x02020000 (location of timer1 data writes - for seeding rng(not used) and for creating the trainer id) that's everything for now until i take more apart in IDA. |
cleanup as in "at least put them in order"
but whatever I couldn't ever do that much by myself so thanks! |
I have a question: in emerald,is there a part of memory never used?
cause i want to store some temp data in the memory. |
Quote:
Or, you could remove contests; that could free up a couple hundred bytes. |
Quote:
|
There's many; if you have VBA on PC, you can search through the memory-map tool from 0x2000000 on, you'll find parts that are completely filled with 00s (nulled out). They might have a purpose, however, so I suggest you test them first.
|
Thank you very much,actually i wanna make a npc who can tell you the individual values of your 1st pokemon,and now i can store the ivs into the memory (i used 0x20500a0),but i dont know how to use xse script to get the value...Do you have any idea to do this?
|
I believe storing them in the RAM of temporary variables (0x800D up) would be a better way to do that.
|
Not to mention that ewram only goes up to 02040000 (256kb).
Anyways, 080FB36C ->Truck_Sequence of newgame (ran by callback3) |
Quote:
Quote:
|
Quote:
EDIT: I now realize how much of an ass I sounded like. I'm sorry if I offended you ^^ no hard feelings? |
What do you mean by "Rumbly truck thing (run by callback3)"
If I zero this out, will it make the truck intro go away? |
Yes, but you will have to add a bx rd to the front of the newly nulled-out section so that it returns every time it's called (because it still will be called).
Alternatively you can use a tool that I recently found around these forums - it's called Truck Remover - that will do all that crap for you.I hope you know how to search Edit: OH AND HAY GUIZE I really need to know how the LZ77 thing works so I can add all that cool stuff ^^ and possibly squeeze another 2% out Ö |
8084310 - make trainer id set
80842cc - store trainer id set i should spend some time idly scrolling through the disassembly in ida at some point soon and see if i can pick some more stuff out.. maybe tomorrow. e: 800a850 - debug printing function |
Quote:
|
Quote:
Code:
Oh, btw, here's another contribution, newgame routine: Code:
|
I...don't really know. It changes the screen to a different tilemap, but that's pretty much all that happens, and the other emulator won't cooperate with me today.
|
setmapfooter 0xA7
Okay hey everyone, I'm here today with a new set of things to figure out reference. This thread needs some action, come on~
This is the same command that does the Shoal Cave business. Its use is pretty complicated so I'll try to explain it thoroughly. Arguments: hword mapNum Use: Changing the map tiles and map movement on any given map. This will take the map that it's given through the argument and set it on top of the original map. If the map sizes are not the same, it will align from the top left corner. mapNum: from 0x8481DD4 (or from the offset pointed to at 0x80849CC) there is a table of map footer offsets. Also, in the map header there is also a map footer offset. The entry in the table plus one is the argument of setmapfooter for that map. ASM: Code:
Spoiler:
|
setpokemonpp (setpkmnpp) 0x7B correction
Come on guys~
Alright, so you know setpkmnpp, it takes four bytes as arguments. The XSE guide says this is how it's used: Quote:
It might just be Emerald, but take note of that. |
Okay, thank you! I'll get to it immediately.
:c |
ROM:0806A518 getPKMData:
ROM:0806A674 readPKMData: ROM:0806ACAC writePKMData: ROM:0806AD9C setPKMData: 08070266 Inheritance- bugged to not prevent inheriting the same IV multiple times Bond697 08070218 Inheritance check- make sure the same IV isn't inherited multiple times- bugged due to the wrong argument being passed to it Bond697 ROM:0806DCB4 @ void __fastcall pokerusHandler(void *pPartyBlock) ROM:0806DEC4 pokerusSpread: fun fact: in gen 3, eggs cannot be infected with pokerus. they can still get it, however, by having it spread to them by another party member. |
pokemon emerald compressed images, raw data, and palletes
2 Attachment(s)
Hi. I've been working on a list of pokemon emerald compressed data using Nintenlord's GBA Graphics Editor.I did't notice the comressed pallete option on the pallete window until I started the items, so I have yet to do any of them before the items.I just completed the compressed data.Attachments follow.
|
oh crap! I'm so sorry for forgetting this! I would definitely love to have you guys still help me :3
I'll get immediately onto updating the OP! |
| All times are GMT -8. The time now is 8:40 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.