Closed tsuza closed 12 months ago
It's my first time looking at Squirrel too - the first clue was a string indicating the Squirrel version and after staring at the source, it seemed tractable to build it into a DLL and interact with the game's VM by detouring the constructor to locate the instance. Everything else has basically followed from there.
alldata.bin
can be unpacked and deserialised with MArchiveBatchTool (including .nut.m
to .nut
), and some initial mods existed that unpacked and repacked it to disable the smoothing. I'm not a fan of invasively modifying huge blobs like that though (I worry about future game updates), so tried to reproduce the effect with a DLL.
The scripts in alldata.bin
are useful to a point but they mostly drive the frontend - I'm now starting to look at the underlying native objects that are bound to Squirrel to see what else can be achieved (which is the usual disassembler/debugger work).
I'm hanging out in the MGN Discord server (MGS1 emulator modding forum thread) if that's your thing, otherwise happy to answer questions here (and accept contributions!)
I see. Yeah, I did see those projects that made you unpack / repack the files. To be honest I thought it was the only way after debugging the main executable ( without extensive work, that is, especially with my current knowledge ), since there was nothing that you could mess with. Well, until I saw this. Thankfully they went with squirrel and not something in-house, which would have required lots of tedious RE.
Anyway, thank you a lot for taking your time to answer my questions! I really appreciate it. I'll be joining the server, thanks for the link.
Hello. This is not a bug report or a feature request issue. I opened this issue to get some insights on the hooking process used for MGS1 MC.
Out of curiosity I wanted to inject and detour some stuff. After attaching a debugger, I wasted quite a lot of time trying to figure out why no breakpoints were working and trying to find anything useful. Only then I realized that the game was being run in a Squirrel VM. I have experience with normal binaries, but not with Squirrel VM. I tried looking up examples online, but I couldn't find anything.
My question is: how and what are you doing? How did you figure out the
setSmoothing
andsetScanline
arguments? As in, where did you find them? From the unpackedalldata.bin
? But if that's the case, how did you open the files (.nut.m
,.psb.m
)?I'm sorry for opening this kind of unrelated issue, but you're the only one ( that I've found publicly ) that has done this. Thank you for your time and answer in advance.