The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Research & Development
Reload this Page Quick Research & Development Thread

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
  #951   Link to this post, but load the entire thread.  
Old April 3rd, 2017 (12:06 PM).
C me's Avatar
C me C me is offline
Creator of Pokemon League Of Legends
 
Join Date: Jan 2014
Age: 26
Gender: Male
Posts: 681
Quote:
Originally Posted by DizzyEgg View Post
Actually it just controls the fainting cry of the pokemon's opponent.
Btw, do you know what does the 0x19 before it do? It's an argument too.
Do you mean when you make the opponent faint as opposed to self destruct/poison etc?

I noticed the 0x19 first but then messed around with the 0x5 and got results so I just ignored 0x19. Can you please share your extra information on this?
Reply With Quote
  #952   Link to this post, but load the entire thread.  
Old April 3rd, 2017 (12:22 PM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 25
Gender: Male
Nature: Quiet
Posts: 794
Quote:
Originally Posted by C me View Post
Do you mean when you make the opponent faint as opposed to self destruct/poison etc?

I noticed the 0x19 first but then messed around with the 0x5 and got results so I just ignored 0x19. Can you please share your extra information on this?
I mean whenever an opposing pokemon faints, so not yours or yours partner, but the opposing one.

This code is calling a function that plays poke cry. First argument is species, second is 0x19 which I dont know what does and the third is 0x5 which you said is responsible for the pitch.
__________________
Support Pokeemerald!

Pokeemerald starter pack:
Emerald Expansion
Reply With Quote
  #953   Link to this post, but load the entire thread.  
Old April 3rd, 2017 (1:04 PM).
C me's Avatar
C me C me is offline
Creator of Pokemon League Of Legends
 
Join Date: Jan 2014
Age: 26
Gender: Male
Posts: 681
Quote:
Originally Posted by DizzyEgg View Post
I mean whenever an opposing pokemon faints, so not yours or yours partner, but the opposing one.

This code is calling a function that plays poke cry. First argument is species, second is 0x19 which I dont know what does and the third is 0x5 which you said is responsible for the pitch.
Makes sense since I when looking for a breakpoint I only tested fainting the opponent. I hope it's done in a similar way, will make it easy to find.

Also makes sense, I spent ages looking at the prepare faint cry function then came across this just looking at the playcry function. I orignially though 0x19 would be speed but I can't really hear a difference in speed.
Reply With Quote
  #954   Link to this post, but load the entire thread.  
Old April 5th, 2017 (9:03 PM). Edited April 17th, 2017 by Aryan 10.
Aryan 10's Avatar
Aryan 10 Aryan 10 is offline
Battle Legend
 
Join Date: Nov 2016
Location: Pallet Town, India
Gender: Male
Nature: Relaxed
Posts: 163
[FireRed] Mew Obey Fix tutorial


In Pokemon FireRed, if you will encounter Mew by any method except Event, then Mew will not obey.

Game Freak made the rarest Pokemon cheat-protected. This is also true with Deoxys, but the Deoxys caught at Birth Island will obey. Since Mew is uncatchable in FireRed. It is not possible with Mew.

So I don't know if someone posted this but I can tell how to fix it. It is really easy to do it.

Quote:
[Step 1]Open any hex editor.

[Step 2]Change the byte at 0x801D402(0x801D416 for FireRed 1.1, in case if someone needs that) from 0x97 to 0x00.
By doing this you no longer need to use 'setobedience' command in every Mew battle script.
Reply With Quote
  #955   Link to this post, but load the entire thread.  
Old April 7th, 2017 (12:14 PM).
MWisBest MWisBest is offline
 
Join Date: Mar 2017
Gender: Male
Posts: 19
Berries Replant Forever [EM]

As most people know, you only have so much time to pick a grown berry before it "replants itself" and becomes a sprout again. By default, the berry can only do this 9 times (for a total of 10 plantings, including the initial time you put the berry in the soil yourself). This has always bothered me because it's possible to lose rare berries forever if you aren't careful, and I tend to be very forgetful.

To allow berries to continue to replant themselves until you pick them, make the following change:
At 0xE185A, replace 04 48 41 68 00 68 20 60 61 60 with 00 20 60 71 C0 46 C0 46 C0 46.
Reply With Quote
  #956   Link to this post, but load the entire thread.  
Old April 8th, 2017 (5:22 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
 
Join Date: Nov 2007
Location: Leicester, UK
Age: 25
Posts: 5,251
Just a reminder to some users who have been using this as a quick question thread: if you don't provide at least some semblance of research or development of your own, your question does not belong here. Instead, create a thread in the parent ROM Hacking forum, here: https://www.pokecommunity.com/forumdisplay.php?f=284, and give it the appropriate category (usually, this will be [ASM & Hex] if you were choosing to post here).
__________________
Reply With Quote
  #957   Link to this post, but load the entire thread.  
Old April 8th, 2017 (6:26 AM). Edited May 30th, 2018 by Aryan 10.
Aryan 10's Avatar
Aryan 10 Aryan 10 is offline
Battle Legend
 
Join Date: Nov 2016
Location: Pallet Town, India
Gender: Male
Nature: Relaxed
Posts: 163
[FireRed] Black out script offsets


Nurse Joy blackout: 0x081A8D97
Mom blackout: 0x081A8DD8

Quote:
0x0807F5C8 = Pointer for Nurse Joy
0x0807F5E8 = Pointer for Mom
__________________
My Works
Reply With Quote
  #958   Link to this post, but load the entire thread.  
Old April 10th, 2017 (11:11 AM).
MWisBest MWisBest is offline
 
Join Date: Mar 2017
Gender: Male
Posts: 19
HM Flash Lightens Entire Screen [EM]

I got a little irked trying to train in the Victory Road basement by the Flash HM not clearing the entire screen. I'm playing the game on my phone, which has an AMOLED display. AMOLED displays are very susceptible to burn-in, so to avoid getting a nice big dark circle in the middle of my screen...

I modified the Flash brightness table to make it work like FR/LG and light up the entire screen:

At 0x54FE66, change 48 to C8.

This is kind of cheap because it makes navigating Granite Cave and Victory Road easier than intended, but whatever.
Reply With Quote
  #959   Link to this post, but load the entire thread.  
Old April 10th, 2017 (8:06 PM). Edited April 14th, 2017 by mbcn10ww.
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
<Remove Field Moves options from Pokémon menu [FR]>
0x122A8C: 00
0x45A76E: 00 00

<Remove Ending Credits (Reset the Game) [FR]>
0x16730B: 9C 50 00 6B 02 FF (see the EDIT below)

EDIT:

In some free space place 00 DF 00 00 and save it's offset

At 0x16730B: 23 XX XX XX 08 FF (XX XX XX is the reverse of the offset you saved +1)
Reply With Quote
  #960   Link to this post, but load the entire thread.  
Old April 12th, 2017 (12:02 AM).
robinjea's Avatar
robinjea robinjea is offline
 
Join Date: Sep 2012
Age: 25
Gender: Male
Nature: Quirky
Posts: 534
Quote:
Originally Posted by mbcn10ww View Post
<Remove Field Moves options from Pokémon menu>
0x122A8C: 00
0x45A76E: 00 00

<Remove Ending Credits (Reset the Game)>
0x16730B: 9C 50 00 6B 02 FF
EM or FR?
Reply With Quote
  #961   Link to this post, but load the entire thread.  
Old April 12th, 2017 (6:13 AM).
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
Quote:
Originally Posted by BlackWhiteRobin View Post
EM or FR?
Oh sorry, it's for Fire Red.
Reply With Quote
  #962   Link to this post, but load the entire thread.  
Old April 13th, 2017 (9:31 AM). Edited April 13th, 2017 by Aryan 10.
Aryan 10's Avatar
Aryan 10 Aryan 10 is offline
Battle Legend
 
Join Date: Nov 2016
Location: Pallet Town, India
Gender: Male
Nature: Relaxed
Posts: 163
Expanded Pokemon In Advance Map


Take the total number of pokemon.

Change it to hex and reverse it.
Quote:
For example, 123 to 23 01

For Advance Map 1.92
Go to D027C

For Advance Map 1.95
Go to 77DD5

and change
Code:
9C 01
to your reverse hex number of Pokemon.

And it's done.
Reply With Quote
  #963   Link to this post, but load the entire thread.  
Old April 13th, 2017 (1:43 PM). Edited April 13th, 2017 by Wesley FG.
Wesley FG's Avatar
Wesley FG Wesley FG is offline
Pokémon Kalos Advance !! Gba Hack
 
Join Date: Oct 2008
Location: Brazil
Gender: Male
Nature: Modest
Posts: 338
Quote:
Originally Posted by Aryan 10 View Post
Expanded Pokemon In Advance Map


Take the total number of pokemon.

Change it to hex and reverse it.



Go to D027C and change
Code:
9C 01
to your reverse hex number of Pokemon.

And it's done.
you need specific what version of Advance Map (1.92, 1.95)
are you tutorial
__________________
Kalos Demake Soon!!
Reply With Quote
  #964   Link to this post, but load the entire thread.  
Old April 13th, 2017 (5:55 PM).
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
Quote:
Originally Posted by Aryan 10 View Post
Expanded Pokemon In Advance Map


Take the total number of pokemon.

Change it to hex and reverse it.



Go to D027C and change
Code:
9C 01
to your reverse hex number of Pokemon.

And it's done.
Quote:
Originally Posted by Wesley FG View Post
you need specific what version of Advance Map (1.92, 1.95)
are you tutorial
It's for 1.92

The offset for 1.95 is 0x77DD5
Reply With Quote
  #965   Link to this post, but load the entire thread.  
Old April 13th, 2017 (6:13 PM).
Aryan 10's Avatar
Aryan 10 Aryan 10 is offline
Battle Legend
 
Join Date: Nov 2016
Location: Pallet Town, India
Gender: Male
Nature: Relaxed
Posts: 163
Quote:
Originally Posted by mbcn10ww View Post
It's for 1.92
The offset for 1.95 is 0x77DD5
Oh, thanks for informing,
Actually, I rarely use 1.95 because it's buggy.

I better edit my post.
Reply With Quote
  #966   Link to this post, but load the entire thread.  
Old April 14th, 2017 (5:17 AM). Edited April 14th, 2017 by mbcn10ww.
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
Quote:
Originally Posted by mbcn10ww View Post
<Remove Field Moves options from Pokémon menu [FR]>
0x122A8C: 00
0x45A76E: 00 00

<Remove Ending Credits (Reset the Game) [FR]>
0x16730B: 9C 50 00 6B 02 FF
I found some problems with skipping the game credits in mobile emulators (like MyBoy), it freezes instead of reset, then I fixed it with a new hex edit:

<Remove Ending Credits (Reset the Game) [FR]>

In some free space place 00 DF 00 00 and save it's offset

At 0x16730B: 23 XX XX XX 08 FF (XX XX XX is the reverse of the offset you saved +1)
Reply With Quote
  #967   Link to this post, but load the entire thread.  
Old April 15th, 2017 (7:33 AM).
Z-nogyroP Z-nogyroP is offline
 
Join Date: May 2014
Age: 22
Gender: Female
Posts: 105
the table for the berry tag images begins at 0x57FC94, at the cheri berry. four bytes are the image pointer, next four are the palette, repeat.
Reply With Quote
  #968   Link to this post, but load the entire thread.  
Old April 15th, 2017 (6:16 PM).
kelario27's Avatar
kelario27 kelario27 is offline
 
Join Date: Jun 2011
Location: Alaska
Age: 23
Gender: Male
Nature: Serious
Posts: 142
Okay, so I'm still a noob at this, but I think I understand better now how memory works. So for some things, I've decided to brute force my way through the hack with a hex editor.

Just to play around and reverse engineer things a bit, I tried the old fashioned method of opening up scripts with PKSV, then opening the ROM in the hex editor and going to the offsets it mentioned. Except...PKSV uses seven digits for "offsets", when there are only six digits for offsets in the ROM.

I don't really know what in particular to ask about this. Is there some way to translate between the two numbers? Does PKSV lie?

So just as I typed that entire paragraph, I realized that PKSV starts everything with 0x8 and then the offset number.

Posting this anyway in case anyone else was wondering.
__________________
Reply With Quote
  #969   Link to this post, but load the entire thread.  
Old April 16th, 2017 (5:14 AM).
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
Quote:
Originally Posted by kelario27 View Post
Okay, so I'm still a noob at this, but I think I understand better now how memory works. So for some things, I've decided to brute force my way through the hack with a hex editor.

Just to play around and reverse engineer things a bit, I tried the old fashioned method of opening up scripts with PKSV, then opening the ROM in the hex editor and going to the offsets it mentioned. Except...PKSV uses seven digits for "offsets", when there are only six digits for offsets in the ROM.

I don't really know what in particular to ask about this. Is there some way to translate between the two numbers? Does PKSV lie?

So just as I typed that entire paragraph, I realized that PKSV starts everything with 0x8 and then the offset number.

Posting this anyway in case anyone else was wondering.
First, it's the wrong place to ask for help.
Second, the 0x8 (0x9 too, for expanded Roms) is only to tell the system "It's a ROM offset!", if it begins with 0x2 it's a RAM offset.
Reply With Quote
  #970   Link to this post, but load the entire thread.  
Old April 17th, 2017 (11:14 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
I'm Still Alive, Elsewhere
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 25
Gender: Male
Nature: Jolly
Posts: 697
Quote:
Originally Posted by kelario27 View Post
Okay, so I'm still a noob at this, but I think I understand better now how memory works. So for some things, I've decided to brute force my way through the hack with a hex editor.

Just to play around and reverse engineer things a bit, I tried the old fashioned method of opening up scripts with PKSV, then opening the ROM in the hex editor and going to the offsets it mentioned. Except...PKSV uses seven digits for "offsets", when there are only six digits for offsets in the ROM.

I don't really know what in particular to ask about this. Is there some way to translate between the two numbers? Does PKSV lie?

So just as I typed that entire paragraph, I realized that PKSV starts everything with 0x8 and then the offset number.

Posting this anyway in case anyone else was wondering.
This is a GBA memory mapping thing, http://problemkaputt.de/gbatek.htm#gbamemorymap
__________________



Reply With Quote
  #971   Link to this post, but load the entire thread.  
Old April 20th, 2017 (6:50 PM). Edited April 24th, 2017 by mbcn10ww.
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
<Skip Player and Rival Naming [FR]>

Change the pointer at 0x13009C to D1 08 13 08

After choosing the player gender the gameplay will start without naming the player and the rival, then you will be able to use static names in-game.

Note: If you don't have used some ASM to set the player/rival names the game will freeze.
Reply With Quote
  #972   Link to this post, but load the entire thread.  
Old April 24th, 2017 (8:05 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
Quote:
Originally Posted by lsmash View Post
Would you mind telling me how you fixed the music that plays after you captured a pokemon?
I made the same feature (though differently: I didn't need to replace the bytes at x15A68), which is almost flawless, if not for the music: it plays the captured pokemon jingle, then the receive exp jingle.
You can check it here: http://pokemonhackersonline.com/showthread.php?t=14839-FR-Pokemons-receive-EXP-after-capturing
Is any chance for repoin this for Ruby? I have troubles with my own researches.
__________________
- My new Project comming Soon
Reply With Quote
  #973   Link to this post, but load the entire thread.  
Old April 25th, 2017 (1:07 AM).
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
It's often been asked how the Hidden Items work, and what flags they use.
I was curious myself, so I did some digging. (FR)

The routine responsible for handling the flag check/set and item give is at 0x6D17A.
The subroutine that converts the Hidden ID to the flag to check/set here is located at 0xCC45E.
It adds 0x3E8 to the Hidden ID, which is then the flag to be checked/set.
This means that hidden ID 0x0 equates to flag 0x3E8, 0x1 equates to 0x3E9, and so on, until you reach ID 0xFF, which is flag 0x4E7.
__________________
Reply With Quote
  #974   Link to this post, but load the entire thread.  
Old April 28th, 2017 (11:18 AM).
DarkPsychic's Avatar
DarkPsychic DarkPsychic is offline
 
Join Date: Jul 2012
Location: CO
Gender: Male
Nature: Timid
Posts: 146
Hello all,
I made a way to have random wild battles which also randomize not only the Pokemon but the level as well.
I got the idea and the know how from a thread called " PokeMart as debug input ".

Anyway here is the XSE script.
Code:
Code:
//wildbattle2hex
00 B6 | ?? ??  | ?? 00   | ?? ?? |  B7 03 | 
 cmd  | pkid   | lvl      |  item  |             
 4100 | 4101 | 4102    | 4103  |  4104  |
Hand to put B7 03 place of(25 39 01 27) wich means dowildbattle followed by '03' return.
Also to get the address of vars 0x4000+ you need to take the pointer stored at 0x3005008 and add 0x1000 to it.
To get var 0x4100 you would add 0x1200 to the pointer at 0x3005008.
//

#dynamic 0xD00000

#org @start
random 0x64
compare 0x800D 0x8
if 0x2 goto @snippet1
random 0x64
copyvar 0x4000 0x800D
setvar 0x4100 0xB600
copyvar 0x4101 0x4000
random 0xFF
copyvar 0x4102 0x800D
setvar 0x4103 0x0000
setvar 0x4104 0x03B7
setvar 0x5006 0x1
setvar 0x800D 0x0
call @snippet2
setvar 0x5006 0x0
release
end

#org @snippet1
release
end

#org @snippet2
writebytetooffset 0x4 0x20370D0
copybyte 0x20370D1 0x3005008
copybyte 0x20370D2 0x3005009
copybyte 0x20370D3 0x300500A
copybyte 0x20370D8 0x20370D2
copybyte 0x20370D9 0x20370D3
addvar 0x8011 0x12
copybyte 0x20370D2 0x20370D8
copybyte 0x20370D3 0x20370D9
copybyte 0x20370D4 0x300500B
writebytetooffset 0x3 0x20370D5
writebytetooffset 0xFF 0x20370D6
writebytetooffset 0x0 0x20370D7
call 0x20370D0
return
At the moment it still uses the default vars from the debug input thread.
But I will make a different version that uses the safe vars hack.
Just in case.

To use this,
Simply compile and place on green script tile then set the tiles var to 0x5006 and the value to 0.
The default script is made so you have an 8% chance of a wildbattle to happen.

What this does:
It takes a script command and writes it in hex into vars 0x4100 - 0x4104.
Then it changes the certain values to the random number (PokemonID and Level),
after that it sets up vars 0x800D - 0x8012 and then calls the 0x800D to execute the code at 0x4100-0x4105.
Then returns.

Hope it can help someone out there.
Reply With Quote
  #975   Link to this post, but load the entire thread.  
Old May 4th, 2017 (4:06 AM).
kleenexfeu kleenexfeu is offline
 
Join Date: Aug 2013
Gender: Male
Posts: 218
Quote:
Originally Posted by Artemis64 View Post
To do the same in Emerald, place 0xFC at 0x6DC48 and 0x6DC4E.
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.
In addition to that, you can also change the total of EV each pokémon can get:
Spoiler:
Code:
.equ New_Limit_Ev_Cap, Max_ev_per_stat @ can't go beyond 255*6 obviously
.equ EV_by_stats_cap, Max_ev_per_poke @ can't go beyond 255 without rewriting a ton of routine, it's the original value

@@ moving the EV cap per poke
.org 0x6DC2A, 0xFF
ldr r0, New_Limit_Ev_Cap
add r0, #1

@@ EV by stats cap
.org 0x6DC48, 0xFF
cmp r0, #EV_by_stats_cap
ble 0x6DC58
mov r0, r1
add r0, #EV_by_stats_cap

@@ moving the EV cap per poke
.org 0x6DC88, 0xFF
New_Limit_Ev_Cap:
.word Max_EV_per_poke-1
__________________
Arceus and Giratina Forms
Dynamic Pokémon Data
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

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:53 AM.