[FF8] .x battle fields

  • Thread starter Thread starter Halfer
  • Start date Start date
Status
Not open for further replies.
Actually the only thing I could guess is that each polygon or group or uv group is assigned somehow to the right color clut..
Something like multi-material in 3ds max but whith color cluts ID instead of material ID.. (I could be totally wrong anyway  ;D )

If I'm right then there is probably no way to automatically extract the "correct puzzle" from a TIM..

we at best could make a check to see if we're making it right :)


For the single .obj is a good thing even if I actually solved the importing time whith a useful script I found that allow me "multi import" .obj files in few secs  :-D

P.S.

I was wondering about some GF stuffs..
for example if you look at that sort of "cemetery ground" (or whatever it is) that GF Cerberus came out from during its summoning animation..
What's that? it looks like a sort of battle stage but it's animated (gate opens..)
I didn't find clues of where that environment could be located till now.. same thing for Alexander mountain and other GF animation "accessory 3d models".. maybe they have their own file format  ???
 
For the single .obj is a good thing even if I actually solved the importing time whith a useful script I found that allow me "multi import" .obj files in few secs  :-D
Oh, could you upload this? I'd use that too. :)

I didn't find clues of where that environment could be located till now.. same thing for Alexander mountain and other GF animation "accessory 3d models".. maybe they have their own file format  ???
Same here. I'll run a software on FF8.EXE and see what will happen.
UPDATE: No. There's no .X files in EXE, nor 01 00 01 00 objects compatible with .X format.
 
Last edited:
Oh, could you upload this? I'd use that too. :)
Can't find that script right now since I'm not at home but you could try this (should work as well or even better ) :

http://www.scriptspot.com/3ds-max/scripts/batch-exportimport

When I'll get back home I'll post the one I'm using :)

Edit:

Here's the one I'm currently using:

http://www.scriptspot.com/3ds-max/scripts/batch-merge


Same here. I'll run a software on FF8.EXE and see what will happen.
UPDATE: No. There's no .X files in EXE, nor 01 00 01 00 objects compatible with .X format.
That worth the try anyway  :'(

I think that probably there is some file format for "animation models" that could be similar to .dat combat model (like GF ones but probably not the same) that is used for stuffs like that like Shiva's "ice shards" or Ifrit's "magma ball" and so on..
There is a chance that same format is used for normal magic animation which actually spawn a 3d model (blizzard, blizzara, blizzaga..etc).
 
Last edited:
I may be completely wrong but why don't you give a shot to mag999_a.dat file. Its size and name could mean that it includes something special, maybe all the ground models for GF animations?
 
I may be completely wrong but why don't you give a shot to mag999_a.dat file. Its size and name could mean that it includes something special, maybe all the ground models for GF animations?
That could be an interesting point!

edit:

looks like battle/mag87 files contain environment textures for selphie's limit "the end".
 
Last edited:
I may be completely wrong but why don't you give a shot to mag999_a.dat file. Its size and name could mean that it includes something special, maybe all the ground models for GF animations?
I've already check it but i don't know how read/extract the data/models from over there.
If you hex edit that file, you can see this header in every "data blocks".

"XX XX XX XX 00 00 00 00 00 11 00 00 00 00 10 00 00 90 06"
Always the same but not the first 4, maybe are some kind of pointers i don't know.
Anyway the header it's always the same dimension 06 90 (is this the header.....i think xD)

We've tried some old Py scripts from this thread https://www.ff7catalog.com/threads/10271/ but are not the same "Kind" of model...so are totally useless...
If you can give a check...maybe MakiPL, you can understand something for make a new script/tool for make readable these "Blocks".

Edit:
IMPORTANT MakiPL
If you check this file "mag087_b.1r1" the structure is very similar to a battlestage...so let me know if there is something like the "the end" stage. If yes i'll give you other file with this type of "models".
 
Last edited:
Edit:
IMPORTANT MakiPL
If you check this file "mag087_b.1r1" the structure is very similar to a battlestage...so let me know if there is something like the "the end" stage. If yes i'll give you other file with this type of "models".
Indeed. Typical Quad info starts at 0x88c. However visualisation of this produces bad mesh.
There's texture in 1t0 and 1t1. The file is divided on parts. At the moment I can tell:

.1p0 file is UNKNOWN (p stands for... particle?)
.1r0 is start file, that the first unsigned int is size of the first pattern. Visualizing of vertices from this part produced this cloud:
G616Qd6.png
. Moreover 2240 MODULO 6 != 0, so it's not Short type X Y Z vertices. After this another pattern appears. Finally, a 8670 byte of this strange pattern. 8670 is dividable by 1,2,3,5,6,10,15,17,30 and 34. Never seen anything sized like that.
.1r1 is the same as above, but the pattern is almost the same like the stage. Starting from 0x8bc till the least 2c EOF byte, there's 5712 bytes, and this number is dividable by 24. Max face index is 545, this means I need at least 545*6 = 3270 Bytes of data for vertices. I found, that there's a pattern for either 4 or 8 bytes. 4 bytes of data, and four next bytes are 00 00 00 00.
.1s0 looks like the camera (has the same header as stage - but it's only a speculation)
.1t0 and .1t1 - divide parts of this texture:
txYH7mj.png


Hm... I have an idea. Please, could you find a mag file that's responsible for some magic/GF that has objects in it? I could then real-time memory edit this to find out what will happen. OR, someone tell me if he/she recognise a spell/magic/anything that this texture may apply.


@Mag999_a.dat contains only AKAO sequences (this is: sounds info).
Mag184 is Shiva.

EDIT3: In .EXE, at 0x9b7db8 is ASCII hard-coded "mag150.TIM". I though about ASCII rip using Jaeder Naub , see what I get.
 
Last edited:
Yes Odin GF invocation.

Hum no. Let me search :) definitely remind me something

Hum seems like bahamut. The only zone with moon on it ....
 
Last edited:
That moon is from Rinoas limit break called Invincible moon
Yep. Thanks.

So, it's just a plane with a moving clouds. That's probably it. Need to find better model. (other magic file)
 
Hum ..... I failed -_-
At least you tried and that's what matters most. :)

I uploaded the ASCII RIP. Be warned, it's 30k lines per one link.

http://pastebin.com/aPE6LnSJ - #1 = most interesting, contains parameters, functions and .cpp leftovers.
http://pastebin.com/DTqEn9sc - #2 = See the ABCDEFGH... things? They're models with texture refference (after these patterns there's a ABC.tim refference)
http://pastebin.com/EW5fnT2S - #3 = See at the end of file. I've seen things like this in rail.obj, what could it be? Also, FF8.EXE contains quote of Buddha: Code: [Select]
Code:
"What is evil? Killing is evil, lying is evil, slandering is evil, abuse is evil, gossip is evil, envy is evil, hatred is evil, to cling to false doctrine is evil; all these things are evil. And what is the root of evil? Desire is the root of evil, illusion is the root of evil."
Also I wonder if it's just a contingency, or it's some sort of encoded thing:
Code: [Select]
Code:
:Yqcq _ qumpb a_jjcb Wncag_j qigjj gqVclxmisicl< sqgle Wgjclr< _lb _ `gr Pmtcq rfc fmr bmeqqmjb gl rfc K_pbcla_dcrcpg_;Yqcq ajmqc amk`_rdgefrgle qigjjq rmbcdc_r clckgcq ugrfnslafcq _lb igaiq;El cvncpr k_piq2k_l;  G_l sqcqncag_jgxcb `sjjcrqrm _rr_ai clckgcq;HmcqlCr ncpdmpktcpw ucjj slbcpnpcqqspc;Yqcq _ ufgn;[fcl gl b_lecp<sqcq kmlqrcp qigjjqqfc f_q jc_plcb;Lcp _bkgpcpq gl rfcK_pbcl f_tcdmpkcb _ d_l ajs`;`cp md rfc`cp pcqgqr_lac
 
Hm... I have an idea. Please, could you find a mag file that's responsible for some magic/GF that has objects in it? I could then real-time memory edit this to find out what will happen. OR, someone tell me if he/she recognise a spell/magic/anything that this texture may apply.
Try to search on Mag190 a/c.....in Mag190b you can find the doomtrain model...and i think anything else...meanwhile in mag190c i think there are 3 models and 1 texture.....in mag 190a there is something....maybe the "space structure" and the flames animation (i think)...but really i don't know....i can "See and recognize" something but i have to find some book or forum where i can study this "hex structure of a file" (i'm really curious)
If you have something like a pdf file or a book or a forum or anything where I can begin, I would appreciate it very much! (So i can give you a help literally >_>)
Let me know if i'm right.

(Here a video about doomtrain
so you can check the extra model and the "stage" (space))
 
http://pastebin.com/aPE6LnSJ - #1 = most interesting, contains parameters, functions and .cpp leftovers.
http://pastebin.com/DTqEn9sc - #2 = See the ABCDEFGH... things? They're models with texture refference (after these patterns there's a ABC.tim refference)
http://pastebin.com/EW5fnT2S - #3 = See at the end of file. I've seen things like this in rail.obj, what could it be? Also, FF8.EXE
1) In the first one there is the structure of the game, functions, a complete list of all file inside the battle.fs etc.
2) Well i don't understand almost anything xD but yeah, there are some references of models and textures.
3)Rail.obj and the others one, just open deling and extract the content of World.fs -> c:\ff8\data\ita\world\dat\.... over there there are all. And you can find and see directly, with deling, some textures of the worldmap and gardens itselfs over the file -> textl.obj & wmsetXX  (XX -> IT/ US / DE / FR / ES ETC) i have for example the wmsetit (i'm italian :P)
 
Last edited:
I real-time debugged process, and found some entries testing on Shiva.

At first, when you summoning G.F. nothing happen to data in memory, it's 00 00... or the state of previous G.F.
After the G.F. gauge runs out, the memory is written by some small data, and after the character animation of summoning passes (You know, that one when for example Squall puts hand from his face to enemy and disappears after) the data is written by .TIM texture. After 1-2 second of Shiva animation, right before she appears in the crystal a data is again written to .TIM texture place and data from mag184_e.dat appears. This is memory dump of this region:
https://www.dropbox.com/s/g2vrrradn7muj8s/MemDump.7z?dl=0

The first texture is broken. Don't know why.

After textures, there's at least 3MB of free space. The models have to be before, but all I can see are still NULL's. At the moment, where there's ice over enemies, and shiva is no more able to be seen, the data is again overwritten. That's the real problem. I can't help myself with real-time memory edit/debugging if the values and addresses are changing by the situation.
 
Last edited:
Month ago I posted japanese interview with every development team at: https://www.ff7catalog.com/threads/10846/
One coder from battle team said that they made a camera editor in-game (Yes, not external program). Some days ago I came up with some extreme idea:
"What if the unknown and unused battle stage section is in fact a CODE?"
So... I tried with intel and came up with nothing. That's not intel, of course it's written for PlayStation. So... I tried with MIPS big-endian and nope, a lot of unrecognizable assembly. But the file is little-endian, so I tried MIPSL (MIPS little-endian) instead and... I got full code with refferences inside (relative jumps in code), repeative memory copy, jumps to 0x800F07C0 and related (The same address range is when you disassembly the real FF8 PSX code file). I have totally no knowledge about MIPS, but maybe someone could prove it's only my fantasy and it's not a code:
*Fun fact is the disassembly fails to convert to code just as the unknown data section ends (so the camera starts)

Code: [Select]
Code:
ROM:00000000                 addiu   $sp, -0x18       # Add Immediate UnsignedROM:00000004                 li      $v0, 1           # Load ImmediateROM:00000008                 sw      $ra, 0x14($sp)   # Store WordROM:0000000C                 beq     $a0, $v0, loc_54  # Branch on EqualROM:00000010                 sw      $s0, 0x10($sp)   # Store WordROM:00000014                 slti    $v0, $a0, 2      # Set on Less Than ImmediateROM:00000018                 beqz    $v0, loc_30      # Branch on ZeroROM:0000001C                 nopROM:00000020ROM:00000020 loc_20:                                  # DATA XREF: ROM:00004264oROM:00000020                                          # ROM:00004654o ...ROM:00000020                 beqz    $a0, loc_44      # Branch on ZeroROM:00000024ROM:00000024 loc_24:                                  # DATA XREF: ROM:00029E80oROM:00000024                                          # ROM:000364B8oROM:00000024                 lui     $a0, 0x8014      # Load Upper ImmediateROM:00000028ROM:00000028 loc_28:                                  # DATA XREF: ROM:00002130oROM:00000028                                          # ROM:000027A0o ...ROM:00000028                 j       0x13E0A8         # JumpROM:0000002C                 nop                      # DATA XREF: ROM:000235A4oROM:0000002C                                          # ROM:00023894o ...ROM:00000030  # ---------------------------------------------------------------------------ROM:00000030ROM:00000030 loc_30:                                  # CODE XREF: ROM:00000018jROM:00000030                                          # DATA XREF: ROM:0002F8A4oROM:00000030                 li      $v0, 2           # Load ImmediateROM:00000034ROM:00000034 loc_34:                                  # DATA XREF: ROM:00022370oROM:00000034                                          # ROM:0002A794o ...ROM:00000034                 beq     $a0, $v0, loc_68  # Branch on EqualROM:00000038                 lui     $s0, 0x8014      # DATA XREF: ROM:00024D94oROM:00000038                                          # ROM:00029594oROM:00000038                                          # Load Upper ImmediateROM:0000003C                 j       0x13E0A8         # DATA XREF: ROM:00006B30oROM:0000003C                                          # JumpROM:00000040                 nop                      # DATA XREF: ROM:000367ACoROM:00000044  # ---------------------------------------------------------------------------ROM:00000044ROM:00000044 loc_44:                                  # CODE XREF: ROM:loc_20jROM:00000044                                          # DATA XREF: ROM:000353CCoROM:00000044                 jal     0x13E0BC         # Jump And LinkROM:00000048ROM:00000048 loc_48:                                  # DATA XREF: ROM:00022F94oROM:00000048                                          # ROM:00023294o ...ROM:00000048                 addiu   $a0, -0xEEC      # Add Immediate UnsignedROM:0000004C                 j       0x13E0A8         # DATA XREF: ROM:00028F94oROM:0000004C                                          # ROM:00029E94oROM:0000004C                                          # JumpROM:00000050                 move    $v0, $zeroROM:00000054  # ---------------------------------------------------------------------------ROM:00000054ROM:00000054 loc_54:                                  # CODE XREF: ROM:0000000CjROM:00000054                                          # DATA XREF: ROM:00022C94o ...ROM:00000054                 lui     $a0, 0x8014      # Load Upper ImmediateROM:00000058                 jal     0x13E2B8         # Jump And LinkROM:0000005CROM:0000005C loc_5C:                                  # DATA XREF: ROM:00022994oROM:0000005C                 addiu   $a0, -0xEEC      # Add Immediate UnsignedROM:00000060                 j       0x13E0A8         # JumpROM:00000064ROM:00000064 loc_64:                                  # DATA XREF: ROM:00022094oROM:00000064                 move    $v0, $zeroROM:00000068  # ---------------------------------------------------------------------------ROM:00000068ROM:00000068 loc_68:                                  # CODE XREF: ROM:loc_34jROM:00000068                                          # DATA XREF: ROM:000253C8oROM:00000068                 addiu   $s0, -0x1A3C     # Add Immediate UnsignedROM:0000006C                 move    $a0, $s0         # DATA XREF: ROM:00035FCCoROM:00000070ROM:00000070 loc_70:                                  # DATA XREF: ROM:000362CCoROM:00000070                                          # ROM:00036170oROM:00000070                 li      $a1, 0x8013E5B4  # Load ImmediateROM:00000078                 li      $a2, 0x10        # DATA XREF: ROM:00024D8CoROM:00000078                                          # ROM:00033D64oROM:00000078                                          # Load ImmediateROM:0000007C                 jal     0xB5078          # DATA XREF: ROM:000223B8oROM:0000007C                                          # Jump And LinkROM:00000080                 li      $a3, 1           # Load ImmediateROM:00000084ROM:00000084 loc_84:                                  # DATA XREF: ROM:00022980oROM:00000084                 move    $a0, $s0ROM:00000088                 lui     $a1, 0x8014      # Load Upper ImmediateROM:0000008C                 jal     0xB50FC          # Jump And LinkROM:00000090                 li      $a1, 0x8013E53C  # Load ImmediateROM:00000094                 sh      $zero, 0xC($v0)  # DATA XREF: ROM:00019AB0oROM:00000094                                          # Store HalfwordROM:00000098                 lui     $a0, 0x8014      # Load Upper ImmediateROM:0000009C                 jal     0x13E26C         # Jump And LinkROM:000000A0                 li      $a0, 0x8013E5D4  # Load ImmediateROM:000000A4                 move    $v0, $s0ROM:000000A8                 lw      $ra, 0x14($sp)   # Load WordROM:000000AC                 lw      $s0, 0x10($sp)   # Load WordROM:000000B0                 addiu   $sp, 0x18        # Add Immediate UnsignedROM:000000B4                 jr      $ra              # Jump RegisterROM:000000B8                 nopROM:000000BC  # ---------------------------------------------------------------------------ROM:000000BCROM:000000BC loc_BC:                                  # DATA XREF: ROM:00005000oROM:000000BC                 addiu   $sp, -0x30       # Add Immediate UnsignedROM:000000C0                 sw      $s4, 0x20($sp)   # Store WordROM:000000C4                 move    $s4, $a0ROM:000000C8                 sw      $s5, 0x24($sp)   # Store WordROM:000000CC                 move    $s5, $zeroROM:000000D0                 lui     $v0, 0x800F      # Load Upper ImmediateROM:000000D4                 sw      $s6, 0x28($sp)   # Store WordROM:000000D8                 addiu   $s6, $v0, 0x708  # Add Immediate UnsignedROM:000000DC                 sw      $s0, 0x10($sp)   # Store WordROM:000000E0                 move    $s0, $s6ROM:000000E4                 sw      $s3, 0x1C($sp)   # Store WordROM:000000E8                 move    $s3, $s5ROM:000000EC                 sw      $s2, 0x18($sp)   # Store WordROM:000000F0                 addiu   $s2, $s6, 0x20   # Add Immediate UnsignedROM:000000F4                 sw      $s1, 0x14($sp)   # Store WordROM:000000F8                 move    $s1, $s4ROM:000000FC                 sw      $ra, 0x2C($sp)   # Store WordROM:00000100ROM:00000100 loc_100:                                 # CODE XREF: ROM:000001A8jROM:00000100                                          # DATA XREF: ROM:0003055Co ...ROM:00000100                 lw      $v0, 8($s1)      # Load WordROM:00000104                 lw      $v1, 4($s1)      # Load WordROM:00000108                 addu    $v0, $s4, $v0    # Add UnsignedROM:0000010C                 addu    $v1, $s4, $v1    # Add UnsignedROM:00000110                 beq     $v0, $v1, loc_174  # Branch on EqualROM:00000114                 nopROM:00000118                 lw      $v0, 4($v1)      # Load WordROM:0000011C                 nopROM:00000120                 addu    $v0, $v1, $v0    # Add UnsignedROM:00000124                 sw      $v0, 4($s0)      # Store WordROM:00000128                 lw      $v0, 8($v1)      # Load WordROM:0000012C                 nopROM:00000130                 addu    $v0, $v1, $v0    # Add UnsignedROM:00000134                 sw      $v0, 8($s0)      # Store WordROM:00000138                 lw      $a0, 0xC($v1)    # Load WordROM:0000013C                 nopROM:00000140                 addu    $a0, $v1, $a0    # Add UnsignedROM:00000144                 jal     0xBBB20          # Jump And LinkROM:00000148                 sw      $a0, 0xC($s0)    # Store WordROM:0000014C                 addiu   $a0, $s6, 0x14   # Add Immediate UnsignedROM:00000150                 addu    $a0, $s3, $a0    # Add UnsignedROM:00000154                 move    $a1, $s2ROM:00000158                 lw      $v0, 0($s0)      # Load WordROM:0000015C                 move    $a2, $zeroROM:00000160                 ori     $v0, 0x700       # OR ImmediateROM:00000164                 jal     0xBFBA0          # Jump And LinkROM:00000168                 sw      $v0, 0($s0)      # Store WordROM:0000016C                 j       0x13E198         # JumpROM:00000170                 addiu   $s0, 0x2C  # ','  # Add Immediate UnsignedROM:00000174  # ---------------------------------------------------------------------------ROM:00000174ROM:00000174 loc_174:                                 # CODE XREF: ROM:00000110jROM:00000174                 lw      $v0, 0($s0)      # Load WordROM:00000178                 li      $v1, 0xFFFFFEFF  # Load ImmediateROM:0000017C                 and     $v0, $v1         # ANDROM:00000180                 li      $v1, 0xFFFFFDFF  # Load ImmediateROM:00000184                 and     $v0, $v1         # ANDROM:00000188                 li      $v1, 0xFFFFFBFF  # Load ImmediateROM:0000018C                 and     $v0, $v1         # ANDROM:00000190                 sw      $v0, 0($s0)      # Store WordROM:00000194                 addiu   $s0, 0x2C  # ','  # Add Immediate UnsignedROM:00000198                 addiu   $s3, 0x2C  # ','  # Add Immediate UnsignedROM:0000019C                 addiu   $s2, 0x2C  # ','  # Add Immediate UnsignedROM:000001A0                 addiu   $s5, 1           # Add Immediate UnsignedROM:000001A4                 slti    $v0, $s5, 4      # Set on Less Than ImmediateROM:000001A8                 bnez    $v0, loc_100     # Branch on Not ZeroROM:000001AC                 addiu   $s1, 4           # Add Immediate UnsignedROM:000001B0                 lui     $v0, 0x800F      # Load Upper ImmediateROM:000001B4                 lui     $a0, 0x800F      # Load Upper ImmediateROM:000001B8                 sh      $zero, 0x800F07C0  # Store HalfwordROM:000001BC                 lw      $v0, 0x14($s4)   # Load WordROM:000001C0                 lw      $v1, 0x18($s4)   # Load WordROM:000001C4                 addu    $v0, $s4, $v0    # Add UnsignedROM:000001C8                 sw      $v0, 0x800F07BC  # Store WordROM:000001CC                 lw      $v0, 0x14($s4)   # Load WordROM:000001D0                 addu    $v1, $s4, $v1    # Add UnsignedROM:000001D4                 addu    $v0, $s4, $v0    # Add UnsignedROM:000001D8                 bne     $v1, $v0, loc_1E4  # Branch on Not EqualROM:000001DC                 lui     $v1, 0x800E      # Load Upper ImmediateROM:000001E0                 sw      $zero, 0x800F07BC  # Store WordROM:000001E4ROM:000001E4 loc_1E4:                                 # CODE XREF: ROM:000001D8jROM:000001E4                 lui     $v0, 0x8014      # Load Upper ImmediateROM:000001E8                 addiu   $a3, $v0, -0x1A78  # Add Immediate UnsignedROM:000001EC                 addiu   $a2, $v1, 0x4CA4  # Add Immediate UnsignedROM:000001F0                 lwl     $a0, 3($a3)      # Load Word LeftROM:000001F4                 lwr     $a0, 0($a3)      # Load Word RightROM:000001F8                 nopROM:000001FC                 swl     $a0, 3($a2)      # Store Word LeftROM:00000200                 swr     $a0, 0($a2)      # DATA XREF: ROM:000347C4oROM:00000200                                          # ROM:00037DC8oROM:00000200                                          # Store Word RightROM:00000204                 lui     $v0, 0x800E      # Load Upper ImmediateROM:00000208                 lui     $v1, 0x8014      # Load Upper ImmediateROM:0000020C                 addiu   $a3, $v1, -0x1A74  # Add Immediate UnsignedROM:00000210                 addiu   $a2, $v0, 0x4E14  # Add Immediate UnsignedROM:00000214                 lwl     $a0, 3($a3)      # Load Word LeftROM:00000218                 lwr     $a0, 0($a3)      # Load Word RightROM:0000021C                 nopROM:00000220                 swl     $a0, 3($a2)      # Store Word LeftROM:00000224                 swr     $a0, 0($a2)      # Store Word RightROM:00000228                 li      $v0, 0x800E4E14  # Load ImmediateROM:0000022C                 li      $v1, 0x32  # '2'  # Load ImmediateROM:00000230                 sb      $v1, 3($v0)      # Store ByteROM:00000234                 lw      $a0, 0x18($s4)   # Load WordROM:00000238                 jal     0xBBB60          # Jump And LinkROM:0000023C                 addu    $a0, $s4, $a0    # Add UnsignedROM:00000240                 lw      $ra, 0x2C($sp)   # Load WordROM:00000244                 lw      $s6, 0x28($sp)   # Load WordROM:00000248                 lw      $s5, 0x24($sp)   # Load WordROM:0000024C                 lw      $s4, 0x20($sp)   # Load WordROM:00000250                 lw      $s3, 0x1C($sp)   # Load WordROM:00000254                 lw      $s2, 0x18($sp)   # Load WordROM:00000258                 lw      $s1, 0x14($sp)   # Load WordROM:0000025C                 lw      $s0, 0x10($sp)   # Load WordROM:00000260                 addiu   $sp, 0x30        # Add Immediate UnsignedROM:00000264                 jr      $ra              # Jump RegisterROM:00000268                 nopROM:0000026C  # ---------------------------------------------------------------------------ROM:0000026C                 addiu   $sp, -0x18       # Add Immediate UnsignedROM:00000270                 sw      $s0, 0x10($sp)   # Store WordROM:00000274                 sw      $ra, 0x14($sp)   # Store WordROM:00000278                 jal     dword_30C54+0x50  # Jump And LinkROM:0000027C                 move    $s0, $a0ROM:00000280                 li      $v1, 0x800EE0E8  # Load ImmediateROM:00000288                 andi    $v0, 1           # AND ImmediateROM:0000028C                 addu    $v0, $v1         # Add UnsignedROM:00000290                 lbu     $v1, 0xCDE($v0)  # Load Byte UnsignedROM:00000294                 lui     $v0, 0x800F      # Load Upper ImmediateROM:00000298                 move    $a0, $s0ROM:0000029C                 jal     0xC69C4          # Jump And LinkROM:000002A0                 sh      $v1, 0x800F1260  # Store HalfwordROM:000002A4                 lw      $ra, 0x14($sp)   # Load WordROM:000002A8                 lw      $s0, 0x10($sp)   # Load WordROM:000002AC                 addiu   $sp, 0x18        # Add Immediate UnsignedROM:000002B0                 jr      $ra              # Jump RegisterROM:000002B4                 nopROM:000002B8  # ---------------------------------------------------------------------------ROM:000002B8                 addiu   $sp, -0x18       # Add Immediate UnsignedROM:000002BC                 sw      $ra, 0x10($sp)   # Store WordROM:000002C0                 lw      $v0, 0x18($a0)   # Load WordROM:000002C4                 jal     0xBDB8C          # Jump And LinkROM:000002C8                 addu    $a0, $v0         # Add UnsignedROM:000002CC                 lw      $ra, 0x10($sp)   # Load WordROM:000002D0                 addiu   $sp, 0x18        # Add Immediate UnsignedROM:000002D4                 jr      $ra              # Jump RegisterROM:000002D8                 nopROM:000002DC  # ---------------------------------------------------------------------------ROM:000002DC                 addiu   $sp, -0x40       # Add Immediate UnsignedROM:000002E0                 li      $a0, 0x54  # 'T'  # Load ImmediateROM:000002E4                 sw      $ra, 0x3C($sp)   # Store WordROM:000002E8                 sw      $fp, 0x38($sp)   # Store WordROM:000002EC                 sw      $s7, 0x34($sp)   # Store WordROM:000002F0                 sw      $s6, 0x30($sp)   # Store WordROM:000002F4                 sw      $s5, 0x2C($sp)   # Store WordROM:000002F8                 sw      $s4, 0x28($sp)   # Store WordROM:000002FC                 sw      $s3, 0x24($sp)   # Store WordROM:00000300                 sw      $s2, 0x20($sp)   # DATA XREF: ROM:000356BCoROM:00000300                                          # ROM:000380C8o ...ROM:00000300                                          # Store WordROM:00000304                 sw      $s1, 0x1C($sp)   # Store WordROM:00000308                 jal     0xB5D10          # Jump And LinkROM:0000030C                 sw      $s0, 0x18($sp)   # Store WordROM:00000310                 move    $s4, $zeroROM:00000314                 move    $s1, $v0ROM:00000318                 addiu   $s7, $s1, 8      # Add Immediate UnsignedROM:0000031C                 lui     $t1, 0x800F      # Load Upper ImmediateROM:00000320                 addiu   $fp, $t1, 0x1298  # Add Immediate UnsignedROM:00000324                 li      $t1, 0x800F071C  # Load ImmediateROM:0000032C                 addiu   $v0, $t1, -0x14  # Add Immediate UnsignedROM:00000330                 addiu   $s6, $v0, 4      # Add Immediate UnsignedROM:00000334                 move    $s3, $v0ROM:00000338                 li      $s2, 0x800F071C  # Load ImmediateROM:00000340                 addiu   $s5, $s2, 0xC    # Add Immediate UnsignedROM:00000344                 li      $v0, 0x140       # Load ImmediateROM:00000348                 sh      $v0, 0x40($s1)   # Store HalfwordROM:0000034C                 li      $v0, 0xD8  # 'ě'  # Load ImmediateROM:00000350                 sh      $v0, 0x42($s1)   # Store HalfwordROM:00000354                 lui     $v0, 0x800F      # Load Upper ImmediateROM:00000358                 lui     $v1, 0x8010      # Load Upper ImmediateROM:0000035C                 lw      $a0, 0x800F182C  # Load WordROM:00000360                 lw      $v1, 0x800FB518  # Load WordROM:00000364                 li      $v0, 0xFFFFFFFF  # Load ImmediateROM:00000368                 sh      $zero, 0x3C($s1)  # Store HalfwordROM:0000036C                 sh      $zero, 0x3E($s1)  # Store HalfwordROM:00000370                 sw      $v0, 0x48($s1)   # Store WordROM:00000374                 sw      $a0, 0x2C($s1)   # Store WordROM:00000378                 sw      $v1, 0x38($s1)   # Store WordROM:0000037CROM:0000037C loc_37C:                                 # CODE XREF: ROM:000004F8jROM:0000037C                 lw      $v0, 0x800F0704  # Load WordROM:00000384                 nopROM:00000388                 andi    $v0, 4           # AND ImmediateROM:0000038C                 bnez    $v0, loc_3B8     # Branch on Not ZeroROM:00000390                 li      $v0, 3           # Load ImmediateROM:00000394                 move    $a0, $s2ROM:00000398                 jal     0xBF670          # Jump And LinkROM:0000039C                 move    $a1, $s5ROM:000003A0                 beqz    $v0, loc_3B4     # Branch on ZeroROM:000003A4                 move    $a0, $s2ROM:000003A8                 move    $a1, $s5ROM:000003AC                 jal     0xBFBA0          # Jump And LinkROM:000003B0                 move    $a2, $zeroROM:000003B4ROM:000003B4 loc_3B4:                                 # CODE XREF: ROM:000003A0jROM:000003B4                 li      $v0, 3           # Load ImmediateROM:000003B8ROM:000003B8 loc_3B8:                                 # CODE XREF: ROM:0000038CjROM:000003B8                 beq     $s4, $v0, loc_3D4  # Branch on EqualROM:000003BC                 move    $a0, $s2ROM:000003C0                 lui     $t1, 0x800F      # Load Upper ImmediateROM:000003C4                 jal     0xBFDE8          # Jump And LinkROM:000003C8                 addiu   $a1, $t1, 0x1298  # Add Immediate UnsignedROM:000003CC                 j       0x13E460         # JumpROM:000003D0                 nopROM:000003D4  # ---------------------------------------------------------------------------ROM:000003D4ROM:000003D4 loc_3D4:                                 # CODE XREF: ROM:loc_3B8jROM:000003D4                 move    $a0, $s1ROM:000003D8                 lui     $t1, 0x8014      # Load Upper ImmediateROM:000003DC                 lw      $v0, 0x8013E5B0  # Load WordROM:000003E0                 move    $a1, $s7ROM:000003E4                 sh      $zero, 4($s1)    # Store HalfwordROM:000003E8                 sh      $zero, 0($s1)    # Store HalfwordROM:000003EC                 sra     $v0, 3           # Shift Right ArithmeticROM:000003F0                 jal     dword_2E554+0x104  # Jump And LinkROM:000003F4                 sh      $v0, 2($s1)      # Store HalfwordROM:000003F8                 move    $a0, $fpROM:000003FC                 jal     dword_30654+0xBC  # Jump And LinkROM:00000400                 move    $a1, $s7ROM:00000404                 lui     $t1, 0x800F      # Load Upper ImmediateROM:00000408                 lw      $v0, 0x14($fp)   # Load WordROM:0000040C                 li      $t1, 0x800F071C  # Load ImmediateROM:00000410                 sw      $v0, 0x1C($s1)   # Store WordROM:00000414                 lw      $v0, 0x18($fp)   # Load WordROM:00000418ROM:00000418 loc_418:                                 # DATA XREF: ROM:00002D10oROM:00000418                 addiu   $a0, $t1, 0x84   # Add Immediate UnsignedROM:0000041C                 sw      $v0, 0x20($s1)   # Store WordROM:00000420                 lw      $v0, 0x1C($fp)   # Load WordROM:00000424                 move    $a1, $s7ROM:00000428                 jal     0xBFDE8          # Jump And LinkROM:0000042C                 sw      $v0, 0x24($s1)   # Store WordROM:00000430                 lw      $v0, 0x800F0704  # Load WordROM:00000438                 nopROM:0000043C                 andi    $v0, 1           # AND ImmediateROM:00000440                 bnez    $v0, loc_460     # Branch on Not ZeroROM:00000444                 lui     $v0, 0x800F      # Load Upper ImmediateROM:00000448                 lui     $t1, 0x8014      # Load Upper ImmediateROM:0000044C                 lh      $v1, 0x800F07C0  # Load HalfwordROM:00000450                 lw      $v0, 0x8013E5B0  # Load WordROM:00000454                 nopROM:00000458                 addu    $v0, $v1         # Add UnsignedROM:0000045C                 sw      $v0, 0x8013E5B0  # Store WordROM:00000460ROM:00000460 loc_460:                                 # CODE XREF: ROM:00000440jROM:00000460                 lw      $v1, 0($s3)      # Load WordROM:00000464                 nopROM:00000468                 srl     $v0, $v1, 8      # Shift Right LogicalROM:0000046C                 andi    $v0, 1           # AND ImmediateROM:00000470                 beqz    $v0, loc_4E4     # Branch on ZeroROM:00000474                 srl     $v0, $v1, 9      # Shift Right LogicalROM:00000478                 andi    $v0, 1           # AND ImmediateROM:0000047C                 beqz    $v0, loc_4E4     # Branch on ZeroROM:00000480                 lui     $s0, 0x8010      # Load Upper ImmediateROM:00000484                 lwl     $v0, 0x2B($s3)   # Load Word LeftROM:00000488                 lwr     $v0, 0x28($s3)   # Load Word RightROM:0000048C                 nopROM:00000490                 swl     $v0, 0x47($s1)   # Store Word LeftROM:00000494                 swr     $v0, 0x44($s1)   # Store Word RightROM:00000498                 move    $a0, $s6ROM:0000049C                 sll     $v1, $s4, 3      # Shift Left LogicalROM:000004A0                 lhu     $v0, 2($s3)      # Load Halfword UnsignedROM:000004A4                 nopROM:000004A8                 sh      $v0, 0x4C($s1)   # Store HalfwordROM:000004AC                 li      $v0, 0x8013E590  # Load ImmediateROM:000004B4                 addu    $v1, $v0         # Add UnsignedROM:000004B8                 lw      $t0, 0($v1)      # Load WordROM:000004BC                 lw      $v0, 0x800FB610  # Load WordROM:000004C0                 addiu   $a1, $s1, 0x28   # Add Immediate UnsignedROM:000004C4                 sw      $v0, 0x10($sp)   # Store WordROM:000004C8                 lui     $v0, 0x8010      # Load Upper ImmediateROM:000004CC                 sll     $t0, 2           # Shift Left LogicalROM:000004D0                 lw      $a2, 0x800FB608  # Load WordROM:000004D4                 lw      $a3, 4($v1)      # Load WordROM:000004D8                 jal     0xBDDA4          # Jump And LinkROM:000004DC                 addu    $a2, $t0         # Add UnsignedROM:000004E0                 sw      $v0, -0x49F0($s0)  # Store WordROM:000004E4ROM:000004E4 loc_4E4:                                 # CODE XREF: ROM:00000470jROM:000004E4                                          # ROM:0000047CjROM:000004E4                 addiu   $s6, 0x2C  # ','  # Add Immediate UnsignedROM:000004E8                 addiu   $s3, 0x2C  # ','  # Add Immediate UnsignedROM:000004EC                 addiu   $s2, 0x2C  # ','  # Add Immediate UnsignedROM:000004F0                 addiu   $s4, 1           # Add Immediate UnsignedROM:000004F4                 slti    $v0, $s4, 4      # Set on Less Than ImmediateROM:000004F8                 bnez    $v0, loc_37C     # Branch on Not ZeroROM:000004FC                 addiu   $s5, 0x2C  # ','  # Add Immediate UnsignedROM:00000500                 jal     0xB5D6C          # Jump And LinkROM:00000504                 li      $a0, 0x54  # 'T'  # Load ImmediateROM:00000508                 lw      $ra, 0x3C($sp)   # Load WordROM:0000050C                 lw      $fp, 0x38($sp)   # Load WordROM:00000510                 lw      $s7, 0x34($sp)   # Load WordROM:00000514                 lw      $s6, 0x30($sp)   # Load WordROM:00000518                 lw      $s5, 0x2C($sp)   # Load WordROM:0000051C                 lw      $s4, 0x28($sp)   # Load WordROM:00000520                 lw      $s3, 0x24($sp)   # Load WordROM:00000524                 lw      $s2, 0x20($sp)   # Load WordROM:00000528                 lw      $s1, 0x1C($sp)   # Load WordROM:0000052C                 lw      $s0, 0x18($sp)   # Load WordROM:00000530                 addiu   $sp, 0x40        # Add Immediate UnsignedROM:00000534                 jr      $ra              # Jump RegisterROM:00000538                 nopROM:0000053C  # ---------------------------------------------------------------------------ROM:0000053C                 addiu   $sp, -0x18       # Add Immediate UnsignedROM:00000540                 sw      $ra, 0x10($sp)   # Store WordROM:00000544                 lh      $v1, 0xC($a0)    # Load HalfwordROM:00000548                 lhu     $v0, 0xC($a0)    # Load Halfword UnsignedROM:0000054C                 beqz    $v1, loc_568     # Branch on ZeroROM:00000550                 addiu   $v0, 1           # Add Immediate UnsignedROM:00000554                 li      $v0, 1           # Load ImmediateROM:00000558                 beq     $v1, $v0, loc_570  # Branch on EqualROM:0000055C                 nopROM:00000560                 j       0x13E578         # JumpROM:00000564                 nopROM:00000568  # ---------------------------------------------------------------------------ROM:00000568ROM:00000568 loc_568:                                 # CODE XREF: ROM:0000054CjROM:00000568                 j       0x13E578         # JumpROM:0000056C                 sh      $v0, 0xC($a0)    # Store HalfwordROM:00000570  # ---------------------------------------------------------------------------ROM:00000570ROM:00000570 loc_570:                                 # CODE XREF: ROM:00000558jROM:00000570                 jal     0x13E2DC         # Jump And LinkROM:00000574                 nopROM:00000578                 lw      $ra, 0x10($sp)   # Load WordROM:0000057C                 move    $v0, $zeroROM:00000580                 jr      $ra              # Jump RegisterROM:00000584                 addiu   $sp, 0x18        # Add Immediate Unsigned
Just look at this:
Bez_tytu_u.jpg

It doesn't look random. It does look like a real code.

UPDATE:
Basing on FF8.exe (PSOne version) file, the sections LI (load immediate - I see it is some sort of Intel's MOV) takes values from .TEXT section which is constants and memory.. example: TEXT:8013E590                 .byte    0
 
Last edited:
Again back at MIPS:
Ran some tests on files, and the differences in MIPSL diassembly are as follow:
a0stg000:
Code: [Select]
Code:
addiu   $a0, -0x1020jal     0x13E2BC
a0stg001:
Code: [Select]
Code:
addiu   $a0, -0x16FCjal     0x13E2BC
a0stg012:
Code: [Select]
Code:
addiu   $a0, -0xEECjal     0x13E2B8
As you can see only the add or jump adresses are changed.
The code is 1416 bytes for a0stg000.x
IDA manages to find at least three complete functions. Anyway I found the online disassembler based on Little-endian MIPS that can produce pseudocode. This is a0stg000.x code section pseudocode:
Code: [Select]
Code:
//// This file was generated by the Retargetable Decompiler// Website: https://retdec.com// Copyright (c) 2016 Retargetable Decompiler <[email protected]>//#include <stdbool.h>#include <stdint.h>// ------------------- Function Prototypes --------------------int32_t function_2a4(int32_t a1);int32_t function_2f0(int32_t a1);int32_t function_314(void);int32_t function_34(int32_t a1);int32_t function_574(int32_t a1);int32_t function_f0(int32_t a1);int32_t unknown_13e0a8(void);int32_t unknown_13e0bc(void);int32_t unknown_13e198(void);int32_t unknown_13e270(void);int32_t unknown_13e2bc(void);int32_t unknown_13e2e0(void);int32_t unknown_13e464(void);int32_t unknown_13e57c(void);int32_t unknown_2e658(void);int32_t unknown_30710(void);int32_t unknown_30ca4(void);int32_t unknown_b5078(void);int32_t unknown_b50fc(void);int32_t unknown_b5d10(void);int32_t unknown_b5d6c(void);int32_t unknown_bbb20(void);int32_t unknown_bbb60(void);int32_t unknown_bdb8c(void);int32_t unknown_bdda4(void);int32_t unknown_bf670(void);int32_t unknown_bfba0(void);int32_t unknown_bfde8(void);int32_t unknown_c69c4(void);// ------------------------ Functions -------------------------// Address range: 0x34 - 0xefint32_t function_34(int32_t a1) {    // 0x34    if (a1 == 1) {        // 0x88        unknown_13e2bc();        return unknown_13e0a8();    }    // 0x44    if (a1 < 2) {        // 0x50        if (a1 != 0) {            // 0x58            return unknown_13e0a8();        }        // 0x78        unknown_13e0bc();        return unknown_13e0a8();    }    // 0x64    if (a1 != 2) {        // 0x6c        return unknown_13e0a8();    }    // 0x9c    unknown_b5078();    *(int16_t *)(unknown_b50fc() + 12) = 0;    unknown_13e270();    return -0x7fec1a38;}// Address range: 0xf0 - 0x2a3int32_t function_f0(int32_t a1) {    int32_t v1 = 0; // $s4    int32_t v2 = -0x7ff0f8f8; // $s0    int32_t v3 = 0; // $s3    int32_t v4 = -0x7ff0f8d8; // $s2    int32_t v5 = a1; // $s1    int32_t v6 = *(int32_t *)(a1 + 4) + a1; // 0x14015    int32_t v7 = v6; // $v1    int32_t v8 = v6;    int32_t * v9 = (int32_t *)-0x7ff0f8f4;    if (*(int32_t *)(a1 + 8) + a1 == v6) {        int32_t v10 = -0x7ff0f8f8; // 0x1c417        int32_t v11; // bp+140        int32_t v12;        while (true) {            int32_t * v13 = (int32_t *)v10;            *v13 = *v13 & -1793;            v12 = v2;            int32_t v14 = v12 + 44;            v2 = v14;            v3 += 44;            v4 += 44;            int32_t v15 = v1 + 1;            v1 = v15;            int32_t v16 = v5;            v5 = v16 + 4;            if (v15 >= 4) {                int32_t v17 = -0x7ff10000; // $a0                *(int16_t *)-0x7ff0f840 = 4;                *(int32_t *)(v17 + 1980) = *(int32_t *)(a1 + 20) + a1;                if (*(int32_t *)(a1 + 24) + a1 != *(int32_t *)(a1 + 20) + a1) {                    // 0x21c                    *(char *)-0x7ff1b1e9 = 50;                    return unknown_bbb60();                }                // 0x214                *(int32_t *)(v17 + 1980) = 0;                // branch -> 0x21c                // 0x21c                *(char *)-0x7ff1b1e9 = 50;                return unknown_bbb60();            }            // 0x1a8            v11 = *(int32_t *)(v16 + 8) + a1;            v7 = v11;            if (*(int32_t *)(v16 + 12) + a1 != v11) {                // break -> 0x134                break;            }            v10 = v14;            // continue -> 0x1a8        }        // 0x134        v8 = v11;        v9 = (int32_t *)(v12 + 48);        // branch -> 0x148    }    // 0x148    *v9 = *(int32_t *)(v8 + 4) + v8;    int32_t v18 = *(int32_t *)(v7 + 8);    *(int32_t *)(v2 + 8) = v18 + v7;    int32_t v19 = *(int32_t *)(v7 + 12);    *(int32_t *)(v2 + 12) = v19 + v7;    unknown_bbb20();    int32_t * v20 = (int32_t *)v2;    *v20 = *v20 | 1792;    unknown_bfba0();    return unknown_13e198();}// Address range: 0x2a4 - 0x2efint32_t function_2a4(int32_t a1) {    unsigned char v1 = *(char *)((unknown_30ca4() % 2 | -0x7ff11f18) + 3294);    *(int16_t *)-0x7ff0eda0 = (int16_t)v1;    return unknown_c69c4();}// Address range: 0x2f0 - 0x313int32_t function_2f0(int32_t a1) {    // 0x2f0    return unknown_bdb8c();}// Address range: 0x314 - 0x573int32_t function_314(void) {    int32_t v1 = unknown_b5d10(); // bp+340    int32_t v2 = 0; // $s4    bool v3 = true; // $fp    int32_t v4 = -0x7ff0f8f4; // $s6    int32_t v5 = -0x7ff0f8f8; // $s3    int32_t v6 = -0x7ff0f8e4; // $s2    int32_t v7 = -0x7ff0f8d8; // $s5    *(int16_t *)(v1 + 64) = 320;    *(int16_t *)(v1 + 66) = 216;    *(int16_t *)(v1 + 60) = 0;    *(int16_t *)(v1 + 62) = 0;    *(int32_t *)(v1 + 72) = -1;    *(int32_t *)(v1 + 44) = *(int32_t *)-0x7ff0e7d4;    *(int32_t *)(v1 + 56) = *(int32_t *)-0x7ff04ae8;    // branch -> 0x3b4    while (true) {        // 0x3b4        if ((*(int32_t *)-0x7ff0f8fc & 4) == 0) {            // 0x3c8            if (unknown_bf670() != 0) {                // 0x3dc                unknown_bfba0();                // branch -> 0x3ec            }            // 0x3ec            // branch -> 0x3f0        }        // 0x3f0        if (v2 != 3) {            // 0x3f4            unknown_bfde8();            return unknown_13e464();        }        // 0x40c        *(int16_t *)(v1 + 4) = 0;        *(int16_t *)v1 = 0;        *(int16_t *)(v1 + 2) = (int16_t)(*(int32_t *)-0x7fec1a4c / 8);        unknown_2e658();        unknown_30710();        int32_t * v8 = v3 ? (int32_t *)-0x7ff0ed54 : (int32_t *)20;        *(int32_t *)(v1 + 28) = *v8;        int32_t * v9 = v3 ? (int32_t *)-0x7ff0ed50 : (int32_t *)24;        *(int32_t *)(v1 + 32) = *v9;        int32_t * v10 = v3 ? (int32_t *)-0x7ff0ed4c : (int32_t *)28;        *(int32_t *)(v1 + 36) = *v10;        unknown_bfde8();        if (*(int32_t *)-0x7ff0f8fc % 2 == 0) {            int32_t v11 = *(int32_t *)-0x7fec1a4c; // bp+488            *(int32_t *)-0x7fec1a4c = v11 + (int32_t)*(int16_t *)-0x7ff0f840;            // branch -> 0x498        }        int32_t v12 = v5; // bp+498        uint32_t v13 = *(int32_t *)v12; // bp+498        uint32_t v14 = v13 / 512;        int32_t v15 = v12; // bp+520        int32_t v16; // bp+528        if ((v13 & 256) != 0) {            // 0x4ac            if (v14 % 2 != 0) {                // 0x4b8                *(int16_t *)(v1 + 76) = *(int16_t *)(v12 + 2);                *(int32_t *)-0x7ff049f0 = unknown_bdda4();                v15 = v5;                // branch -> 0x51c            } else {                v15 = v12;            }            // 0x51c            v4 += 44;            v5 = v15 + 44;            v6 += 44;            v16 = v2 + 1;            v2 = v16;            v7 += 44;            if (v16 >= 4) {                // break -> 0x534                break;            }            // continue -> 0x3b4            continue;        }        // 0x51c        v4 += 44;        v5 = v15 + 44;        v6 += 44;        v16 = v2 + 1;        v2 = v16;        v7 += 44;        if (v16 >= 4) {            // break -> 0x534            break;        }        // continue -> 0x3b4    }    // 0x534    return unknown_b5d6c();}// Address range: 0x574 - 0x5bbint32_t function_574(int32_t a1) {    int16_t * v1 = (int16_t *)(a1 + 12);    int16_t v2 = *v1;    if (v2 == 0) {        // 0x5a0        *v1 = (int16_t)((int32_t)*v1 + 1);        return unknown_13e57c();    }    // 0x588    if (v2 != 1) {        // 0x594        return unknown_13e57c();    }    // 0x5a8    unknown_13e2e0();    return 0;}// --------------------- Meta-Information ---------------------// Detected compiler/packer: gcc// Detected functions: 6// Decompiler release: v2.1.2 (2016-01-27)// Decompilation date: 2016-07-05 18:14:25
You can of course see some totally wrong this like:
int32_t * v8 = v3 ? (int32_t *)-0x7ff0ed54 : (int32_t *)20;
^I do not understand why there are negative values. This looks like address, so 20 is also wrong.
Although the first function seems to be correct with the IDA disassembly.

Graphs:












 
Last edited:
Battle camera:

00B8B7D8 int  _battleCamera_worldXZ:
 This & FFFF0000 : Camera world location on X axis
 This & 0000FFFF : Camera world location on Z axis (up-down)

00B8B7DC int? _battleCamera_worldY: Camera world location on Y axis

00B8B7E0 int _battleCamera_LookAtX: Camera look-at target location on X axis in world. Maybe the other sint16 is Z axis, but I can't prove this

00B8B7E4 int _battleCamera_LookAtY: Camera look-at target location on Y axis in world. Changing the other sint16 doesn't seem to do anything?

Camera is always looking at look-at target.
 
Maybe its more:

int32_t * v8 = v3 ? (int32_t *)-0x7ff0ed54 : (int32_t *)20;
*(int32_t *)(v1 + 28) = *v8;

Is

*(int32_t *)(v1 + 28) = v3 ? -(int32_t *)0x7ff0ed54 : 20;

And v1 is clearly some structure so it would actually be:

int32_t* g7ff0ed54; // some unknown global
v1->Field_28 = v3 ? -*g7ff0ed54 : 20;
 
Status
Not open for further replies.
Back
Top