The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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.


Advertise here

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old January 9th, 2010, 02:23 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice

Advertise here

Quick Research & Development Thread


This thread is for small-scale research and development that can be solved in a matter of, say, five or six posts (or less). If you think of something you want to investigate but think it is too minor or shot for an entire Research & Development thread, or discover a small titbit of information that, on its own, would not warrant a whole thread for itself, just post it here!

Posting format


When posting your researched articles, please post them in a format that can be easily understood. Along with posting all your research on the matter in hand, please include any website links, offsets, subsidiary information and the likes when posting your article. Posts that are unclear in their message or that miss out vital information will not be added to the directory, for the sake of convenience and ease of access.

Thread rules


All posts must follow the posting format above. In addition, posts must follow the rules detailed below. (Of course, please ensure that you follow the PokéCommunity global rules, as well as this subforum's local rules.)

This is not a Simple Question thread.
This is purely for quick research, don’t ask your ROM Hacking questions unless they are undocumented enough to warrant research. Simple Questions should be posted as unique threads in the Beginner's Lounge subforum.

You should have a minimum amount of knowledge on the matter in hand.
We expect that you’ll have knowledge of ROM Hacking and at least a small idea on what to do with what you've found out.

Reviving old topics in the thread is forbidden.
Unless you've found significant research and the case was unresolved in the first time of posting.

Thread Directory


To make navigating this thread easier for everybody, the posts in this thread are linked to in this directory. It is split into a few categories, and each link is marked with a prefix. The meaning of these prefixes is explained in the Key at the bottom of this post.

Mechanics Research


Scripting Research


Graphics Research


Audio Research


Other


Directory Key
[FR] - FireRed / LeafGreen (usually just FireRed)
[EM] - Emerald
[RS] - Ruby / Sapphire (usually just Ruby)
[OTHER] - Not necessarily specific to ROMs
[PMD] - Pokémon Mystery Dungeon (not necessarily the same versions)
[Part #] - Links to other posts that expand upon or correct the first part
__________________

Last edited by Spherical Ice; 1 Day Ago at 04:15 AM. Reason: updated some parts of the thread
Reply With Quote
  #2    
Old February 12th, 2010, 10:04 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
The title says it all. If you have any suggestions, or criticism or you spotted some erros, feel free to post. Otherwhise avoid spamming, thanks!
Note: only clean ROMs are taken into account. Also, features available in all games are not included.

[snip]Those pictures weren't meant to be there, I suppose XD[/giradialkia]
__________________

Last edited by giradialkia; December 29th, 2012 at 05:55 PM.
Reply With Quote
  #3    
Old February 12th, 2010, 04:20 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by HackMew View Post
The title says it all. If you have any suggestions, or criticism or you spotted some erros, feel free to post. Otherwhise avoid spamming, thanks!
HackMew, doesn't FireRed have Pokérus? Maybe you mean random Pokérus (in which case I wouldn't know) but as a feature it does.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #4    
Old February 13th, 2010, 11:36 AM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote:
Originally Posted by HackMew View Post
The title says it all. If you have any suggestions, or criticism or you spotted some erros, feel free to post. Otherwhise avoid spamming, thanks!]
Also, here are some other fixes you should include:
Battling 2 trainers at once: I'm sure FireRed has that, especially at the Battle Tower in 7 Island
Colored dialogue: I think Ruby has that, although limited, and I also think Emerald has that.
More than one Bike: I think with a little ASM, the hidden Key Items in FR/LG can be made to work with R/S/E standards, although I have no idea how to use it.
Pokérus: I KNOW FR/LG has it, and I think diegoisawesome is right on that call. That definitely needs to be corrected.
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world
Reply With Quote
  #5    
Old February 13th, 2010, 11:40 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Quote:
Originally Posted by Team Fail View Post
Also, here are some other fixes you should include:
Battling 2 trainers at once: I'm sure FireRed has that, especially at the Battle Tower in 7 Island
Colored dialogue: I think Ruby has that, although limited, and I also think Emerald has that.
More than one Bike: I think with a little ASM, the hidden Key Items in FR/LG can be made to work with R/S/E standards, although I have no idea how to use it.
Pokérus: I KNOW FR/LG has it, and I think diegoisawesome is right on that call. That definitely needs to be corrected.
By Coloured Dialogue, I think HackMew meant automatic colouring for person events; the numerous bike feature IS RS/E exclusive, as that list is for an unedited ROM, and I agree with you and diegoisawesome with the Pokérus factor.

Still, that is a very helpful post, HackMew.
__________________
Reply With Quote
  #6    
Old February 13th, 2010, 11:48 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by diegoisawesome View Post
HackMew, doesn't FireRed have Pokérus? Maybe you mean random Pokérus (in which case I wouldn't know) but as a feature it does.
Nope, it doesn't. It does support Pokérus as status, for compatibility. But you won't be able to infect other Pokémon and the virus will never wear off either.
You can't even get the Pokérus unless you trade/cheat. At least, that's what I read on Bulbapedia.


Quote:
Originally Posted by Team Fail View Post
Also, here are some other fixes you should include:
Battling 2 trainers at once: I'm sure FireRed has that, especially at the Battle Tower in 7 Island
Colored dialogue: I think Ruby has that, although limited, and I also think Emerald has that.
More than one Bike: I think with a little ASM, the hidden Key Items in FR/LG can be made to work with R/S/E standards, although I have no idea how to use it.
Pokérus: I KNOW FR/LG has it, and I think diegoisawesome is right on that call. That definitely needs to be corrected.
Are you sure on the Battle Tower? Mind checking again, just in case?
Also, for colored dialogue I meant, like The Master said, the automatic, gender-based coloring.
If you look at the original games, you'll see R/S/E messages are plain black.
__________________
Reply With Quote
  #7    
Old March 13th, 2010, 07:19 PM
Team Fail's Avatar
Team Fail
The fine line between in|sanity
Community Supporter
 
Join Date: May 2009
Age: 19
Gender: Male
Nature: Brave
Quote:
Originally Posted by HackMew View Post
Nope, it doesn't. It does support Pokérus as status, for compatibility. But you won't be able to infect other Pokémon and the virus will never wear off either.
You can't even get the Pokérus unless you trade/cheat. At least, that's what I read on Bulbapedia.




Are you sure on the Battle Tower? Mind checking again, just in case?
Also, for colored dialogue I meant, like The Master said, the automatic, gender-based coloring.
If you look at the original games, you'll see R/S/E messages are plain black.
I can see why there's no support for Pokerus: No RTC. It wears off at midnight, but there isn't a RTC.

I grabbed my LeafGreen (same as Firered...) Yup. At the battle tower, there are 4 modes:
Single
Double
Knockout
Mixed

On double, the trainers will face you- 2-on-2 matches (Double battles) until you complete the challenge or loose. Also, right before Pattern Bush, there are twins Miu and Mia that both send out Pikachu.

OK. I guess I was wrong for text coloring in R/S. I beat Ruby ages ago (360+ hours...) so I kinda forgot...
And sorry for a month-long response...
__________________

Pairs:
Kevin, Echidna
Follow me on Twitter! @TeamFail
Alt 1, リザードン
Miiverse
Pokémon Hackers Online
Alt 2: Jack Cayman



[04:20.39] <@GoGo> I WILL INSERT WITH PLEASURE
[04:20.45] <@GoGo> shut it Bela

[05:41.55] <Team_Fail> Blue Spider is interesting, but #MEHMasterRace
[05:42.20] <diegoisawesome> Team_Fail: Sounds like a bunch of unmotivated people that still want to try to take over the world

Last edited by Team Fail; March 13th, 2010 at 08:08 PM.
Reply With Quote
  #8    
Old March 13th, 2010, 08:26 PM
Gamer2020's Avatar
Gamer2020
This love is a sickness...
 
Join Date: Jun 2008
Location: Violet city!
Gender: Male
Nature: Bold
Send a message via AIM to Gamer2020 Send a message via Windows Live Messenger to Gamer2020 Send a message via Yahoo to Gamer2020 Send a message via Skype™ to Gamer2020
Quote:
Originally Posted by Team Fail View Post
I can see why there's no support for Pokerus: No RTC. It wears off at midnight, but there isn't a RTC.

I grabbed my LeafGreen (same as Firered...) Yup. At the battle tower, there are 4 modes:
Single
Double
Knockout
Mixed

On double, the trainers will face you- 2-on-2 matches (Double battles) until you complete the challenge or loose. Also, right before Pattern Bush, there are twins Miu and Mia that both send out Pikachu.

OK. I guess I was wrong for text coloring in R/S. I beat Ruby ages ago (360+ hours...) so I kinda forgot...
And sorry for a month-long response...
It is not the same as emerald though. That is just a normal double battle.
In Emerald if 2 trainers happen to both see you at the same time they will both battle you at once.
__________________
I find it amusing how people my steal ideas and then claim to be the first one to do something.

A present to people learning to make ROM hacking tools. - https://dl.dropboxusercontent.com/u/..._Functions.zip

If you want a successor to PGE then download this: http://www.pokecommunity.com/showthread.php?t=311461

This site likes to keep things quiet and buries things. Over the years I have seen many injustices on this website to members of the ROM hacking community. Some where even very important people in the community that are now gone. If you want a website where you will be treated fairly and you can voice your opinion while learning more about ROM hacking then please join the following website.
http://pokemonhackersonline.com/
Reply With Quote
  #9    
Old April 14th, 2010, 03:26 PM
Chaos Rush's Avatar
Chaos Rush
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
I think "Improved Graphics" is an opinion, not an actual fact.

Quite frankly, I think the FR/LG graphics are horrible.

EDIT: Okay, they aren't horrible, they look fine to be honest, but I still think that "Improved Graphics" is just an opinion.
__________________

The Chaos Emerald ROM Base (it's gonna take awhile)

DS-style 64x64 Pokémon Sprite Resource NOW COMPLETED
Custom Sugimori-style Pokémon Sprite Resource IN PROGRESS


Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete

Last edited by Chaos Rush; June 8th, 2010 at 06:49 PM.
Reply With Quote
  #10    
Old April 14th, 2010, 03:37 PM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by Chaos Rush View Post
I think "Improved Graphics" is an opinion, not an actual fact.

Quite frankly, I think the FR/LG graphics are horrible.
Well, that's meant as graphics engine. Maybe I'll reword it a little.
__________________
Reply With Quote
  #11    
Old May 1st, 2010, 08:17 AM
Shiny Quagsire's Avatar
Shiny Quagsire
Actually gone until Aug 20th .-.
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Does anyone know where each map's pokemon list is stored and how it is stored? Ex XXXX -level XX -species
__________________



Reply With Quote
  #12    
Old May 1st, 2010, 08:32 AM
mindfreak's Avatar
mindfreak
Belgium Rom hacker
 
Join Date: Dec 2007
You can find the offsets for each maps pokemon in Advance map.
Go to the wild pokemon tab and click on expand.
There you ll' find the offset.

its stored...

YY Min Lv
XX Max LV
FFFF Pokemon hex number
__________________
Reply With Quote
  #13    
Old June 16th, 2010, 08:57 PM
kittopian's Avatar
kittopian
The Kittopian CREATOR
 
Join Date: Mar 2010
Location: KITTOPIA
Well... I am researching "glitch moves" In the hope of creating more attacks... I would like to know where the move data table is so I may try to expand it because the "glitch move" data is really existing rom data, and if this is actualy acheivable Any way... hopefully I will be able to 'create' new moves. E.G. for 4th gen pokemon, ect.

My knowledge so far: Move data can be interpreted from other data.

P.S I do not truly know if this thread was where to put this...
__________________
The planet KITTOPIA... I belong there... I will return...

Last edited by kittopian; June 18th, 2010 at 06:27 PM.
Reply With Quote
  #14    
Old July 1st, 2010, 06:26 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Actually gone until Aug 20th .-.
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
I'm using JPAN's hacked engine, and I was wondering how I could turn his random water battle, to use the tree data? Here is the code he made:
Code:
.align 2
.thumb


/*Special 0x98 will start a random water battle, such as those in the sea.
Sister to the previous function, will start a water battle anywhere there is 
a water pokemon data.*/

Special_98: push {r4-r7, lr}
	    mov r7, r8
	    push {r7}
	    sub SP, SP, #0x8
	    ldr r0, water_data
	    lsl r4, r0, #0x18
	    lsr r4, r4, #0x18
	    ldr r1, wild_generator2
	    bx r1
.hword 0x0000
water_data: .word 0x22000410 /*the lake tile data*/
wild_generator2: .word 0x0806cbe5
__________________



Reply With Quote
  #15    
Old July 1st, 2010, 06:31 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by shiny quagsire View Post
I'm using JPAN's hacked engine, and I was wondering how I could turn his random water battle, to use the tree data? Here is the code he made:
Code:
.align 2
.thumb


/*Special 0x98 will start a random water battle, such as those in the sea.
Sister to the previous function, will start a water battle anywhere there is 
a water pokemon data.*/

Special_98: push {r4-r7, lr}
        mov r7, r8
        push {r7}
        sub SP, SP, #0x8
        ldr r0, water_data
        lsl r4, r0, #0x18
        lsr r4, r4, #0x18
        ldr r1, wild_generator2
        bx r1
.hword 0x0000
water_data: .word 0x22000410 /*the lake tile data*/
wild_generator2: .word 0x0806cbe5
Actually, you don't need to do that. there's already a built-in special for that, although I don't know what it is.
If you find it, please tell me, and I'll try to get it into my scripting tutorial.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #16    
Old July 1st, 2010, 06:41 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Actually gone until Aug 20th .-.
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
I believe it's special AB, which is unknown in XSE's guide. Here'd the code for rock smash:
Code:
'---------------
#org 0x1BE00C
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lockall
checkflag 0x825
if 0x0 goto 0x81BE091
checkattack 0xF9
compare LASTRESULT 0x6
if 0x1 goto 0x81BE091
setanimation 0x0 LASTRESULT
bufferpartypokemon 0x0 LASTRESULT
bufferattack 0x1 0xF9
msgbox 0x81BE09D MSG_YESNO '"This rock appears to be breakable...."
compare LASTRESULT 0x0
if 0x1 goto 0x81BE09A
msgbox 0x81BDFD7 MSG_KEEPOPEN '"[buffer1] used [buffer2]!"
closeonkeypress
doanimation 0x25
waitstate
goto 0x81BE06F

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x1BE091
msgbox 0x81BE0E2 MSG_SIGN '"It's a rugged rock, but a POKéMON\..."
end

'---------------
#org 0x1BE09A
closeonkeypress
releaseall
end

'---------------
#org 0x1BE06F
applymovement LASTTALKED 0x81BE08F
waitmovement 0x0
hidesprite LASTTALKED
special 0xAB
compare LASTRESULT 0x0
if 0x1 goto 0x81BE08D
waitstate
releaseall
end

'---------------
#org 0x1BE08D
releaseall
end


'---------
' Strings
'---------
#org 0x1BE09D
= This rock appears to be breakable.\nWould you like to use ROCK SMASH?

#org 0x1BDFD7
= [buffer1] used [buffer2]!

#org 0x1BE0E2
= It's a rugged rock, but a POKéMON\nmay be able to smash it.


'-----------
' Movements
'-----------
#org 0x1BE08F
#raw 0x68 'mov68
#raw 0xFE 'End of Movements
__________________



Reply With Quote
  #17    
Old July 1st, 2010, 06:50 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by shiny quagsire View Post
I believe it's special AB, which is unknown in XSE's guide. Here'd the code for rock smash:
Code:
'---------------
#org 0x1BE00C
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lockall
checkflag 0x825
if 0x0 goto 0x81BE091
checkattack 0xF9
compare LASTRESULT 0x6
if 0x1 goto 0x81BE091
setanimation 0x0 LASTRESULT
bufferpartypokemon 0x0 LASTRESULT
bufferattack 0x1 0xF9
msgbox 0x81BE09D MSG_YESNO '"This rock appears to be breakable...."
compare LASTRESULT 0x0
if 0x1 goto 0x81BE09A
msgbox 0x81BDFD7 MSG_KEEPOPEN '"[buffer1] used [buffer2]!"
closeonkeypress
doanimation 0x25
waitstate
goto 0x81BE06F

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x1BE091
msgbox 0x81BE0E2 MSG_SIGN '"It's a rugged rock, but a POKéMON\..."
end

'---------------
#org 0x1BE09A
closeonkeypress
releaseall
end

'---------------
#org 0x1BE06F
applymovement LASTTALKED 0x81BE08F
waitmovement 0x0
hidesprite LASTTALKED
special 0xAB
compare LASTRESULT 0x0
if 0x1 goto 0x81BE08D
waitstate
releaseall
end

'---------------
#org 0x1BE08D
releaseall
end


'---------
' Strings
'---------
#org 0x1BE09D
= This rock appears to be breakable.\nWould you like to use ROCK SMASH?

#org 0x1BDFD7
= [buffer1] used [buffer2]!

#org 0x1BE0E2
= It's a rugged rock, but a POKéMON\nmay be able to smash it.


'-----------
' Movements
'-----------
#org 0x1BE08F
#raw 0x68 'mov68
#raw 0xFE 'End of Movements
I think that's it! Try it out in a script and see what you get.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #18    
Old July 1st, 2010, 07:00 PM
Shiny Quagsire's Avatar
Shiny Quagsire
Actually gone until Aug 20th .-.
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Yeah, I tried it and it worked
__________________



Reply With Quote
  #19    
Old July 1st, 2010, 07:04 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by shiny quagsire View Post
Yeah, I tried it and it worked
Awesome! I'll add it in as soon as I update the old tutorial. It might take a while, though.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote
  #20    
Old July 16th, 2010, 06:35 PM
Chaos Rush's Avatar
Chaos Rush
im sexy and i know it
 
Join Date: May 2007
Location: Taylor Swift
Gender: Male
Nature: Adamant
I found out how to edit the Battle Tower opponent Pokemon in Pokemon Ruby. The data is located at 0x4038E0.

I posted a whole thread about it, but just in case it doesn't get approved, I wanted to mention the offset anyway, because hopefully some hacker more advanced than me can find out where the pointer is.

I don't want to explain in detail the data, but at 0x4038E0, change 19 into 18, and congratulations, most Pikachu will now turn into Arboks in the Battle Tower.
__________________

The Chaos Emerald ROM Base (it's gonna take awhile)

DS-style 64x64 Pokémon Sprite Resource NOW COMPLETED
Custom Sugimori-style Pokémon Sprite Resource IN PROGRESS


Non-Pokémon hacks I support:
Sonic Classic Heroes
Sonic 3 Complete
Reply With Quote
  #21    
Old July 26th, 2010, 09:58 AM
knizz's Avatar
knizz
 
Join Date: Aug 2007
I found this in the US-FR-Rom:
Spoiler:
081e3b14 b580 push {r7,lr}
081e3b16 b084 add sp, -#0x10
081e3b18 466f mov r7, sp
081e3b1a 6038 str r0, [r7, #0x0]
081e3b1c 6079 str r1, [r7, #0x4]
081e3b1e 60ba str r2, [r7, #0x8]
081e3b20 60fb str r3, [r7, #0xc]
081e3b22 68f8 ldr r0, [r7, #0xc]
081e3b24 2800 cmp r0, #0x0
081e3b26 d00b beq $081e3b40
081e3b28 4804 ldr r0, [$081e3b3c] (=$086fc08c)
081e3b2a 687a ldr r2, [r7, #0x4]
081e3b2c 68bb ldr r3, [r7, #0x8]
081e3b2e 6839 ldr r1, [r7, #0x0]
081e3b30 f7ff bl $081e39d8
081e3b34 f7ff bl $081e3b04
081e3b38 efff [ ??? ]
081e3b3a e007 b $081e3b4c
...
081e3b4c b004 add sp, #0x10
081e3b4e bc80 pop {r7}
081e3b50 bc01 pop {r0}
081e3b52 4700 bx r0

What is this [ ??? ]-instruction doing there?
__________________
Firered IDA 6.1 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support (no longer in development)

Last edited by knizz; July 26th, 2010 at 10:05 AM.
Reply With Quote
  #22    
Old July 26th, 2010, 12:38 PM
prime-dialga's Avatar
prime-dialga
pure darkness
 
Join Date: Dec 2009
Gender: Male
Some hwords have no opcode in Thumb.
If you try to decompile one of this hwords the output is [???].

Maybe it is a grafik or an ARM code.
Reply With Quote
  #23    
Old July 26th, 2010, 05:12 PM
knizz's Avatar
knizz
 
Join Date: Aug 2007
Quote:
Originally Posted by prime-dialga View Post
Some hwords have no opcode in Thumb.
If you try to decompile one of this hwords the output is [???].

Maybe it is a grafik or an ARM code.
That's what I thought at first too. But it all makes sense:
  • The function pushes registers in the first line
  • The function pops registers in the last line
  • The registers are popped to the positions they were pushed from except for lr/pc of course.
  • The stack-pointer is decreased and then used to the limit. (Why allocate more or less?)
  • The cmp-opcode is followed by a beq-opcode.
  • The functions called from this function are valid too.

It *has* to be THUMB-Code!
__________________
Firered IDA 6.1 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support (no longer in development)
Reply With Quote
  #24    
Old August 16th, 2010, 06:02 PM
JPAN
pokemon rom researcher
 
Join Date: Dec 2008
I found something that bugs a lot of people, the fact HM moves cannot be deleted, can be easily erased on Fire Red.
There are two main routines that check if an attack is an HM or not:
one for the battle routine at 0x80441B8;
one for the in-screen move learning at 0x08125A90.
Both routines check for HMs in different locations.
The first checks if the attack given is part of a non-deletion list at 0x0825e014, ended in FFFF, and searches through it until it reaches the ending value, or finding a valid attack. Here's the code:
Code:
ROM:080441B8 ; =============== S U B R O U T I N E =======================================
ROM:080441B8
ROM:080441B8
ROM:080441B8 Battle_HM_set                           ; CODE XREF: sub_80CE8DC+A80p
ROM:080441B8                 PUSH    {R4,LR}
ROM:080441BA                 LSLS    R0, R0, #0x10
ROM:080441BC                 LSRS    R3, R0, #0x10        ;given attack stored
ROM:080441BE                 LDR     R2, =unk_825E014        ;list location
ROM:080441C0                 LDRH    R0, [R2]
ROM:080441C2                 LDR     R1, =0xFFFF
ROM:080441C4                 CMP     R0, R1
ROM:080441C6                 BEQ     loc_80441EA          ;is end of list
ROM:080441C8                 MOVS    R4, R1
ROM:080441CA                 ADDS    R1, R2, #0
ROM:080441CC
ROM:080441CC loc_80441CC                             ; CODE XREF: Battle_HM_set+30j
ROM:080441CC                 LDRH    R0, [R2]
ROM:080441CE                 ADDS    R1, #2
ROM:080441D0                 ADDS    R2, #2
ROM:080441D2                 CMP     R0, R3
ROM:080441D4                 BNE     loc_80441E4
ROM:080441D6                 MOVS    R0, #1        ;is same attack, undeletable
ROM:080441D8                 B       loc_80441EC
ROM:080441D8 ; ---------------------------------------------------------------------------
ROM:080441DA                 DCB    0
ROM:080441DB                 DCB    0
ROM:080441DC off_80441DC     DCD unk_825E014         ; DATA XREF: Battle_HM_set+6r
ROM:080441E0 dword_80441E0   DCD 0xFFFF              ; DATA XREF: Battle_HM_set+Ar
ROM:080441E4 ; ---------------------------------------------------------------------------
ROM:080441E4
ROM:080441E4 loc_80441E4                             ; CODE XREF: Battle_HM_set+1Cj
ROM:080441E4                 LDRH    R0, [R1]
ROM:080441E6                 CMP     R0, R4
ROM:080441E8                 BNE     loc_80441CC    ;new end_of_list check
ROM:080441EA
ROM:080441EA loc_80441EA                             ; CODE XREF: Battle_HM_set+Ej
ROM:080441EA                 MOVS    R0, #0      ;ended list, attack deletable
ROM:080441EC
ROM:080441EC loc_80441EC                             ; CODE XREF: Battle_HM_set+20j
ROM:080441EC                 POP     {R4}
ROM:080441EE                 POP     {R1}
ROM:080441F0                 BX      R1
The other searches for them at 0x0845A80C, the TM attack list. It does so by looking over the TMs at position 50+
Code:
ROM:08125A90 ; =============== S U B R O U T I N E =======================================
ROM:08125A90
ROM:08125A90
ROM:08125A90 Check_for_HM                            ; CODE XREF: ROM:0813939Ep
ROM:08125A90                 PUSH    {LR}
ROM:08125A92                 LSLS    R0, R0, #0x10
ROM:08125A94                 LSRS    R2, R0, #0x10
ROM:08125A96                 MOVS    R1, #0
ROM:08125A98                 LDR     R3, =TM_List        ;Location for all TM Attacks
ROM:08125A9A
ROM:08125A9A loc_8125A9A                             ; CODE XREF: Check_for_HM+28j
ROM:08125A9A                 MOVS    R0, R1
ROM:08125A9C                 ADDS    R0, #0x32
ROM:08125A9E                 LSLS    R0, R0, #1
ROM:08125AA0                 ADDS    R0, R0, R3
ROM:08125AA2                 LDRH    R0, [R0]             ;loads HM required by R1
ROM:08125AA4                 CMP     R0, R2
ROM:08125AA6                 BNE     loc_8125AB0
ROM:08125AA8                 MOVS    R0, #1            ;if equal, undeletable, return 1
ROM:08125AAA                 B       loc_8125ABC
ROM:08125AAA ; ---------------------------------------------------------------------------
ROM:08125AAC off_8125AAC     DCD TM_List             ; DATA XREF: Check_for_HM+8r
ROM:08125AB0 ; ---------------------------------------------------------------------------
ROM:08125AB0
ROM:08125AB0 loc_8125AB0                             ; CODE XREF: Check_for_HM+16j
ROM:08125AB0                 ADDS    R0, R1, #1
ROM:08125AB2                 LSLS    R0, R0, #0x18
ROM:08125AB4                 LSRS    R1, R0, #0x18
ROM:08125AB6                 CMP     R1, #6         ;maximum TM checking
ROM:08125AB8                 BLS     loc_8125A9A
ROM:08125ABA                 MOVS    R0, #0       ;not any TM, deletable
ROM:08125ABC
ROM:08125ABC loc_8125ABC                             ; CODE XREF: Check_for_HM+1Aj
ROM:08125ABC                 POP     {R1}
ROM:08125ABE                 BX      R1
So, how to "fix" it? Well, change 080441D6 to 00 and 08125AA8 to 00 to make no attack undeletable.
If, on the other hand, you have a wish to prevent the player from deleting random attacks, simply repoint the list to a location where your attacks fit (plus the 0xffff part), and change the following addresses:
0x08125A9C to 00 (one byte only)
0x08125AAC to your list pointer reversed
0x08125AB6 to the number of attacks you placed -2 (to a max of 101 undeletable attacks)

If, for some reason, you wish to make all attacks undeletable, change
080441EA to 00
08125ABA to 00

Hope this helps those hacks who want to get rid of HMs.
__________________
Here are the links for my work


Currently working on:
Battle Script Documentation
Another large project
Reply With Quote
  #25    
Old August 18th, 2010, 08:32 AM
Saxisai's Avatar
Saxisai
Unbeatable 3's-Unstopable Trio
 
Join Date: Jul 2007
Location: Chambersburg, PA
Age: 21
Gender: Male
Nature: Naughty
I don't know if this belongs here but I didn't know where else to post it.

Has anyone thought of a way to hack the pal park in the generation iv games?
__________________


HeartGold FC: 0732-7327-6698
SoulSilver FC: 2193-0253-0727
Platinum FC: 3652-7229-4117

PM Me if you added me so I can add you

YELLOW CRYSTAL EMERALD PLATINUM BLACK
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 01:58 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.