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

Any information processing .slot lines from cnf files? #6

Open
spencerelliott opened this issue Nov 6, 2023 · 6 comments
Open

Any information processing .slot lines from cnf files? #6

spencerelliott opened this issue Nov 6, 2023 · 6 comments

Comments

@spencerelliott
Copy link

I was wondering if it is possible to add support for processing the .slot entries contained in the cnf files or if there is any information about the offsets?

I have been trying to figure out how the page and offset from the .slot line correspond to the folder structure extracted by this tool. Any information or support would be greatly appreciated.

If you have any general information, I'd be more than happy to add the code and open a merge request. If not, I'll continue digging.

@Jayveer
Copy link
Owner

Jayveer commented Nov 7, 2023

With the following example;

.slot slot_s01a00l 2 12434000

slot_s01a00l would be the name of the slot file
2 would be the page number
12434000 would be the amount of memory the game needs to reserve for the slot file.

@spencerelliott
Copy link
Author

Ah, okay, I understand. Thanks! Is there a known way to convert the name of the slot file into the hashed version that Chrysalis will extract?

@Jayveer
Copy link
Owner

Jayveer commented Nov 7, 2023

should be strcode32 here;

https://github.com/Jayveer/Chrysalis/blob/master/mgs/common/strcode.h

@spencerelliott
Copy link
Author

So, I tried the following:

  • Read .slot dynamic_map_w05s03a 1 571392 from data.cnf
  • Use strcode() to convert dynamic_map_w05s03a to d54f4a
  • Open the slot/1/ folder that was extracted using Chrysalis

I don't see any files with a hash of d54f4a. Did I misinterpret your example?

@spencerelliott
Copy link
Author

If I refer to the data.cnf README here, it seems like the following .slot line reads:

.slot dynamic_map_w05s03a 1 571392

This would instruct the program to load the first group of files (found at offset 571392) from "dynamic_map_w05s03a.slot" into the resident area.

I'm not really sure how you would convert "dynamic_map_w05s03a.slot" into a slot number, though.

@Jayveer
Copy link
Owner

Jayveer commented Nov 7, 2023

It's almost like that, but you load the slot file and then the page from that, but I don't know if you would be able to apply this to this tool and the way it works here. It's been a long time since I made this so I can't remember but I think once decrypting the slot file you see the hashses, however I dont keep any of that information in what I extract so you won't see it.

Looking at a game like mgs4 and its cnf files would be a lot easier to follow along as it has slots in a folder with unhashed names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants