ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Nov 16, 2018 6:09 am

All times are UTC




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sat Nov 03, 2018 3:16 pm 

Joined: Mon Oct 29, 2018 6:19 pm
Posts: 4
Hello, everyone!
I am attempting to extract a WAV file from Prince of Persia: Warrior Wihin's .sb0 files.
I managed to extract it and import it into audacity as raw data. I also managed to find the right offset for the size of the file, which is 0x350 threebyte in little endianness. However when I place a different file for reimporting, the archive gets completely changed (making it essentially useless). (This happens with both reimport and reimport2.bat and/or a smaller or higher file size,) however reimporting the original unchanged file works flawlessly. The WAV file specifically is named Pr_ONOHURT_001.WAV in the .sb0 file, which I included below. (It is renamed to .zip because .sb0 was not allowed.)

I will accept any kind of help. :)
Thank you in advance.
R4nger


Attachments:
File comment: .sb0 file renamed to .zip.
prinono2.zip [671.29 KiB]
Downloaded 3 times
Top
   
PostPosted: Sat Nov 03, 2018 5:46 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9236
What's the script you are using?


Top
   
PostPosted: Sat Nov 03, 2018 11:55 pm 

Joined: Mon Oct 29, 2018 6:19 pm
Posts: 4
aluigi wrote:
What's the script you are using?

A very simple custom script which is only a few lines, those being getting the offset of the file, the size and the name and logging that. Nothing fancy. It works, but its a bit bad of a script.

Code:
goto x310
getdstring NAME 0x12
goto 0x33B
get OFFSET byte
goto 0x350
get SIZE threebyte
log NAME OFFSET SIZE


Top
   
PostPosted: Sun Nov 04, 2018 12:51 pm 

Joined: Mon Oct 29, 2018 6:19 pm
Posts: 4
Although the OFFSET of the script is just 00, so i probably wouldnt even need to use the get command for it, but its just how i do it.


Top
   
PostPosted: Wed Nov 07, 2018 11:11 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9236
"goto x310" is not hexadecimal.
Do you mean "goto 0x310"?


Top
   
PostPosted: Wed Nov 07, 2018 11:14 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9236
Anyway the offset is for sure wrong and the reason your reimported file corrupts everything is just that one, offset 0 with a size bigger than 0x310 (where the first file name resides).


Top
   
PostPosted: Thu Nov 08, 2018 5:27 pm 

Joined: Mon Oct 29, 2018 6:19 pm
Posts: 4
aluigi wrote:
Anyway the offset is for sure wrong and the reason your reimported file corrupts everything is just that one, offset 0 with a size bigger than 0x310 (where the first file name resides).


Interesting. I will keep that in mind, Aluigi. Thanks a lot for your help here! :)

PS: The original is indeed 0x310, a simple copy mistake.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited