The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Research & Development
Reload this Page Code ASM Resource 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
  #176   Link to this post, but load the entire thread.  
Old December 8th, 2014 (6:26 PM). Edited December 12th, 2014 by Blah.
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by DJTiKi View Post
Alright, I have a request. Remove the "Save" Option from the main menu but still be able to save it using the special, if I'm correct(I'm not sure if this was done yet, just a neat suggestion)
He says I can post it, so I will now :)

Quote:
Originally Posted by LocksmithArmy View Post
so like you could use items to save, but not the main menu... thatd be cool
Hi, this is a matter of tracking the routine that does the saving and calling it. While I don't know where it is, perhaps you can track it down if I tell you that the routine called when you hit save in the start menu is 0x6F4E8. Happy hacking!

Quote:
Originally Posted by Bauerklos View Post
Interesting, this will be helpful in the future. :D
That's the plan, if you have any routines which you would like to see, feel free to request them here.

Swapping between two possible start menus



Basically this routine will allow the player to have two different start menus. The start menu shown is dependent on a flag being set. The second one will not have a "Save" option.

How to insert:

Compile and insert into free space the following routine:
Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func
main:
	mov r0, #0x94 @flag 0x250 divided by 4 (change if you want)
	lsl r0, #0x2
	ldr r1, =(0x806E6D0 +1)
	bl linker
	cmp r0, #0x0
	bne showMine

end:
	mov r0, #0x1
	ldr r1, =(0x806ED70 +1)
	bx r1
 
showMine:
	mov r0, #0x82
	lsl r0, r0, #0x4
	add r0, r0, #0x9
	ldr r1, =(0x806E6D0 +1)
	bl linker
	cmp r0, #0x0
	beq noDex
	mov r0, #0x0
	ldr r1, =(0x806ED94 +1)
	bl linker

noDex:
	mov r0, #0x82
	lsl r0, r0, #0x4
	add r0, r0, #0x8
	ldr r1, =(0x806E6D0 +1)
	bl linker
	cmp r0, #0x0
	beq noMon
	mov r0, #0x1
	ldr r1, =(0x806ED94 +1)
	bl linker

noMon:
	mov r0, #0x2
	ldr r1, =(0x806ED94 +1)
	bl linker
	mov r0, #0x3
	ldr r1, =(0x806ED94 +1)
	bl linker
	mov r0, #0x5
	ldr r1, =(0x806ED94 +1)
	bl linker
	mov r0, #0x6
	ldr r1, =(0x806ED94 +1)
	bl linker
	pop {r0}
	bx r0
 
linker2:
	bx r0
 
linker:
	bx r1

.align 2


Navigate to 0x6ED5C and insert the following byte changes:
Code:
00 48 00 47 XX XX XX 08
Where XX XX XX is the pointer (plus 1) in reverse hex to where you inserted the routine.
Navigate to 0x6EE42 and change 08 to 00.

Usage:
setflag 0x250 = show menu without save
clearflag 0x250 = show menu with save

That's it. It's toggled internally depending on the flag's state.
__________________
...
Reply With Quote
  #177   Link to this post, but load the entire thread.  
Old December 8th, 2014 (6:38 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Pokemon Item Checker + Silent Evolution Combination as an item effect
This is my personal request that canbe a general feature.
I wanted in my hack to make Mewtwo evolves into Armoured Mewtwo with "Legendary Armour"
but this is not the same in others, It will evolve Mewtwo using Metal Vessel if it is holding Legendary Armour but in a silent mode.
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #178   Link to this post, but load the entire thread.  
Old December 8th, 2014 (8:09 PM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
Quote:
Originally Posted by Lance32497 View Post
Pokemon Item Checker + Silent Evolution Combination as an item effect
This is my personal request that canbe a general feature.
I wanted in my hack to make Mewtwo evolves into Armoured Mewtwo with "Legendary Armour"
but this is not the same in others, It will evolve Mewtwo using Metal Vessel if it is holding Legendary Armour but in a silent mode.
If you would read some of the older posts, Fbi Agent said he wasnt gonna do this cause daniilS has done it but hes working on it some more. aSk him is you would want to use it.
__________________
New living flesh vessel who dis?
Reply With Quote
  #179   Link to this post, but load the entire thread.  
Old December 8th, 2014 (8:27 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by joexv View Post
If you would read some of the older posts, Fbi Agent said he wasnt gonna do this cause daniilS has done it but hes working on it some more. aSk him is you would want to use it.
No no no, Daniils is working for mega evolution, and it is definitely not the same in my request, Mega evolution occurs inside the battle while my request occurs in overworld.
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #180   Link to this post, but load the entire thread.  
Old December 8th, 2014 (8:30 PM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
Quote:
Originally Posted by Lance32497 View Post
No no no, Daniils is working for mega evolution, and it is definitely not the same in my request, Mega evolution occurs inside the battle while my request occurs in overworld.

Yes I understnad that. He also made this. He shared the old version of the code with me, but I am no good at asm so it wasnt very useful in my hands.T.T
__________________
New living flesh vessel who dis?
Reply With Quote
  #181   Link to this post, but load the entire thread.  
Old December 8th, 2014 (8:30 PM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Lance32497 View Post
Pokemon Item Checker + Silent Evolution Combination as an item effect
This is my personal request that canbe a general feature.
I wanted in my hack to make Mewtwo evolves into Armoured Mewtwo with "Legendary Armour"
but this is not the same in others, It will evolve Mewtwo using Metal Vessel if it is holding Legendary Armour but in a silent mode.
You would use the party checker routine to check if Mewtwo is holding the item. Then, depending on the return you would call silent evolution. It's just simply combining two routines I've already done.

Quote:
Originally Posted by joexv View Post
If you would read some of the older posts, Fbi Agent said he wasnt gonna do this cause daniilS has done it but hes working on it some more. aSk him is you would want to use it.
Thanks.

Get Pokemon Type



Recently, someone commented on the limitations of my special 0x12b edit. Honestly speaking it is very limited, and only really has a use for checking if you have a certain type of Pokemon. If you had multiple pokemon of the same type it would only return the first one..ect.ect. Well I decided to customize it a little more. It's less powerful now, but more useful (hopefully). All it does is return the type of a Pokemon in a certain slot.

How to insert:

Compile and insert into free space the following routine:
Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func

main: 
	push {r0-r2, lr}
	ldr r1, =(0x20370B8) @var 0x8000 is slot (0x0 to 0x5)
	ldrb r1, [r1]
	mov r0, #0x64
	mul r1, r1, r0 @slot to check
	ldr r0, =(0x2024284)	
	add r0, r0, r1
	mov r1, #0xB
	ldr r2, =(0x803FBE8 +1)
	bl linker
	lsl r0, r0, #0x10
	lsr r0, r0, #0x10
	lsl r1, r0, #0x3
	sub r1, r1, r0
	lsl r1, r1, #0x2
	ldr r2, =(0x8254784)
	add r1, r1, r2
	ldrb r0, [r1, #0x6]
	ldr r1, =(0x20370B8)
	strb r0, [r1]
	pop {r0-r2, pc}

linker:
	bx r2	
	

.align 2
Sorry, too lazy to fetch compiled version :D


Usage:
setvar 0x8000 0x[pokemon slot from 0 to 5]
callasm 0x[routine +1]

It will store the Pokemon's type in variable 0x8000 in the form of an integer. The values in decimal follow this table (it will be stored in hex of course):
Code:
0x0 - Normal
0x1 - Fighting	
0x2 - Flying
0x3 - Poison
0x4 - Ground
0x5 - Rock
0x6 - Bug
0x7 - Ghost
0x8 - Steel
0x9 - ???
0xA - Fire
0xB - Water
0xC - Grass
0xD - Electric
0xE - Psychic
0xF - Ice
0x10 - Dragon
0x11 - Dark
__________________
...
Reply With Quote
  #182   Link to this post, but load the entire thread.  
Old December 8th, 2014 (8:33 PM). Edited December 8th, 2014 by Lance32497.
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
FBI, yup a combination but It will be an item effect

Quote:
Originally Posted by joexv View Post
Yes I understnad that. He also made this. He shared the old version of the code with me, but I am no good at asm so it wasnt very useful in my hands.T.T
What is the code?
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #183   Link to this post, but load the entire thread.  
Old December 8th, 2014 (8:57 PM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
Quote:
Originally Posted by Lance32497 View Post
FBI, yup a combination but It will be an item effect



What is the code?

Idk. I forgot where I put it. If you really want it ask him.
__________________
New living flesh vessel who dis?
Reply With Quote
  #184   Link to this post, but load the entire thread.  
Old December 8th, 2014 (10:25 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by joexv View Post
Idk. I forgot where I put it. If you really want it ask him.
Ahhm okay ^_^
Evolution through script
This is just an opposite of Silent evolution, when a var is set into something, it will evolve the pokemon wherever in slot you wanted with the Evolution effect.
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #185   Link to this post, but load the entire thread.  
Old December 9th, 2014 (7:10 AM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 26
Gender: Male
Posts: 252
Quote:
Originally Posted by Lance32497 View Post
Ahhm okay ^_^
Evolution through script
This is just an opposite of Silent evolution, when a var is set into something, it will evolve the pokemon wherever in slot you wanted with the Evolution effect.
That's ... exactly what silent evolution does. -_- Unless you're talking about silent evolution with the evolution animation added, which FBI is working on, if you read his post closely.
Reply With Quote
  #186   Link to this post, but load the entire thread.  
Old December 9th, 2014 (7:30 AM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by HidoranBlaze View Post
Unless you're talking about silent evolution with the evolution animation added, which FBI is working on, if you read his post closely.
Yah, that is what Im looking for, His Silent evolutuon with evolution animation, I didnt noticed that he is working for that..
A liitle question, Is that you who's working on an specific Pokemon when enters the battle, it calls rain or sunny day, although it doesnt have Drought and Drizzle ability?
As far as I remember, that's you.
Looking forward for it >_<
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #187   Link to this post, but load the entire thread.  
Old December 9th, 2014 (9:05 AM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
I have a request, but it may be a little too game specific. Could you make a routine that after every battle scans to see if a certain pokemon evolved? And then runs a set script when it happens?
I guess the scan party for a Pokemon script would work too but is there a way to make it run after every battle?
__________________
New living flesh vessel who dis?
Reply With Quote
  #188   Link to this post, but load the entire thread.  
Old December 9th, 2014 (9:37 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Lance32497 View Post
FBI, yup a combination but It will be an item effect
What is the code?
Use Darthatron's code, and follow the instructions carefully, it works.

Quote:
Originally Posted by Lance32497 View Post
Ahhm okay ^_^
Evolution through script
This is just an opposite of Silent evolution, when a var is set into something, it will evolve the pokemon wherever in slot you wanted with the Evolution effect.
The evolution animation is actually kinda wierd. I have the whole animation working, however once the animation is over and it's time to return to overworld the game freezes. I'm not too sure why that is, I just know it's not very easy to fix (I have to ask my graphics sensei). Oh plus this is graphics :P

Quote:
Originally Posted by HidoranBlaze View Post
That's ... exactly what silent evolution does. -_- Unless you're talking about silent evolution with the evolution animation added, which FBI is working on, if you read his post closely.
Thanks.


Quote:
Originally Posted by joexv View Post
I have a request, but it may be a little too game specific. Could you make a routine that after every battle scans to see if a certain pokemon evolved? And then runs a set script when it happens?
I guess the scan party for a Pokemon script would work too but is there a way to make it run after every battle?
Oh man. I'm not very confident I can do it, but I'll try and see how it goes. There's a few complications, for example how do I know it evolved? The only real way to know is if the game's evolution routine was called. Hacking that is actually not a good idea, it's kinda weird. The routine has a very LOW priority and so the script will end up running before the routine.

To check if a Pokemon evolved the best way to do it is to store the party's species before the battle, and then compare it after the battle. Even then, like I said the evolution routine will end up running AFTER the script, so the check will show nothing evolve, and then it will evolve lol. This would work very nicely in scripted battles, but non-scripted battles it would probably fail. I would just have made it so that it runs the script after you take a step after battle.

Slight progress on trainer sliding:

__________________
...
Reply With Quote
  #189   Link to this post, but load the entire thread.  
Old December 9th, 2014 (9:48 AM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
Quote:
Originally Posted by FBI agent View Post
Oh man. I'm not very confident I can do it, but I'll try and see how it goes. There's a few complications, for example how do I know it evolved? The only real way to know is if the game's evolution routine was called. Hacking that is actually not a good idea, it's kinda weird. The routine has a very LOW priority and so the script will end up running before the routine.

To check if a Pokemon evolved the best way to do it is to store the party's species before the battle, and then compare it after the battle. Even then, like I said the evolution routine will end up running AFTER the script, so the check will show nothing evolve, and then it will evolve lol. This would work very nicely in scripted battles, but non-scripted battles it would probably fail. I would just have made it so that it runs the script after you take a step after battle.
Dang I was hoping to avoid a scripted battle.:/ But I guess your silent evolution would work for that. Anyways, how bout making new trainerbattle 0x9?(The ones that run even if you lose.)
Maybe make one that doesnt have any of the annoying msgboxes and screen highlights?
__________________
New living flesh vessel who dis?
Reply With Quote
  #190   Link to this post, but load the entire thread.  
Old December 9th, 2014 (10:24 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 27
Gender: Male
Nature: Bold
Posts: 76
From what I've you do since this thread started, you are an incredible hacker as far as this community goes.
1st Thanks for all the work you've done this has gotten to so many ideas, and you've made them real in no time.
I still need to try everything you've done since its genius, but tell me if any of these sound plausible to do:

Illegal capture flag -- setting a flag which would make it 'illegal' to capture wild pokemon as long as its on, like for a fancy garden where the owner doesn't like pokemon being captured or a town which believes its wrong to capture pokemon...
Longer nickname for pokemon -- such that you could add the prefix 'Shadow/SHDW' to wild nicknamed pokemon.

Lastly its on the border of graphical since idk if it means full on graphic changes or just a small change:
Change the box color surrounding a pokemon like in shinies to a different color via script?
Reply With Quote
  #191   Link to this post, but load the entire thread.  
Old December 9th, 2014 (11:43 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by joexv View Post
Dang I was hoping to avoid a scripted battle.:/ But I guess your silent evolution would work for that. Anyways, how bout making new trainerbattle 0x9?(The ones that run even if you lose.)
Maybe make one that doesnt have any of the annoying msgboxes and screen highlights?
The Oak battle is actually it's own little special battle. To mimic it, would be to re-write the whole thing. However, you're in luck. I'm already in the works of writing a battle-cancel routine which ends the battle forcibly and continues the script. So far it's working very well! To modify that to work when the player has lost the match is actually a little harder, but maybe if I have time I'll look into it :P

Quote:
Originally Posted by Turtl3Skulll View Post
From what I've you do since this thread started, you are an incredible hacker as far as this community goes.
1st Thanks for all the work you've done this has gotten to so many ideas, and you've made them real in no time.
I still need to try everything you've done since its genius, but tell me if any of these sound plausible to do:

Illegal capture flag -- setting a flag which would make it 'illegal' to capture wild pokemon as long as its on, like for a fancy garden where the owner doesn't like pokemon being captured or a town which believes its wrong to capture pokemon...
Longer nickname for pokemon -- such that you could add the prefix 'Shadow/SHDW' to wild nicknamed pokemon.

Lastly its on the border of graphical since idk if it means full on graphic changes or just a small change:
Change the box color surrounding a pokemon like in shinies to a different color via script?
Thank you for your kind words, I appreciate that you appreciate what I'm doing :)

1) Illegal capture flag? I've made a routine that toggles capturability of Pokemon already, look in the first post!
2) Longer nickname for Pokemon (I don't really feel the need to do it, because no one will really use it.) Pokemon Nicknames are stored in RAM as 11 bytes, changing that to be longer would require a full rework of the Pokemon storage (aka, not easy or really feasible). That being said, I suppose I can make longer names read from a pointer.
Hmmm...if I have time and patience to step through I'll look into it. I'm sure I will end up having to hook in many places, and there will most definitely be text overflow somewhere.

3) Why not just make the Pokemon shiny? HackMew's made a tool for shiny Pokemon
__________________
...
Reply With Quote
  #192   Link to this post, but load the entire thread.  
Old December 9th, 2014 (11:50 AM).
Turtl3Skulll's Avatar
Turtl3Skulll Turtl3Skulll is offline
Blue Turtl3
 
Join Date: Jun 2013
Location: Utah, U.S.A.
Age: 27
Gender: Male
Nature: Bold
Posts: 76
Quote:
Originally Posted by FBI agent View Post
The Oak battle is actually it's own little special battle. To mimic it, would be to re-write the whole thing. However, you're in luck. I'm already in the works of writing a battle-cancel routine which ends the battle forcibly and continues the script. So far it's working very well! To modify that to work when the player has lost the match is actually a little harder, but maybe if I have time I'll look into it :P



Thank you for your kind words, I appreciate that you appreciate what I'm doing :)

1) Illegal capture flag? I've made a routine that toggles capturability of Pokemon already, look in the first post!
2) Longer nickname for Pokemon (I don't really feel the need to do it, because no one will really use it.) Pokemon Nicknames are stored in RAM as 11 bytes, changing that to be longer would require a full rework of the Pokemon storage (aka, not easy or really feasible). That being said, I suppose I can make longer names read from a pointer.
Hmmm...if I have time and patience to step through I'll look into it. I'm sure I will end up having to hook in many places, and there will most definitely be text overflow somewhere.

3) Why not just make the Pokemon shiny? HackMew's made a tool for shiny Pokemon
Dood you're welcome I love your work :)

1) I thought the toggle capturability was in succession with the capture trainer pokemon only, if it works with wild pokemon then nevermind lol
2) I imagine an overflow error would occur, if you can that'd be great, I knew that would be a real stretch though.
3) I don't want it to be shiny, I want to be able to change that box color to any other color to symbolize special pokemon such as Shadow pokemon, since coding a shadow pokemon would be too much of a hassle.
Reply With Quote
  #193   Link to this post, but load the entire thread.  
Old December 9th, 2014 (11:56 AM).
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Turtl3Skulll View Post
Dood you're welcome I love your work :)

1) I thought the toggle capturability was in succession with the capture trainer pokemon only, if it works with wild pokemon then nevermind lol
2) I imagine an overflow error would occur, if you can that'd be great, I knew that would be a real stretch though.
3) I don't want it to be shiny, I want to be able to change that box color to any other color to symbolize special pokemon such as Shadow pokemon, since coding a shadow pokemon would be too much of a hassle.
1) There's another routine I wrote separate for wild pokemon and a second one for trainers.
2) Yeah, probably not gonna be able to in the near future :(
3) This is a graphical implementation, however, I like you, so I'll look into it :P
__________________
...
Reply With Quote
  #194   Link to this post, but load the entire thread.  
Old December 9th, 2014 (1:31 PM). Edited December 9th, 2014 by Blah.
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924

Special Shiny Pokemon box!



This is the first, and probably last, graphical hack I ever want to do. All it does is add the nice Shiny box and start around a Pokemon that's not actually shiny.

How to insert:

Compile the following routine into free space:
Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func

main:
	mov r4, r0
	add r0, r0, #0x1E
	ldrb r0, [r0]
	cmp r0, #0x0
	bne setPal
	mov r0, r4
	mov r1, #0x1
	mov r2, #0x0
	ldr r3, =(0x803FBE8 +1)
	bl linker
	ldr r5, =(0x804447C +1)
	bx r5

setPal:
	mov r0, #0x1
	pop {r4, r5}
	pop {r1}
	bx r1

linker:
	bx r3
	
	
.align 2
Here's a compiled version:
Code:
04 1C 1E 30 00 78 00 28 07 D1 20 1C 01 21 00 22 04 4B 00 F0 06 F8 04 4D 28 47 01 20 30 BC 02 BC 08 47 18 47 E9 FB 03 08 7D 44 04 08


Navigate to offset 0x44472 and insert the following byte changes:
Code:
01 4D 28 47 00 00 XX XX XX 08
Where XX XX XX is the pointer to the routine we just compiled +1!

Compile into free space the following optional routine:
Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func

main:
	push {r0-r1, lr}
	ldr r0, =(0x20370C0) @var 0x8004 for slot
	ldrb r0, [r0]
	mov r1, #0x64
	mul r0, r0, r1
	ldr r1, =(0x2024284) @this is for party.
	add r1, r1, r0
	add r1, r1, #0x1E
	mov r0, #0x1
	strb r1, [r0]
	pop {r0-r1, pc}	
	
.align 2


This routine is optional, it takes into var 0x8004 a slot number 0-5 for a pokemon and applies the property needed to give it a shiny box. You can do this yourself in a different routine if you would like :)

Usage:
Everything is done internally. If you wish to give a Pokemon a shiny box, setvar 0x8004 to the slot number of it from 0-5 and callasm to the second routine. That's all :D

Here's how it look like:
Before:

After:



I've also got similar routines to enable the shiny palette as well, if anyone cares to know :x
__________________
...
Reply With Quote
  #195   Link to this post, but load the entire thread.  
Old December 9th, 2014 (3:13 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
Quote:
Originally Posted by FBI agent View Post
Is it real? Is it real!? Oh! My! God! I cant wait for the routine! Its awesome!
About how to make the palette to be shiny, Im interested!

Changing the HM-enabling badge
I havent found any tutorial on how
to make the first badge enables you to use
Cut instead Flash
Boulder-Hm 01 Cut
Cascade-Hm 06 Rock Smash
Thunder-Hm 04 Strength
Rainbow-Hm 02 Fly
Soul-Hm 05 Rock Climb
Marsh-Hm03 Surf
Volcano-Hm08 Dive
Earth-Hm07 Waterfall
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #196   Link to this post, but load the entire thread.  
Old December 9th, 2014 (3:19 PM). Edited December 3rd, 2016 by Blah.
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924

Inserting Routines into your ROM



This is not exactly the same as my normal ASM resources. Instead of a routine I have a mini-tutorial. This has been covered in a lot of other ASM tutorials, but I'm just going to go over inserting routines into your ROM in general (and hopefully in detail). I've just been getting a large amount of PMs and VMs regarding this, so I thought it was about time I write a small guide.
This guide may seem like a large amount of work, but all the steps take me about 10 seconds to do. Literally 10 seconds.

Before we start you will need the following tools:
- This thumb compiler (http://www.mediafire.com/download/bxzzfe543qq7697/Compiler.rar)
- Hex editor (I use ftp://wa651f4:[email protected]/HxDSetupEN.zip)
- Some knowledge of how to use the command line/a computer in general



Setting up your routine for compilation



1) Make a separate folder somewhere and put the thumb compiler you downloaded in the first post. into this folder. In this example I make a folder on my Desktop called ASM, and inside that folder I have my thumb compiler.
Spoiler:




2) Now open your routine inside a word processor. I use notepad (thought you should use notepad ++ or something similar). Save the file as Name.asm and move it into the folder containing the compiler. I'm going to be using my "Average Level" routine because I have to test it still, and this is a good opportunity to do that!
Spoiler:




You've now set up the files in a needed matter to assemble your routine!

Compiling the routine:



Before I begin, if you're running a windows machine (Windows 7, Vista, XP (maybe 8 works, I'm not sure)), you don't need to read this part of the tutorial. Skip to the Windows-compile section of this tutorial.

1) Open the start menu and open your command line. In Windows this is cmd, most other operating systems call it the Terminal. Whatever you call it, open it! It should be a black or dark purple box depending on the OS you're using.
Spoiler:




2) We need to navigate to our folder containing the compiler and our ASM Routine! To do we use the cd command (short for change directory). You can find the directory of the file you're using if you navigate to it and click the directory browser.

Here's a picture of what I'm talking about:
Spoiler:




3) We will insert into the command line "cd \file\path" where these words file path are the names of the folders we have to go through to reach our routine. In my case the filepath to the folder containing the routine and compiler was C:\Users\Guest\Desktop\ASM. My command line is currently on:
Code:
C:\Users\Guest>
So I will type in:
Code:
cd Desktop\ASM
Hit Enter/return when you're done.

It looks like this:
Spoiler:


4) Run the compiler on the Routine. The line to do this is simply:
Code:
thumb filename.asm outputFileName.bin
The only thing here that will remain the same for you is the word "thumb" as that is the name as the.bat file. The following file names after the word "thumb" are not case sensitive and the outputFileName.asm is actually optional. If you don't specify an output file, the compiler is smart enough to make one with the same name as the input file, but with a .bin extension.

So all you really need to type in the end is:
Code:
thumb fileName.asm
In my case I named my file AverageLevel.asm. So I would type, obviously:


5)If the routine you compiled, is error free, it will say "Assembled Successfully"


Windows Compile:



If you're not running a Windows machine, this doesn't apply to you (maybe it does, I haven't confirmed :P). Feel free to skip to the next section.

1)Drag your .ASM file into your thumb.bat file. It will look like this:
Spoiler:




2) If your .ASM file doesn't have any errors a new File with the same name but with a .bin extension will be created. If a .bin file isn't created than the file you're trying to compile has an error. Go back to the "Compiling your Routine" section and do it manually to find the error.



Inserting the compile Routine into the ROM!



1) Open both the ROM and the .bin File inside a hex editor. Remember, you want the .bin file which was created in the compilation process, not the .asm file.

2) Copy the contents the hex editor gives for your .bin file
Spoiler:




3) Find some free space in the ROM (denoted by 0xFF) and insert there the .bin file's hex form. In HxD you simply ctrl+c the bin file's hex, then at the free space in the ROM do ctrl +B.
Spoiler:




4) You need to make sure the address you insert the routine in is divisible by 4. The simple way to ensure this is to make sure that the address ends in 0, 4, 8 or C. In my case I will insert the routine in 00720000.



Running the Rountine from your ROM.
In your script have "callasm 0xRoutineAddress +1".
So if I had inserted my routine at 0x720000, I would have the command "callasm 0x720001". That's all there is to compiling and using ASM routines.

If you still don't understand, I would advise you to go and play outside instead :)
__________________
...
Reply With Quote
  #197   Link to this post, but load the entire thread.  
Old December 9th, 2014 (4:04 PM).
Lance32497's Avatar
Lance32497 Lance32497 is offline
LanceKoijer of Pokemon_Addicts
 
Join Date: Aug 2014
Location: Criscanto town-Ginoa Region xD
Gender: Male
Nature: Adamant
Posts: 792
How about over 50 TMS? Its not yet implemented in FR
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #198   Link to this post, but load the entire thread.  
Old December 9th, 2014 (4:32 PM). Edited December 9th, 2014 by Blah.
Blah's Avatar
Blah Blah is offline
Free supporter
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 1,924
Quote:
Originally Posted by Lance32497 View Post
Is it real? Is it real!? Oh! My! God! I cant wait for the routine! Its awesome!
About how to make the palette to be shiny, Im interested!

Changing the HM-enabling badge
I havent found any tutorial on how
to make the first badge enables you to use
Cut instead Flash
Boulder-Hm 01 Cut
Cascade-Hm 06 Rock Smash
Thunder-Hm 04 Strength
Rainbow-Hm 02 Fly
Soul-Hm 05 Rock Climb
Marsh-Hm03 Surf
Volcano-Hm08 Dive
Earth-Hm07 Waterfall
Hi, I documented this in my HM crusade. Most of these are easy, the only ones that will take effort are fly, surf and waterfall. All which I've talked about before.

Quote:
Originally Posted by Lance32497 View Post
How about over 50 TMS? Its not yet implemented in FR
This is a rather pointless feature. TM bag space is limited to I think it's limited to 43 different types of TMs in the TM bag at once. This means that if you convert TMs to the newer generation compatibility (unconsumable) you will run out of bag space. Having studied the bag for my Bag deletion/restoration routines, I can tell you that expanding the bag slots will also be a very hard task. So no, I'm not going to expand TMs, and for anyone who bothers to try, that's a wall they will end up hitting.

Some research on Shiny Pals routine (not the frame/star, the Pokemon itself)
It's determined at 0x80440F4. This routine is run for enemy Pokemon and for your own. Which means it's actually possible (and very sad) to find a shiny which belongs to a trainer!

It does the same shiny check as normal, taking species, OTID and applying the algorithm. The line that determines all of this is at 0x8044122. Happy hacking!
__________________
...
Reply With Quote
  #199   Link to this post, but load the entire thread.  
Old December 9th, 2014 (6:57 PM). Edited December 9th, 2014 by DJTiki.
DJTiki's Avatar
DJTiki DJTiki is offline
absolutely should have never given me the internet
 
Join Date: Mar 2014
Location: Florida, USA
Gender: Male
Nature: Adamant
Posts: 1,256
I recently began planning for a hack and for what I wanted to do, it involved changing the overworld colors inbetween segments. Although it is graphical hack, I am curious(since it sort of has to do with the mechanics of Fire Red)

Turn the coloring of the game's overworld to the same Black and White Filter used in Flashbacks.

By this, flashbacks use a filter that turns all colors to Black and White. If you could set some var and use this on the spot, that'd be cool. I mainly want to do this because detective monolouges are always cool(or super emotional cutscenes, your preference)
Reply With Quote
  #200   Link to this post, but load the entire thread.  
Old December 9th, 2014 (7:52 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
I'm really enjoying this thread. Its great seeing so many interesting routines being churned out, whether they're big or small. Its the first thread I open up whenever I log on to PC now. Keep up the excellent work FBI and the same goes for all of the hard-working elves who pop-in now and then to assist :P

Quote:
Originally Posted by DJTiKi View Post
I recently began planning for a hack and for what I wanted to do, it involved changing the overworld colors inbetween segments. Although it is graphical hack, I am curious(since it sort of has to do with the mechanics of Fire Red)

Turn the coloring of the game's overworld to the same Black and White Filter used in Flashbacks.

By this, flashbacks use a filter that turns all colors to Black and White. If you could set some var and use this on the spot, that'd be cool. I mainly want to do this because detective monolouges are always cool(or super emotional cutscenes, your preference)
You can already do this with a writebytetooffset command as shown here. There's also some talk about it on the 19th page of the Quick R&D thread which should allow you to revert the game's colour back to normal without warping.
__________________
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:46 AM.