Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
SBird, I heard about your method. I saw that Emerald had a malloc system as well. I didn't have the proper tools to look further into it however (I'm not too sure on how to add ASM code yet, and I can't find HackMew's compiler anywhere). It's cool that you looked into it. So, it is possible to extend it, but way more complex than Fire Red's process?
Tlachi, could you share your code that puts the Physical/Special/Status symbols on the summary and move learning screens? (Also, the small glimpses of your ROM that you're leaking through your sig look amazing. Great work!)
I'll be happy to, once I'm totally satisfied with how it works anyways. Right now it's appearing about 1-2 frames too early, which I know sounds unimportant but it's one of those things you can't un-see once you notice it. I'm still working on that at the moment.
As far as GBA hacking is concerned, it actually kinda is. ASM (assembly language) is as close to the actual machine code as you can get, and is the basis for just about everything that happens while a ROM operates.
So. Is ASM is really handy? Why when I asking a lot of times do not get POINTER ADRESS for Pokemon Ruby Cries Table? I start do my own researches avoiding ASM by this fact. NO ONE GIVE ME THAT DAMIT POINTER WHICH I NEED. Only telling that ASM is EASY TO LEARN. Lying! Is not easy. When it was easy I've do not must found method which avoid ASM code.
So. Is ASM is really handy? Why when I asking a lot of times do not get POINTER ADRESS for Pokemon Ruby Cries Table? I start do my own researches avoiding ASM by this fact. NO ONE GIVE ME THAT DAMIT POINTER WHICH I NEED. Only telling that ASM is EASY TO LEARN. Lying! Is not easy. When it was easy I've do not must found method which avoid ASM code.
No offense, but what you are speaking is not even english, and that comes from a person who is not even a native lol...
However, I do not want to discuss this any further, if you want to use your method go ahead.
@LCCoolJ95: Yeah, you pretty much nailed it.
Oh my, that's incredible! You know, I always thought that it was. I'm not going to bug you over and over again about it because I don't want you to feel pressured on doing it. Take your time with it, I feel that waiting for expanding the amount of Pokémon in a game that I always hack is so worth it. Just one thing:
I looked at the tutorial on how to expand it in Fire Red, and it states that a patch called "JPAN's save block hack." Emerald doesn't have a patch like that, so how did you look into it?
Emerald uses more memory then Firered, which means that JPAN's save block hack wouldn't work normally. You'd have to port it and make it suitable to Emerald.
Also: I think I kind of did it for Emerald, however, I'm a german hacker and it was a pain in the ass to do this, therefore I won't port it to an english version because I'm sorry to say but I won't ever take advantage of it. You can have my notes on the german version, it's a bit cramped, but maybe you'll get the hang of how it is supposed to work:
Spoiler:
Expanding the Pokédex (Pokémon Emerald D / BPED)
1) Insert expanded save hack
2) Repoint RAM stuff:
03005d90 - Pointer to PLAYER_DATA containing name and some other information. (Beginning with the player's name)
Dex entries begin at PLAYER_DATA + 0x28 (National Dex Caught)
Plan: Make the Pokédex Data static:
2a)
Routines loading the Pokédex Caught Flags: 0x080c04c8 (Change to 0x11 0x48)
Routines loading the Pokédex Seen Flags: 0x080c0476
2b) Eliminate adds coming from DMA 0x080c04ca(3 OP Codes) / 0x080c0478(3 OP Codes)
2c) Change 0x080c04dc to 0x15 0xE0 (branch OP Code)
2d) Change 0x080c04ec to 0x0D 0xE0 and 0x080c048a to 0x3e 0xe0
2e)
Routines Writing the Pokédex Caught Flags: 0x080c05a4 (Change to 0x05 0x49)
Routines writing the Pokédex Seen Flags: 0x080c0568 (Change to 0x0a 0x49)
2f) Eliminate the adds coming from DMA 0x080c56a(2 OP Codes) / 0x080c05a6 (2 OP Codes)
2g) Change 0x080C0578 to 0x1C 0xE0
3) Repoint ROM stuff
3a)
-Name Table
-Stats Table
-Learnable Moves Table
-Front Sprites
-Back Sprites
-PKMN Animations (aka "real front sprites")
-National order
3b) Change 0x6B948 to 0x0000 0x0000 0x0000 (Name limitting)
3c) Change
0x080346DA to 0x07 0xE0 //
0x08034ac6 to 0x07 0xE0 //
0x08034a1a to 0x07 0xE0 //
0x08034b36 to 0x07 0xE0 //
0x08034c02 to 0x07 0xE0 //
0x0806e754 to 0x04 0xE0 (Palette Limit)
0x0806A102 to 0x0b 0xE0 (Animation Limit)
0x080a600A to 0x03 0xE0 (Altitude Limit)
0x080a5f9e to 0x03 0xE0 (Y Limit)
0x0802DC20 to 0x00 0x00 (Y Limit?) //Some of those ? Y Limits are probably obsolete, anyways it can't hurt...
0x08039A12 to 0x03 0xE0 (Y Limit?)
0x080A5ED2 to 0x03 0xE0 (Y Limit?)
0x080A8872 to 0x03 0xE0 (Y Limit?)
0x080A8796 to 0x03 0xE0 (Y Limit?)
0x080a86ce to 0x00 0x00 (Y Limit?)
0x080D2a96 to 0x01 0xE0 (Icon Limit)
0x080D297C to 0x0000 0x0000 (Icon Palette Limit)
0x080D2B18 (Watch for eventual limiter)
From 0xBB6DC to 0xC21AC: Add 0x700 to all 0x000006XX entries to relocate the global variables.
0x080BB6DC: Change to 0x00 0x20 for more memory
0x0806D430: Change to 0x00 0x00 (Dex Limit)
0x080BC94A: Change to 0x5D 21 0xC9 0x00
Replace 0x00000181 with 0x000002E7 in the first rom area (29 occurances)
Replace 0x0000019B with 0x0000030D in the first rom area (10 occurances)
@0x080BB45C: Manual calculus of offset (0x62E) -> 12 01
@0x080BD8AC: Manual calculus of offset (0x62E) -> 09 01
@0x080bd57C: Manual calculus of offset (0x62E) -> 12 01
@0x080bd4e0: Manual calculus of offset (0x62E) -> 09 01
@0x080BD5e8: Manual calculus of offset (0x630) -> 2D 01
@0x080BD0B2: Manual calculus of offset (0x630) -> 12 01
@0x080bd5ae: Manual calculus of offset (0x630) -> 1B 01
@0x080bcfce: Manual calculus of offset (0x630) -> 09 01
@0x080BCFEA: Manual calculus of offset (0x630) -> 09 01 //1
@0x080bd00C: Manual calculus of offset (0x630) -> 1B 01
@0x080bd02e: Manual calculus of offset (0x630) -> 12 01
@0x080bd04a: Manual calculus of offset (0x630) -> 12 01
@0x080bb486: Manual calculus of offset (0x630) -> 12 01
@0x080bd3e8: Manual calculus of offset (0x630) -> 12 01
@0x080bd856: Manual calculus of offset (0x638) -> 09 01
@0x080bd874: Manual calculus of offset (0x638) -> 1B 01
The last part is all memory, global vars and stuff like that, you'll just have to deal with it I guess...
Well, I've thought about it for a little while now, and I've decided to do one thing...I'm going to take what SBird has found about expanding the amount of Pokémon and Pokédex entries in a german Emerald ROM, and port it to an English Emerald ROM. Emerald is my favorite game to hack, and I would love to see what has happened in Fire Red be incorporated in Emerald. Will it be hard? Of course, but I'm very patient. I also hope anyone wanting this will be as well.
I think I've finally worked the bugs out of Protean, and I'm 96% sure it'll work with no problem now. As promised here's the (Emerald BPEE) ASM for it, so hold on to your butts:
Now actually implementing it is the tricky part, it won't be a simple copy/paste job; you'll need some insight on what the battle scripts for different moves are actually doing to decide the appropriate place(s) to put ability checks. For any move you want to be affected by Protean you'll need to add a check for it somewhere in the battle script before calculatedamage. In order for a notification string to print out correctly callasm must be before printstring 0x49, and the printstring must be before attackcanceller. You should add a check to see if the user's ability is Protean, if so execute the ASM and optionally print a message if the type is changed, then jump back to the right point in the script. A potential script segment would look something like:
Note 1: You'll either need to define ABILITY_PROTEAN in BSP's abilities.bsh, or just use the hex for the ability here instead.
Note 2: A goto jump to an address somewhere in the area of 0x082D8A26 usually signifies the end of a moves' unique scripting, as that jumps to a segment of script shared by nearly all damaging moves. In damaging moves I'd suggest putting the check for Protean before that jump. In status moves the jump may be different.
Note 3: The ASM for Protean does the following: gets the type of the move being used, checks it against the user's type(s), and if necessary changes type to match the move. If there is a type change it will always result in a monotype, if one is not needed though the Poke can retain a dual typing. If a type change is done the byte at 0x02024200 is set to a non-zero garbage byte (in this case 0x6A). This can be used to decide whether or not to display a message, and should be reset to 0x0 somewhere in the battle script.
Note 4: String 0x49 is "[User] transformed into the [Type] type!". This is the string used in Gen 6 games.
As a demo, here's the script I used while testing it. It changes Psybeam, Feint Attack, and Slash (all moves known by the Kecleon I was testing with). After compiling the test script change Psybeam's move effect (effect 76) pointer to match @Psybeam, and change Slash and Feint Attack (effects 43 and 17) to both match @Slash. You'll also need Jambo's callasm for BSP and to define Protean in abilities.bsh.
Even though it seems complicated and may not be the most concise or elegant way to add Protean, it does indeed work. The only known issue is that when using Hidden Power it will change to Normal instead of the hidden type, but honestly it seems like a small issue and writing more asm to fix that is fairly low on my priority list.
One thing I feel that makes Ruby/Sapphire feel more "old" compared to FR/LG and Emerald is due to the way Ruby/Sapphire handles menu boxes.
In the Japanese Ruby/Sapphire, the menu box choice indicator was a black arrow, just like in FR/LG and Emerald. But in localized releases of Ruby/Sapphire, they changed the black arrow to a red box, which later came to bug me after FR/LG and Emerald. FR/LG and Emerald retained the black arrow from their respective Japanese versions, and simply got around any space problems by using one of the smaller fonts, such as the one used in the Pokémon's HP boxes in-battle. (The Japanese FR/LG and Emerald doesn't HP box font in those places, it was a localization change to make the names fit).
In the past few days, I have been working on a side project to make Ruby feel a bit less dated. Here is what I've done. On the left is vanilla Ruby, on the right is my modifications:
This wasn't a simple graphics change. For the START menu alone, what I had to do was:
1) insert Emerald's black arrow selector in some free space in a Ruby ROM
2) repoint one of the red box pointers to the black arrow
3) change a RAM pointer to a ROM offset in order to get the black arrow's palette to load correctly
4) extend the width of the START menu
5) reposition the text
(unrelated but I also took the screenshots on the right using an old font patch of mine that changes Ruby's font to Emerald)
Changing the graphics alone won't magically update all of your menu boxes, as the black arrow would overlap the text. What you have to do for every single menu box is to extend the width and reposition the text.
Here are my horribly disorganized notes that I've taken during this process. Please be aware that these notes are incomplete, as there a few more menu boxes that I haven't found the positioning for.
Spoiler:
---START menu info---
08071108 - START menu routine possibly starts here
08376D04 - unknown table right before START menu stuff
08376D24 -42C472- POKéDEX text pointer
08376D28 -071419- POKéDEX function pointer (+1)
same format as FireRed START menu table
08071128 - Y position of START menu text
0807113C - X position of START menu text
0807115E - pointers, etc. (right after a branch, so it's not part of routine)
080711C8 - left width of START menu
080711CA - height of START menu
080711CC - right width of START menu
0807120E - X position of red selector thing (relative)
08071210 - Y position of red selector thing (relative)
---red box info---
0842D51C - red box selector thing
(there's a whole bunch of them starting here)
0842F140 - the table that controls these boxes?
08072D2C - color slot of red color
08072D3C - palette offset of red box selector
08072D40 - possible related routine?
08072DAC - X position of red selector thing
0842F240 - palette pointer for the red box thing
---red box info, PC related---
080B5760 - width of PC menu box
080B5776 - left width of PC menu box (after entering Hall of Fame)
080B5778 - top height of PC menu box (after entering Hall of Fame)
080B577A - bottom height of PC menu box (after entering Hall of Fame)
080B5782 - X position of "HALL OF FAME"
080B5784 - Y position of "HALL OF FAME"
080B578C - X position of "LOG OFF" (after you meet Lanette)
080B578E - Y position of "LOG OFF" (after you meet Lanette)
080B57A4 - how many selections in the PC box there are before you meet Lanette
080B57AC - left width of PC menu box (before you meet Lanette)
080B57AE - top height of PC menu box (before you meet Lanette)
080B57B0 - bottom height of PC menu box (before you meet Lanette)
080B57B8 - X position of "LOG OFF" (before you meet Lanette)
080B57BA - Y position of "LOG OFF" (before you meet Lanette)
080B57D0 - X position of "LANETTE's PC"
080B57D2 - Y position of "LANETTE'S PC"
080B57EA - X position of "SOMEONE'S PC"
080B57EC - Y position of "SOMEONE's PC"
080B57F4 - X position of "[name]'S PC"
080B57F6 - Y position of "[name]'S PC"
080B580A - X position of cursor
080B580A - Y position of cursor
3B600C = 410B46 = WITHDRAW POKéMON
3B6014 = 410B57 = DEPOSIT POKéMON
08096172 - left width of LANETTE'S PC menu
08096174 - top height of LANETTE'S PC menu
08096176 - width of LANETTE'S PC menu
08096178 - height of LANETTE'S PC menu
08096180 - X position of everything in LANETTE'S PC menu
08096182 - Y position of everything in LANETTE'S PC menu
08096184 - how many selections in LATE'S PC menu
08096192 - X position of cursor in LANETTE'S PC menu
08096194 - Y position of cursor in LANETTE'S PC menu
08096196 - how many selections in LANETTE'S PC menu
08095FD0 - how many horizontal tiles get cleared when leaving LANETTE'S PC menu
08095FD2 - how many vertical tiles get cleared when leaving LANETTE'S PC menu
0809CE9E - controls height of "WITHDRAW/SUMMARY/MARK/RELEASE" menu
0809CEB4 - controls left width of "WITHDRAW/SUMMARY/MARK/RELEASE" menu
0809CEC4 - controls right width of "WITHDRAW/SUMMARY/MARK/RELEASE" menu
0809CEC6 - controls height of "WITHDRAW/SUMMARY/MARK/RELEASE" menu
0809CECE - X position of "WITHDRAW/SUMMARY/MARK/RELEASE"
0809CED6 - Y position of "WITHDRAW/SUMMARY/MARK/RELEASE"
---INTRO---
0800B736 - ASM X position of "BOY/GIRL" text
0800B790 - width of name "NEW NAME/LANDON/TERRY" menu
0800B7A2 lsl r0, r5, #0x18
0807294A ldr r3, [$08072970] (=$08376D74)
08072970 (pointer related to YES/NO menu)
080B57CE ldr r0, [$080B57E4] (=$08410760) //this loads the "LANETTE'S PC text"
0809CE0C ldr r2, [$0809CE44] (=$083BBCA0) //this loads the "WITHDRAW/SUMMARY/MARK/RELEASE" etc. text in the PC
0800B734 ldr r3, [$0800B75C] (=$081E79B0) //this loads the "BOY/GIRL" text during intro
---MAKE THESE CHANGES---
0842F240 - B2 66 1E 08 //palette pointer
080711C8 - 15 //left width of START menu
0807120E - 16 //relative X position of selector
08072DAC - 90 //X position of selector
080B57D0 - 02 //moves "LANETTE'S PC" text one tile to the right
080B57F4 - 02 //moves "[name]'S PC" text one tile to the right
080B5782 - 02 //moves "HALL OF FAME" text one tile to the right
080B578C - 02 //moves "LOG OFF" text one tile to the right
080B5760 - 09 //extends width of PC menu box by one tile
080B57B8 - 02 //moves "LOG OFF" text one tile to the right (before you meet Lanette menu variation)
080B57EA - 02 //moves "SOMEONE's PC" text one tile to the right
08096176 - 0E //extends width of PC menu box by one tile
08096180 - 02 //MOVES "WITHDRAW POKéMON, DEPOSIT POKéMON," etc., one tile to the right
08095FD0 - 0E //extends width of what gets cleared in VRAM when leaving previous menu
0809CEB4 - 1A //extends width of "WITHDRAW/SUMMARY/MARK/RELEASE" menu
0809CECE - 02 //moves "WITHDRAW/SUMMARY/MARK/RELEASE" text one tile to the right
0800B736 - 68 //moves "BOY/GIRL" text one tile to the right
0800B7A2 - 04 20 00 00 //fixes positioning of male player name choices
0800B7C2 - 04 20 00 00 //fixes positioning of female player name choices
0807294C - 60 //fixes positioning of some YES/NO menus
I apologize for how horribly disorganized these notes are. Once I find all of the positioning stuff for every menu box, then I will explain these in detail and make a tutorial/patch or something.
Again, these notes are incomplete, and I'm only posting them so you guys can experiment. There are still many menu box position stuff that I have yet to find, such as in-battle move selection, the party screen, etc. By changing the red box to an arrow, it doesn't automatically fix all the menus, you have to reposition the text in every single menu box AND extend the width of almost every single menu box in order to get this to work.
EDIT: On Ruby, the bytes at 0802E16E and 0802E174 controls the positioning of the attack names during battle. I moved them one tile to the right to make room for my black arrow hack, and it still works fine. I even tested with attacks that have the max character limit and the black arrow doesn't overlap! This screenshot is proof that FR/LG and Emerald using a smaller font for attack selection is redundant. I actually think it looks a lot better with the main font.
I've probably posted this elsewhere, but still.....
(refer to Chaos Rush's thread for the backgrounds)
To do a Attack Background, use 14 XX 17 (XX refers to a Background)
To do an Animated BG use 14 XX 17 03 59 3A 0E 08 05 04 00 FY 00 ZZ 00 00 00 FF FF
XX referring to a background, Y referring to the speed of the horizontal scrolling and ZZ referring to the speed of the vertical scrolling.
To clear such BGs, put 0E F3 61 1D 08 before the 08 at the end.
To color a background(e.g. Giga Drain) use 02 C4 B3 3D 08 02 05 01 00 XX 00 00 00 II 00 CC CC 05
To clear the color use 02 C4 B3 3D 08 02 05 01 00 SS 00 YY 00 00 00 CC CC 05 0B 03 0D
In this case SS referring to the speed of the transition, II the intensity of the color (0C for Giga Drain, 10 completely replaces the background with that color) and CC referring to the color.
Hope this helps with creating new animations for Pokémon Ruby.
Also I've found the Attack BG table, but there seems to be limiter bytes that stop me from adding more than 0x1A or 26 Backgrounds.... There also seems to be a limiter byte preventing Pokémon Ruby from loading more than 413 Pokémon, can anyone figure out where is it?
Edit: The Psychic BG command is 0E E7 61 1D 08. I'm also making a list of particle pointers (e.g. the rotating fire before Dragon Claw) for Ruby, once I'm done will post them.
I'm happy to say I can finally contribute something to Emerald hacking!
The battle background table starts at 0x525D54 and ends at 0x525E97, and the structure is the same as FireRed's.
Also, here are some of my notes on Emerald animations: (although I think people might already know this)
To do a scrolling background: 14 WW 17 03 61 76 11 08 05 04 00 XX 00 YY 00 00 FF FF
WW refers to the image of the background, XX and YY refer to the speed of the horizontal and vertical scrolling respectively.
To display a background: 14 WW 17
To clear a background: 0E DD 7C 2D 08
If I find any more commands, I will update this post.
Some of you may have noticed that in all of my Ruby-hacking related stuff, it has a hacked font. Some time ago I made a patch to change Ruby's font to Emerald, but I have yet to release it. Yesterday I finally found where Ruby's font width table is and finally perfected the patch, so here it is.
This patch is for Ruby. It does this:
*Changes the font to the one used in Emerald
*Changes the font width table to be identical to Emerald
*Changes the byte at 0x08056D62 to 0xE0 to enable Palette 12 to be used in tilesets (credit to colcolstyles)
The attack BG table appears to be at 0x37F374 and ends at 0x37F4AB, but as I mentioned above, there appears to be a limiter byte that prevents loading more than 0x1A backgrounds. For example, using the Waterfall BG, if I use it to overwrite BG 0x1 (the extra Dark-type BG) I can load it. However, if I place its Image/Tileset/Pallette pointers at the end it doesn't work and gives me a messed up screen..... Edit: Forgot to mention, this is for Ruby.
This is not really a contribution to Ruby & Emerald hacking per se, but rather a contribution to hacking in general. I used Gen 4 fire sprites and modified them to be used in GBA. It's in the attachment.
LCCoolJ95, could you pleaseprovide me with the patch for your Light Platinum fixes? I'm playing Light Platinum, and would really love not hearing Unown's cry every time I send out my Empoleon.... Also, do y'all still remember MrDollSteak's tutorial on adding new particles into FireRed? I have the table offsets for R/S/E handy here, but I can't seem to find the loader pointers he had at 728B7. For Ruby, while I think those are at 374B20 (since 369A48 roughly points to the same bytes as 399388), but I'm not sure. Can someone check this out? The table offsets (ifI find the loader pointers I'll post them): Ruby : 37E164 Sapphire : 37E0F4 Emerald : 524B44 Also, I've been trying to add new Pokémon to Ruby. However, I can't seem to find the limiter Chaos Rush/Jambo51 disabled to get the Pokémon working. If anyone knows this limiter,can they post it or PM it to me? Thanks.(And screw Pokédex expansion for now)
Also, I've been trying to add new Pokémon to Ruby. However, I can't seem to find the limiter Chaos Rush/Jambo51 disabled to get the Pokémon working. If anyone knows this limiter, can they post it or PM it to me? Thanks.(And screw Pokédex expansion for now)
But don't change all of them, as the ones I've labeled are the ones I know for sure. The ones that are marked with [x] means it is confirmed that you have to change that limiter to get something working. The ones that are [ ] means it could possibly be a limiter, but I don't know what it does.
I guess I'll throw in my two cents on the topic. As much as I love Ruby as a game, it's codebase is absolutely horrible. Now, we all know that GameFreak programmed these games in C, so this is in no way their fault but in fact a slight defect from using some of the first compilers released by Nintendo when the GBA was released. So is it workable? Maybe. There are still a few actual elements of the engine that are a bit of a mess so I will personally continue to use only Fire Red and Emerald.
As for Emerald, it is ridiculously easy to port ASM from Emerald to Fire Red and vice versa. I've done this countless times and only failed once. Heck, I ported an entire intro to Emerald once, and the Ruins of Alph. My point being, that in terms of Emerald support I am 100% in. It's a great engine and it's literally loaded with features. No issues there.
For those curious on how to find pieces of code between engines, I will say this (and you might think it to be a bit obvious, but it isn't always): Copy 1 or 2 lines of bytes from the Fire Red pointer, and then search for that in Emerald. This almost always works, unless the function has been optimised so that the bytes aren't identical anymore, in which case you can continue searching for parts of it. Also, if you're searching for parts of a function, it is best to leave out BL bytes as those are always different between games.