Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=112e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexc01a.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=112e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexc01a.html.zxEg^ЋOKtext/htmlISO-8859-1gzip8:Tue, 10 Mar 2020 08:02:41 GMT0 0PEg^ Show Posts - Displacer

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Displacer

Pages: 1 2 »
1
Yea we did kind of hijack her thread didn't we? My apologies for my part in said takeover PP :)

2
https://www.youtube.com/watch?v=ESq27B9YI4Q

Nintendo video that will crack you up

3
Thing is, it uses an offset to load these so I'm betting one of the other sets of data are used to pick a particular stance for each character, meaning there can be more than one for any particular character. I'll track down which data set it is offsetting into to get the stance data.

4
Yea there's a whole ton of sets of data based off those 3 bits. I'm guessing they're all graphics related but since some of the data are actually pointers to other data then it's going to take awhile to sort them all out. Figures, I hate dealing with graphics code but eh, at least it will clear up some of the "unknowns".

So, for the record the PC enemy sprite arrangement data is stored in 2 parts. A set of pointers starting at 0D/FD6D which points to the actual data starting at 0D/FD89 and it looks like there are 14 in all

5
OK chillyfeez, here's what I get with those numbers:


6
I'll give those numbers a try, soon as I fine my way back to where they are loaded. This stuff is so convoluted it's easy to get lost

7
I set a breakpoint at that routine and oddly enough, I've only had it hit once, the battle in mist when Rydia causes the quake, but that's as far as I have save states into the game so it may be used elsewhere as well. It hasn't hit with normal battles, including the one with the mist dragon.

It seems though that it has opened up a whole can of data being used. For instance, some of those data sets are used to access pointers at 0D/FD6D. These are pointers to data sets at 0D/FD89. These are used in sets of 3, each with a FF terminator. I'm wondering if they are for the 3 monster sets in a battle. The Rydia battle uses the first pointer, and the 3 sets it uses are:

Code: [Select]
01 00 FF
03 02 FF
05 04 FF

I have no clue what these are, just guesses at present. Man, those coders sure did like their pointers...

 :edit:

OK, those appear to be graphic positioning data. I would assume top, middle, and bottom. If you change those numbers, rydia's graphic is broken up and moved around.

8
Here we go:
Code: [Select]
Enemy Formation Table (70200-711FF)
Each formation is represented by 8 bytes:

Byte 0:
 Bit 0: ?
 Bit 1: ?
 Bit 2: ?
 Bit 3: Forced Back Attack
 Bit 4: Enemies Have Boss Death
 Bit 5: Monster(s) 3 Begin In Eggs
 Bit 6: Monster(s) 2 Begin In Eggs
 Bit 7: Monster(s) 1 Begin In Eggs

Byte 1: Monster(s) 1 Type

Byte 2: Monster(s) 2 Type

Byte 3: Monster(s) 3 Type

Byte 4: Qty. of Each Monster Type (max 8 altogether)
 Bit 0-1: ?
 Bit 2-3: Monster(s) 3 Qty.
 Bit 4-5: Monster(s) 2 Qty.
 Bit 6-7: Monster(s) 1 Qty.

Byte 5: Preset Monster Arrangement
 -Values 00-91
 -Total qty. of monsters is limited by arrangement

Byte 6:
 Bit 0: Can't Run
 Bit 1: No Game Over (think impossible Dark Elf battle)
 Bits 2-3: Battle Music (Regular/Boss/Fiend/No Change)
 Bit 4: Character Battle (Edward v. Tellah, etc.)
 Bit 5: Auto Battle (not sure where the AI is for these?)
 Bit 6: Floating
 Bit 7: Transparent (Breath, Mind)

Byte 7: ?
The unknown bits and byte seem to be insignificant, or at least not worth changing.

In case anyone's interested, the so-smart-it's-stupid way I traced this: Took two identical files, changed the monster type of group 1 from imp to basilisk (using zyrthofar's editor), created an .ips patch, read the patch with my hex editor to determine the altered location. Voila!

Bits 0-2 of byte 0 are used to load sets of data, a lot of sets. It is used as an offset to load these sets. There are 2 sets of 8 bytes that are loaded first, located at 16/FBAC and 16/FBDC. It is also used to load 2 sets of 4 bytes each. Located at 16/FC0C and 16/FC24. Here is the loading code ($29A4 holds byte 0):

Code: [Select]
02/8ECA: AD A4 29     LDA $29A4
02/8ECD: 29 07        AND #$07
02/8ECF: 0A           ASL
02/8ED0: 0A           ASL
02/8ED1: 48           PHA
02/8ED2: 0A           ASL
02/8ED3: AA           TAX
02/8ED4: 7B           TDC
02/8ED5: A8           TAY
02/8ED6: BF DC FB 16  LDA $16FBDC,X
02/8EDA: 99 CB 6C     STA $6CCB,Y
02/8EDD: BF AC FB 16  LDA $16FBAC,X
02/8EE1: 99 D3 6C     STA $6CD3,Y
02/8EE4: E8           INX
02/8EE5: C8           INY
02/8EE6: C0 08 00     CPY #$0008
02/8EE9: D0 EB        BNE $8ED6
02/8EEB: 7B           TDC
02/8EEC: A8           TAY
02/8EED: 68           PLA
02/8EEE: AA           TAX
02/8EEF: BF 0C FC 16  LDA $16FC0C,X
02/8EF3: 99 DB 6C     STA $6CDB,Y
02/8EF6: BF 24 FC 16  LDA $16FC24,X
02/8EFA: 99 DF 6C     STA $6CDF,Y
02/8EFD: C8           INY
02/8EFE: E8           INX
02/8EFF: C0 04 00     CPY #$0004
02/8F02: D0 EB        BNE $8EEF

9
Oh God don't get me started on the "coding" they did with this software :þ

10
Are you talking about the 8 byte data sets starting at 0E/9000?

If so, I've done some very limited research on these. One thing is each byte appears to be 2 pieces of data. One in the low nibble, the other in the high nibble. They are separated and treated differently in the code in several places. Sorry I don't know anything beyond this yet. Might have some info later

11
Yea, had a lot going on with that pesky real life stuff.

Unfortunately the power went out yesterday at my house and I've lost 3 days worth of work on this. I've since added a auto backup plugin to notepad++, that will keep it safe from here on but my changes for the last 3 days (and there were a lot) are lost, and it was a lot of work too.

Let that be a lesson for all of you. Get the backup plugin. There is a auto save plugin but seeing how reverse engineering is all about guesses, then verifying them, making changes, then making them again several times, just the auto save may cause you issues too. The auto backup saves individual copies of your work with timestamps so you can go back to any point. The one you want is Autosave2 in the plugin manager. Set the backup directory to a different one than the default directory then you'll have backups of backups, etc.

At any rate I was going to post a whole bunch of findings, but not now :(

Now if you'll excuse me, I'm going to go lay down in a dark corner and cry

12
Well, diving into the ROM, the hex code appears to say exactly what the editor says it's saying according to my information.

A004B: 00 07 00 01 00 0B 00 0B FF

00 07 = Cast spell 7 (Slow)
00 01 = Cast spell 1 (Hold)
00 0B = Cast spell 11 (White)
00 0B = Cast spell 11 (White)
FF = End script

A005D: 00 2F 00 0C FF

00 2F = Cast spell 31 (Meteo)
00 0C = Cast spell 12 (Dummy / Dispel)
FF = End script

Unless there's something special about those indexes, it's being parsed correctly.

 :edit: Wait I see what's happening now. It's writing over Golbez' script code. It doesn't know how to read the Golbez scripts and doesn't even acknowledge their existence and just goes ahead and computes what it thinks is the correct place to put the "next" autobattle, which is right over top of where the Golbez script should be. Ok at least I know what to do now.


These are 2 part scripts of some sort. The code accesses the last two auto battle scripts in 2 parts separated by a terminator (FF) and stores the first part starting at address $388C, and the second part starting at address $389A. Here's the relevant code:

Code: [Select]
03/8985: B7 80        LDA [$80],Y   ;Load auto battle script
03/8987: 9D 8C 38     STA $388C,X   ;And save
03/898A: C8           INY
03/898B: E8           INX
03/898C: C9 FF        CMP #$FF      ;End of script?
03/898E: D0 F5        BNE $8985     ;No, branch
03/8990: A5 84        LDA $84       ;Script number
03/8992: C9 0C        CMP #$0C      ;Next to last?
03/8994: F0 04        BEQ $899A     ;Yes, branch
03/8996: C9 0E        CMP #$0E      ;Last?
03/8998: D0 15        BNE $89AF     ;No, branch
03/899A: 7B           TDC
03/899B: AA           TAX
03/899C: B7 80        LDA [$80],Y   ;Continue on past the first FF byte
03/899E: 9D 9A 38     STA $389A,X
03/89A1: C8           INY
03/89A2: E8           INX
03/89A3: C9 FF        CMP #$FF      ;Second terminator reached?
03/89A5: D0 F5        BNE $899C     ;No, branch

I believe the script parser is at 03/8ED6 although I haven't gotten to that yet...

 :edit:

My mistake, I believe the parser is at 03/A4E9

13
Final Fantasy IV Research & Development / Re: $1560 in RAM
« on: May 01, 2011, 02:37:01 PM »
Yep, already sorted it out. Basically the spell lists for the characters

14
Thanks, I'll have a look. I'm currently separating out the event scripts, I have most of the event interpreter code figured out and documented. Probably move on to combat code and data after that

15
Final Fantasy IV Research & Development / Event script interpreter
« on: March 15, 2011, 02:22:20 PM »
The code that runs the event scripts is located at $00DF63

Pages: 1 2 »