You are not logged in.
What is it ? I've heard this word many times in ROM Hacking. And what is the word calle d routine?
Offline
Yes mate, i too want to know what is and how to use, as i'm tryin' to add some functions and items i think is better i know how to use!!!
RaltVus is back.
I'm not hacking in the moment, but i always had ideas to give. Just ask me if you want.
Offline
The games are made of bits, or in other words, zeroes and ones. All the game's data looks like this: 00011011100101010111000111.....
Because working out with binary numbers (consisting of only 0 and 1) is close to impossible for a normal human, we use hexadecimal system for describing 8-bit binary number sets as bytes.
So you could raise a question: "What's convenient about 8-bit numbers then?"
Assembly (or just "ASM") is a programming language that is used to tell the CPU what to do. All of its instructions of Gameboy CPU are either 8, 16, or 24 bits long (so, 1, 2 or 3 bytes long!). And the data this programming language can work with is mostly also restricted to 8 or 16 bit structures (1 or 2 bytes).
If you want to learn how to make use of assembly, you first of all have to know what programming is about. No one taught me how to program - I learned the (very) basics by designing scripts for DE. ASM isn't really any different.
You write script in Gameboy ASM language, and
1) Insert it to the rom with an assembler
2) Write the script data with a hex(/asm) editor in the game
The option #2 is quite easily achieved as well since like I pointed out earlier, all the asm instructions are 8, 16 or 24 bits long. Thus, you can write asm code just by replacing bytes with bytes that represent different asm instructions. To be precise, all the instructions are 8 bits long, but they can have parameters that take either 8 or 16 bits.
Offline
The games are made of bits, or in other words, zeroes and ones. All the game's data looks like this: 00011011100101010111000111.....
Because working out with binary numbers (consisting of only 0 and 1) is close to impossible for a normal human, we use hexadecimal system for describing 8-bit binary number sets as bytes.So you could raise a question: "What's convenient about 8-bit numbers then?"
Assembly (or just "ASM") is a programming language that is used to tell the CPU what to do. All of its instructions of Gameboy CPU are either 8, 16, or 24 bits long (so, 1, 2 or 3 bytes long!). And the data this programming language can work with is mostly also restricted to 8 or 16 bit structures (1 or 2 bytes).
If you want to learn how to make use of assembly, you first of all have to know what programming is about. No one taught me how to program - I learned the (very) basics by designing scripts for DE. ASM isn't really any different.
You write script in Gameboy ASM language, and
1) Insert it to the rom with an assembler
2) Write the script data with a hex(/asm) editor in the gameThe option #2 is quite easily achieved as well since like I pointed out earlier, all the asm instructions are 8, 16 or 24 bits long. Thus, you can write asm code just by replacing bytes with bytes that represent different asm instructions. To be precise, all the instructions are 8 bits long, but they can have parameters that take either 8 or 16 bits.
Thanks for this. And wich program can write/edit ASM ? Also what can i do whith PKSV ?
Offline
I have one ASM if i remember is GBASM i found in romhcking.net!!!
RaltVus is back.
I'm not hacking in the moment, but i always had ideas to give. Just ask me if you want.
Offline
I have one ASM if i remember is GBASM i found in romhcking.net!!!
Ferrnando,can you give me the full link? Please!
Offline
@Pokemon_Master:
Here's the link!!!
www.romhacking.net/utilities/282/
RaltVus is back.
I'm not hacking in the moment, but i always had ideas to give. Just ask me if you want.
Offline
@Pokemon_Master:
Here's the link!!!
www.romhacking.net/utilities/282/
Thanks Ferrnando.(if i am right your name is so)
Offline
Yeah this is my name snif* you remember!!! haha but only with one "r"
Last edited by RaltVus (2013-10-04 20:31:13)
RaltVus is back.
I'm not hacking in the moment, but i always had ideas to give. Just ask me if you want.
Offline
Thanks,comet
Offline
Hello, I have a question pertaining to ASM. Instead of creating a new thread, I decided to post it here. I've been trying to add the Dark, Steel and brand-new Fairy types into Red version. I've already added them to the type effectiveness chart and then I progressed to adding their names in. This is where I hit a brick wall. There isn't any blank space in bank 9, so I can't simply repoint to the blank space and add the names. Do I have to learn ASM to point to blank space elsewhere in the ROM? I was already planning on doing this but now it seems as though I'll be learning it earlier than I intended to.
Offline
Repointing the table of names should not be necessary. The table of type names at 0x27de4 does not have to be contiguous; meaning you can add new type names at the end of the bank without moving the existing names
Here's why:
Try looking just before the type names at 0x27dae. This is a list of pointers to the text strings for every type name. At the beginning of this list of pointers, you see E4 7D. This points to the text string "NORMAL".
A few bytes later, you see E4 7D over and over again. Every time you see that pointer, it is for an unused type id. (id's 0x9-0x13 to be exact)
So what you can do is take one of these pointers to the "NORMAL" text string and change it to point to free space. (but don't change the very first pointer to "NORMAL" of course)
Then at the beginning of free space, add the bytes for "DARK", "STEEL" and "FAIRY" or whatever, but remember to end each name with a 50 to tell the game the text string is finished.
And remember to change three different pointers to point to the three new names.
Offline
But wait.
Is Fairy going to be a physical type or a special type?
You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.
Offline
I haven't thought about that. I'm going to have to find out how that's done.
Offline
I haven't thought about that. I'm going to have to find out how that's done.
Oh that's real easy.
Look at "CalculateDamage".
You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.
Offline
Ah, yep that routine makes it easy to divide the unused id's, 0x9-0x13, between normal and special however you want.
Offline
So I'll need to learn Z80. What is a good resource that will help me reach that end?
Offline
You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.
Offline
Are the game data rated in this way?:
0001
0010
0011
0100
0101
0111
or not.
Last edited by Pokemon_Master (2013-11-09 13:25:16)
Offline
Are the game data rated in this way?:
0001
0010
0011
0100
0101
0111
or not.
Can someone tell me are they correct?
Offline
No one has responded because your question doesn't make any sense.
What are you trying to ask here?
Offline
No one has responded because your question doesn't make any sense.
What are you trying to ask here?
Oh not yet. What i am asking: If i load the rom in any Asm editor will the ones and zeroes be shown in this way:
00001,00011,0011,
01111,
10000,10001,10011,1011,11111
or i'm wrong
Offline
Danny-E 33 wrote:No one has responded because your question doesn't make any sense.
What are you trying to ask here?Oh not yet. What i am asking: If i load the rom in any Asm editor will the ones and zeroes be shown in this way:
00001,00011,0011,
01111,
10000,10001,10011,1011,11111
or i'm wrong
He probably says your question makes no sense, because you won't see Bits (like 0101) in an ASM editor at all.. Nor Hex Bytes. You will see Z80 commands, or opcodes. (Like ld a, b $A7C5)
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
Every decimal or hexadecimal number has a binary presentation.
For example number "5" is "101" in binary system.
Long binary numbers aren't really readable for a human so we use hexadecimal number system instead. I can't think of any editor that would show data in binary instead of decimal or hexadecimal.
Offline