Users browsing this thread: 1 Guest(s)
General Hex Question

#1
Posts: 72
Threads: 7
Thanks Received: 0
Thanks Given: 5
Joined: Nov 2011
Reputation: 0
Status
None
This is probably going to sound like a really stupid question, but I need to ask it anyway.

I want to edit some events and other things, but the thing that is plaguing me right now is understanding how to add to the event without deleting everything else.

So example, I'm working on the intro scene at the Narshe cliff. How do I add another character for the game to create without deleting the next byte of information?

So it might read 3D003D0E3D0F for creating characters followed by 45 for refresh. How do I add another character after 0F without deleting the next byte (45). Is there a way to edit and "insert" instead of removing? But then, won't this mess up the rest of the game?
  Find
Quote  

#2
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
There is no way to add bytes in front of other bytes, so you will either need to delete and/or rearrange many bytes, so that you can add stuff in, but the better way for larger events is to make it jump to somewhere that has free space with the B2 subroutine command, and then once your done coding stuff, make it jump back to the code where it started.

There are some places in the C banks with free space and it is documented, but not enough at all really for major event hacking, so you would either have to erase some useless events to free up space, or if your ROM has been expanded you can use the F1 bank where there should be a ton of free space. To jump to the F1 bank you would put B2 XX XX 27 FE and then add what you want there in F1, then jump back to the original code where it continues. Just make sure you put that FE after the subroutine, or it will just continue on to the next code instead of jump, that or freeze.

ex: 3D 00 3D 0E 3D 0F 45 B2 10 50 27 FE [new code here @ F15010] B2 15 99 03 FE <----- jumps back to CC/9915 Think of it as a boomerang.

Remember the correct order when inputting the address, it should always be like this:
CC/9915 = 15 99 03

The CC should go last and turns into 03, the middle byte stays the same, and the last byte becomes the first one.

Key:
00 = CA
01 = CB
02 = CC
etc...
27 = F1


We are born, live, die and then do the same thing over again.
Quote  

#3
Posts: 72
Threads: 7
Thanks Received: 0
Thanks Given: 5
Joined: Nov 2011
Reputation: 0
Status
None
Thanks Nattak. This is a long process to learn. There is a ton of code to put in just to make a character appear on the screen lol.

Is there a reason why I should use a headered rom?
  Find
Quote  

#4
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
(02-23-2012, 05:12 PM)silvermaine Wrote: Thanks Nattak. This is a long process to learn. There is a ton of code to put in just to make a character appear on the screen lol.

Is there a reason why I should use a headered rom?

There is no reason one way or the other, the header just gets in the way when event hacking, so I would erase the header to make it easier to put in the right addresses, and so that the event dump addresses match, without having to factor in and worry about the +200 to everything. There's an option to delete the header in the hex editor. There is a reason to have a header sometimes, a lot of patches and editors require the ROM to be headered, so just be sure and re-add the header with a tool like SNESTool if you are going to apply a patch that requires a header.


We are born, live, die and then do the same thing over again.
Quote  

#5
Posts: 72
Threads: 7
Thanks Received: 0
Thanks Given: 5
Joined: Nov 2011
Reputation: 0
Status
None
OK, thanks Nattak. That's why I wanted to remove the header. Was driving me crazy doing the math on each one.

So I will subroutine to another databank to do events. That's seems pretty simple.

Do you know if there is a complete list somewhere that would tell me which characters are assigned to each address?

Also, trying to make a character change his position (not move) from say, standing to kneeling. I can't seem to find the command code for that.
  Find
Quote  

#6
Posts: 831
Threads: 41
Thanks Received: 16
Thanks Given: 12
Joined: Nov 2009
Reputation: 18
Status
None
(02-23-2012, 04:43 PM)silvermaine Wrote: This is probably going to sound like a really stupid question, but I need to ask it anyway.
This is actually a great question to ask, but Mike got to answer it first.

(02-23-2012, 05:10 PM)Gi Nattak Wrote: ex: 3D 00 3D 0E 3D 0F 45 B2 10 50 27 FE [new code here @ F15010] B2 15 99 03 FE <----- jumps back to CC/9915 Think of it as a boomerang.

Lol,the boomerang!

You tell the code "go here, and when you're done doing your task, come back to this exact same address"
Quote  

#7
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
(02-23-2012, 05:25 PM)silvermaine Wrote: Do you know if there is a complete list somewhere that would tell me which characters are assigned to each address?

Also, trying to make a character change his position (not move) from say, standing to kneeling. I can't seem to find the command code for that.

There is no list like that, I'm not entirely sure what you mean though, all the characters are assigned in CC, you will just have to search the event dump to find them.

And I'm sure you've taken a look at the 'All things event hacking' thread..? It has all the action commands listed there. You would want to do something like: 00 (the character who will do the action), here it is char $00 TERRA, then you would want to say how many bytes the action queue will be, so let's say she will go from standing, to kneel, that would be 2 bytes. So we got 00 82 09 (the command for kneel) and FF (end action queue)

00 82 09 FF
or...
00 02 09 FF <---- the 8X becomes 0X if you want the other event commands after this one to continue playing in tandem with her movement or in this case action. 8X makes it play out while everything else waits.


Just try and look and learn and expiriment with the event dump, and see how it looks in the hex as well, until it becomes 2nd nature to you:

For instance I see this:
CC/D891: 11 Begin action queue for character $11 (NPC $11), 2 bytes long (Wait until complete)
CC/D893: 09 Do vehicle/entity graphical action $09 (kneeling)
CC/D894: FF End queue
CC/D895: FE Return

...and I type this: 11 82 09 FF FE Wink

The commands to 'stand' are:
CC = look up
CD = look right
CE = look down
CF = look left


We are born, live, die and then do the same thing over again.
Quote  

#8
Posts: 72
Threads: 7
Thanks Received: 0
Thanks Given: 5
Joined: Nov 2011
Reputation: 0
Status
None
So, another quick question. If I remove the header and make event edits and then add the header back, will the boomerang trick correct itself to point to the correct address or do I need to go fix it?
  Find
Quote  

#9
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Gosh..I shouldn't have slept all day I miss all the good questionsSmile

I just wanted to says that if you write events in the F1 bank, FF6Le Rogue uses the same bank as the default expansion bank (and not F0 like it is suppose to be). This is a display bug Lord J mentioned about in another forum. So your events could potentially be erased by FF6LE when you save with the editor if he needs to use his expansion bank. The location of the expansion bank can be change, just look at the first post in the FF6Le Rogue thread for the steps to do so.

But anyway I wouldn't personally use FF6LE Rogue because of the nasty Serpent Trench potential bug...

Edit:

(02-23-2012, 08:38 PM)silvermaine Wrote: So, another quick question. If I remove the header and make event edits and then add the header back, will the boomerang trick correct itself to point to the correct address or do I need to go fix it?

The physical address of your code will move of 200 bytes but everything will work anyway.

The address to jump to will remain the same as the game take in account the header if there is one when it jumps somewhere (I mean when the game reads an address and jump). So you can reapply the header with no problem. The only advantage of a header is that you need one to apply some patches that were written on a ROM with a header.
  Find
Quote  

#10
Posts: 72
Threads: 7
Thanks Received: 0
Thanks Given: 5
Joined: Nov 2011
Reputation: 0
Status
None
(02-23-2012, 08:41 PM)Madsiur Wrote: Gosh..I shouldn't have slept all day I miss all the good questionsSmile

I just wanted to says that if you write events in the F1 bank, FF6Le Rogue uses the same bank as the default expansion bank (and not F0 like it is suppose to be). This is a display bug Lord J mentioned about in another forum. So your events could potentially be erased by FF6LE when you save with the editor if he needs to use his expansion bank. The location of the expansion bank can be change, just look at the first post in the FF6Le Rogue thread for the steps to do so.

But anyway I wouldn't personally use FF6LE Rogue because of the nasty Serpent Trench potential bug...

Edit:

(02-23-2012, 08:38 PM)silvermaine Wrote: So, another quick question. If I remove the header and make event edits and then add the header back, will the boomerang trick correct itself to point to the correct address or do I need to go fix it?

The physical address of your code will move of 200 bytes but everything will work anyway.

The address to jump to will remain the same as the game take in account the header if there is one when it jumps somewhere (I mean when the game reads an address and jump). So you can reapply the header with no problem. The only advantage of a header is that you need one to apply some patches that were written on a ROM with a header.

Thank you sir. I will probably avoid using the rogue editor for now. I will have to report on your other question tomorrow as I don't have that pc with me that I used the editor on.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite