Copy that and paste into notepad. Once you've done copying the code, click Save As. Down, where it says ".txt file", click and change it to "All Files", and call the file [randomname].asm. Remember to save it on the folder where you put the THUMB compiler.
Now, simply drag the .asm file you created into the file "thumb". Now, there should be a new .bin file. That's the file we want!
PART 2 - INSERTING IT INTO THE ROM AND REPOINTING BYTES
Spoiler:
Okay, inserting the code into the ROM is so easy. Open the newly created .BIN file in your hex editor. You should see this code:
Now, also open your ROM with the hex editor. Seek for a free space. I always look for a free space that ends with "0" (for example: 0x800000, 0x960000, 0x862180 etc.).
Once you found the free space, press CTRL+B (NEVER CTRL+V). Write down the offset where the ASM code start at. Add 1 to it, and reverse it. If what I said right now was too complicated, well, let me explain it:
If you picked up the offset 0x800000, add 1 to it. 800000 + 1 = 800001. To make it look more simple, after every byte (Byte = XX), press space, so it will now like that: 80 00 01. Now, switch the first byte with the last byte, so it will result: 01 00 80. Easy, isn't it?
Quote:
Originally Posted by Jambo51
Musghot Hack One:
Insert at 0x0807FF90:
004A1047XXXXXX08
Press CTRL+G, or Go to the written offset. the written offset is 0807FF90, but wait... This offset doesn't even exist in the ROM! Just remove the 080, it's not necessary for navigating to specific offsets. Now, go to 7FF90, and change the bytes there to
Code:
00 4A 10 47 XX XX XX 08
Instead of the XX XX XX, put the offset we reversed earlier, so it will be
Code:
00 4A 10 47 01 00 80 08
Good job! Now, there are three routines, so do what I did with the first routine, but do it with the other routines.
Now, once you've done all the 3 routines,
Quote:
Originally Posted by Jambo51
Finally, change the byte at 0x080801F5 to 0x78
Just navigate to 080801F5 and change the byte there to 78.
PART 3 - CREATING THE TABLE
Spoiler:
Navigate to another free space in your ROM, and now take a look:
Quote:
Originally Posted by Jambo51
0x3FA660 (Agatha)
0x3FA680 (Bruno)
0x3FA6A0 (Lorelei)
0x3FA6C0 (Lance)
0x3FA6E0 (Gary Champion)
0x3FA700 (Male Player BG)
0x3FA720 (Female Player BG)
All of these offsets are for the pallets that the mugshot uses, so just write pointers to them. Here, I already made it:
(Message3 used if you want something to happen right after the battle).
Replace A with the battle type, replace B with the trainer number and replace C with the pallet you want. Agatha is the first, so it will be 100. Bruno is the second, so it will be 200 and Female Player BG is the last, so it will be 700. Simple, huh?
Now, let's test ingame... And it worked! If it doesn't you probably did something wrong :O
Thanks for reading, I hope this actually helps!
Credits: Me - Writing this tutorial!
Jambo51 - The routines & teaching me how to insert an ASM routine!
this is probably an incredibly stupid question but what does ASM stand for and what does it do haha.. im sorry im just trying to get a little bit of knowledge for all aspects of hacking
this is probably an incredibly stupid question but what does ASM stand for and what does it do haha.. im sorry im just trying to get a little bit of knowledge for all aspects of hacking
You use ASM to insert something that doesn't exist in the ROM, if I am not wrong (I am not that good when it comes to making an ASM code) and/or extending some sort of table.
this is probably an incredibly stupid question but what does ASM stand for and what does it do haha.. im sorry im just trying to get a little bit of knowledge for all aspects of hacking