Page 2 of 2
Re: Ah My Goddess (PS2)
Posted: Sun Apr 30, 2023 4:48 pm
by falconcool
there is a file called cutsume2_log.txt.
if i remember it correct,it recored where you should read vertices count,face index data,try to use those values to edit my script and execute my script again.
Code: Select all
"Reading Verts @ 0xf20"
"Reading Faces @ 0x33068"
"Last Read @ 0x3c3c4"
i totally forgot what 'last read' meaning now .lol
Re: Ah My Goddess (PS2)
Posted: Sun Apr 30, 2023 5:05 pm
by Natsuki Okusawa
hmm... well I'm not sure where I'm supposed to place the vertex and face offsets in the script
Re: Ah My Goddess (PS2)
Posted: Sun Apr 30, 2023 5:06 pm
by falconcool
Another model sample ripped from ram dump.
with logs i wrote you need to change some values in the script.
https://www.sendspace.com/file/yvuv3d
Re: Ah My Goddess (PS2)
Posted: Sun Apr 30, 2023 5:07 pm
by falconcool
I'm trying very hard to remember it too

Re: Ah My Goddess (PS2)
Posted: Mon May 01, 2023 12:37 pm
by falconcool
alright,,finally reinstalled every thing.it seems my scripts still working.
Code: Select all
--===========================================================================
-- fsource="C:\\Users\\ACER_PREDATOR\\Documents\\My Received Files\\new dump.dat"
fsource = GetOpenFileName \
caption:"[PS2] Oh! My Goddess" \
types: "MemoryDump(*.dat)|*.CEM|All files (*.*)|*.*|"
if (fsource!=undefined) AND ((doesFileExist fsource)==true) then(
f = fopen fsource "rb"
fext= getFilenameType fsource
fpath= getFilenamePath fsource
fbatch= getFiles (fpath+"*"+fext)
fname= getFilenameFile fsource
fsize= getFileSize fsource
st = timestamp() --get start time in milliseconds
clearlistener()
openLog (fpath+fname+"_log.txt") mode:"w" outputOnly:true
--===========================================================================
undo off(
with redraw off (
vertsArray = #()
facesArray = #()
uvsArray = #()
mscale=39.34
/*
Instructions!
Please manually add the offset where the header starts
the script will read 96bytes from that and try to read the header from there
*/
fseek f 0x00000000 #seek_set --Important must be set at the RIGHT location, else will return Error Message!
startPos=0
read=0
meshInfo=false
for scan = 1 to 96 do(
read=readbyte f #unsigned
if read==0x70 do(
read=(readbyte f #unsigned)-(readbyte f #unsigned)-(readbyte f #unsigned)
if read==0x00 do(
fseek f -4 #seek_cur
read=readlong f #unsigned
if read==0x70 do(
meshInfo=true
startPos=ftell f
))))
fseek f startPos #seek_set
meshArray=#()
if meshInfo==true then(
fseek f startPos #seek_set --try to scan for those headers.. using 0x0140 as an ID
do(
ukn=readlong f
ukn=readlong f
ukn=readlong f
ukn=readlong f
faceAddition=readlong f #unsigned
ukn=readlong f
ukn=readlong f
faceCount=readlong f #unsigned
ukn=readshort f
ukn=readshort f
ukn=readshort f
ukn=readshort f
ukn=readshort f
ukn=readshort f
ukn=readshort f
ukn=readshort f
fseek f 0x30 #seek_cur --Skips FF's
read=readlong f #unsigned
append meshArray[faceCount,faceAddition]
)
while read==0x70
fseek f -0x20 #seek_cur
newPos=0
for tst = 1 to 0x10 do(
read=readlong f
if read==1 do(
newPos=ftell f+4
))
fseek f newPos #seek_set
vertCount=readlong f #unsigned
ukn=readlong f #unsigned
faceCount=readlong f #unsigned
ukn=readlong f #unsigned
Print ("Reading Verts @ 0x"+((bit.intAsHex(ftell f))as string))
for x = 1 to vertCount do(
vx=readfloat f*mscale
vy=readfloat f*mscale
vz=readfloat f*mscale
ukn1=readfloat f
ukn2=readfloat f
ukn3=readfloat f
ukn4=readfloat f
nx=readfloat f
ny=readfloat f
nz=readfloat f
ukn5=readfloat f
tv=readfloat f
tu=readfloat f*-1
ukn=readlong f #unsigned
append vertsArray[vx,vz,vy]
append uvsArray[tv,tu,0]
)
Print ("Reading Faces @ 0x"+((bit.intAsHex(ftell f))as string))
for tst = 1 to 0x10 do(
read=readlong f
if read==1 then EXIT
)
fseek f -8 #seek_cur
for x = 1 to meshArray.count do(
fd=1+meshArray[x][2]
for z = 1 to meshArray[x][1] do (
fa=readlong f #unsigned+fd
fb=readlong f #unsigned+fd
fc=readlong f #unsigned+fd
append facesArray[fc,fb,fa]
)
msh = mesh vertices:vertsArray faces:facesArray --build mesh
msh.numTVerts = uvsArray.count
buildTVFaces msh
meshop.deleteIsoVerts msh
for j = 1 to uvsArray.count do setTVert msh j uvsArray[j]
for j = 1 to facesArray.count do setTVFace msh j facesArray[j]
facesArray = #()
)
)
else(messageBox "ERROR!!!!!!")
--===========================================================================
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
gc()
fclose f
flushLog()
closeLog()
enableSceneRedraw()
Print ("Done! ("+((((timestamp())-st)/60)as string)+" Seconds)") --print time to finish
))) else (Print "Aborted.")
Re: Ah My Goddess (PS2)
Posted: Mon May 01, 2023 12:43 pm
by falconcool
I checked few differnt characters dump,,only few characters working.This script is still not compelete.but you should be able to see it's basic vertex ,face index data pattern from the script.
Re: Ah My Goddess (PS2)
Posted: Mon May 01, 2023 1:23 pm
by falconcool
change the line 35 in my script last posted.
Code: Select all
fseek f 0x00000144 #seek_set --Important must be set at the RIGHT location, else will return Error Message!
0x144 ..this value is for cutsume2.dat
original should be 0x00000000 ,b/c it's ripped from memory,so i have no idea about it's header,,it's judged by lots of dumped data.
then you should be able to get the model. you have to use hex editor to look those model's pattern,should not be hard to judge the correct offset value.
Re: Ah My Goddess (PS2)
Posted: Mon May 01, 2023 3:44 pm
by Natsuki Okusawa
I finally got it, once again thank you very much I really appreciate your help
cutsume2.png
well hopefully one day there will be an easier way to get models from this game
Re: Ah My Goddess (PS2)
Posted: Mon May 01, 2023 9:10 pm
by falconcool
np,glad it can help,,
also,,if you have tool to unpack the raw packge archieve file.try feed dumped hex data with encrypted data into chatgpt.
if you're lucky,maybe it will find the function to decrypt raw data for us.
Re: Ah My Goddess (PS2)
Posted: Tue May 02, 2023 10:02 am
by Natsuki Okusawa
Durik made a GRP.BIN extractor that can be found in the first page.
here's one of the extracted files from GRP.BIN:
OB0026O.rar