+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Utilizing free space in an expanded rom...
Pages: 1 [2]
Author Topic: Utilizing free space in an expanded rom...  (Read 2 times)
Ryusui
Guest
« Reply #15 on: November 07, 2009, 03:57:27 pm »

On a random subject, how big did you make the ROM? IIRC, FFVI is already 32Mbits (4Mb), which is the theoretical max for a SNES game...

Vehek
Guest
« Reply #16 on: November 07, 2009, 04:19:58 pm »

I believe FFVI is normally 24Mbits.

I've read there's a number around 0x0CE600 (no header) which tells the game the index of the first dialog string to be in bank $CE. (This kind of FFVI information was documented years ago I think.)
strings805
Guest
« Reply #17 on: November 07, 2009, 10:49:28 pm »

To Ryusui: I downloaded a 3,072 kb rom. Now it's 4,096. So, 4Mb I'd say? Please don't tell me I need to download a different rom lol

To Vehek: The dialog goes into bank $CE and ends there, but starts in bank $CD at CD0000. I used Thingy32 (ff3us.tbl and ff3btl.tbl) to upload tables and that where it started.
Ryusui
Guest
« Reply #18 on: November 08, 2009, 02:25:32 pm »

According to Vehek, it's normally 24Mbits; you've expanded it to 32Mbits, so you're good.
MathOnNapkins
Guest
« Reply #19 on: November 10, 2009, 03:22:49 pm »

Quote from: Tauwasser on November 06, 2009, 09:01:38 pm
Kewl, now tell us where? In ROM? In RAM? In DUCKBURG?

Your peers have reported this post as being problematic and interfering with their ability to enjoy the forums and healthy community atmosphere. The moderation staff has evaluated these reports and taken appropriate moderation action and warning involved individuals. Please take severe disputes and non friendly or respectful discussion into private conversation and be considerate of your fellow community members.
Tauwasser
Guest
« Reply #20 on: November 10, 2009, 03:58:23 pm »

Quote from: MathOnNapkins on November 10, 2009, 03:22:49 pm
Your peers have reported this post as being problematic and interfering with their ability to enjoy the forums and healthy community atmosphere. The moderation staff has evaluated these reports and taken appropriate moderation action and warning involved individuals. Please take severe disputes and non friendly or respectful discussion into private conversation and be considerate of your fellow community members.

It seems my peers are idiots -- idiots who cannot take a joke. It's basically the same situation as when somebody states "It costs five." -- People will usually ask "five what?" and then go on "Euros? Dollars? Applepies?" or something similarly silly. I had to use a place name obviously to hint at the reference being inexact of itself.
So I'll unreport my post, so you can deduct me warning points accordingly.

cYa,

Tauwasser
« Last Edit: November 10, 2009, 04:06:40 pm by Tauwasser »
DarkSol
Guest
« Reply #21 on: November 12, 2009, 09:17:23 pm »

Quote from: Tauwasser on November 10, 2009, 03:58:23 pm
It seems my peers are idiots -- idiots who cannot take a joke. It's basically the same situation as when somebody states "It costs five." -- People will usually ask "five what?" and then go on "Euros? Dollars? Applepies?" or something similarly silly. I had to use a place name obviously to hint at the reference being inexact of itself.
So I'll unreport my post, so you can deduct me warning points accordingly.

cYa,

Tauwasser

Additional moderation action has been taken. We understand that you may object to the previous moderator interjection. However, when your fellow community members tell us there is a problem, we must listen. We are doing the job your peers have asked for. Please respect moderator interjection on behalf of your fellow community members. The community feels strongly about upholding a friendly and respectful atmosphere. Feel free to contact us to discuss the matter for further clarification. If community members continue to report a problem here, more severe moderation action will be taken. For the benefit and consideration of all, please discontinue the current line of problematic discussion.
tc
Guest
« Reply #22 on: November 13, 2009, 04:31:33 am »

I suppose you're right. Hilarious as it was, doesn't fit this topic.
sqykly
Guest
« Reply #23 on: November 21, 2009, 05:52:56 am »

