PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion Board > Archive

Notices

Archive Old threads that serve no purpose are here.

 
 
Thread Tools Display Modes
Old 23rd October 2013, 02:32 PM   #1
Andrea
Beginner
 
Join Date: Oct 2013
Posts: 35
Andrea
Default INSERT ASM ROUTINE

Hello guys ^^
Well today I would like to explain as clear as possible how to insert asm routines in a rom.
1° step: download assembler
First of all, begin to download an assembler for your routine asm ^^
Council Hackmew assebler:
http://dl.dropboxusercontent.com/u/2...utorialPack.7z
Once downloaded, put it in a folder (I recommend the desktop), but can fit any location.
In this folder will be the files previously downloaded the package.
2° step: write routine
Once this is done we have to write our routine :
I post a basic routine:
Spoiler:

.thumb
.align 2

push {r0-r1,lr}
ldr r0, = 0xoffset
mov r1, #0xval
strb r1,[r0]
pop {r0-r1,pc}

Open your notepad and start writing your routine,after the routine save it but we have to do some steps before:
First of all you need to change the various "settings" if you can define these saving.
Below the screen, you should change "Text Documents (*.Txt)" to "All Files" and save with the name you want .asm
ex :
routine.asm
Save your routine in the folder you created earlier ^^
3° step: Assebler routine
Now you need to open a program already included in the Windows OS , The cmd
Once opened you will be presented with this screen:
(I have already done all the steps)

Now I will explain everything in detail .
First of all, in the picture you can see the command "CD" means "Change directory", this allows us to change the folder until you get to our portfolio , in this case Assembly.
Once you reach the desired path you have to write thumb to activate the file "THUMB.BAT " and the name of the routine asm:
ex: thumb routine.asm
If there are no errors should show the message "Assembly successfully"
In our directory should now there is a new file named as our routine but with the extension . Bin
This will be our routine compiled!
4° step: insert
Once this is done we should avail ourselves do another program, a hex editor ^^
Open your rom and your routine:
WARNING
Here comes the important part ^^
First of all, copy the entire contents of the routine .Bin in the rom in an free offset.
I recommend the offset 700000 or free offsetthat you can serach with the FSF.
NOW PUSH CTRL+B to paste the routine in the rom ^^
Why does not CTRL+C? well, it is very simple, if you do a CTRL+C
is as if you added the byte ROM and as a result will crash.
Now we can close our hex editor ^^
We miss the last part of our routine or how to call via scripts.
5° step: call routine with script
The command that we use is the following :
Callasm 0xoffsetroutine+1
Come to order :
Callasm call our routine but the+1? Used to say that XSE calling a routine of type Thumb otherwise the game would freeze in game.
ex:
if our offset where we inserted the routine is 700000:
callasm 0x700001
I hope I was as clear as possible,if you have doubt,ask in the comments ^^

Last edited by Andrea; 23rd October 2013 at 02:42 PM.
Andrea is offline  
Sponsored Links
Old 24th October 2013, 03:15 PM   #2
mewthree9000
Junior Trainer
 
mewthree9000's Avatar
 
Join Date: May 2010
Location: U.S.A.
Age: 28
Posts: 70
mewthree9000 mewthree9000
Default

Useful tutorial, mucho gracias. Good to see you back, long time no see!
__________________
-Mewthree9000
We all fight a war within ourselves, a war of greatness, a war to become the best.
LIVE THE REVOLUTION, PHO!
Gotta Hack'em All!!




My current projects:
-Pokemon ChaosBlack[v2]
-!!Elite FireRed ROM Base!!
mewthree9000 is offline  
Old 24th October 2013, 04:22 PM   #3
Andrea
Beginner
 
Join Date: Oct 2013
Posts: 35
Andrea
Default

thanks but i registered on PHO only five days ago x'D
Andrea is offline  
Old 24th October 2013, 05:19 PM   #4
Pia Carrot
Orange Developer
Administrator
 
Pia Carrot's Avatar
 
Join Date: Aug 2010
Location: Valencia Island
Age: 23
Posts: 811
Pia Carrot Pia Carrot Pia Carrot Pia Carrot Pia Carrot
Default

Quote:
Originally Posted by Andrea View Post
thanks but i registered on PHO only five days ago x'D
It's probably because Hackmew was an italian named Andrea as well.
Pia Carrot is offline  
Old 24th October 2013, 05:54 PM   #5
Full Metal ★
Unstable?
Ex-StaffPHO VIP
 
Full Metal ★'s Avatar
 
Join Date: Oct 2012
Posts: 312
Full Metal ★ Full Metal ★
Default

Quote:
Originally Posted by mewthree9000 View Post
Useful tutorial, mucho gracias. Good to see you back, long time no see!
This is not Hackmew, I'm fairly certain Andrea is a coincidence. :P
__________________

★ full metal.

#busy
Full Metal ★ is offline  
Likes mewthree9000 liked this post
Old 24th October 2013, 07:09 PM   #6
Andrea
Beginner
 
Join Date: Oct 2013
Posts: 35
Andrea
Default

(Omg full metal *_*)
yes i know ^^"
i couldn't remmeber x'D
Andrea is offline  
 

Tags
asm, insert, routine, [Tutorial]

Thread Tools
Display Modes

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. The time now is 10:26 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts