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 ... 25
51
What exactly you want to do, Rick? Change world map encounters, change field encounters, change monster to fight, change how many monsters you fight?

52
@myst6re will you be updating Deling for new comp=2 (LZ4)?

53
Totally outplayed! Thank you @kruci - so the line difference/broken FL was actually a bad decompression algo implementation

54
General Discussion / Re: FFVIII Remastered
« on: 2019-09-06 19:34:13 »
Is it possible that Dotemu screw up the file structure so that we can't mess with it?
They DID. Introduced zzz, new FS compression and partially reorganized field archives (multi JSM, multi text sections, some fields have broken/badly edited FL and FI sections- complete misunderstanding) rendering Deling useless. We broke zzz, we broke new compression (sorta) but that's all. More and more people are leaving this pile of poo

55
So Dotemu couldn't do this so I did:
Code: [Select]
FFVIII_EFIGS.dll+8A2CB2 - add byte ptr [esi+08],00
FFVIII_EFIGS.dll+8A2CB8 - add byte ptr [esi+08],00
FFVIII_EFIGS.dll+8A2D17 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2D1D - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2D6D - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2D73 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2DC5 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2DCB - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2E1B - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2E21 - add byte ptr [esi+0C],00
FFVIII_EFIGS.dll+8A2E6F - add byte ptr [esi+04],00
FFVIII_EFIGS.dll+8A2E75 - add byte ptr [esi+04],00

change 4th byte on those pointers to 0

56
General Discussion / Re: FFVIII Remastered
« on: 2019-09-06 11:54:31 »
I just unpacked several fields (they were compressed with some 4ZL_ that no internet has heard of)- they ruined whole structure. If you wanted to edit the text, then you can't now. Thank you whoever ruined the FS structure*

*they can still be updated manually though, but I doubt anyone would need that

57
Oh, myst6re I've got so many bad news
I managed to get fields up to 'cc' extracted. Even after decompressing they are still useless with Deling:
example bgroad_6.fl:
Code: [Select]
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.ca
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.id
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_jp.inf
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.inf
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_en.jsm
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_fr.jsm
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_it.jsm
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_de.jsm
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_es.jsm
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_jp.jsm
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_en.map
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_fr.map
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_it.map
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_de.map
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_es.map
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_jp.map
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_en.mim
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_fr.mim
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_it.mim
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_de.mim
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_es.mim
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_jp.mim
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.mrt
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_en.msd
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_fr.msd
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_it.msd
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_de.msd
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_es.msd
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6_jp.msd
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.msk
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.pcb
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.pmd
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.pmp
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.pvp
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.rat
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.sym
c:\ff8\data\x\field\mapdata\bg\bgroad_6\bgroad_6.tdw
c:\ff8_6.sym
c:\ff8\data\x\field\mapdatchara.one
the fi size is 456/12.0 = 38.0, but as you can see there are 39 lines in fl - this is where Deling crashes on open, but on other fields the bare minimum is supported

The newest commit on that test soft of mine makes it to decompress a bunch of fields

58
WIP:
https://github.com/MaKiPL/4ZL__decompressor

*pardon my C++ - I'm not into that language
anyway if someone wants to help/rebuild the algorithm so it's not dirty as now, then much appreciated

59
Thanks to Hoodium- they lifted the anti-debugger/emulator 0xf00000f1 exception overwrite

Code: [Select]
int __usercall sub_115D72C0@<eax>(unsigned int maybeOutBuffer@<edx>, _BYTE *compressedBuffer@<ecx>, int firstDwordMinusOne, int secondDword)

Code: [Select]
int __usercall probably4LZDecompress@<eax>(unsigned int maybeOutBuffer@<edx>, _BYTE *compressedBuffer@<ecx>, int firstDwordMinusOne, int secondDword)
{
  _BYTE *v4; // eax@1
  unsigned int v5; // edi@1
  int v6; // edx@1
  int result; // eax@4
  unsigned int v8; // ebx@6
  size_t v9; // ebx@6
  int v10; // esi@7
  unsigned int v11; // esi@10
  unsigned int v12; // edx@10
  _WORD *v13; // esi@11
  int v14; // eax@12
  unsigned int *v15; // ebx@12
  unsigned int v16; // ecx@14
  int v17; // esi@14
  int v18; // edi@15
  int v19; // ecx@16
  unsigned int v20; // edi@20
  unsigned int v21; // ebx@20
  char *v22; // esi@21
  char *v23; // esi@21
  int v24; // ecx@22
  _BYTE *v25; // edx@23
  _BYTE *v26; // edi@26
  int v27; // ebx@26
  unsigned int v28; // edi@29
  int v29; // ecx@29
  unsigned int v30; // ebx@32
  char v31; // cl@33
  unsigned int v32; // edi@36
  int *v33; // ebx@36
  int v34; // ecx@37
  _BYTE *v35; // [sp+0h] [bp-60h]@1
  unsigned int v36; // [sp+4h] [bp-5Ch]@1
  int v37; // [sp+8h] [bp-58h]@1
  int v38; // [sp+Ch] [bp-54h]@1
  unsigned int v39; // [sp+10h] [bp-50h]@20
  unsigned int v40; // [sp+14h] [bp-4Ch]@1
  unsigned int v41; // [sp+14h] [bp-4Ch]@14
  char v42; // [sp+18h] [bp-48h]@6
  unsigned int v43; // [sp+18h] [bp-48h]@24
  __int128 v44; // [sp+1Ch] [bp-44h]@1
  __int128 v45; // [sp+2Ch] [bp-34h]@1
  int v46; // [sp+3Ch] [bp-24h]@1
  int v47; // [sp+40h] [bp-20h]@1
  int v48; // [sp+44h] [bp-1Ch]@1
  int v49; // [sp+48h] [bp-18h]@1
  int v50; // [sp+4Ch] [bp-14h]@1
  int v51; // [sp+50h] [bp-10h]@1
  int v52; // [sp+54h] [bp-Ch]@1
  int v53; // [sp+58h] [bp-8h]@1

  v4 = compressedBuffer;
  v35 = compressedBuffer;
  v5 = maybeOutBuffer;
  v36 = maybeOutBuffer;
  v6 = (int)&compressedBuffer[firstDwordMinusOne];// first byte of compressed data
  v40 = v36;
  v38 = (int)&compressedBuffer[firstDwordMinusOne];
  v37 = secondDword + v36;
  v46 = 0;
  v47 = 1;
  v48 = 2;
  v49 = 1;
  v50 = 4;
  v51 = 4;
  v52 = 4;
  v53 = 4;
  _mm_storeu_si128((__m128i *)&v44, _mm_load_si128((const __m128i *)&xmmword_116C4370));
  _mm_storeu_si128((__m128i *)&v45, _mm_load_si128((const __m128i *)&xmmword_116C2380));
  if ( secondDword )
  {
    while ( 1 )
    {
      v8 = *v4++;
      v42 = v8;
      v9 = v8 >> 4;
      if ( v9 == 15 )
      {
        do
        {
          v10 = *v4++;
          v9 += v10;
        }
        while ( (unsigned int)v4 < v6 - 15 && v10 == 255 );
        v5 = v40;
        if ( v9 + v40 < v40 || &v4[v9] < v4 )
          return v35 - v4 - 1;
      }
      v11 = secondDword + v36;
      v12 = v9 + v5;
      if ( v9 + v5 > v37 - 12 )
        goto LABEL_41;
      v13 = &v4[v9];
      if ( (unsigned int)&v4[v9] > v38 - 8 )
      {
        v11 = secondDword + v36;
LABEL_41:
        if ( &v4[v9] == (_BYTE *)v38 && v12 <= v11 )
        {
          memcpy((void *)v5, v4, v9);
          return v5 + v9 - v36;
        }
        return v35 - v4 - 1;
      }
      v14 = (int)&v4[-v5];
      v15 = (unsigned int *)(v9 + v5);
      do
      {
        *(_DWORD *)v5 = *(_DWORD *)(v14 + v5);
        *(_DWORD *)(v5 + 4) = *(_DWORD *)(v14 + v5 + 4);
        v5 += 8;
      }
      while ( v5 < v12 );
      v16 = *v13;
      v4 = v13 + 1;
      v17 = v12 - v16;
      v41 = v16;
      if ( v12 - v16 < v36 )
        return v35 - v4 - 1;
      v18 = v42 & 0xF;
      *v15 = v16;
      if ( v18 == 15 )
      {
        while ( 1 )
        {
          v19 = *v4++;
          if ( (unsigned int)v4 > v38 - 5 )
            return v35 - v4 - 1;
          v18 += v19;
          if ( v19 != 255 )
          {
            if ( (unsigned int *)((char *)v15 + v18) < v15 )
              return v35 - v4 - 1;
            v16 = v41;
            break;
          }
        }
      }
      v20 = v18 + 4;
      v21 = (unsigned int)v15 + v20;
      v39 = v21;
      if ( v16 >= 8 )
      {
        *(_DWORD *)v12 = *(_DWORD *)v17;
        v24 = *(_DWORD *)(v17 + 4);
        v23 = (char *)(v17 + 8);
        *(_DWORD *)(v12 + 4) = v24;
      }
      else
      {
        *(_BYTE *)v12 = *(_BYTE *)v17;
        *(_BYTE *)(v12 + 1) = *(_BYTE *)(v17 + 1);
        *(_BYTE *)(v12 + 2) = *(_BYTE *)(v17 + 2);
        *(_BYTE *)(v12 + 3) = *(_BYTE *)(v17 + 3);
        v22 = (char *)(*(&v46 + v41) + v17);
        *(_DWORD *)(v12 + 4) = *(_DWORD *)v22;
        v23 = &v22[-*((_DWORD *)&v44 + v41)];
      }
      v25 = (_BYTE *)(v12 + 8);
      if ( v21 <= v37 - 12 )
        break;
      v43 = v37 - 7;
      if ( v21 > v37 - 5 )
        return v35 - v4 - 1;
      if ( (unsigned int)v25 < v37 - 7 )
      {
        v26 = v25;
        v27 = v23 - v25;
        do
        {
          *(_DWORD *)v26 = *(_DWORD *)&v26[v27];
          *((_DWORD *)v26 + 1) = *(_DWORD *)&v26[v27 + 4];
          v26 += 8;
        }
        while ( (unsigned int)v26 < v43 );
        v21 = v39;
        v23 += v43 - (_DWORD)v25;
        v25 = (_BYTE *)(v37 - 7);
      }
      v28 = 0;
      v29 = v21 - (_DWORD)v25;
      if ( (unsigned int)v25 > v21 )
        v29 = 0;
      if ( v29 )
      {
        v30 = v29;
        do
        {
          v31 = *v23++;
          ++v28;
          *v25++ = v31;
        }
        while ( v28 < v30 );
        v5 = v39;
        v6 = v38;
        v40 = v39;
      }
      else
      {
LABEL_39:
        v6 = v38;
        v5 = v21;
        v40 = v21;
      }
    }
    *(_DWORD *)v25 = *(_DWORD *)v23;
    *((_DWORD *)v25 + 1) = *((_DWORD *)v23 + 1);
    if ( v20 > 0x10 )
    {
      v32 = (unsigned int)(v25 + 8);
      v33 = (int *)(v23 + 8);
      do
      {
        v34 = *v33;
        v33 += 2;
        *(_DWORD *)v32 = v34;
        *(_DWORD *)(v32 + 4) = *(v33 - 1);
        v32 += 8;
      }
      while ( v32 < v39 );
      v21 = v39;
    }
    goto LABEL_39;
  }
  if ( firstDwordMinusOne != 1 || *compressedBuffer )
    result = -1;
  else
    result = 0;
  return result;
}
I didn't tidy it up, but does it seem familar to you? I'm not well into compression so I see nothing actually

XMM and int128- some long long buffers going on?


UPDATE:
First DWORD is uncompressedSizeBuffer:

example:
mapdata/mapdata.fl
1stDWORD = 45-8= 37
c:\ff8\data\x\field\mapdata\maplist 0x0A 0x0D  == 37 bytes

vars used in decoding:
Code: [Select]
xmmword_116C4370 xmmword 0FFFFFFFF000000000000000000000000h
xmmword_116C2380 xmmword 3000000020000000100000000h

I copied and fixed the code to new project, here the source so far:
Code: [Select]
// ConsoleApplication2.cpp : Ten plik zawiera funkcję „main”. W nim rozpoczyna się i kończy wykonywanie programu.
//

#include <iostream>
#include <xmmintrin.h>

#define BYTE unsigned char;

int probably4LZDecompress(unsigned int maybeOutBuffer, unsigned char* compressedBuffer, int firstDwordMinusOne, int secondDword)
{

unsigned char* v4; // eax@1
unsigned int v5; // edi@1
int v6; // edx@1
int result; // eax@4
unsigned int v8; // ebx@6
size_t v9; // ebx@6
int v10; // esi@7
unsigned int v11; // esi@10
unsigned int v12; // edx@10
unsigned short* v13; // esi@11
int v14; // eax@12
unsigned int* v15; // ebx@12
unsigned int v16; // ecx@14
int v17; // esi@14
int v18; // edi@15
int v19; // ecx@16
unsigned int v20; // edi@20
unsigned int v21; // ebx@20
char* v22; // esi@21
char* v23; // esi@21
int v24; // ecx@22
unsigned char* v25; // edx@23
unsigned char* v26; // edi@26
int v27; // ebx@26
unsigned int v28; // edi@29
int v29; // ecx@29
unsigned int v30; // ebx@32
char v31; // cl@33
unsigned int v32; // edi@36
int* v33; // ebx@36
int v34; // ecx@37
unsigned char* v35; // [sp+0h] [bp-60h]@1
unsigned int v36; // [sp+4h] [bp-5Ch]@1
int v37; // [sp+8h] [bp-58h]@1
int v38; // [sp+Ch] [bp-54h]@1
unsigned int v39; // [sp+10h] [bp-50h]@20
unsigned int v40; // [sp+14h] [bp-4Ch]@1
unsigned int v41; // [sp+14h] [bp-4Ch]@14
char v42; // [sp+18h] [bp-48h]@6
unsigned int v43; // [sp+18h] [bp-48h]@24
__m128 v44; // [sp+1Ch] [bp-44h]@1
__m128 v45; // [sp+2Ch] [bp-34h]@1
int v46; // [sp+3Ch] [bp-24h]@1
int v47; // [sp+40h] [bp-20h]@1
int v48; // [sp+44h] [bp-1Ch]@1
int v49; // [sp+48h] [bp-18h]@1
int v50; // [sp+4Ch] [bp-14h]@1
int v51; // [sp+50h] [bp-10h]@1
int v52; // [sp+54h] [bp-Ch]@1
int v53; // [sp+58h] [bp-8h]@1

v4 = compressedBuffer;
v35 = compressedBuffer;
v5 = maybeOutBuffer;
v36 = maybeOutBuffer;
v6 = (int)& compressedBuffer[firstDwordMinusOne];// first byte of compressed data
v40 = v36;
v38 = (int)& compressedBuffer[firstDwordMinusOne];
v37 = secondDword + v36;
v46 = 0;
v47 = 1;
v48 = 2;
v49 = 1;
v50 = 4;
v51 = 4;
v52 = 4;
v53 = 4;

__m128 xmmword_116C4370;
__m128 xmmword_116C2380;
xmmword_116C4370.m128_u64[1] = 0xFFFFFFFF00000000;
xmmword_116C4370.m128_u64[0] = 0x0000000000000000;

xmmword_116C2380.m128_u64[1] = 0x0000000300000002;
xmmword_116C2380.m128_u64[0] = 0x0000000100000000;

/*_mm_storeu_ps
_mm_storeu_si128((__m128i*) & v44, _mm_load_si128((const __m128i*) & xmmword_116C4370));
_mm_storeu_si128((__m128i*) & v45, _mm_load_si128((const __m128i*) & xmmword_116C2380));*/

//looks like _mm_storeu_si128 stores to &v44, and _mm_load_si128 loads _m128, so that's just v44=xmmword...
v44 = xmmword_116C4370;
v45 = xmmword_116C2380;


if (secondDword)
{
while (1)
{
v8 = *v4++;
v42 = v8;
v9 = v8 >> 4;
if (v9 == 15)
{
do
{
v10 = *v4++;
v9 += v10;
} while ((unsigned int)v4 < v6 - 15 && v10 == 255);
v5 = v40;
if (v9 + v40 < v40 || &v4[v9] < v4)
return v35 - v4 - 1;
}
v11 = secondDword + v36;
v12 = v9 + v5;
if (v9 + v5 > v37 - 12)
goto LABEL_41;
v13 = (unsigned short*)& v4[v9];
if ((unsigned int)& v4[v9] > v38 - 8)
{
v11 = secondDword + v36;
LABEL_41:
if (&v4[v9] == (unsigned char*)v38 && v12 <= v11)
{
memcpy((void*)v5, v4, v9);
return v5 + v9 - v36;
}
return v35 - v4 - 1;
}
v14 = (int)& v4[-v5];
v15 = (unsigned int*)(v9 + v5);
do
{
*(unsigned int*)v5 = *(unsigned int*)(v14 + v5);
*(unsigned int*)(v5 + 4) = *(unsigned int*)(v14 + v5 + 4);
v5 += 8;
} while (v5 < v12);
v16 = *v13;
v4 = (unsigned char*)v13 + 1;
v17 = v12 - v16;
v41 = v16;
if (v12 - v16 < v36)
return v35 - v4 - 1;
v18 = v42 & 0xF;
*v15 = v16;
if (v18 == 15)
{
while (1)
{
v19 = *v4++;
if ((unsigned int)v4 > v38 - 5)
return v35 - v4 - 1;
v18 += v19;
if (v19 != 255)
{
if ((unsigned int*)((char*)v15 + v18) < v15)
return v35 - v4 - 1;
v16 = v41;
break;
}
}
}
v20 = v18 + 4;
v21 = (unsigned int)v15 + v20;
v39 = v21;
if (v16 >= 8)
{
*(unsigned int*)v12 = *(unsigned int*)v17;
v24 = *(unsigned int*)(v17 + 4);
v23 = (char*)(v17 + 8);
*(unsigned int*)(v12 + 4) = v24;
}
else
{
*(unsigned char*)v12 = *(unsigned char*)v17;
*(unsigned char*)(v12 + 1) = *(unsigned char*)(v17 + 1);
*(unsigned char*)(v12 + 2) = *(unsigned char*)(v17 + 2);
*(unsigned char*)(v12 + 3) = *(unsigned char*)(v17 + 3);
v22 = (char*)(*(&v46 + v41) + v17);
*(unsigned int*)(v12 + 4) = *(unsigned int*)v22;
v23 = &v22[-*((unsigned int*)& v44 + v41)];
}
v25 = (unsigned char*)(v12 + 8);
if (v21 <= v37 - 12)
break;
v43 = v37 - 7;
if (v21 > v37 - 5)
return v35 - v4 - 1;
if ((unsigned int)v25 < v37 - 7)
{
v26 = v25;
v27 = (unsigned char)v23 - (unsigned char)v25;
do
{
*(unsigned int*)v26 = *(unsigned int*)& v26[v27];
*((unsigned int*)v26 + 1) = *(unsigned int*)& v26[v27 + 4];
v26 += 8;
} while ((unsigned int)v26 < v43);
v21 = v39;
v23 += v43 - (unsigned int)v25;
v25 = (unsigned char*)(v37 - 7);
}
v28 = 0;
v29 = v21 - (unsigned int)v25;
if ((unsigned int)v25 > v21)
v29 = 0;
if (v29)
{
v30 = v29;
do
{
v31 = *v23++;
++v28;
*v25++ = v31;
} while (v28 < v30);
v5 = v39;
v6 = v38;
v40 = v39;
}
else
{
LABEL_39:
v6 = v38;
v5 = v21;
v40 = v21;
}
}
*(unsigned int*)v25 = *(unsigned int*)v23;
*((unsigned int*)v25 + 1) = *((unsigned int*)v23 + 1);
if (v20 > 0x10)
{
v32 = (unsigned int)(v25 + 8);
v33 = (int*)(v23 + 8);
do
{
v34 = *v33;
v33 += 2;
*(unsigned int*)v32 = v34;
*(unsigned int*)(v32 + 4) = *(v33 - 1);
v32 += 8;
} while (v32 < v39);
v21 = v39;
}
goto LABEL_39;
}
if (firstDwordMinusOne != 1 || *compressedBuffer)
result = -1;
else
result = 0;
return result;
}

int main()
{
FILE* f = fopen("D:\\ff8_R\\EXPORT\\world_fs_export\\mapdata\\mapdata.fl", "rb");
fseek(f, 0, 2);
auto position = ftell(f);
rewind(f);
unsigned int* buffer = (unsigned int*)calloc(position, 1);
fread(buffer, sizeof(char), position, f);
fclose(f);

unsigned int firstDword = (*buffer) - 8;
unsigned int secondDword = *(buffer + 2);
unsigned char * buffer_ = (unsigned char*)(buffer + 3);
unsigned int* outBuffer = (unsigned int*)calloc(firstDword, 1);
unsigned int firstParm = (unsigned int)outBuffer;
int testing = probably4LZDecompress((unsigned int)firstParm, buffer_, firstDword, secondDword);
}


and it didn't quite worked well on line 119- I had mismatch with data which I had on demastered code.
It turns out the casual field.fs contains compression method of ==2
there are some issues:
in field.fi the mapdata/maplist has 0x25 uncompressed size (that is true actually)- but absolute offset points to 0x25- that's true, but it's way after the header. You have to seek -4 to get secondDword which will give 0x25 (37) - this is how much data should be read- currently Deling reads the size correctly- but with the header missing 8 bytes afterward
So to summarize:
field.fl ->
c:\\ff8\\data\\x\\field\\mapdata.fl is entry 2

field.fi entry 2 (so 12) - that is correct:
uncompressed size - 37
location in FS file - 25
compression flag - 2

If we jump to 0x19- we get the DWORD+4ZL... this is wrong (more or less)
now Deling exports by size of uncompressed- that's okay, but there's 12bytes header data
So the content reads 37 bytes, while it should read 37+12 = 49

60
General Discussion / Re: FFVIII Remastered
« on: 2019-09-05 09:10:29 »
Albeoris- did you succeed on breaking any sub-routine with debugger? I tried IDA, IDA+scyllaHyde, OllyDgb and CE debugger- I'm getting 0x400000f1 (STATUS_WX86_BREAKPOINT) on all threads and the game is immidiately killed. Happens only for core game code

61
I'm trying to RE this but no luck so far mostly due to debugger issues.
In FFVIII_EFIGS.dll at 015DE64B there's function that performs fread on files. Are you able to break on this? I'm not sure whether the issue is on me or the whole remaster has some anti-debugging techniques- tried with IDA, IDA+ScyllaHyde, CE and OllyDbg doesn't even show the process on the list

edit: to add to this it doesn't seem to use any of the zlibwapi.dll functions- tested with procmon- this is a stacktrace for reading the content of field.fl:

62
General Discussion / Re: FFVIII Remastered
« on: 2019-09-03 19:15:21 »

two FMVs are updated- if someone knows any tool or want to do frame-by-frame shit then please take a look at those two videos
(remaster on left)

63
General Discussion / Re: FFVIII Remastered
« on: 2019-09-03 19:07:49 »
python2 script to unpack ZZZ files- just change path in line 5 to either main.zzz or other.zzz
Code: [Select]
import sys
import os
import struct

fd = open('main.zzz', 'rb')

def ReadEntry():
filenameLen = struct.unpack('<I', fd.read(4))[0]
filename = fd.read(filenameLen)
absPos = struct.unpack('<I', fd.read(4))[0]
flag = struct.unpack('<I', fd.read(4))[0]
fileSize = struct.unpack('<I', fd.read(4))[0]
return [filenameLen, filename, absPos, flag, fileSize]

filesCount = struct.unpack('<I', fd.read(4))[0]
entries = [ReadEntry()]

for i in range(1,filesCount):
entries += [ReadEntry()]
#print(entries[i])

for i in range(0,len(entries)):
finPath = os.path.join(os.getcwd(), 'EXPORT', entries[i][1].replace('\\', '/'))
dirPath = os.path.dirname(finPath).replace('\\', '/')
if not os.path.exists(dirPath):
os.makedirs(dirPath)
outfd = open(finPath, 'wb')
fd.seek(entries[i][2])
buffer = fd.read(entries[i][4])
outfd.write(buffer)
outfd.close()
print(finPath + " saved.")

64
They could easily add these fixes - but why bother when there are enough suckers around to keep throwing $20 at them regardless.
That's true but still this is not Dotemu decision- they are just contractors working on SE project. They do strictly what SE said to do and no one would pay them for adding XX years bug fix to crappy world map even though it's only changing 5-6 bytes. That's sad what SE have become.

65
General Discussion / Re: FFVIII Remastered
« on: 2019-08-23 09:47:54 »
19.99$ is very cheap and affordable. it's basically one cheap lunch.
One cheap lunch for whole family*

anyway if FFVIII didn't use DirectMusic then we probably wouldn't get any kind of audio replacement- it's simple, Dotemu was forced to change that component with something more current-gen. The music is going to be OGG and work like RaW- I bet it

66
well I recently sent an e-mail linking to Dotemu linking this thread - let's keep fingers crossed- but I doubt they will introduce game code changes in a week to publish (or actually do anything at all).

67
General Discussion / Re: FFVIII Remastered
« on: 2019-08-22 17:37:36 »
Steam page says its directx 11 so if they ported it to unity for multi platform releases it might make modding easier.
They just upgraded the wrapper like they did upgrade the DirectX to EIDOS release. They said they replaced the music, so no more DirectMusic and Dx11 makes it multi-platform friendly. (At least for PS4 I can confirm from deploy/devkit side- even better for XOne but I don't know about Switch)
I really wish they did Unity, but that's not what Dotemu does - if remaster was in hands if Silicon then I could get my hopes up for rewrite.

68
FF8 Tools / Re: [PSX/PC] Save editor - Hyne (1.9.3)
« on: 2019-08-19 08:16:09 »
Thank you sithlord48 found them and did what i wanted, mostly, another question if i may. do you know how to alter the spell in a draw point?. the drop down menu appears when modifying the status e.g full, half full etc. but nothing when i click on the spell.

http://forums.qhimm.com/index.php?topic=16980.0

69
Triple triad cards texture atlas is embedded into EXE. Awful design, not so easy modding. Use Tim Viewer to scan the EXE.

70
Support / Re: [FF8] Looking for opening sound effect
« on: 2019-07-23 22:00:24 »
This sound is part of the FMV itself. The opening is played as-is therefore your only chance is to actually rip the sound directly from the movie. The 2000.PC release is Bink video, while Steam is casual Avi codec.

71
WIP / Re: [FFVII] Snowboard?
« on: 2019-07-01 16:35:29 »



Code: [Select]
# Final Fantasy VII Snowboard TMD (Playstation TMD) to OBJ by Maki ([email protected])
# Made @ 01.07.2019
# version 0.1

#Based on structure by http://wiki.xentax.com/index.php/Playstation_TMD


import sys
import struct

filename = "for_ev.tmd" #change that for other
outfilename = "for_ev.obj" #change that also

def ReadInt():
    return struct.unpack("<I", fd.read(4))[0]

def GetVertices(pVert, nVert):
    vertices = []
    fd.seek(pVert, 0)
    for n in range(0, nVert):
        x = struct.unpack('<h', fd.read(2))[0]
        y = struct.unpack('<h', fd.read(2))[0]
        z = struct.unpack('<h', fd.read(2))[0]
        w = struct.unpack('<h', fd.read(2))[0]
        vertices += [[x,y,z]]
    return vertices

def GetPolygons(pPrim, nPrim):
    polygons = []
    fd.seek(pPrim, 0)

    for n in range(0, nPrim):
        modeVariable = struct.unpack('<I', fd.read(4))[0]
        if(modeVariable != 0x31010506):
            print('unknown mode at: ' + str(fd.tell()))
            return []
        fd.seek(12,1) # unknown, UV?
        A = struct.unpack('<H', fd.read(2))[0]
        B = struct.unpack('<H', fd.read(2))[0]
        C = struct.unpack('<H', fd.read(2))[0]
        polygons += [[A,B,C]]
        fd.seek(2,1)
    return polygons


     

fd = open(filename,"rb")
if(fd==None):
    print("cannot open file. Exiting")
    exit()
if(ReadInt() != 0x41):
    print("tmd version is not 0x41")
    exit()
fd.seek(4,1) # we don't really care for flags here. It's always 0
objCount = ReadInt()

#Main arrays
pVerts = []
nVerts = []
pNorms = []
nNorms = []
pPrims = []
nPrims = []

#Step 1- Gather info about every single object to arrays
for i in range(0,objCount):
    pVerts += [ReadInt()]
    nVerts += [ReadInt()]
    pNorms += [ReadInt()]
    nNorms += [ReadInt()]
    pPrims += [ReadInt()]
    nPrims += [ReadInt()]

    print("===Object: {}===\nVertices: {}\tPointer: {}\nNormals: {}\tPointer: {}\nPrims: {}\tPointer: {}\nScale: {}".format(i, nVerts[i], pVerts[i], nNorms[i], pNorms[i], nPrims[i], pPrims[i], ReadInt()))
#Step 2- Process gathered data
for i in range(0,objCount):
    vertices = GetVertices(pVerts[i]+12, nVerts[i])
    fda = open('obj{}.obj'.format(i), 'wt')
    for n in vertices:
        fda.write("v {} {} {}\n".format(n[0], -n[1], n[2]))
    polygons = GetPolygons(pPrims[i]+12, nPrims[i])
    for n in polygons:
        fda.write("f {} {} {}\n".format(n[0]+1,n[1]+1,n[2]+1))
    fda.close()

This for 0.1 version. Looks like for_gs.tmd and for_en.tmd have the same data (huh??)
I'll be digging for UVs and thankfully for reimport. Should be easy


Vertices (as in TMD):
Code: [Select]
short X;
short -Y;
short Z;
short W; //unused

Polygon type A:
Code: [Select]
0x06050131 //polygon type const. Probably that means triangle and the other unknown one is quad, but that's just assumption
char unk[12] //unkown, I'm missing three UVs, but what are other values?
ushort A;
ushort B;
ushort C;
ushort pad; //maybe a place for D?

Polygon type B:
Code: [Select]
0x80808000 //const?
ushort A; //untested
ushort B; //untested
ushort C; //untested
ushort PAD;
char unk[16]; //not sure

72
General Discussion / Re: FFVIII Remastered
« on: 2019-06-19 17:37:48 »
Famitsu page, interview.

Infos:
  • Triple speed
  • Enhance battle (Max HP & ATB, can always use special moves)
  • No encounter

  • PC-only features:
  • Obtain all items, abilities, special moves & cards
  • Max GF level, Gil & magic
  • Detailed customization in system settings


If someone made to translate it please notify us. I'm really looking forward to every single word they say about viii

74
*Fixed null reference at listbox selectedItem=null
*Fixed unwanted conversion from ARGB8888 (32bpp) to ARGB1555 (16bpp) resulting in loss of colour

https://drive.google.com/file/d/1Yr8Lw_wFBzuqPOV-TqfGAcwbXTHLtPwI/view?usp=sharing

75
what really confuses me is why you receive such generic-looking error on debug builds
A few questions:
Which operating system are you on?
You mention VS, which version you use?

C# is perfect for debugging due to JIT technology. I'll show you some instructions for VS2017:
First choose valid build configuration for your operating system:

Naturally I'm on Windows so I'm choosing WindowsDebug



Now, there is one remaining option: x86 and x64 (green arrow). There's no much difference other than that x64 does NOT use the crappy direct DirectSound wrapper (I mean wrapper is cool, but whole DirectSound is NO-NO as of today). For maximum stability I recommend choosing x64.
Now simply hit "Run" (red arrow) and before the game will shit itself the code will show exactly why, where and what's wrong

The same behaviour applies to MonoDevelop. Choosing build to DebugLinux, choosing either x86/x64 (doesn't matter here, DirectSound is disabled anyway on Linux) and hitting 'Debug...' or something like this, don't really remember now

Pages: 1 2 [3] 4 5 6 7 8 ... 25