If you're using Geiger's snes9x debugger, this should be a snap.  You know what the first string says, right?  Then put a read breakpoint at CD0000, and get to the part of the game where that string comes up.  The break will occur when it's accessed.  If you see:
someplace: lda $CD0000,x
then put the new 24 bit address of your text at someplace+1.  Otherwise, the breakpoint came just a few instructions too late to tell you where the pointer came from.  Still, do pay attention to that instruction's address mode and operand.  When the break occurs, hit 'Step out'.  Jot down the address of the next instruction that you see.  Subtract one from that address and set it as an execution breakpoint.  Do whatever you did to get the text to come up again and the new breakpoint should come up first.  It will be a jsr or jsl instruction.  Hit 'Step into' to continue into the subroutine, and that will basically spell it out for you.

Remember how you paid attention to the address mode and operand of the instruction that LDAed the first byte of the string?  That's because you need that information to know what you're looking for earlier in the subroutine.
If the first breakpoint turned up any of the following address modes:
(something),y
something,y
something,x
Then you're looking for a set of push (PH* or PEA) and pull (PLB) instructions; the register that is pushed last was carrying the bank part of the pointer, and you can trace it back to some place in the rom from there.

Otherwise, you saw:
[something]
or
[something],y
which means that you are looking for an earlier store (STA, STX, or STY) to something+2.  Again, the stored register is carrying the bank, trace it back to the ROM from there.

If that doesn't help at all, look for a doc on basic 65x assembly.  There are plenty, and they should make that make some sense.
creatorofchaos
Guest
« Reply #24 on: November 30, 2009, 09:43:23 pm »

 Does all this apply to NES hacking to?
sqykly
Guest
« Reply #25 on: December 01, 2009, 12:43:20 am »

ALL of it?  Probably not.  Regarding the stuff I wrote, the general technique of using a debugger to find out where something happens transcends processors and architectures, but I can't see how a lot of the stuff about address modes would apply to the NES.  I don't know a lot about it, but I'm pretty sure there's no way to fetch data from an offset into an array through a far pointer in RAM in a single instruction.

But can you be a little more specific?
Lenophis
Guest
« Reply #26 on: December 03, 2009, 07:35:49 pm »

Quote from: Vehek on November 07, 2009, 04:19:58 pm
I've read there's a number around 0x0CE600 (no header) which tells the game the index of the first dialog string to be in bank $CE. (This kind of FFVI information was documented years ago I think.)
The code you refer to:

Code:
Dialogue Loading function:
C0/7FBF: A9CD    LDA #$CD       (Initial bank is CD)
C0/7FC1: 85CB    STA $CB        (This is kept in location $CB)
C0/7FC3: C220    REP #$20       (16 bit accum./memory)
C0/7FC5: A5D0    LDA $D0        (get memory D0)
C0/7FC7: 0A      ASL A          (times 2 since pointers are 2 bytes)
C0/7FC8: AA      TAX            (this gives us the index X)
C0/7FC9: BF02E6CC LDA $CCE602,X  (Loads pointer to dialogue X)
C0/7FCD: 85C9    STA $C9        (The pointer goes in $C9)
C0/7FCF: A5D0    LDA $D0        (Which dialogue is this?)
C0/7FD1: CF00E6CC CMP $CCE600    (Checks to see whether bank byte needs is right or needs to be CE)
C0/7FD5: 9005    BCC $7FDC      (Branch if less to the pointer above)
C0/7FD7: 7B      TDC            (bank byte needs to be incremented, and this is pointless...)
C0/7FD8: E220    SEP #$20       (8 bit accum./memory)
C0/7FDA: E6CB    INC $CB        (Since it wasn't less, we increment the bank byte)
C0/7FDC: 7B      TDC            (Either way it is correct now, so clear the accumulator)
C0/7FDD: E220    SEP #$20       (8 bit accum./memory)
C0/7FDF: A901    LDA #$01       (Put a 1 in the accumulator)
C0/7FE1: 8D6805  STA $0568      (Store 1 into $0568)
C0/7FE4: 60      RTS

string, I replied to your thread at the Den, you may wish to check that out. I suppose in a way me being without internet was good, cause you got some helpful info from these guys. :thumbsup:
strings805
Guest
« Reply #27 on: December 21, 2009, 11:03:56 pm »

No doubt lol. Decided to check out this forum to see what was going on. Gonna be a long list of thanks in the end credits of this mother.
Pages: 1 [2]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC