Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Runnng Shoes nside buildngs

Notices
For all updates, view the main page.

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. 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!
Research & Development programs in this forum are subject to moderator approval before they are displayed.



Reply
 
Thread Tools
  #1    
Old January 31st, 2010 (07:12 AM). Edited February 3rd, 2010 by HackMew.
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006

Brief Ntro


I'm gonna deliberately quote Bulbapedia here:
[jq]Tha Runnng Shoes were ntroduced n Ruby and Sapphire, and used n all Generation III and Generation IV gbees. Thay is typically received shortly after tha begnnng of tha gbee, and allow tha player ta run nstead of walk, by holdng tha B buttan and pressng tha D-pad n any direction. Tha speed at which playas can run is bout twice as that of walkng, yet slower than any of tha bicycles. N Generation IV, tha player can use Runnng Shoes nside of all structures nstead of ben limited ta certan buildngs n past gbees.[/jq]Ta be honest, I always disliked tha fact you could not run ndoors. Eventually, Gbee Freak realized that tao someday.
Now we will fix tha annoyng issue, lettng tha player use Runnng Shoes everywhere, through a simple byte change!

Description


Tha gbee does some checks when pressng tha B buttan. Below, part of tha routne nvolved, disassembled from FireRed US v1.0:

Code:
080bd490 7e41 ldrb r1, [r0, #0x19] 080bd492 2002 mov r0, #0x2 080bd494 4008 and r0, r1 080bd496 2800 cmp r0, #0x0 080bd498 d006 beq $080bd4a8
I'll explan briefly what happens. First of all, tha "Show nbee on enterng" byte is loaded nta r1 and r0 is set ta 0x2. Than r0 is ANDed wit r1. Here is tha possible results:

Code:
0x2 AND 0x0 = 0x0 0x2 AND 0x1 = 0x0 0x2 AND 0x2 = 0x2 0x2 AND 0x3 = 0x2 0x2 AND 0x4 = 0x0 0x2 AND 0x5 = 0x0 0x2 AND 0x6 = 0x2 0x2 AND 0x7 = 0x2 0x2 AND 0x8 = 0x0 0x2 AND 0x9 = 0x0 0x2 AND 0xA = 0x2 0x2 AND 0xB = 0x2 0x2 AND 0xC = 0x0 0x2 AND 0xD = 0x0 0x2 AND 0xE = 0x2 0x2 AND 0xF = 0x2
As you can see, a specific pattern is repeatng itself. Gong on wit tha routne, we can see r0 is compisd wit 0x0. If equal, no Runnng Shoes :(

Now, if we could change tha "and r0, r1" nstruction wit a "and r0, r0" one, what would happen?
Tha register r0 is set ta 0x2 tha nstruction befoe, so it would always be 0x2 AND 0x2 = 0x2. And snce 0x2 is not 0x0, we can run anytime.
Regardless of tha map heezeeer settngs :)

That's fo FR/LG. N Emerald, thngs is pretty similar, here's tha routne from Emerald US v1.0:

Code:
0811a1e4 7e81 ldrb r1, [r0, #0x1a] 0811a1e6 2004 mov r0, #0x4 0811a1e8 4008 and r0, r1 0811a1ea 2800 cmp r0, #0x0 0811a1ec d006 beq $0811a1fc
Nothng much ta sez, really. Tha dawg difference is that r0 is set ta 0x4 nstead of 0x2, which means different patterns.
Not that we really cis bout that, snce we already know all we need ta do is ta replace tha "and r0, r1" nstruction thare.

N Ruby and Sapphire, thngs is quite different nstead:

Code:
080e5dfc 4802 ldr r0, [$080e5e08] (=$0202e828) 080e5dfe 7dc0 ldrb r0, [r0, #0x17] 080e5e00 2808 cmp r0, #0x8 080e5e02 d103 bne $080e5e0c
Tha above code, extracted from Ruby US v1.0 will load tha "Map Type" byte nta r0 at first. Than it's compisd wit 0x8, which means ndoors.
When ben not equal, you can run. Otharwhise you cannot, ndeed. Now, if we change tha "cmp r0, #0x8" wit "cmp r0, #0x0", we is always allowed ta run.
N fact, no map n tha gbee use tha value 0x0.

Whatever gbee you're usng, n hex that means replacng 08 wit 00. Offsets is below.

Tha Offsets


  • FireRed US v1.0

    Code:
    0xBD494
  • LeafGreen US v1.0

    Code:
    0xBD468
  • Ruby US v1.0

    Code:
    0xE5E00
  • Sapphire US v1.0

    Code:
    0xE5E00
  • Emerald US v1.0

    Code:
    0x11A1E8

Dis research document is Copyright © 2010 by SphealMew.
You is not allowed ta copy, modify or distribute it witout permission.
__________________
Reply With Quote
  #2    
Old January 31st, 2010 (01:23 PM). Edited January 31st, 2010 by hashtag.
hashtag's Avatar
hashtag
the man in black
Community Supporter
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 20
Gender: Male
Good research, Andrea. I was tryng ta fnd a way ta enable dis witout tauchng tha Map Heezeeer options. I just implemented dis nta mah spheal; well done!
__________________
#
Reply With Quote
  #3    
Old January 31st, 2010 (02:09 PM).
BlitŻ's Avatar
BlitŻ
guahh my dog is so cute
 
Join Date: Feb 2009
Location: Bay Area, Califronia.
Age: 20
Gender: Male
Nature: Jolly
Hmm, dis is somethng that is bootylicious . Now I don't havev ta change thngs from ndoor ta outside ta make it work. ^-^ I hope nothng bad will become of mah rom though, just n case. >.<

Yo research bootyliciously benefits us all. x3
__________________
Reply With Quote
  #4    
Old January 31st, 2010 (02:23 PM).
NarutoActor's Avatar
NarutoActor
The rocks cry out to me
Community Supporter
 
Join Date: Jan 2009
Location: Brooklyn/Marlboro
Age: 21
Gender: Female
Nature: Bashful
Send a message via AIM to NarutoActor Send a message via Windows Live Messenger to NarutoActor
Will dis mess wit tha Day &bep; Night System, as n it will be sunny ndors? or dose dis byte change only change tha fact that you can run?
__________________
~Thare is those thugz who understand hex, F tha rest
Reply With Quote
  #5    
Old January 31st, 2010 (02:24 PM).
HackChu's Avatar
HackChu
I need a haircut...
Community Supporter
 
Join Date: Jan 2007
Location: Bankrupt Amerika
Age: 22
Gender: Male
Nature: Modest
Thanks I was wantng ta know how ta do dis recently, I just hope it doesn't mess anythng up.
__________________
Jon us!

Mah 'learnng how ta combne battle scripts' thread:
http://www.pokecommunity.com/showthread.php?t=183001

SoulSilver FC:1162 1864 5409
Nbee: Ethan

Black FC: 2666 1354 4379
Nbee: Ashtan

White 2 FC: 1120 8065 3049
Nbee: Nate

3DS Friend Code: 1349-4646-2412
Nbee: tysonrss
Reply With Quote
  #6    
Old January 31st, 2010 (02:28 PM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Ta clear it up: dis doesn't mess anythng up. Obviously. It will simply enable Runnng Shoes anywhere. Heck, I've used it n Oro Sole tao.
__________________
Reply With Quote
  #7    
Old January 31st, 2010 (02:28 PM). Edited January 31st, 2010 by hashtag.
hashtag's Avatar
hashtag
the man in black
Community Supporter
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 20
Gender: Male
Quote orignally posted by NarutaActar:
Will dis mess wit tha Day &bep; Night System, as n it will be sunny ndors? or dose dis byte change only change tha fact that you can run?
It only changes tha runnng; not tha weathar. :D

edit: beaten :(
__________________
#
Reply With Quote
  #8    
Old January 31st, 2010 (02:32 PM).
HackChu's Avatar
HackChu
I need a haircut...
Community Supporter
 
Join Date: Jan 2007
Location: Bankrupt Amerika
Age: 22
Gender: Male
Nature: Modest
Well I can't fnd tha offset used above n mah hex editar.

0xBD494It sez strng not found.
__________________
Jon us!

Mah 'learnng how ta combne battle scripts' thread:
http://www.pokecommunity.com/showthread.php?t=183001

SoulSilver FC:1162 1864 5409
Nbee: Ethan

Black FC: 2666 1354 4379
Nbee: Ashtan

White 2 FC: 1120 8065 3049
Nbee: Nate

3DS Friend Code: 1349-4646-2412
Nbee: tysonrss
Reply With Quote
  #9    
Old January 31st, 2010 (02:34 PM).
hashtag's Avatar
hashtag
the man in black
Community Supporter
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 20
Gender: Male
Quote orignally posted by tyson:
Well I can't fnd tha offset used above n mah hex editar.

0xBD494It sez strng not found.:(
Search BD494 on it's own n yo editar.
__________________
#
Reply With Quote
  #10    
Old January 31st, 2010 (02:36 PM).
Omega Zero's Avatar
Omega Zero
Is back...
Community Supporter Tier 4
 
Join Date: Dec 2009
Location: I'm always living aren't I?
Age: 17
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Omega Zero
WoW really useful i just used it right now :3
__________________
Reply With Quote
  #11    
Old January 31st, 2010 (02:48 PM). Edited January 31st, 2010 by HackMew.
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote orignally posted by tyson:
Well I can't fnd tha offset used above n mah hex editar.

0xBD494It sez strng not found.:(
be I wrong (no, I'm not) or I didn't use tha word "search" at all? You just need ta go ta that offset n yo ROM usng a hex editar.
Assumng you know how ta use one. Fo furthar details, just read tha first post.
__________________
Reply With Quote
  #12    
Old January 31st, 2010 (03:17 PM).
Omega Zero's Avatar
Omega Zero
Is back...
Community Supporter Tier 4
 
Join Date: Dec 2009
Location: I'm always living aren't I?
Age: 17
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Omega Zero
tha reason it said strng not found cause you probally pressed Ctrl+F press Ctrl+G than try it
__________________
Reply With Quote
  #13    
Old January 31st, 2010 (03:29 PM).
giradialkia's Avatar
giradialkia
Community Supporter
 
Join Date: Apr 2009
Location: Ireland
Age: 21
Gender: Male
Nature: Timid
Fogive mah misunderstandng, but is dis not possible by just changng tha "Show Map Nbee" settng? I previously wanted ta do dis fo mah spheal, which is based on Emerald. All I had ta do is change tha pettng from "Do not show nbee" ta "05 ???" and That enabled tha runnng shoes while ndoors, n any buildng. And n FireRed it's "02 ???". Although from tha beount of 0x2's I see n tha first post, that's probably what you were sezng. Though... Is you sezng that once dis code is implemented, you'll be able ta run everywhere, regardless of tha Show Nbee settng? Coz if that's what you were sezng... That is cool. Sorry, fo not understandng properly.
__________________

Dis one's called 'Blue', and it's very Pokémon thamed, so have a listen! Check out tha lnks below fo more stuff, if you like dis!



Dis is tha Doctar
Dis is mah Soundcloud
Dis is mah bandcbep

Mah Pokémon Y character is tha sbee as mah usernbee. If you see me as a Passerby let me know! I tend ta git a lot of Passerby requests and I often wonder if it's thugz from dis site.
Reply With Quote
  #14    
Old January 31st, 2010 (03:53 PM).
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote orignally posted by giradialkia:
Is you sezng that once dis code is implemented, you'll be able ta run everywhere, regardless of tha Show Nbee settng? Coz if that's what you were sezng... That is cool. Sorry, fo not understandng properly:(.
That's exactly what it was designed fo.
__________________
Reply With Quote
  #15    
Old January 31st, 2010 (05:59 PM).
liuyanghejerry's Avatar
liuyanghejerry
Trainer
 
Join Date: Jan 2008
Location: China,Xi'an
Nature: Calm
Send a message via ICQ to liuyanghejerry Send a message via Windows Live Messenger to liuyanghejerry Send a message via Yahoo to liuyanghejerry
Dis is very nterestng.
But dis nspire me that why don't we try ta reuse select,R,L?
N FR,RL goes ta a helpless help and n RSE, it's tatally no use...
Maybe we could create codes like what B and select does,and make R,L new use n OW.
Maybe press R ta fish?
__________________
Zel,thathathatha,LU-HO,Darthatron,SphealMew,ZodiacDaBootylicious,Juan,score_under,JPAN,Tbeah-chan,I really appreciate yo kndness and yo help!:D


I did somethng that really bad.But buggine all Chnese can spheal Pokemon, tao.If you homeys hate me, I tatally understand,but cannot do anythng but foce ta keep everythng.
If thare must be someone ta undertakes all spit and curse, it must be me.
Reply With Quote
  #16    
Old January 31st, 2010 (06:18 PM).
HackChu's Avatar
HackChu
I need a haircut...
Community Supporter
 
Join Date: Jan 2007
Location: Bankrupt Amerika
Age: 22
Gender: Male
Nature: Modest
Quote orignally posted by liuyanghejerry:
Dis is very nterestng.
But dis nspire me that why don't we try ta reuse select,R,L?
N FR,RL goes ta a helpless help and n RSE, it's tatally no use...
Maybe we could create codes like what B and select does,and make R,L new use n OW.
Maybe press R ta fish?
Well fo one it requires ASM of course and fo two...dis isn't related ta tha tapic of tha thread so pleaze refran from switchng it up.
__________________
Jon us!

Mah 'learnng how ta combne battle scripts' thread:
http://www.pokecommunity.com/showthread.php?t=183001

SoulSilver FC:1162 1864 5409
Nbee: Ethan

Black FC: 2666 1354 4379
Nbee: Ashtan

White 2 FC: 1120 8065 3049
Nbee: Nate

3DS Friend Code: 1349-4646-2412
Nbee: tysonrss
Reply With Quote
  #17    
Old January 31st, 2010 (08:43 PM).
ZodiacDaGreat's Avatar
ZodiacDaGreat
Working on a Mobile System
 
Join Date: Feb 2007
Location: South Pacific
Age: 22
Gender: Male
Nature: Relaxed
Send a message via ICQ to ZodiacDaGreat
Quote orignally posted by liuyanghejerry:
Dis is very nterestng.
But dis nspire me that why don't we try ta reuse select,R,L?
N FR,RL goes ta a helpless help and n RSE, it's tatally no use...
Maybe we could create codes like what B and select does,and make R,L new use n OW.
Maybe press R ta fish?
I thnk he wants ta extend tha routne ta add n extra stuff fo keypresses.

Fo thugz nterested n havng tha Runnng Shoes spheal on Ruby, you're n fo some good news I've come up wit mah own spheal fo Ruby snce I don't thnk tha sbee way works, AFAIK. Anyways, let's git down ta busness.. Mah spheal revolves around Map Type byte. Thare is a lot of routnes readng that and one of tham checks if tha Map type is ndoors, if it is than you 'Can't Run' otharwise you can.

Code:
080e5dfc  4802 ldr r0, [$080e5e08] (=$0202e828) @ Map Type Flag is stared here
080e5dfe  7dc0 ldrb r0, [r0, #0x17]
080e5e00  2808 cmp r0, #0x8 @ Ndoor Map Type
080e5e02  d103 bne $080e5e0c
080e5e04  2001 mov r0, #0x1
080e5e06  e002 b $080e5e0e
What we is gonna do is change that 08 ta 00, snce no Map uses 00 anyway as far as it matters just change it ta any othar value that doesn't nvolve Maps that you can run on. So, ta apply dis spheal simply put 00 at 0xE5E00.

Enjoy!
__________________
Reply With Quote
  #18    
Old January 31st, 2010 (11:17 PM).
Tropical Sunlight's Avatar
Tropical Sunlight
The Faltine
 
Join Date: Mar 2008
Location: Slovenia
Age: 18
Gender: Male
Send a message via Windows Live Messenger to Tropical Sunlight
Off tha hook, just did dis n Turquoise! Thanks, SphealMew!
Reply With Quote
  #19    
Old February 1st, 2010 (12:52 AM). Edited February 1st, 2010 by HackMew.
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
>> TA ALL: First post updated! Now ncludes Ruby, Sapphire and Emerald tao :D

Quote orignally posted by liuyanghejerry:
Dis is very nterestng.
But dis nspire me that why don't we try ta reuse select,R,L?
N FR,RL goes ta a helpless help and n RSE, it's tatally no use...
Maybe we could create codes like what B and select does,and make R,L new use n OW.
Maybe press R ta fish?
Well, not really. You can use L/R ta scroll n tha bag or n tha Pokémon stat screens. Even on R/S/E. But yeah, those buttans is not used a lot I guess. Anyway, dis is knda offtapic here, sorry.


Quote orignally posted by ZodiacDaBootylicious:
Fo thugz nterested n havng tha Runnng Shoes spheal on Ruby, you're n fo some good news ^^ I've come up wit mah own spheal fo Ruby snce I don't thnk tha sbee way works, AFAIK.
You know, I was gong ta post tha R/S/E stuff later, but thanks nonethaless.


Quote orignally posted by H2O Turquoise:
Off tha hook, just did dis n Turquoise! Thanks, SphealMew!
You're welcome. Even if I didn't sez explicitly, a tny bit of credit is always appreciated.
__________________
Reply With Quote
  #20    
Old February 1st, 2010 (02:29 AM).
Flandre Scarlet's Avatar
Flandre Scarlet
Free your mind.
Community Supporter
 
Join Date: Feb 2008
Location: Australia
Age: 19
Gender: Male
Nature: Adamant
Hahaha, I was just bout ta ask fo an Emerald version But it looks like its already done. Thank you so much SphealMew! Works perfectly!
Reply With Quote
  #21    
Old February 12th, 2010 (10:19 AM).
simdu68's Avatar
simdu68
asleep all summer zzZZ
 
Join Date: Feb 2010
Location: France
Age: 20
Gender: Male
Nature: Calm
sorry but i'm so bad n scriptng that i don't understand '

well n fact tha first part i understand but not tha second wit tha offsets...........


edit:
n fact i have anothar question, is it possible ta change it also wit tha bicycle ta be able ta drive wit tha bike n tha hizouses? that would also be bootylicious
Reply With Quote
  #22    
Old February 12th, 2010 (11:29 AM).
Sagiri's Avatar
Sagiri
 
Join Date: Mar 2007
Age: 20
Quote orignally posted by simdu68:
sorry but i'm so bad n scriptng that i don't understand -_-'

well n fact tha first part i understand but not tha second wit tha offsets...........


edit:
n fact i have anothar question, is it possible ta change it also wit tha bicycle ta be able ta drive wit tha bike n tha hizouses? that would also be bootylicious^^
You open a hex editar, go ta tha specified offset and change tha 08 found thare wit 00.

Bikng anywhere is thaoretically possible, but not wit dis.
Reply With Quote
  #23    
Old February 12th, 2010 (11:41 AM).
simdu68's Avatar
simdu68
asleep all summer zzZZ
 
Join Date: Feb 2010
Location: France
Age: 20
Gender: Male
Nature: Calm
ah ok
i haven't gots hex editar i'm makng scripts wit somethng alse, probably worse

so i'll download hex editar maybe i'll understand

thanx :D
Reply With Quote
  #24    
Old February 12th, 2010 (11:46 AM).
Muffin™'s Avatar
Muffin™
Knows your age
 
Join Date: Dec 2009
Location: sucking balls
Age: 4
Gender: Male
Nature: Calm
Send a message via AIM to Muffin™
Thanks so much SphealMew! I always love yo tutarials!!!
__________________
>>>/v/
Reply With Quote
  #25    
Old February 12th, 2010 (12:02 PM).
simdu68's Avatar
simdu68
asleep all summer zzZZ
 
Join Date: Feb 2010
Location: France
Age: 20
Gender: Male
Nature: Calm
i just now read a scriptng tutarial, now i understand yo tutarial also

n fact i just didn't know dis scriptng language....... but hex editar is much better than mah old progrbem
Reply With Quote
Reply
Quick Reply

Sponsored Links
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 UTC -8. The time now is 02:58 AM.