ZodiacDaGreat
Working on a Mobile System
- 429
- Posts
- 18
- Years
- South Pacific
- Seen Apr 26, 2017
Warning: This is not your average ROM Hacking tutorial.
Hello all, its been a while since I've posted some tuts. Lately, I've been learning some stuff, from here and there. I finally found out something on my own, and wrote my own asm routine.
Ok, let's get down to business... Today I'll be teaching and showing you all how to make a Item appear on the first slot, in your PC. Here's what you'll be using and what you'll need:
-VBA 1.7.2
-A ASM Assembler - for people who really want to learn the hard way
(Goldroad, etc)
-Knowledge on using an Assembler
-Pokemon Ruby ROM - my favorite version
Part 1:Searching/Calculating For the Offsets
First open your ROM in VBA, load up to a place where you can access your PC. Open your PC, you'll see some items already in your PC, which for my case is: - EON TICKET
So, open Search For Cheats function, by pressing ctrl + C, or open it manually, and set these:
-Specific Value
-16 bits
-Equal
-Hexadecimal
-Update Values
Now, after you're done, you must be wondering what value to search for? Now, we need to search for the EON Ticket - where the item is located, and the HEX value for EON Ticket is 0x113, so type in 113, and click start followed by search. You should get something around:
"02025BCC".
Next, is the Offset to the Item Quantity, value. So suppose we had 10 EON TICKETs back then in the first slot, to search we're do this:
-Specific Value
-16 bits
-Equal
-Unsigned
-Update Values
First type in 10, Start then Search, you'll see too much values/offsets, withdraw a few tickets, say 3. This time type in 7, and search (Don't press start). When the offsets keep narrowing in the end you'll get "02025BCE" Phew.
Part 2: The ASM routine
Now, theres two routines, one to give the item, and one to give the quantity. We're gonna put MAX Potion in the first slot of the PC, if there's any items in the first slot, it'll get overwritten, so be warned. For people who know how to use a assembler, I provide 2 routines made by me.
Routine #1, Item:
Routine #2, Quantity:
Routine #1:
Routine #2:
Now, you must be thinking what to do with the codes above, Now, to explain, open your hex editor goto some free space, and insert these 2 routines. After that you'll need a script to call the routines, so you'll be using XSE.
Your script will be:
To conclude, I'd like to say that asm hacking is got to do with calculating pointers and offsets, as well as writing routines to patch certain routines ;), and I leave to you all a small challenge:
As mentioned earlier, this routine is for the first slot, see if you can make it for the second slot, and try to change the quantity as well as giving items above Blue Scarf. Happy Hacking.
Hello all, its been a while since I've posted some tuts. Lately, I've been learning some stuff, from here and there. I finally found out something on my own, and wrote my own asm routine.
Ok, let's get down to business... Today I'll be teaching and showing you all how to make a Item appear on the first slot, in your PC. Here's what you'll be using and what you'll need:
-VBA 1.7.2
-A ASM Assembler - for people who really want to learn the hard way
(Goldroad, etc)
-Knowledge on using an Assembler
-Pokemon Ruby ROM - my favorite version
Part 1:Searching/Calculating For the Offsets
First open your ROM in VBA, load up to a place where you can access your PC. Open your PC, you'll see some items already in your PC, which for my case is: - EON TICKET
![[PokeCommunity.com] Giving Items In the PC [PokeCommunity.com] Giving Items In the PC](https://www.divshare.com/img/4922269-62e.gif)
So, open Search For Cheats function, by pressing ctrl + C, or open it manually, and set these:
-Specific Value
-16 bits
-Equal
-Hexadecimal
-Update Values
Now, after you're done, you must be wondering what value to search for? Now, we need to search for the EON Ticket - where the item is located, and the HEX value for EON Ticket is 0x113, so type in 113, and click start followed by search. You should get something around:
Two values, is not exactly what we want so, we got to narrow the values, withdraw the EON Ticket and open the window again, and you'll see this:02025BCC - 0113 - 0113
02025D1C - 0113 - 0113
Alright, we did it! Thats the offset to the Slot 1 of the Item Storage PC Item Value, which is02025BCC - 0113 - 0000
02025D1C - 0113 - 0113
"02025BCC".
Next, is the Offset to the Item Quantity, value. So suppose we had 10 EON TICKETs back then in the first slot, to search we're do this:
-Specific Value
-16 bits
-Equal
-Unsigned
-Update Values
First type in 10, Start then Search, you'll see too much values/offsets, withdraw a few tickets, say 3. This time type in 7, and search (Don't press start). When the offsets keep narrowing in the end you'll get "02025BCE" Phew.
Part 2: The ASM routine
Now, theres two routines, one to give the item, and one to give the quantity. We're gonna put MAX Potion in the first slot of the PC, if there's any items in the first slot, it'll get overwritten, so be warned. For people who know how to use a assembler, I provide 2 routines made by me.
Routine #1, Item:
.code 16
push {lr}
ldr r0, =0x2025BCC @loads register to PC address
mov r2, #0x14 @loads Max Potion, #20 is Max Potion in Decimal
strh r2, [r0] @stores Max Potion at PC address
pop {pc}
Routine #2, Quantity:
Now, for those that don't know how to use a Assembler - don't worry your code has been translated by hex for me:.code 16
push {lr}
mov r0, #0x01 @Quantity, which is 0x1
ldr r1,=0x2025BCE @ Address to write to
strh r0, [r1]
pop {pc}
Routine #1:
00B502481422026000BD0000CC5B0202
where bold = Item Offset which was calculated above
and underlined is = Item in Hex, max of 0xFF, ie BlueScarf
Routine #2:
00B501200149087000BD0000CE5B0202
where bold = Item Qunatity Offset which was calculated above
and underlined is = amount in Hex, max of 0xFF, ie 255, in this case is 0x1
Now, you must be thinking what to do with the codes above, Now, to explain, open your hex editor goto some free space, and insert these 2 routines. After that you'll need a script to call the routines, so you'll be using XSE.
Your script will be:
Run, the script ingame and check your PC, you should get a Max Potion in the first slot. :) Phew! My longest tut yet. Remember, the routines will overwrite the item already in slot one, so use it like say, in the beginning of the game.#dynamic 0x800000
#org @Start
callasm 0xXXXXXX ' first routine offset + 1
callasm 0xWWWW ' second routine offset + 1
end
To conclude, I'd like to say that asm hacking is got to do with calculating pointers and offsets, as well as writing routines to patch certain routines ;), and I leave to you all a small challenge:
As mentioned earlier, this routine is for the first slot, see if you can make it for the second slot, and try to change the quantity as well as giving items above Blue Scarf. Happy Hacking.
Last edited: