The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Research & Development
Reload this Page Research Exploring Ruby and Emerald

Notices
For all updates, view the main page.

Binary Hack Research & Development Got a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Ad Content
Reply
 
Thread Tools
  #101   Link to this post, but load the entire thread.  
Old September 5th, 2014 (7:55 PM).
Artemis64 Artemis64 is offline
 
Join Date: Mar 2014
Location: Singapore
Gender: Male
Nature: Hasty
Posts: 89
Please use more diplomatic language in the future. However, I agree that the type table is corrupted, but I copied the old type table over from a backup, and it works like a charm. Despite that, the battle system seems to work perfectly.
More importantly, there seems to be an error with the animation system in my game. I suspect it has something to do with the mass decapitalisation of Anti-Exploud, because it was already present before applying the Physical/Special split, Fairy-type and Pokédex Expansion. That said, I won't rule out one of those as a potential cause.
The glitch happens when Pokémon are switched out, then Peck is used. The Pokémon does not have to be specific. Then, the Pokémon that used Peck will start stretching on horizontally.
Here is a GIF (I changed the animation to that of Peck's):

Sorry about the quality, I had to shrink it so it could be uploaded.
However, this glitch, while minor, seems to be related to another similar bug in which, if a Pokémon uses any move that includes the Pokémon sprite moving forward, the sprite expands a few times, but is cut off beyond its 64x64 size. Entering the Bag and exiting seems to clear the issue.
Can someone help me research into this? I'm not good at ASM...
Reply With Quote
  #102   Link to this post, but load the entire thread.  
Old September 5th, 2014 (9:39 PM).
Le pug's Avatar
Le pug Le pug is offline
Creator of Pokémon: Discovery / Fat Kid
 
Join Date: Aug 2013
Location: Le bed
Age: 30
Gender: Male
Nature: Bold
Posts: 870
Quote:
Originally Posted by Artemis64 View Post
Please use more diplomatic language in the future. However, I agree that the type table is corrupted, but I copied the old type table over from a backup, and it works like a charm. Despite that, the battle system seems to work perfectly.
More importantly, there seems to be an error with the animation system in my game. I suspect it has something to do with the mass decapitalisation of Anti-Exploud, because it was already present before applying the Physical/Special split, Fairy-type and Pokédex Expansion. That said, I won't rule out one of those as a potential cause.
The glitch happens when Pokémon are switched out, then Peck is used. The Pokémon does not have to be specific. Then, the Pokémon that used Peck will start stretching on horizontally.
Here is a GIF (I changed the animation to that of Peck's):

Sorry about the quality, I had to shrink it so it could be uploaded.
However, this glitch, while minor, seems to be related to another similar bug in which, if a Pokémon uses any move that includes the Pokémon sprite moving forward, the sprite expands a few times, but is cut off beyond its 64x64 size. Entering the Bag and exiting seems to clear the issue.
Can someone help me research into this? I'm not good at ASM...
Not only that ...
"I also changed the type picture sprite as well."

I applied this patch to an untouched rom and it doesn't update the type picture at all lol. This patch needs all sorts of lovin' or at least, he needs to rewrite what features are apart of it until he fixes it.
__________________
Retired. Thank you guys for a wonderful five years.
Reply With Quote
  #103   Link to this post, but load the entire thread.  
Old September 7th, 2014 (12:27 AM).
Artemis64 Artemis64 is offline
 
Join Date: Mar 2014
Location: Singapore
Gender: Male
Nature: Hasty
Posts: 89
I think you must have used an older version. Either that, or Advance Map may have repointed a map or Tileset and overwritten a part of the patch.
Examples:


By the way, I've been working on an Emerald remake/expansion, and it seems that either there is something wrong with my Map editor, or it's an inherent bug in the game-Route 111 reverts to the original tile map after a battle or exiting a house on Route 111. Going into the PokéCenter and exiting seems to fix it.
Reply With Quote
  #104   Link to this post, but load the entire thread.  
Old September 9th, 2014 (4:01 PM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Had this in my notes and forgot about it :\
At offset 0x329D48 in Emerald is Deoxys Speed forme stats in the usual HP/ATK/DEF/SPD/SPATK/SPDEF format.
Editing HP here doesn't seem to affect anything, but editing its Normal forme stats in G3HS/YAPE allows it to change.
Reply With Quote
  #105   Link to this post, but load the entire thread.  
Old September 13th, 2014 (9:17 AM).
Subin Lee Subin Lee is offline
 
Join Date: Sep 2014
Posts: 1
good work! ruby was my favorite game
Reply With Quote
  #106   Link to this post, but load the entire thread.  
Old September 27th, 2014 (3:46 PM).
Danny0317's Avatar
Danny0317 Danny0317 is offline
Fluorite's back, brah
 
Join Date: Jun 2013
Age: 23
Gender: Male
Nature: Hasty
Posts: 1,067
Okay guys, does anyone know the proper way of using hidebox2 in emerald? It seems like a fairly useful command, I got it to do this once:


but that ended up hiding the msgbox as well.
__________________
Reply With Quote
  #107   Link to this post, but load the entire thread.  
Old September 29th, 2014 (9:24 AM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by Dark Sneasel View Post
Okay guys, does anyone know the proper way of using hidebox2 in emerald? It seems like a fairly useful command, I got it to do this once:


but that ended up hiding the msgbox as well.
It probably won't work, but try using it with a signpost event types?
In the Emerald script dump I have, all instances of hidebox2 come under signpost events.

Click here to get Emerald script dump
Reply With Quote
  #108   Link to this post, but load the entire thread.  
Old October 12th, 2014 (1:19 AM).
Artemis64 Artemis64 is offline
 
Join Date: Mar 2014
Location: Singapore
Gender: Male
Nature: Hasty
Posts: 89
What is the table in Emerald that is used to decide how the frames are flopped between each other? I changed Pidgey's sprite to the HGSS one so I want to change the rapid Frame 0/Frame 1 alternation of default Pidgey
Reply With Quote
  #109   Link to this post, but load the entire thread.  
Old October 12th, 2014 (9:38 PM).
Artemis64 Artemis64 is offline
 
Join Date: Mar 2014
Location: Singapore
Gender: Male
Nature: Hasty
Posts: 89
By the way, the offset for the move effects table is 0x2D86A8. Just plug this in instead of 0x1D65A8 in Itman's Creating new Move Effects tutorial. And Shiny Quagsire or maybe Chaos Rush, could you please post the offset of the table that decides how Pokemon's frames are interchanged in Emerald?
Reply With Quote
  #110   Link to this post, but load the entire thread.  
Old October 15th, 2014 (1:49 AM).
AtecainCorp.'s Avatar
AtecainCorp. AtecainCorp. is offline
Rejishan awake...
 
Join Date: Jun 2008
Location: Takoabe Town (Region Thonsu)
Age: 30
Gender: Male
Nature: Hardy
Posts: 1,354
Someone can help me with my problem? I have strange failure with Type Chart. I remade ??? To Fairy. And I have some trouble with it becouse when I use Fairy Type Move it allways afect as 1 point of damage <Even when supereffective> Someone know how to fix it?
__________________
- My new Project comming Soon
Reply With Quote
  #111   Link to this post, but load the entire thread.  
Old October 15th, 2014 (4:34 AM).
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Posts: 736
Quote:
Originally Posted by Ksiazek Bartlomiej View Post
Someone can help me with my problem? I have strange failure with Type Chart. I remade ??? To Fairy. And I have some trouble with it becouse when I use Fairy Type Move it allways afect as 1 point of damage <Even when supereffective> Someone know how to fix it?
That's because the ASM code behind the damage calculator doesn't know whether to categorise moves of that type as physical or special, and so does neither - simply returning 1 as the final damage.

It's fairly easy to fix with a little ASM knowledge, but fundamentally the change you're making is a hex edit.

I can't tell you where the byte(s) you'd need to change are as I never hacked Ruby or Emerald, so you'll need to find someone who either knows where the byte(s) are, or find them yourself using ASM research techniques.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!
Reply With Quote
  #112   Link to this post, but load the entire thread.  
Old October 15th, 2014 (5:56 PM). Edited October 16th, 2014 by Xencleamas.
Xencleamas's Avatar
Xencleamas Xencleamas is offline
Suddenly lurking in the shadows...
 
Join Date: Feb 2014
Gender: Male
Nature: Adamant
Posts: 456
Quote:
Originally Posted by HidoranBlaze View Post
So since this is the "Exploring R/S/E" thread, I think this might be a good place to re-post my reply to Artemis64 in the battle backgrounds tutorial. Hopefully someone can make heads and tails of what I've looked into. (I can't really hack as of now)
This is already posted in Inserting Battle Backgrounds thread but I decided to post it in this thread as well.

Emerald Battle Backgrounds
Alright! This is the Battle Backgrounds table for Emerald. The table has the same concept for each background as FireRed has. I dunno if anyone already posted this kind of research but let's just say that I made fine research. LOL Having this format of having five pointers for each background:

Code:
VV VV VV 08  WW WW WW 08  XX XX XX 08  YY YY YY 08  ZZ ZZ ZZ 08
 
VV = Image Offset
WW = TileMap Offset
XX = Entry Image 
(Ex. The Grass that moves in front of the screen at the beginning of a grass battle.)
YY = Entry Image Tilemap
ZZ = Palette
The difference between FireRed and Emerald is that the Emerald's table only covers 10 backgrounds which are in this list:
  • Grass 1 (Normal Grass)
  • Grass 2 (Tall Grass)
  • Sand
  • Dive
  • Sea
  • Pond
  • Craggy
  • Cave
  • Trainer Battles (Indoor)
  • Trainer Battles (Outdoor) "can be called as the outdoor FIELD"

The table begins at 31ABA8 and ends at 31AC6F. The table hasn't the background for Gym Leader battles, Hideout battles, Pokemon League battles, Battle Frontier battles (doesn't count the Smeargle cave underneath Battle Frontier), and the backgrounds for the Weather Trio battles isn't in the table too. I'm pretty sure that the table is somewhere else but they are located separatedly. Here is the documentation of each background and their offsets and pointers in the original table:

Code:
- Grass 1 (Normal Grass)
--- D77D68 (image) - pointer 68 7D D7 08 at 31ABA8
--- D75008 (image tilemap) - pointer 08 50 D7 08 at 31ABAC
--- D7E280 (entry image) - pointer 80 E2 D7 08 at 31ABB0
--- D7E808 (entry image tilemap) - pointer 08 E8 D7 08 at 31ABB4
--- D78318 (image palette) - pointer 18 83 D7 08 at 31ABB8

- Grass 2 (Tall Grass)
--- D78600 (image) - pointer 00 86 D7 08 at 31ABBC
--- D78CB8 (image tilemap) - pointer B8 8C D7 08 at 31ABC0
--- D7E9C4 (entry image) - pointer C4 E9 D7 08 at 31ABC4
--- D7F0D4 (entry image tilemap) - pointer D4 F0 D7 08 at 31ABC8
--- D78C78 (image palette) - pointer 78 8C D7 08 at 31ABCC

- Sand
--- D78F68 (image) - pointer 68 8F D7 08 at 31ABD0
--- D795A8 (image tilemap) - pointer A8 95 D7 08 at 31ABD4
--- D7F3C0 (entry image) - pointer C0 F3 D7 08 at 31ABD8
--- D7F850 (entry image tilemap) - pointer 50 F8 D7 08 at 31ABDC
--- D79560 (image palette) - pointer 60 95 D7 08 at 31ABE0

- Dive
--- D79858 (image) - pointer 58 98 D7 08 at 31ABE4
--- D79E58 (image tilemap) - pointer 58 9E D7 08 at 31ABE8
--- D7F9F8 (entry image) - pointer F8 F9 D7 08 at 31ABEC
--- D7FEC4 (entry image tilemap) - pointer C4 FE D7 08 at 31ABF0
--- D79E10 (image palette) - pointer 10 9E D7 08 at 31ABF4

- Sea
--- D7A108 (image) - pointer 08 A1 D7 08 at 31ABF8
--- D7A720 (image tilemap) - pointer 20 A7 D7 08 at 31ABFC
--- D80054 (entry image) - pointer 54 00 D8 08 at 31AC00
--- D80660 (entry image tilemap) - pointer 60 06 D8 08 at 31AC04
--- D7A6DC (image palette) - pointer DC A6 D7 08 at 31AC08

- Pond
--- D7A9D0 (image) - pointer D0 A9 D7 08 at 31AC0C
--- D7AFB8 (image tilemap) - pointer B8 AF D7 08 at 31AC10
--- D80804 (entry image) - pointer 04 08 D8 08 at 31AC14
--- D80D50 (entry image tilemap) - pointer 50 0D D8 08 at 31AC18
--- D7AF78 (image palette) - pointer 78 AF D7 08 at 31AC1C

- Craggy
--- D7B268 (image) - pointer 68 B2 D7 08 at 31AC20
--- D7B864 (image tilemap) - pointer 64 B8 D7 08 at 31AC24
--- D80E9C (entry image) - pointer 9C 0E D8 08 at 31AC28
--- D8147C (entry image tilemap) - pointer 7C 14 D8 08 at 31AC2C
--- D7B828 (image palette) - pointer 28 B8 D7 08 at 31AC30

- Cave
--- D7BB14 (image) - pointer 14 BB D7 08 at 31AC34
--- D7C154 (image tilemap) - pointer 54 C1 D7 08 at 31AC38
--- D81610 (entry image) - pointer 10 16 D8 08 at 31AC3C
--- D81E2C (entry image tilemap) - pointer 2C 1E D8 08 at 31AC40
--- D7C10C (image palette) - pointer 0C C1 D7 08 at 31AC44

- Trainer Battles (Indoor)
--- D7C440 (image) - pointer 40 C4 D7 08 at 31AC48
--- D7CA28 (image tilemap) - pointer 28 CA D7 08 at 31AC4C
--- D820D4 (entry image) - pointer D4 20 D8 08 at 31AC50
--- D824E4 (entry image tilemap) - pointer E4 24 D8 08 at 31AC54
--- D7DEB4 (image palette) - pointer B4 DE D7 08 at 31AC58
* Noted that the Trainer Battles for Indoor and Outdoor are sharing the same except for the image palette. Trainer Battles for Indoors contains white-ish and dark-brown-ish palette while Trainer Battles for Outdoors contains yellow-green-ish and light-brown-ish palette.

- Trainer Battles (Outdoor) "almost going to be called as the outdoor field"
--- D7C440 (image) - pointer 40 C4 D7 08 at 31AC5C
--- D7CA28 (image tilemap) - pointer 28 CA D7 08 at 31AC60
--- D820D4 (entry image) - pointer D4 20 D8 08 at 31AC64
--- D824E4 (entry image tilemap) - pointer E4 24 D8 08 at 31AC68
--- D7C404 (image palette) - pointer 04 C4 D7 08 at 31AC6C
* Noted that the Trainer Battles for Indoor and Outdoor are sharing the same except for the image palette. Trainer Battles for Indoors contains white-ish and dark-brown-ish palette while Trainer Battles for Outdoors contains yellow-green-ish and light-brown-ish palette.
For Gym Leader and Battle Frontier battles, they have separated backgrounds. Now, here is the documentation on other special backgrounds and I just give the location of their pointers:

Code:
BATTLE FRONTIER image pointer @ 03579C
BATTLE FRONTIER image tilemap pointer @ 0357A4
BATTLE FRONTIER image palette pointer @ 0357AC

GROUDON image pointer @ 0357D0
GROUDON image tilemap pointer @ 0357D8
GROUDON image palette pointer @ 0357E0

KYOGRE image pointer @ 035804
KYOGRE image tilemap pointer @ 03580C
KYOGRE image palette pointer @ 035814

RAYQUAZA image pointer @ 035838
RAYQUAZA image tilemap pointer @ 035840
RAYQUAZA image palette pointer @ 035848

GYM LEADER image pointer @ 035884
GYM LEADER image tilemap pointer @ 03588C
GYM LEADER image palette pointer @ 035894

CHAMPION image pointer @ 0358B0
CHAMPION image tilemap pointer @ 0358B8
CHAMPION image palette pointer @ 0358C0

"Gym Style (AM)" image pointer @ 035964
"Gym Style (AM)" image tilemap pointer @ 03596C
"Gym Style (AM)" image palette pointer @ 035974
* (AM) - Advance Map

MAGMA HIDEOUT "Team Rocket Style (AM)" image pointer @ 03598C
MAGMA HIDEOUT "Team Rocket Style (AM)" image tilemap pointer @ 035994
MAGMA HIDEOUT "Team Rocket Style (AM)" image palette pointer @ 03599C
* (AM) - Advance Map
* Although that the Ruby's Magma Hideout isn't used in the normal gameplay of Emerald, it exists in Emerald just for a standard "Team Rocket Style" and for FireRed, it is used in Pokemon Tower.

AQUA HIDEOUT "03 (AM)" image pointer @ 0359B4
AQUA HIDEOUT "03 (AM)" image tilemap pointer @ 0359BC
AQUA HIDEOUT "03 (AM)" image palette pointer @ 0359C4
* (AM) - Advance Map
* In Emerald, the "03 ???" from the Fight Type, it is the Aqua Hideout. Although that in FireRed, it appears to be for Rocket Hideout.

ELITE FOUR 1 image pointer @ 0359DC
ELITE FOUR 1 image tilemap pointer @ 0359E4
ELITE FOUR 1 image palette pointer @ 0359EC

ELITE FOUR 2 image pointer @ 035A04
ELITE FOUR 2 image tilemap pointer @ 035A0C
ELITE FOUR 2 image palette pointer @ 035A14

ELITE FOUR 3 image pointer @ 035A2C
ELITE FOUR 3 image tilemap pointer @ 035A34
ELITE FOUR 3 image palette pointer @ 035A3C

ELITE FOUR 4 image pointer @ 035A5C
ELITE FOUR 4 image tilemap pointer @ 035A64
ELITE FOUR 4 image palette pointer @ 035A6C

"Big Red Pokeball (AM)" image pointer @ 035A90
"Big Red Pokeball (AM)" image tilemap pointer @ 035A98
"Big Red Pokeball (AM)" image palette pointer @ 035AA0
* (AM) - Advance Map
So far, that's only the separated backgrounds I've found in Emerald. Some of the images are aligned with the first ten backgrounds or the other backgrounds so be careful while repointing. Example: You have a background for the Elite Four and Champion but it relates with the Team Rocket Style background. I suggest that if you have good instincts, insert the image without repointing and just edit the pointers manually by using a HEX editor. I just gave all the information I have found so you won't be having problems dealing with Emerald background. I hope this help you a lot. Good luck!

----

Quote:
Originally Posted by LCCoolJ95 View Post
I did some research into TM extension in Emerald. It seems that the TMs are located at 616040. When I looked at the data, they were two bytes long each. It was a move IDs, in hex, FLIPPED. I used a Pokémon Ruby Gameshark Codes listing to prove it (Here's the link: http://www.ign.com/faqs/2004/pokemon-battle-e-gameshark-sp-codes-list-541208). For example, the move ID for Focus Punch, or or Fighting Punch as the rough Japanese to English translation, in hex would be 108. However, within the TM Data,
it is actually 08 01. It just flipped the first number, 01, with the two other numbers, 08.

The TMs in hex are:
Spoiler:
08 01 51 01 60 01 5B 01 2E 00 5C 00 02 01 53 01 4B 01 ED 00 F1 00 0D 01 3A 00 3B 00 3F 00 71 00 B6 00 F0 00 CA 00 DB 00 DA 00 4C 00 E7 00 55 00 57 00 59 00 D8 00 5B 00 5E 00 F7 00 18 01 68 00 73 00 5F 01 35 00 BC 00 C9 00 7E 00 3D 01 4C 01 03 01 07 01 22 01 9C 00 D5 00 A8 00 D3 00 1D 01 21 01 3B 01


But what about the HMs? They follow right after:
Spoiler:
0F 00 13 00 39 00 46 00 94 00 F9 00 7F 00 23 01


I asked someone about this, and they stated that, no matter what, if the move IDs (in hex) are added BEFORE the HM data, this would be the beginning of the expansion of TMs in the game. HMs, however, will always be the last 8 move IDs (in hex).

Here, I just did an example of doing this process, using an expanded moves table:
Spoiler:
08 01 51 01 60 01 5B 01 2E 00 5C 00 02 01 53 01 4B 01 ED 00 F1 00 0D 01 3A 00 3B 00 3F 00 71 00 B6 00 F0 00 CA 00 DB 00 DA 00 4C 00 E7 00 55 00 57 00 59 00 D8 00 5B 00 5E 00 F7 00 18 01 68 00 73 00 5F 01 35 00 BC 00 C9 00 7E 00 3D 01 4C 01 03 01 07 01 22 01 9C 00 D5 00 A8 00 D3 00 1D 01 21 01 3B 01 AE 01 63 01 B4 01 B8 01 BA 01 83 01 84 01 C0 01 A7 01 C3 01 05 01 C4 01 8D 01 6A 01 C5 01 88 01 75 01 A2 01 65 01 C7 01 C8 01 C9 01 7C 01 CA 01 E7 01 76 01 A5 01 96 01 CC 01 D6 01 77 01 E8 01 E4 01 68 01 79 01 54 01 57 01 7E 01 81 01 CD 01 86 01 BC 01 9F 01 A0 01 C8 00 7A 01 44 01 14 01 94 01 8B 01 0F 00 13 00 39 00 46 00 94 00 F9 00 7F 00 23 01


If you compare it to the original, there are an extra 50 TMs added. Now, I just need to know how to make the legitimate TM item work. If someone were to look into that, that would be awesome.
I think you should expand the items too. If the list of items ISN'T somewhat "DMA protected", that would be possible. I like the idea of expanding TMs but the items should too (in case you don't want replacing ????????????-s at all). Even with the INFINITE USAGE, how does the no-sell and no-buy-it-again will work on Gen III? And even with the expanded TMs (example 100 for now), I think expanding TM/HM compatibility table should be expanded too.
__________________
Reply With Quote
  #113   Link to this post, but load the entire thread.  
Old October 16th, 2014 (11:13 PM).
AtecainCorp.'s Avatar
AtecainCorp. AtecainCorp. is offline
Rejishan awake...
 
Join Date: Jun 2008
Location: Takoabe Town (Region Thonsu)
Age: 30
Gender: Male
Nature: Hardy
Posts: 1,354
Quote:
Originally Posted by Jambo51 View Post
That's because the ASM code behind the damage calculator doesn't know whether to categorise moves of that type as physical or special, and so does neither - simply returning 1 as the final damage.

It's fairly easy to fix with a little ASM knowledge, but fundamentally the change you're making is a hex edit.

I can't tell you where the byte(s) you'd need to change are as I never hacked Ruby or Emerald, so you'll need to find someone who either knows where the byte(s) are, or find them yourself using ASM research techniques.
Ok. Thank you. Meybe still I do not known the pointer of bytes which I must change. But now I know what I must do.
__________________
- My new Project comming Soon
Reply With Quote
  #114   Link to this post, but load the entire thread.  
Old October 27th, 2014 (2:34 AM).
AtecainCorp.'s Avatar
AtecainCorp. AtecainCorp. is offline
Rejishan awake...
 
Join Date: Jun 2008
Location: Takoabe Town (Region Thonsu)
Age: 30
Gender: Male
Nature: Hardy
Posts: 1,354
So Someone can told me from where to where is Safe Flags in Ruby?
__________________
- My new Project comming Soon
Reply With Quote
  #115   Link to this post, but load the entire thread.  
Old October 27th, 2014 (9:50 AM).
mamamama mamamama is offline
 
Join Date: Feb 2014
Posts: 180
I feel that translating this to Emerald would open up a huge door as many moves and held items need this hack. While the regular ROM offsets are easy to translate (I'll post them when I have access to my HEX-editor), I can't seem to find the corresponding RAM-locations in Emerald.

How would I go about finding them? 0x0202298C and 0x0203C020. I've searched for pointers in the ROM without luck.

Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
.global battlestringloaderhack
main:
mov r0, #0xC2
lsl r0, r0, #0x1
cmp r0, r6
bne normalcode
ldr r0, ramlocation
ldr r7, [r0, #0x0]
cmp r7, #0x0
beq alternative
mov r0, #0xA
lsl r0, r0, #0x18
cmp r7, r0
bge alternative
mov r0, #0x8
lsl r0, r0, #0x18
cmp r7, r0
blt alternative
b continue
alternative: mov r6, #0xC
ldr r1, returntwo
bx r1
continue: ldr r0, returnone
bx r0
normalcode: ldr r1, otherramloc
mov r0, #0xFF
strb r0, [r1, #0x0]
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align
ramlocation: .word 0x0203C020
returntwo: .word 0x080D77D1
returnone: .word 0x080D77DD
otherramloc: .word 0x0202298C
Reply With Quote
  #116   Link to this post, but load the entire thread.  
Old October 27th, 2014 (10:49 AM). Edited October 27th, 2014 by HidoranBlaze.
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 26
Gender: Male
Posts: 252
Quote:
Originally Posted by mamamama View Post
I feel that translating this to Emerald would open up a huge door as many moves and held items need this hack. While the regular ROM offsets are easy to translate (I'll post them when I have access to my HEX-editor), I can't seem to find the corresponding RAM-locations in Emerald.

How would I go about finding them? 0x0202298C and 0x0203C020. I've searched for pointers in the ROM without luck.

Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
.global battlestringloaderhack
main:
mov r0, #0xC2
lsl r0, r0, #0x1
cmp r0, r6
bne normalcode
ldr r0, ramlocation
ldr r7, [r0, #0x0]
cmp r7, #0x0
beq alternative
mov r0, #0xA
lsl r0, r0, #0x18
cmp r7, r0
bge alternative
mov r0, #0x8
lsl r0, r0, #0x18
cmp r7, r0
blt alternative
b continue
alternative: mov r6, #0xC
ldr r1, returntwo
bx r1
continue: ldr r0, returnone
bx r0
normalcode: ldr r1, otherramloc
mov r0, #0xFF
strb r0, [r1, #0x0]
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align
ramlocation: .word 0x0203C020
returntwo: .word 0x080D77D1
returnone: .word 0x080D77DD
otherramloc: .word 0x0202298C
The otherramloc seems to be 0x02022E2C. I haven't found the corresponding offset for 0x0203C020 yet, but I'll update this post if I do.
So for reference:
returntwo: .word 0x0814E6CD
returnone: .word 0x0814E6D9
otherramloc: .word 0x02022E2C
EDIT: This is a big assumption on my part, but 0x0203c020 seems to be free ram space. Under that assumption, I've found a place that'll hopefully work: 0x0203B200.
I haven't found any references to this in the ROM, so hopefully this'll work. Please make a backup before testing this though.

EDIT2: How does this look?

Reply With Quote
  #117   Link to this post, but load the entire thread.  
Old October 27th, 2014 (3:01 PM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by HidoranBlaze View Post
The otherramloc seems to be 0x02022E2C. I haven't found the corresponding offset for 0x0203C020 yet, but I'll update this post if I do.
So for reference:
returntwo: .word 0x0814E6CD
returnone: .word 0x0814E6D9
otherramloc: .word 0x02022E2C
EDIT: This is a big assumption on my part, but 0x0203c020 seems to be free ram space. Under that assumption, I've found a place that'll hopefully work: 0x0203B200.
I haven't found any references to this in the ROM, so hopefully this'll work. Please make a backup before testing this though.

EDIT2: How does this look?

That's what I had found to. I personally used something different to 203B200, but that works too!
I was going to post my port, but you guys have beaten me there.
__________________
Reply With Quote
  #118   Link to this post, but load the entire thread.  
Old October 27th, 2014 (4:06 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 26
Gender: Male
Posts: 252
Quote:
Originally Posted by MrDollSteak View Post
That's what I had found to. I personally used something different to 203B200, but that works too!
I was going to post my port, but you guys have beaten me there.
Just curious, what RAM offset did you use? I ask this since I imagine people will add their own moves to your rombase once you release your Emerald version, and it'd be nice to have consistency.

Anyway, I realized I should probably post how I ported this to EM.

1.
Code:
.text
.align 2
.thumb
.thumb_func
.global battlestringloaderhack
main:
mov r0, #0xC2
lsl r0, r0, #0x1
cmp r0, r6
bne normalcode
ldr r0, ramlocation
ldr r7, [r0, #0x0]
cmp r7, #0x0
beq alternative
mov r0, #0xA
lsl r0, r0, #0x18
cmp r7, r0
bge alternative
mov r0, #0x8
lsl r0, r0, #0x18
cmp r7, r0
blt alternative
b continue
alternative: mov r6, #0xC
ldr r1, returntwo
bx r1
continue: ldr r0, returnone
bx r0
normalcode: ldr r1, otherramloc
mov r0, #0xFF
strb r0, [r1, #0x0]
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align
ramlocation: .word 0x0203B200
returntwo: .word 0x0814E6CD
returnone: .word 0x0814E6D9
otherramloc: .word 0x02022E2C
Insert this routine into your ROM. Take note of the offset you insert it to.

2. Go to 0x14E6C2 in your hex editor and change FF 20 to 08 47. Then go to 0x14E6C8 and change the pointer to the location of your ASM routine +1.

Using it is as simple as putting
setword 0x203B200 0x8(location of your string)
printstring 0x184
in your battle script.
Reply With Quote
  #119   Link to this post, but load the entire thread.  
Old October 27th, 2014 (4:12 PM).
MrDollSteak's Avatar
MrDollSteak MrDollSteak is offline
Formerly known as 11bayerf1
 
Join Date: Dec 2008
Location: Hong Kong
Age: 28
Gender: Male
Posts: 859
Quote:
Originally Posted by HidoranBlaze View Post
Just curious, which RAM offset did you use? I ask this since I imagine people will add their own moves to your rombase once you release your Emerald version, and it'd be nice to have consistency.

Anyway, I realized I should probably post how I ported this to EM.

1.
Code:
.text
.align 2
.thumb
.thumb_func
.global battlestringloaderhack
main:
mov r0, #0xC2
lsl r0, r0, #0x1
cmp r0, r6
bne normalcode
ldr r0, ramlocation
ldr r7, [r0, #0x0]
cmp r7, #0x0
beq alternative
mov r0, #0xA
lsl r0, r0, #0x18
cmp r7, r0
bge alternative
mov r0, #0x8
lsl r0, r0, #0x18
cmp r7, r0
blt alternative
b continue
alternative: mov r6, #0xC
ldr r1, returntwo
bx r1
continue: ldr r0, returnone
bx r0
normalcode: ldr r1, otherramloc
mov r0, #0xFF
strb r0, [r1, #0x0]
pop {r3-r5}
mov r8, r3
mov r9, r4
mov r10, r5
pop {r4-r7}
pop {r0}
bx r0
.align
ramlocation: .word 0x0203B200
returntwo: .word 0x0814E6CD
returnone: .word 0x0814E6D9
otherramloc: .word 0x02022E2C
Insert this routine into your ROM. Take note of the offset you insert it to.

2. Go to 0x14E6C2 in your hex editor and change FF 20 to 08 47. Then go to 0x14E6C8 and change the pointer to the location of your ASM routine +1.

Using it is as simple as putting
setword 0x203B200 0x8(location of your string)
printstring 0x184
in your battle script.
I doubt people would be adding moves to my rombase as I've expanded it to 1023 available moves, so that it can include every actual move. As for custom moves, I doubt anyone would make effects that don't currently exist. But anyway I used 203E320 instead of 2023B200.

That being said I don't know much about the Emerald ram. Much less than Fire Red anyway, so I'll trust your judgment for what is unused, and will probably change it.
__________________
Reply With Quote
  #120   Link to this post, but load the entire thread.  
Old October 28th, 2014 (12:46 AM).
AtecainCorp.'s Avatar
AtecainCorp. AtecainCorp. is offline
Rejishan awake...
 
Join Date: Jun 2008
Location: Takoabe Town (Region Thonsu)
Age: 30
Gender: Male
Nature: Hardy
Posts: 1,354
It was nice. But I wonder that it was possible to make Pokemon Evolving During Battle? Not like Mega Evolutions. But normally. For example. Torchic gained lvl 16 in the middle of battle and start evolving in that moment beafore rival sent next Pokemon. That feature make game more like Anime series.
__________________
- My new Project comming Soon
Reply With Quote
  #121   Link to this post, but load the entire thread.  
Old November 29th, 2014 (7:20 PM).
Artemis64 Artemis64 is offline
 
Join Date: Mar 2014
Location: Singapore
Gender: Male
Nature: Hasty
Posts: 89
Chaos Rush or Shiny Quagsire, could you please post the tables that control how frames alternate between each other? Also, I would appreciate it if someone actually posts how to find limiters, I haven't seen a tutorial for this of all important things, as I intend to try and expand the animation table in Emerald and the Abilities table.
Reply With Quote
  #122   Link to this post, but load the entire thread.  
Old November 30th, 2014 (2:05 PM).
AtecainCorp.'s Avatar
AtecainCorp. AtecainCorp. is offline
Rejishan awake...
 
Join Date: Jun 2008
Location: Takoabe Town (Region Thonsu)
Age: 30
Gender: Male
Nature: Hardy
Posts: 1,354
Someone know where is Trainer Sprites showing Limiter on Pokemon Ruby?
__________________
- My new Project comming Soon
Reply With Quote
  #123   Link to this post, but load the entire thread.  
Old December 18th, 2014 (5:42 PM).
Percy's Avatar
Percy Percy is offline
 
Join Date: Sep 2014
Location: Asia
Gender: Male
Nature: Quiet
Posts: 3,045
Anyone know an ASM code where I can name the player from the Overworld?
__________________
i don't want to have a signature
Reply With Quote
  #124   Link to this post, but load the entire thread.  
Old December 18th, 2014 (9:19 PM).
Aruaruu Aruaruu is offline
 
Join Date: Sep 2011
Gender: Male
Posts: 199
Quote:
Originally Posted by BlazikenXY View Post
Anyone know an ASM code where I can name the player from the Overworld?
I found this somewhere for Emerald
callasm 0xE5075
Reply With Quote
  #125   Link to this post, but load the entire thread.  
Old December 18th, 2014 (9:21 PM).
Percy's Avatar
Percy Percy is offline
 
Join Date: Sep 2014
Location: Asia
Gender: Male
Nature: Quiet
Posts: 3,045
Quote:
Originally Posted by Aruaruu View Post
I found this somewhere for Emerald
callasm 0xE5075
Wow, thank you very much! I'll test it if it will work!
__________________
i don't want to have a signature
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 8:39 AM.