Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Initial D Extreme Stage [PS3]

Post questions about game models here, or help out others!
User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 49 times

Initial D Extreme Stage [PS3]

Post by blackracer »

Image

Hi guys, maybe you can help me get 3D models of cars and tracks from the game InitialD Extreme Stage?)
There is some success in extracting archives,
All textures are able to extract from the archives in the DDS format using file ripper
Image

And maybe unpack archives (possible container) using this BMS script:

Code: Select all

# AFS archives (used on some Xbox games) (script 0.1.1a)
# script for QuickBMS http://quickbms.aluigi.org

idstring "AFS"
get DUMMY byte  # it's usually 0 but in some files (MULTSPQ2.AFS) it may be different
get FILES long
savepos INFO_OFF

math NAME_OFF = FILES
math NAME_OFF *= 8
math NAME_OFF += INFO_OFF
goto NAME_OFF
get NAME_OFF long
goto INFO_OFF

for i = 0 < FILES
    get OFFSET long
    get SIZE long

   if NAME_OFF == 0
      set NAME string ""
   else
      savepos INFO_OFF
      goto NAME_OFF
      getdstring NAME 32
      getdstring DUMMY 16
      savepos NAME_OFF
      goto INFO_OFF
   endif

    log NAME OFFSET SIZE
next i
I put the game files for the attempts to extract 3d models:
Cars archive: https://www.dropbox.com/s/xho8nnna9il7ph2/car.afs?dl=0
This presumably 3d models tuning parts that are not packed: https://www.dropbox.com/s/1mkq0ot48voom ... P.efo?dl=0
User avatar
Takukun
advanced
Posts: 45
Joined: Sun Sep 06, 2015 1:40 am
Has thanked: 136 times
Been thanked: 24 times

Re: Initial D Extreme Stage [PS3]

Post by Takukun »

This is cool i have the game but never finished it, too hard for me :P Congrats for getting the textures though :)
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4284
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Initial D Extreme Stage [PS3]

Post by shakotay2 »

efo-model:
boost_up-efo.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 49 times

Re: Initial D Extreme Stage [PS3]

Post by blackracer »

It is excellent!
Aluigi is helped with a BMS script to extract the *afs :

Code: Select all

# Initial D Extreme Stage
# script for QuickBMS http://quickbms.aluigi.org

math OFFSET_LIMIT = -1
for i = 0
    savepos TMP
    if TMP == OFFSET_LIMIT
        break
    endif
    get OFFSET long
    if i == 0
        math OFFSET_LIMIT = OFFSET
    endif
    get SIZE long
    get NAME string
    log NAME OFFSET SIZE
next i
How to get game resources: Extract *afs archive with QuickBMS Script (one post) or AFSExplorer Tool > Extract from container *efo with QuickBMS Script in this post.

I was able to learn that *efo may contain geometry or dds textures.
For extracting dds textures from texture.efo using X-Ripper.

Maybe someone has the skill to write a generic script for extracting 3d models?
xxdrifterxx
ultra-n00b
Posts: 1
Joined: Tue Jun 27, 2017 2:21 pm

Re: Initial D Extreme Stage [PS3]

Post by xxdrifterxx »

I find InitialD arcade stage(6) resource file. but filetype is different(xaf)
https://mega.nz/#!jBR0EAyD!d8XFF5_WTS6T ... d_NoFeIr8I
someone extract this?
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4284
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Initial D Extreme Stage [PS3]

Post by shakotay2 »

offzip didn't reveal senseful data but you can search for "YABX" or "yabukita::Object" in car.xaf, which are present 400 times
There's an uncompressed block at 0x17F000 for example:
Car_xaf_0x17F000.jpg
(sry for cutting his left arm mesh :D )

btw: cut/copied that 16 kB block into a separate file, so offset 0x17F000 -> 0x0000
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
User avatar
REDZOEU
veteran
Posts: 151
Joined: Thu Mar 10, 2011 8:03 am
Location: Jakarta, Indonesia
Has thanked: 74 times
Been thanked: 50 times
Contact:

Re: Initial D Extreme Stage [PS3]

Post by REDZOEU »

I am interested in this. Any workaround to a method for extracting the .xaf file? I tried the game on my pc and it's suprisingly good. Would be great to have the track models too.
User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 49 times

Re: Initial D Extreme Stage [PS3]

Post by blackracer »

Hi guys, I have not been here for a long time, there was a problem with my hardware iMac ))
I tried to write a script on Noesis, and I have some success, but the script contains a lot of mistakes ...
This script works with InitialD Extreme Stage/ InitialD Arcade Stage 6AA / InitialD Arcade Stage 7AAX and InitialD Arcade Stage 8 Infinity with *.efo containers that contain meshes and textures.

At the moment the script does not work correctly, it reads not the hex offset in the files but it looks for the content labels
I could not fully understand the structure. * .efo, who knows how to handle hex, I will be glad to any help and advice in search of the necessary displacements and decoding of the structure.

Currently, the script reads only files containing single models (not group models)

Code: Select all

from inc_noesis import *
import noesis
import rapi

def registerNoesisTypes():
    handle = noesis.register("InitialD", ".efo")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadModel(handle, noepyLoadModel)
    #noesis.logPopup()
    return 1

NOEPY_HEADER = "YABX"
   
def noepyCheckType(data):
   bs = NoeBitStream(data)
   if len(data) < 4:
      return 0
   if bs.readBytes(4).decode("ASCII").rstrip("\0") != NOEPY_HEADER:
      return 0
   return 1  

 
def noepyLoadModel(data, mdlList):
    ctx = rapi.rpgCreateContext()
    bs = NoeBitStream(data)
    fileName = rapi.getLocalFileName(rapi.getInputName()).rstrip(".efo")
    print("File Name: " + str(fileName))
        
        #Texture Name
    #bs.seek(0x3573, NOESEEK_ABS) 
    #textureNamesize = bs.readUShort()
    #textureName = bs.readBytes(textureNamesize).decode("ASCII").rstrip("\0")
    #rapi.rpgSetName(textureName)
    #print("Texture Name: " + str(textureName))
    rapi.rpgSetName("bodyD16")   # Texture Name FIX IT 
            
    # myString = bs.readBytes(len(data))
    # essd = myString.find(b"\x65\x73\x73\x64")
    # bs.seek(essd - 0x4, NOESEEK_ABS)
    # skipessd = bs.readUInt() 
    # skip = bs.readBytes(essd)
    
    myString1 = bs.readBytes(len(data))
    myIndex1 = myString1.find(b"\x27\x06\x00\x00\x00\x01\x00\x00\x00\x1A\x27\x04")   ##FIX IT
   
    myString2 = bs.readBytes(len(data))
    myIndex2 = myString2.find(b"\x47\x65\x6F\x6D\x30")                                                 ##FIX IT
   
        #Face Counts      
    bs.seek(myIndex1, NOESEEK_ABS)       
    skip = bs.readBytes(23) 
    #bs.seek(9E5, NOESEEK_ABS) 
    FaceCount = bs.readUInt()
    FaceBuffer = bs.readBytes(FaceCount * 2)
    print("Face Counts: " + str(FaceCount))
           
    bs.seek(myIndex2, NOESEEK_ABS)       
    skip = bs.readBytes(24)
    
        #UV Vertex Stride
    VertexStride = bs.readUInt()  
    print("UV Vertex Stride :" + str(VertexStride ))
    bs.seek(myIndex2, NOESEEK_ABS)
    skip = bs.readBytes(8)
    size = bs.readUInt()
    skip = bs.readBytes(size)
    skip = bs.readBytes(10)
    
        #Vertex Counts 
    VertexCount = bs.readUInt()
    print("Vertex Count :" + str(VertexCount))               
    VertexBuffer = bs.readBytes(VertexCount * VertexStride)
    if VertexStride == 12:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 12, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 12, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 12, 20)
    elif VertexStride == 16:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 16, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 16, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 16, 20)
    elif VertexStride == 20:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 20, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 20, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 20, 28) 
    elif VertexStride == 24:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 24, 0) 
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 24, 8)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 24, 16)   
    elif VertexStride == 28:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 28, 0) ## FIX IT
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 28, 24)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 28, 36)         
    elif VertexStride == 32:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 32, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 32, 12)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 32, 24)
    elif VertexStride == 36:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 36, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 36, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 36, 28)
    elif VertexStride == 40:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 40, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 40, 20)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 40, 32)
    elif VertexStride == 44:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 44, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 44, 24) 
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 44, 36)
    elif VertexStride == 56:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 56, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 56, 12)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 56, 24)
    elif VertexStride == 60:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 60, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 60, 16)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 60, 28)
    elif VertexStride == 64:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 64, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 64, 20)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 64, 32)
    elif VertexStride == 68:
        rapi.rpgBindPositionBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 68, 0)
        rapi.rpgBindNormalBufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 68, 24)
        rapi.rpgBindUV1BufferOfs(VertexBuffer, noesis.RPGEODATA_FLOAT, 68, 36)
    else:
        print("This mesh not yet supported")

    rapi.rpgCommitTriangles(FaceBuffer, noesis.RPGEODATA_USHORT, FaceCount, noesis.RPGEO_TRIANGLE_STRIP, 1) #SHORT for word indices
    #rapi.rpgSetOption(noesis.RPGOPT_TRIWINDBACKWARD, 1) #Flip Mesh
    mdl = rapi.rpgConstructModel()                                                          
    mdlList.append(mdl)
    rapi.rpgClearBufferBinds()
    return 1
    
Image Image

several primitive models for tests here:
https://www.dropbox.com/s/geejzobp9m6yw ... 6.zip?dl=0

example structure cube.efo
I was not able to find the offset at the beginning of the file to these blocks, I can not understand where they can be in * .efo (((
Image
skys215
ultra-n00b
Posts: 5
Joined: Sat Dec 23, 2017 3:58 pm
Been thanked: 1 time

Re: Initial D Extreme Stage [PS3]

Post by skys215 »

blackracer wrote:Hi guys, I have not been here for a long time, there was a problem with my hardware iMac ))
I tried to write a script on Noesis, and I have some success, but the script contains a lot of mistakes ...
This script works with InitialD Extreme Stage/ InitialD Arcade Stage 6AA / InitialD Arcade Stage 7AAX and InitialD Arcade Stage 8 Infinity with *.efo containers that contain meshes and textures.
...
May I ask how to open the .efo file?
Thanks in advance!

Updated:
I know how to use this script now.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4284
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: Initial D Extreme Stage [PS3]

Post by shakotay2 »

blackracer wrote:I was not able to find the offset at the beginning of the file to these blocks, I can not understand where they can be in * .efo (((
you don't need to; just search for 1A 27 04 00 as a signature in the efo file, add 10 bytes to the offset you'll find.
Should result in the start of face block size; tested with cube, wheel_rays_te37 and torus.efo.

edit: well, see, you did it already in your script. So what's "wrong" with that solution?
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
skys215
ultra-n00b
Posts: 5
Joined: Sat Dec 23, 2017 3:58 pm
Been thanked: 1 time

Re: Initial D Extreme Stage [PS3]

Post by skys215 »

shakotay2 wrote:
blackracer wrote:I was not able to find the offset at the beginning of the file to these blocks, I can not understand where they can be in * .efo (((
you don't need to; just search for 1A 27 04 00 as a signature in the efo file, add 10 bytes to the offset you'll find.
Should result in the start of face block size; tested with cube, wheel_rays_te37 and torus.efo.

edit: well, see, you did it already in your script. So what's "wrong" with that solution?

How about .efo file which starts with "YS" not "YABX"?
zoloat
ultra-n00b
Posts: 2
Joined: Mon Dec 25, 2017 8:09 am

Re: Initial D Extreme Stage [PS3]

Post by zoloat »

Why not try using TeknoParrot to play Initial D Arcade Stage 6? I think you can use Cheatengine to find game running code. But I'm not an expert, I'm just trying to help. Looking forward to your result.
User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 49 times

Re: Initial D Extreme Stage [PS3]

Post by blackracer »

shakotay2 wrote:
blackracer wrote:I was not able to find the offset at the beginning of the file to these blocks, I can not understand where they can be in * .efo (((
you don't need to; just search for 1A 27 04 00 as a signature in the efo file, add 10 bytes to the offset you'll find.
Should result in the start of face block size; tested with cube, wheel_rays_te37 and torus.efo.

edit: well, see, you did it already in your script. So what's "wrong" with that solution?
This data block in files is different ((
I do not know the universal offset for all *.efo files

Image
skys215 wrote:
How about .efo file which starts with "YS" not "YABX"?
Give me a sample file?
zoloat wrote:Why not try using TeknoParrot to play Initial D Arcade Stage 6? I think you can use Cheatengine to find game running code. But I'm not an expert, I'm just trying to help. Looking forward to your result.
Thanks, I'll take this into consideration
skys215
ultra-n00b
Posts: 5
Joined: Sat Dec 23, 2017 3:58 pm
Been thanked: 1 time

Re: Initial D Extreme Stage [PS3]

Post by skys215 »

I guess this is the main body of AE86L.
AE86L_Body_genuine_00.efo this is just one of the extracted file for AE86L.
https://www.dropbox.com/s/c2o60uko4873e ... 0.efo?dl=0

And there's another file called texture.efo, which I believe it combines all parts into a car.
https://www.dropbox.com/s/fdkklq9le0nsz ... e.efo?dl=0

Both file was under the AE86L folder.
User avatar
blackracer
advanced
Posts: 51
Joined: Sat Jun 27, 2015 1:20 pm
Has thanked: 30 times
Been thanked: 49 times

Re: Initial D Extreme Stage [PS3]

Post by blackracer »

skys215 wrote:I guess this is the main body of AE86L.
AE86L_Body_genuine_00.efo this is just one of the extracted file for AE86L.
https://www.dropbox.com/s/c2o60uko4873e ... 0.efo?dl=0

And there's another file called texture.efo, which I believe it combines all parts into a car.
https://www.dropbox.com/s/fdkklq9le0nsz ... e.efo?dl=0

Both file was under the AE86L folder.
Unfortunately the files with YS header have compression, I already asked for help with from Aluigy but he could not understand the method of file compression.
Post Reply