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 - Maki

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 ... 25
152
Uhm


153
FOUND THE FUCKER!
ucrtbase.dll:00007FFF8A01D800 ucrtbase__Exit -this is called asynchronous by one thread. Suspending thread toally makes the game playable with debugger attached.

UPDATE:
Unfortunately it doesn't print any cool debug stuff (maybe before level loading I saw something with [klang])

Okay, now I'm not quite sure how to enable input here xD I bet the input must be on some thread

DUMP TIME!

Luminous.RenderInterface.DefaultWindow
.rdata:00007FF6374128B0 0000000A C GLADIOLUS   

Hm, maybe this script:
SQEX.Ebony.Framework.Sequence.Event.SequenceEventKeyboardInput
EDIT_DISABLED_KEYBOARD_PAD   

Grab 73k lines of all engine scripts/paths/etc here:
https://www.dropbox.com/s/wytfrid4r3ju5nd/FFXV_dumped.txt?dl=0

UPDATE:
I saw "Luminous" only one time, it's always refered as "Black":
BlackConfig.xml

ucrtbase_exit is called by sub_7FF634CAC230 which is called by sub_7FF634CAC79


[klang][info]version 16.2.26.A

UPDATE:

Code: [Select]
.rdata:00007FF637646990 00000007 C ESCAPE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF6376469C8 00000008 C PRT_SCR                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF6376469D0 00000007 C SCR_LK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF6376469F0 0000000B C BACK_QUOTE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
.rdata:00007FF637646A00 00000005 C CAPS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646A08 00000008 C L_SHIFT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF637646A10 00000007 C L_CTRL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF637646A18 00000008 C WINDOWS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF637646A20 00000006 C L_ALT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646A28 00000006 C MINUS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646A30 00000006 C EQUAL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646A38 0000000B C BACK_SPACE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
.rdata:00007FF637646A48 0000000D C OPEN_BRACKET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
.rdata:00007FF637646A58 0000000E C CLOSE_BRACKET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
.rdata:00007FF637646A68 0000000B C BACK_SLASH                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
.rdata:00007FF637646A78 0000000B C SEMI_COLON                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
.rdata:00007FF637646A88 0000000B C APOSTROPHE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
.rdata:00007FF637646A94 00000006 C ENTER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646A9C 00000006 C COMMA                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646AA4 00000007 C PERIOD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF637646AAC 00000006 C SLASH                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646AB8 00000008 C R_SHIFT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
.rdata:00007FF637646AC0 00000006 C SPACE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646AC8 00000006 C R_ALT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646AD0 00000005 C FUNC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
.rdata:00007FF637646AD8 00000005 C MENU                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

154
Scripting and Reverse Engineering / [PC] Final Fantasy XV
« on: 2018-02-09 15:32:35 »
The benchmark is available on:
http://benchmark.finalfantasyxv.com/na/

Game engine that parses FFXV files. Uses EARC for archives, tool is available here.
PDB available on torrent site, due to PDB availibility let's all work on r1138403 debug build

Make sure for your comfort to rebase software to 140000000 (default 64 bit entry point) and disable ASLR (0x1EE & 0xBF)

EARC is known

XMB2 (.exml):
Code: [Select]
char[4] IDENTIFIER = "XMB2"
uint FileSize [yes, 4 byte, not qword]
ushort flags
ushort version
uint RootElementOffset <- this points to element root

155
and do you know how to get animation of model?

wmset objects are non-animated. It only animates the translation+rotation of single object via engine.

I'm having exactly the same issue.  No model appears in the previewer for me of balamb G... just a floating triangle in a sea of blackness. 

Mhm... Does battle stage previewing work? Try to hit "Reset Camera" and get to Display>Textured
I tried to test the newest release on my computer at workplace but I only have battle stage model with me





I was wondering - Do you have documentation as to what files to grab, etc.?  I found Balamb garden and other vehicles, but all I really want is the original GF's ripped to .obj with UV's so that I can put the models into Quixel and use DDO to re-create the textures.

GFs are crap as hell. Some are in EXE, some are in battle.fs, some are in magic.fs; Rinoa's toolset is capable of exporting GFs environments (Like Alexander scene) + dumping geometry manually (for Shiva icespike). For GFs itself someone from here (I forgot the name, sorry!) made a script for transforming GF header into battle DAT file. You probably know that. I don't remember if they have UVs.
Another thing: Textures for GFs are also different. Some are normal TIM, some are weird shit (Rinoa's toolset GF>Special texture format>[choose one]).
At the weekend I'll rip all GFs for you.



Quixel and use DDO to re-create the textures.

Is this really that good? I was working so far with educational license of Substance Painter 2 and that's really amazing. Have you tried it? Is Quixel better?


This may have been some kind of 'hackish' fix that the coders did to the PC version so that the linear filtering didn't cause weird seam glitches - OR - it's the issue inherent to DX9, where the texel information is incorrectly calculated and ends up being 2px off.  Is there a way to add the DX9 UV/Texel calculation fix to FF8's rendering shader?  I've got all of the coding resources anyone would need for that, but I have no idea how/where to inject the code because I don't do any coding at all.

I'm still trying to lay my hands on DX buffer and shit. I've come really close, but it's still rubbish to me. I only know OpenGL so far, yesterday I checked how to draw primitive with DirectX, maybe I could reverse it from the other side- directly from DX calls.

156
I heard it uses the same thing as FFXHD, so just one giant chunk, it also have the same extension, so maybe the structure is the same.

157
General Discussion / Re: Final Fantasy 8 in Unity?
« on: 2018-02-04 14:42:09 »
I'm at it again:



Textures are placeholders

158
It highly depends on which tool you are going to use. Rinoa's toolset is a collection of tools. You can use this software for any FF version you have, but it supports unpacking only PC/Steam files. If you rip some file manually from psx, then it's going to support it.

159
General Discussion / Re: FF8 Save editor advice
« on: 2018-01-24 07:45:09 »
If you are really into hacks just to get achievement use SAM:
https://github.com/gibbed/SteamAchievementManager

160
FF8 Tools / Re: [FF8] Enemy editor - IFRIT (0.11)
« on: 2018-01-21 20:54:25 »
MonsterAI+CA:   (Where MonsterAI is 0x487DE0 in 2000PC)
Code: [Select]
mov     al, [esi]:
[ESI] - pointer to current operation to parse
al - will hold AI code opcode


Example:
MonsterAI+62E  AI_TALK (opcode 0x1A)
mov dl, [esi] - ESI holds textID (as said in documentation it's byte text_index)
gets saved to local at var_14

MonsterAI+661 now EAX holds absolute address to text to display- here: "5 ?Rm kmpc."- deciphered as "NO MORE!"

So... Yeah, I might be able to make something like real-time AI interpreter I think...

Opcode 0x05 is some sort of PUSH

Isn't it?

Pardon that 'A', I just used ROT-23 for text conversion

161
DIV BY ZERO - CPU error
Looks like I didn't test it perfectly before handing it out. There's sub_496300, a function that parses party abilities. It want's to read some rubbish data and in fact tries to divide some variable by zero. Let me investigate that...

UPDATE:
Ok, got it- it's HP error. It takes it's ability from playable party structure:
01CF75F5 (named K_CHARACTER_HP_B) [Steam should use the same variables]
Calculation: 01CF75F5 + (characterID*0x24)
Let's see... Cockatrice is 0x20 (32 in decimal). So:
I'm setting 01CFE0F0 to 0x20
I'm setting (0x20 * 0x24) + 01CF75F5 to 255 (0xFF)

UPDATE 2:
Loord... another DIVIDE BY ZERO...

UPDATE 3:
Too much shit is going on here. I need to find another way. At the moment do this:
Put a breakpoint at 495550 (mov dl, 01CFE0F0)
Step forward, change EDX register (only two last digits) to the monster you want to control in battle. That's for now unfortunately, I need to think how to deal with this now so you can modify it without disassembler and you could access menu normally.

Grab video tut here:
https://www.youtube.com/watch?v=irNiwcGltkw&feature=youtu.be

I think I know how to do it...

UPDATE 4:
You can use assembler script I wrote. It replaces Squall: (change MOV dl, 0x20 to any enemy you want; Keep in mind this only works for battle so far...)
Code: [Select]
alloc(newmem,2048)
label(returnhere)

newmem:
CMP EAX, 0
JNE noSquall
mov dl,0x20
JMP exit
noSquall:
mov dl,[edi+FF8_EN.exe+18FE0F0]
jmp returnhere

"FF8_EN.exe"+95550:
jmp newmem
nop
returnhere:

162
Gameplay / Re: FF8 Party modifier mod?
« on: 2018-01-19 17:28:05 »
http://forums.qhimm.com/index.php?topic=17634.msg255403#msg255403

For GameShark to ePSXe cheat engine address see my wiki page:
http://web.archive.org/web/20171021012301/http://wiki.qhimm.com/view/User:MaKiPL#GameShark_codes_to_PC_version_-_memory_calculation

Quote:
Quote
80078A62 270F --(delete GS directive of MOV [8])-->
00078A62 270F --(Trim the 4 last bytes, it's the MOV value to address)-->
00078A62 --(Now ADD A8B6A0)-->
      Your address in ePSXe 1.9.2: 000B04102

163
Just as requested I'm posting the code for manipulating the party for both 2000 and Steam version:

At 48B7F5 you have:
mov     al, byte ptr ss:SG_PARTY_BATTLE1[ebp]

SG_PARTY_BATTLE1 is DWORD, and EBP holds current pointer to index for getting byte
When EBP is higher than 3 (4) then parsing is done. When AL holds 0xFF, then next character is parsed. Sample party variable:
.data:01CFE74C SG_PARTY_BATTLE dd 0FF050100h
(remember to read variables from end to beginning).

Interesting note: just after party_battle dword there's UnlockedWeapons DWORD and griever name (allocated on 12 bytes including terminator)

so just change (byte):
01CFE74F - to replace 1st party member
01CFE74E - to replace 2nd party member
01CFE74D - to replace 3rd party member

Anyway- that's wrong. I was enough reckless to not note where is the actual model ID stored and that what happened. Anyway, the new method I discovered doesn't require 1ms memory injection but simple memory change and requires you to have fixed party (if not, I'll tell you how to calculate it)

Let's get started:
ParseBattleParty+93   push    eax ; eax stores Party member ID as variables from above
ParseBattleParty+94   call    ParseBattleCharacter

ParseBattleCharacter in PC2000 is located at: 495520
Step by step:
mov     ebx, [esp+CharacterID] ;EBX now stores party ID. Here 00 because Squall is first in party
ParseBattleCharacter+A    lea     eax, [ebx+ebx*8] ; dark magic shit
ParseBattleCharacter+17   lea     edi, [ebx+eax*2] ; another dark magic shit
ParseBattleCharacter+20   mov     dl, SG_CHARACTER_MODEL_ID[edi] ; DL stores real model ID from King's Edgar codes

SG_CHARACTER_MODEL_ID is at 01CFE0F0

Now math time!
If Squall (ID=00) is in party, then:
x=(0+0*8 )
y=x*2 + 0
z = ((x+y) << 3) + SG_CHARACTER_MODEL_ID_ptr

If Selphie (ID==05) is in party, then:
x=(5+5*8 )
y=x*2 + 5
z = ((x+y) << 3) + SG_CHARACTER_MODEL_ID_ptr

Example calculation in python for selphie:
Code: [Select]
hex(((5+5*8 )*2+5)<<3)will give 0x2f8
Then: 01CFE0F0 + 0x2F8 = 01CFE3E8 = Byte to change - you can do it in CE freely

Changing 01CFE3E8 to 0x20 will give you Cockatrice instead of Selphie in party

Non-hacker guide: (2000 PC)
Now, I'm pretty sure you don't want to do all the calculations and also you don't have all engine IDs for party, so I pre-calculated values for you:
Squall replace- 0x1CFE0F0
Zell replace- 0x1CFE188
Irvine replace- 0x1CFE220
Quistis replace- 0x1CFE2B8
(CharID=4)- 0x1CFE350
Selphie replace- 0x1CFE3E8

Non-hacker guide: (Steam)
I know many of you play Steam version, so here are the codes for Steam:
ParseBattleParty is 0048B7E0 sub_48B7E0
ParseBattleCharacter is 00495530
so SG_CHARACTER_MODEL_ID_ptr is byte_1CFE0F0 (01CFE0F0)
Therefore 2000 PC version and Steam version BOTH SHARE THE SAME ADDRESSES.

164
Didn't get mail but I see annotation on dashboard about it. Quite ridiculous. 1000 subscribers is not that easy thing and 4000 watch time? It sucks!

165
FF8 Tools / Re: [FF8] Enemy editor - IFRIT (0.11)
« on: 2018-01-15 13:57:02 »
Some times ago someone sent me the japanese site where I found all enemy scripts dumped and formatted with all magic IDs and texts inside files. Grab it here:

http://www.geocities.jp/agnesboulangerchan/psff8/research/psff8-enemy-ai.zip

For example you can clearly see that 117 (Sorceress 3) is casting magic 327 and 074 on herself at the init. It has all variables named (local and globals) and rich AI documentation with HEX codes, but all in Japanese.

166
Gameplay / Re: [FF8 PC] No GF or Custom GF Squall
« on: 2018-01-04 06:59:16 »
Doomtrain lets you edit default GFs abilities via kernel.bin edit

167
Done!


Source (with whole garbage taken out):
Code: [Select]
alloc(newmem,2048)
label(returnhere)
label(originalcode)

newmem:
PUSH 04
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ Lower
PUSH 03
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ Upper
JMP originalcode

Lower:
FINIT
FLD [myvar]
FLD1
FSUB st(0), st(1)
FABS
FST [myvar]
CMP [myvar], 0
JNE notzero
MOV [myvar], 43b40000
notzero:
JMP RightCamera

Upper:
FINIT
FLD [myvar]
FLD1
FADD st(0), st(1)
FST [myvar]

RightCamera: //Degree to radians + sine
CMP [myvar], 43b40000
JNA locok
MOV [myvar], 0
locok:
PUSH [myvar]
CALL CalculateRadians
ADD ESP,4


//Y
FINIT
FLD [myvar+8]
FSIN
FLD [myvar+10]
FMUL st(0), st(1)
FSTP [myvar+8] //BattleCamera X (st1>st0)
FILD [myvar+14]
FMULP
FIST [myvar+8]
MOV EAX, [myvar+8]
//SHR EAX, 8
MOV WORD [B8B7F0], AX  //BattleCamera X (correct st0)

//X
PUSH [myvar]
CALL CalculateRadians
ADD ESP,4

FINIT
FLD [myvar+8]
FCOS
FLD [myvar+10]
FMUL st(0),st(1)
FSTP [myvar+8]
FILD [myvar+14]
FMULP
FIST [myvar+8]
MOV EAX, [myvar+8]
MOV [B8B7F4], EAX

//MOV EAX, [B8B7F4]
//SUB EAX, 32
//MOV [B8B7F4], EAX


JMP originalcode

myvar:
dd 42340000  //alpha
dd 40490e56  //PI [4]
dd 00000000  //Temp far for FPU [8]
dd 43340000 //180.0 [C]
dd 41200000 //R [10]
dd 4E20 // [14]

CalculateRadians: //Get Angle to radians
ADD ESP, 4
POP EAX
SUB ESP, 8
MOV [myvar+8], EAX
FINIT
FLD [myvar+4] //st0 has PI
FLD [myvar+C] //st1 has 180.0
FDIV st(1), st(0)
FLD [myvar+8] //alpha
FMUL st(0), st(2)
FST [myvar+8]
RET




originalcode:
push 0000009D
JMP returnhere

"FF8.exe"+A2CA0:
jmp newmem
returnhere:

Let me know if you want something like this in FF7. I need only values for camera world-space X and Y :D

EDIT: Hm.. that doesn't satisfy me enough. I need to do something big...

168
My database is from 2000 release, but that shouldn't be problem to finally port it to Steam. Anyway:
Bloodfest is magic 210, has no FL class, but tend to load texture from constant data at 01470DC4:



Just to inform- your case is quite difficult. This might be special effects that none of us actually reversed so far.
Do you remember any magic that use some similar effect like this?

EDIT: Are you sure we are talking about MAG_210?

I used magic 200 instead, this one has intense green glow effect. I'm reversing it right now.

.text: 00693374 - loads battle.fs file 232 - MAG199_a.DAT; still glow effect

Grr.. I can't find it...

Magic shit is mostly working on BdLinkTask. Forced one looped BdLinkTask to retn, still glow effect.

Completely randomly found Stage disappear script at 571230


FOUND IT


As I was afraid- it's on BdLinkTask. Address: 0063A0A0.
Called by MAG_200_NO_MERCY+335

It's a huge class, but finally we know what to reverse

It is called every frame when glow effect is active

169
Here you are!

0050638C
00571870

Therefore:
Code: [Select]
{For certain flashes like critical attacks
{50638C = 90:5

{Disable all battle flashes
571870 = C3

For EXE patching just change first 5 to 1

170
Wait a bit. DLPB will surely port it over to Italian. I'm also free tomorrow so if I don't forget I'll write you updated addresses.

171
FF8 is a NIGHTMARE to debug.

No, it's not. 👿

Hey do you know how to disable flashes on international versions of Steam? I'm from Italy and I would really like to do it.

It's a hack for international version. You probably want a patch for FF8_IT.exe

172
What about this?

15415F = 00
15416A = 00
15417B = 00
154186 = 00
154199 = 00
1541A4 = 00
1541B7 = 00
1541C2 = 00
1541D5 = 00
1541E0 = 00
1541E9 = 00
1541F4 = 00

173
Third line should be B at the end:

Fixed code:

15415F = 00
15416A = 00
15417B = 00
154186 = 00
154199 = 00
1541A4 = 00
1541B7 = 00
1541C2 = 00
1541D5 = 00
1541F0 = 00
1541E9 = 00
1541F4 = 00

174
I started developing rotatable camera in VIII (VII will utilize from it too)

The look-at actor is always in center of the stage, and R is distance from center of circle to world-space camera.
I'm kinda new to FPU so sorry for not so good code. Anyway this one is working fine, when you press '3' in battle the camera would move, but I'm currently struggling with conversion of pseudo-vector short16 from real (single) value. Need to think about it, also it misses the Y axis (or Z if we're talking about X-ZY coordinate system)

In code you can see divide by 10000.0, but it's wrong. Diving doesn't do anything as the float/real number always will have different hex values other than FF8 short16 camera coordinate.

Currently I'm on stage like this:
Code: [Select]
alloc(newmem,2048)
label(returnhere)
label(originalcode)

newmem:
PUSH 03
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ LeftCamera
PUSH 04
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ RightCamera
JMP originalcode

LeftCamera: //Casual value+10
PUSH EAX
MOV EAX, [B8B7F4] //BattleCamera X
//SHR EAX, 010
ADD EAX, 32
//SHL EAX, 010
MOV [B8B7F4], EAX //BattleCamera X
POP EAX
JMP originalcode

RightCamera: //Degree to radians + sine
FINIT
FLD [myvar]
FLD1
FADD st(0), st(1)
FST [myvar]
PUSH [myvar]
CALL CalculateRadians
ADD ESP,4

FINIT
FLD [myvar+8]
FSIN
FLD [myvar+10]
FMUL st(0), st(1)
FLD [myvar+14]
FDIV st(1), st(0)
FSTP [B8B7F4] //BattleCamera X (st1>st0)
FSTP [B8B7F4] //BattleCamera X (correct st0)

//MOV EAX, [B8B7F4]
//SUB EAX, 32
//MOV [B8B7F4], EAX


JMP originalcode

myvar:
dd 42340000  //alpha
dd 40490e56  //PI
dd 00000000  //Temp far for FPU
dd 43340000 //180.0
dd 41200000 //R
dd 461c4000 //10000.0 0x14

CalculateRadians: //Get Angle to radians
ADD ESP, 4
POP EAX
SUB ESP, 8
MOV [myvar+8], EAX
FINIT
FLD [myvar+4] //st0 has PI
FLD [myvar+C] //st1 has 180.0
FDIV st(1), st(0)
FLD [myvar+8] //alpha
FMUL st(0), st(2)
FST [myvar+8]
RET




originalcode:
push 0000009D
JMP returnhere

"FF8.exe"+A2CA0:
jmp newmem
returnhere:

175
Grimmy,
as I see the camera is the same as in FFVIII. You see, camera operates on two major vectors (which one pseudo-vector are in fact just three short16 values). One major thing is look-at actor which is the X Y Z position of camera target. It can be placed in the center of the stage. However, the difficult happens when you'll be trying to move world-space camera (physical location of camera). By changing X axis you'll move camera only in two directions. To make controllable rotation you may need to introduce a math here to calculate X and Y worldspace position of global camera to make the circular movement. Therefore you'll need some memory injection and a bunch of assembly code/ C pre-compiled code utilizing e.g. Math.PI

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 ... 25