Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PsbDecompile/PsBuild] Dunamis 15 (Xbox 360 / PS3) #87

Closed
itsrigs opened this issue Jul 25, 2022 · 7 comments
Closed

[PsbDecompile/PsBuild] Dunamis 15 (Xbox 360 / PS3) #87

itsrigs opened this issue Jul 25, 2022 · 7 comments
Assignees
Labels
help wanted psb.m about xxx_info.psb.m and xxx_body.bin
Milestone

Comments

@itsrigs
Copy link

itsrigs commented Jul 25, 2022

Hello there. For some years now, I have been interested in having PsbDecompile and PsBuild functionalities for Dunamis 15. I am not terribly tech-savvy, so I apologize if A) this is the wrong way to go about this, and B) if I am mistaking anything in my understanding of the technical situation.

I believe that the game's M2 encryption key for both Xbox 360 and PlayStation 3 is 4nDSd4sa2v. It is further my understanding that the 360 and PS3 scripts are intrinsically different in at least one sense, and speaking to a friend, their conjecture at a glance was potential difference in endianness. I am not very learned in this, so I apologize if anything is incorrect.

Sample-wise, here is the unextracted PS3 scenario.zip, the unextracted 360 scenario.zip, and the 360 scenario (extracted).zip. This post is purely aimed at the Xbox 360 version, but PS3 files have been added for your convenience.

This Asmodean page for a tool titled exm2lib is where I found something capable of extracting the Xbox 360 version scenario. It appears it was made almost solely for this game and task. I had also managed to make it function in extracting the files from the image archive of the 360 version, though that might be a separate matter I can provide samples for if you think that is relevant.

And further is an image of the output of attempting to use PsbDecompile with the provided M2 key on the encrypted Xbox 360 version scenario_info.psb.m, with its companion scenario_body.bin within the same directory. Again, I apologize if I misunderstood anything in the process. I just figured after all this waiting, I should probably reach out to someone who understands far more than I ever will. Thank you for your time.
image

@UlyssesWu
Copy link
Owner

UlyssesWu commented Jul 26, 2022

Thanks for the detailed description. I will take a look at these samples once I have time.

Note for myself: The PS3 version can be extracted with PsbDecompile info-psb -k 4nDSd4sa2v scenario_info.psb.m -l 84 while 84 is an unusual key length (same as xbox ver; hardcoded in exm2lib as 0x54). Should add -a support later.

@UlyssesWu UlyssesWu added the psb.m about xxx_info.psb.m and xxx_body.bin label Jul 26, 2022
@itsrigs itsrigs closed this as completed Jul 26, 2022
@itsrigs
Copy link
Author

itsrigs commented Jul 26, 2022

Oops, wrong button above. Didn't mean to close.
I appreciate your response, by the way.

I tried out your recommended command, and it indeed extracted the PS3 scenario archive. I ran PsbDecompile on files from the
resultant PS3 scenario (extracted).zip, but to no avail.
image

For curiosity's sake, I also returned my focus to imagery. Using PsbDecompile on the 360 motion archive, and then the resultant loading.psb, I did indeed receive an image... though I cannot say its output is congruent with how the game would make it seem.
image
image

From here, I also thought to give a try to the PS3 motion archive, which does give me the motion files via PsbDecompile. I attempted PsbDecompile on the same loading file as the one extracted from 360, but to no avail.
image

This same fate was met by any images from the PS3 image archive as well.
image

I'll try to grab some samples real quick.

@itsrigs
Copy link
Author

itsrigs commented Jul 26, 2022

This PS3.zip contains the loading file from the PS3 motion archive and an image from the extracted PS3 image archive.
This X360.zip contains the loading file from the 360 motion archive and an exm2lib-extracted image from the 360 image archive.

@itsrigs itsrigs reopened this Jul 26, 2022
@itsrigs itsrigs changed the title [PsbDecompile/PsBuild] Dunamis 15 (Xbox 360) [PsbDecompile/PsBuild] Dunamis 15 (Xbox 360 / PS3) Jul 26, 2022
@UlyssesWu
Copy link
Owner

I tried out your recommended command, and it indeed extracted the PS3 scenario archive. I ran PsbDecompile on files from the
resultant PS3 scenario (extracted).zip, but to no avail.

Since the files extracted from psb.m + body.bin are still packed in mfl/mdf shells, they should be unpacked first. However mfl unpack is not implemented in tools yet (it can be done using FreeMote dll libs, but I forgot to add this feature in tools).

I did indeed receive an image... though I cannot say its output is congruent with how the game would make it seem.

Seems a new image type, will try to support it later. (maybe on weekends)

@UlyssesWu UlyssesWu self-assigned this Jul 31, 2022
@UlyssesWu UlyssesWu added this to the v4.0 milestone Jul 31, 2022
UlyssesWu added a commit that referenced this issue Jul 31, 2022
@UlyssesWu
Copy link
Owner

UlyssesWu commented Jul 31, 2022

though I cannot say its output is congruent with how the game would make it seem.

I think this is a correct image - the PS3 ver looks same to me.

A little progress (the latest CI build)
The PS3 scenario can be extracted with
PsbDecompile info-psb -k 4nDSd4sa2v scenario_info.psb.m -l 84 -a
while -a means to extact all files in this body.bin. You will get all extracted files in json format.

You can also use some command like EmtConvert.exe mpack -k 4nDSd4sa2v -l 84 10001.txt -x .scn.m (check 10001.txt file header with a hex editor first, if it is mfl, use this command; if it's PSB, ignore this command) to get a decompressed PSB (unpacked from FastLZ shell), then use PsbDecompile.

The PS3 loading base_xxx image can be extracted, but not correctly at the moment (still working on this filp algorithm) with:
EmtConvert.exe mpack -k 4nDSd4sa2v -l 84 loading -x .psb.m (get decompress PSB from FastLZ shell, then use PsbDecompile)
while -x .psb.m is a hint for its actual extension because the "unpack from shell" operation requires a correct file name to generate the key. Usually if you have used PsbDecompile info-psb to extract these files, they are already generated with correct file names.

In short, PsbDecompile info-psb -k 4nDSd4sa2v {name}_info.psb.m -l 84 -a is the simple way to get unpacked files in info.psb.m + body.bin.

Todo list:

  • Generate correct PS3 images (flip, rotate) - v3.3 (release soon)
  • Try support MXB shell for xbox360 - v3.4

I understand that you are more interested in xbox ver, however the problems in PS3 files are much easier to solve because they are already partially supported. I need more time to support xbox's MXB shell if there is no much references.

@UlyssesWu
Copy link
Owner

support MXB shell for xbox360

Finally, I fixed it. I couldn't have much interest on this because I have a feeling that this MXB type was only used in very few titles.
Now this will work for MXB PSB in Dunamis 15:
PsbDecompile.exe info-psb -k 4nDSd4sa2v -l 84 scenario_info.psb.m -a

UlyssesWu added a commit that referenced this issue Sep 15, 2023
only works with `-dci` (PsbDecompile) for now
@alvedit
Copy link

alvedit commented May 8, 2024

lograron algo posotivo aun tengo seseos de crear mapas para xbox 360 pero es algo complicado no hay fuentes que me asesoren

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted psb.m about xxx_info.psb.m and xxx_body.bin
Projects
None yet
Development

No branches or pull requests

3 participants