#Modding the MGS1 emulator
1 messages · Page 11 of 1
ok well
it works with my replacement structures
now to add something extra i guess
ah, there's a smart thing to do here
there's one for each game version and the PSX addresses differ as u would expect
but the native handlers are shared
so that can be used in various ways:
identify functions in different game versions using the shared handlers
and matching stuff from the decomp based on integral
which can then apply to all game versions
so i think it's best to let the emu load them all, then attack the integral one, and finally propagate it to all versions
alright
time for some bullshit
wrote some crap to map integral hooks to all game versions
so if it's already hooked by M2/whoever, and you found it in integral, any mods to it will apply to all game versions
if its a custom hook (which I'll prob look at later) it'll need locating manually for all game versions ofc
this is our candidate ig
i see it in the logs each time the game starts
ok bad example lmfao that one only exists for integral
found one that exists for all
wow it worked
integral-derived hook on top of their hooks worked on the german version
2024-01-06 23:00:02.656 ( 6.638s) [ 7E25CA70] dllmain.cpp:412 INFO| M2: printf: > LoadReq
2024-01-06 23:00:02.656 ( 6.638s) [ 7E25CA70] dllmain.cpp:412 INFO| M2: printf: > load init
2024-01-06 23:00:02.656 ( 6.638s) [ 7E25CA70] dllmain.cpp:412 INFO| M2: printf: > start
2024-01-06 23:00:02.688 ( 6.671s) [ 7E25CA70] dllmain.cpp:775 INFO| woop woop
science time
I like the woop woop message
that gives like, 1000 points to hook the emulator at certain points in the game's execution for absolutely free
can read CPU registers and shit with this
for the emulated PSX
and all sorts of chaos can ensue
it encapsulates their hooks, so can optionally run their stuff or not
cool i can read memory via the emulator directly now
should have reg access working in a sec
0x0, 0x800b0084, 0x0, 0x0, 0x0, 0x800b3234, 0x800b31b4, 0x800b2d34, 0x800b2f1c, 0x4, 0xfff0, 0xc000000, 0x800b28b0, 0x0, 0x1, 0x0, 0x800ae168, 0x800ae148, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8ade0, 0x0, 0x800ac824, 0x800ad870, 0x800ad920, 0x8001692c
looks good to me
lol
reimplemented one of the hooks entirely
very weird
its in the game's main()
and it doesn't boot without that hook functioning
game ends up in an infinite loop
oh, i guess the infinite loop makes sense
if PC doesn't get changed, it'll just run the hook again
as it's still in the list
the PSX function they've hooked is just this though
i guess they just had it for testing
coz this just looks like if (!initialised) initialised = true
not sure why u would need to hook this
the simple stuff is very good at revealing what certain things are tho
i'm sure there's gotta be some johnny hackery in here
they're pulling all sorts of shit
what happens if i turn them all off ;o
the psx crashes ;o
r3000: illegal instruction 0xffffffff (pc=0x8009a7c8)
r0-7: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000
r8-15: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000
r16-23: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000
r24-31: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000
pc: 8009a7c8, 00000000, hi: 00000000, lo: 00000000, sr: 0x00400000
needs the "__SN_ENTRY_POINT" hook
which is unique per game version
and not very coincidentally, hooks pc 0x8009a7c8
and does a buncha shit
sets up a bunch of registers
aha.
lets see if i can find a way of only keeping that specific hook
ah yeah of course this isnt going to get anywhere coz they deleted a bunch of the original code
what if I put it back in tho ;o
unsafe code? emulators use it
Is m2epi the opcode interpreter of the cpu or some communication API towards emuTask?
i think it means "emulator programming interface"
LOL
so i restored all the missing code
and removed all the hooks
and it actually gets quite far
InitHeap:
init_memory: 0xe000 0x1000
alloc_memory: 0x20
install_syscall_handler: 0
SysEnqIntRP: 0 0x6da8
install_int_handler: 3
SysEnqIntRP: 3 0x6d98
alloc_memory: 0x1c0
alloc_memory: 0x8
alloc_memory: 0x900
install_rcnt_handler: 1
ResetEntryInt:
mainbus_read_w: bad addr 0x1fffffff
mainbus_write_l: bad addr 0x1ffefff8
r0-7: 00000000,800a0000,fffefff8,00000000,00000010,0000000c,801fff00,00000800
r8-15: 00000001,00000018,000000b0,00000000,00000000,00000000,00000000,00000000
r16-23: 00000908,0000e1ec,0000000c,0000000c,00000010,00000008,801fff00,00000000
r24-31: 00000000,00000000,00000000,00000000,800ab2e4,801fff68,801ffff8,800999a8
pc: 80099ad4, 80099ad0, hi: 00000000, lo: 00000000, sr: 0x00400000
switched to integral now so i can just find the code it chokes on in the decomp
Que guapo
its trying to start up the task scheduler
dies somewhere in psy-q SetConf
oh
it loads some address from the BIOS area
but there's no proper BIOS
LOL
ok
but can I get it to boot a pcsx-redux savestate
i tried this ages ago but i didn't have the accelerator hooks disabled
I recommend using Bizhawk, it shows you the current and lost frames, also to move between frames by pressing F
What I'm not sure about is if savestates are compatible, it will have a different struct
hahahahahahahahahh
so
now with a pcsx-redux ram dump
and the BIOS RAM region updated so it has the PS-X EXE header at the correct M2 offset
mainbus_read_w: bad addr 0x1fc0761c
mainbus_read_w: bad addr 0x1fc07620
now those are extremely interesting
because 0x1fc00000 is the actual BIOS ROM
which is indeed missing
so to really have a chance of running other games, would need to get M2 to map and load the BIOS
but that's not really my objective right now (i don't really have an objective, im exploring)
oh SRAM dump, well maybe, SRAMs are compatible and it's just about finding the right frame to dump, minus the savestate which is an invention of each emulator.
Damn bios, where is he lol. There is no way to pause and run the mgs emu frame by frame to see what happens in the first minutes in the SRAM, perhaps the executable is not copied the first time
nah RAM dumps are not compatible currently
RAM and ROM conspire a lot on PSX
so the BIOS you have influences the RAM you get
heavily
and since there isn't a BIOS here and it's just been held together with string, a RAM dump from anything accurately simulating the BIOS will not work
the first 0x10000 of RAM is leftovers from BIOS
and lots of that is used by the game
here they've just stuck anything and everything wherever they like in that space
e.g. they stuck the PS-X EXE header at 0xB070 but the real BIOS doesn't do that
and the emulator reads it from 0xB070 when booting the CPU
its why they have most of these hooks, to compensate for not having a BIOS to set things up properly
there are some that definitely do MGS specific stuff though, like the ones that are examining stage names
Well, I only saw something like CDpatch first appears pointing to the executable in conventional emulators and then loads it in the same region. There is a considerable space starting at 0x800 that inserts data that I don't understand
https://problemkaputt.de/psx-spx.htm#biosmemorymap might help you
https://problemkaputt.de/psx-spx.htm#cdromfileplaystationexeandsystemcnf also a useful section for booting
if johnny was indeed changed via this kind of hook, i would expect to see that hook in the european and US releases but not integral
that's a clue i guess
there are i repeat, about 1000 hooks tho LOL
It is a very deep documentation and I have only spent a year in programming, I will save it on my server for future reference.
Mr krabs fixin to go down with a god damn heart attack
ur pretty knowledgeable for only 1 year, gj
i have like 12 years :S
where did the time go lol
Well summarized... Imagine writing to make video games and waiting years for someone to want to program your game. Since it never happened, I made the decision 1 year ago and the decomposition caught my attention, and since I come from modifying Switch games, when I tried to program something to extract textures from N64 NSO and RDP, I realized that I had to understand. emulation hardware and in my opinion it is overwhelming, like having to surf the Internet. In short, the Internet is like a Library and you are all like little people who have published bestsellers
For now I am a bank of doubts, I still have to face trials and errors. I hope I can also learn to not be so talkative xd
N64 NSO? you have experience with that?
totally unrelated to MGS but i've been trying for a while to figure out how to get the game ROMs ripped from it in a playable format on PC emulators, i'm gonna take my chances and ask if you might know of a way to do that 
Yes, about idle, rpt textures, .lua mod, graphic settings
zlib compressed
yea, i knew that bit
i don't really know of a way to uncompress em unfortunately ;-;
er
decompress
same thing
damn, unexpected but a welcome help
people talking is better than silence
we need more people with some technical knowledge in here lol
so that "SetPC" function is not really SetPC
it's more like "Step"
but now im wondering what their stack utilisation is like
since it looks very recursive
an invocation of "Step" can call my hook, and from there I can run "Step" myself to advance execution
that's already 2 stack frames
Cool, I remember that you can pause by pressing R3, and accelerate by pressing L2+ RIGHT STICK (-X or +X). Also Screen Capture and Replay functions, like a TAS.
oh god
they basically implemented C++ in C
in a project that already uses C++
the emu core is C but pretending to be C++
but all the squirrel bindings are C++
i was trying to interact with it using actual C++ constructs in m2fix but
that is not quite going to work
i also have to write it like C
it does some kind of JIT
creates a massive buffer that I assume covers RAM and sticks a function pointer there for an initial decode
i assume accelerator functions get added to it
i have this so far
very nice, got the permission from the leader of the fan CN translation team, I can pack and publish the ppf mod later, with their team credit and of course yours with detail instructions
did you get the zip with the other CD ppfs?
yeah you sent them here before
nice
tho I figure that Chinese people probably can't access github link (maybe?), so have to put another upload space
on steam page no, but with retails key? maybe
HK/Taiwan has no such a problem, we can buy them on Steam
yeah they have one chinese version of steam, but they still can use the normal one like us
ah
it's really lucky the normal one didn't get banned by CN government lol
no fun allowed
ah, GlobalCDROM = false also cause the key config in game go directly to the original menu rather than the emulator menu
yep
it will disable most MC things
its a heavy handed solution
thats why we gotta figure the patches out lol
https://www.models-resource.com/playstation/metalgearsolid/model/64647/ perfect image if ketchup mod loader have a logo
PlayStation - Metal Gear Solid - Ketchup Bottle - The #1 source for video game models on the internet!
damn
nice
they have this custom memory manager called "memento"
im still trying to figure out what the point of it is
maybe it does different things on different platforms
lol well i know how the GTE commands work now i guess
all of the accelerator tables are like this
first few are 0x80000000 but then switch to RAM relative
for the remaining ~1000 entries
wonder if they were done by different ppl
they overallocate RAM as 0x210000
so 0x10000 bytes for their "EXMEM" thing
of which they use about 0x1000 of
What the shit
yeah they even rewrite function pointers in the fake "class" so its like virtual methods
all within translation units that have debug strings indicating they're .c files
the only reason to do that check is if that funcptr might not be pointing to the very same function
uh how to access VRAM?
well that was quite nice
i have all the cpu instructions in the emu named now
(and gte)
looks like im sticking with v1.2.2 for this stuff lol
its not gonna change much in updates anyway
thank heavens its not actually C++
its quite relaxing where actual C++ gives u an aneurysm
umm are you intercepting the for cycle of the emulator modules?
Nice
i didn't really try to, it just so happens to be a parameter to the functions that implement instruction semantics
because each instruction must specify the number of cycles it's supposed to have taken
a nop is single cycle so it adds 1 to the cycle count
at the moment I'm purely researching and reversing/labelling stuff to make... hopefully lots of shit easier
it's a lot less intimidating when the structures are understood
and i'm finding out that their stuff is generally quite straightforward
once you put the time in to work it out
i should have a decent footing now into the rest of the system
this is a bit of an oddity
so the internal modules are all the old favourites, they're what actually power the game in its current state
cpu_r3000 etc
external modules load instead from separate DLL files
and we don't have any of them
wonder what happens if u drop a DLL with those names in the game folder
ah, needs to be under a subdirectory
name must be of the format: modules/$name/$name.dll
the game complains that it can't load them in the m2fix logs at startup
i assume these are the "full fat" versions
probably with more compatibility
has to also define the symbol "ng_mod_anchor" for it to load "successfully"
seems like a nice way to get code execution, thanks M2

hehe when you go through the gpu, check if there is any unused external texture loading function,
that might be ur way of patching into the switch exe

i'd probably have tried that without also wanting a way into the squirrel stuff
doing that kind of DLL now would be totally academic for me
yeah, i'll go through the gpu fairly soon
just letting myself find it naturally from the cpu side
i know next to nothing about GPUs so
hoping their code is simple enough for me to finally understand a GPU
my day job is CPUs so it'd be a bit embarrassing if i couldn't get this far
this is also a great way to learn about the PSX lol
ah
they bulldozed some BIOS libraries out of the RAM images too
figuring out what they originally were will be slightly harder as don't have the originals for the BIOS they used
There's something called "ThorHammer script" that ports "asm" methods to atmosphere cheatcode on Switch. I would have to ask how it works.
Example:
neat
they hooked the exception handler
of course they did

they probably removed a bunch of stuff out of the RAM image to prove their hooks were actually running and doing the job
easier to say it works and how it works is understood if the original code isnt even there
its a very weird setup
half port half emulation
Well, if I'm not wrong it should be GTE that takes care of the textures and possibly loads custom textures.
you know, it was made by Japanese, only they could port an emulator on so many platforms
had a radical idea
as i cannot sleep
if you were to try and get other games to run
prob the best way to do it is instantiate your own copy of emu_psxbase
via m2fix or summit
and bypass all of their squirrel frontend crap to start with
as it will only make life difficult
that way you could control the BIOS and everything precisely
not gonna do it for a long time tho lol
the time will come to do them
yeah gonna stick at what i'm doing for now
what i'm doing will always be useful for lots of things
can't mod the emu if we don't know how it works lol
I wouldn't do it for a while, honestly. Once you can inject your own ISO into it, and KONAMI or M2 find out, they might try stirring some shit.
Even if they don't have the legal ground to.
i don't even think it's that practical
who wants a bunch of extra games under metal gear solid on steam
???
it would only be academic
well at this point if you want to boot and play a ps1 game, why bother using the MC one, use other instead
If the lawyers of corporations thought that straightforwardly, then the world would be a better place.
i mean what i'm saying is
we could just do it to learn but not make super simple tools for it lol
im more interested in getting the original german version working in MC i think
is there any better tool than mkpsxiso for actually reproducing the original iso
mkpsxiso rebuilds with slight differences
anyone got any old versions of the .exe?
im out here diffing MGS3 exes and while im at it i should check out the M2 changes
oh maybe i figured out grabbing it from steam
yh. steam dumps it in some complete random ass place tho
definitely much less changed in MGS1 v1.4 than MGS3 v1.4 exes lol
I have an exe, I don't know what version but it is from the first weeks it was released.
does Integral also have a dev menu? I might just want to use it to load some levels and testing. If not, save file also be fine, like the place before disc swap
https://www.nexusmods.com/metalgearsolidmc/mods/2 is it included in this? Or it's just for original mgs1
you can enable it in the m2fix .ini
i think those mods require save file editing
but the m2fix option doesnt
just modded my bluray drive firmware 
it can read 4Ks now 
on top of already being able to read PS3 discs 
oh shoot nice, thanks a lot, how did I miss that lol
lol np
i always have it on coz it's really convenient
easy to get out of it if you don't want it
otherwise it's right there immediately
helps a lot with testing
🤔
https://steamcommunity.com/sharedfiles/filedetails/?id=3136010615 woohoo! Thanks nuggs so much, I can finally publish this Chinese translation mod! First posted it on steam guide, later I need to learn how to post it on Nexus
oops gotta fix it lol
bit busy atm... it has become patently obvious that i'm not good when there's more than a handful of things i have to do simultaneously, none of them get done
hopefully can get back to this shortly
all good, take your time!
Hey Nuggs, sorry for my disappearing act but I’ve been working on something
I figured out how to get retroarch shaders working on the master collection but there is one major problem
The game won’t accept inputs because it only accepts inputs if it’s the active window!
Is there anyway you could add a setting to where it’s always active even if it’s not in focus?
Uh….guys?
I figured out a way to fanagle this thing to work….but I just had the strangest thing
I did black frame insertion…..and it fixed the input lag
Literally everything I have read about black frame insertion states it should make the input lag worse
I have no logical explanation
This is going to look and play WAY better once I’m done with this
I might go ahead and put out a “preview”
It’s still rough cuz I need to do a bunch of color adjustment and things
But the level of detail and blending is far better than anything I could get out of reshade
Full disclosure though, its not perfect because you can’t just use any shader on this, but I’m getting there
I’m still stunned that the input lag is gone
ah finally i've got a bit of time
i wish i understood what was going on here lmfao
there's a penny drop moment for sure... whenever it happens
the kernel_call table makes no sense and doesn't match up with PSXSPX in any obvious way
and then I have no idea what they're trying to accomplish with the 0xF000+ addresses
what, now im even more confused
this area is both the heap and some sort of dispatch table at the same time
prob should look outside the kernel module and not get bogged down here, might make sense l8r
oh shit i always wondered what this func did
just need to get some of this stuff to marry up with external psx docs
oh gawd it's starting to make some sense and i don't like it
this has been native accelerated
i'm getting somewhere in how the hell to identify these
there's like 3 layers of indirection so
hang on I can just log these
holy crap
what the-
do these match up
A(0xa7) B(0x58) B(0x4f)
A(A7h) bu_callback_okay()
B(58h) get_bu_callback_port()
B(4Fh) read_card_sector(port,sector,dst)
yes!
this is what i mean by 3 levels of indirection lol
so they hook some part of the game code
which is version-dependent
those hooks sometimes go to library/kernel code
and to do that they ping-pong the PSX CPU through various RAM vectors
with some sort of function ID passed around
but the trick with the M2 stuff is rather than this happening with MIPS code it's actually x86
to name them i kind of have to follow the flow all the way from integral through all this indirection
but having it dumped to the log should help a lot
I would ask why they did that, but at this point I’ve realized nothing about this emulator makes sense
rather than JIT (which usually is forbidden on consoles anyway) it makes heavy use of AOT (ahead-of-time vs just-in-time)
if something is simple enough or there's a real performance incentive, they've reimplemented it in C as part of this AOT framework (so it's native x86 code)
https://steamcommunity.com/app/2131630/discussions/0/6208841617674327658/ someone just talked about input lag in steam forum not long ago, may feel happy to hear that you fix it somehow
I still don’t believe it myself. At first I thought it was a placebo affect cuz the game appears to run faster, but then I measured it and there is an actual significant difference
About half a frames worth for that matter
lol
definitely instruction access and data access are not coherent with each other
they write data on top of where the "code" should be
but it's fine because the code isn't fetched from memory, it goes thru this AOT thing
So did you discover how to initialize the cd and copy the overlay in some region of sram, and also how to copy both geometries and textures in the cop2?
https://www.bilibili.com/video/BV1M3411273E/ unrelated to mgs1, but it's also surprised to see msx mg1 also has a fan cn translation, if only can apply ips patch to the mc version like the ppf method, but I don't know if the original msx rom is identical or not as the mc one, or it's a slightly different kind of port
What is the Chinese' obsession with a game series about governments that abuse their soldiers and employ mass surveillance over their civillians?
Japanese
Now it looks right, only problem is its so precise I can’t use screenshots to take the pictures
But man I love retroarch filters
And now they finally work on the MC
Nope
Windowcast core on retroarch itself
It kills 3 birds with one stone
1: it makes the game look fantastic in a way reshaders couldn’t
2: it smooths out the motion with black frame insertion
3: it eliminates the input lag
Those pictures don’t even do it justice
When you see it in motion, it’s amazing
I’ll probably go ahead and update the mod page and do a release later tonight
But I really wish there was a way to simplify the process
Right now it’s a little tricky because you have to use windows power toys to force retroarch to stay on top window
Then you have to alt tab over to the master collection
Either way I want to get it out there though because even with it being a little complicated it does make the game far more enjoyable
Metal Gear Solid
what the hell
i'm looking at the object that implements the PSX memory bus
and it seems like there was meant to be 6 methods, read byte, read word read long and the equivalents for write
but it's screwed up
some of the types are mixed up
i don't think writes and reads are mixed up
i assume the PSX is similarly screwed up then
can basically talk to any device in the PSX system now
I'm pretty sure the Subsistence version of Metal Gear 1/2 is an actual port, not emulation like MGS1MC
#modding-general message huh I thought someone mentioned before that mg1 and 2 are dll, roms
Oh, wow, I'd always heard differently
I wonder if they're actually MSX ROMs or something else though. MG1 has weird frame pacing that was apparently also present in the mobile port that the Shinkawa portraits debuted in
they aren't
tho MG2 got the updated sprites, so might be different with the original release
Yeah, I assumed as much
aw but yeah, after looking the folders, they aren't. well, I guess at least the nes mg1 & Snake's revenge are indeed nes roms?
they are yeah
that's a simpler M2 product
doesn't have all the tech that the MGS1 build has
does nes have similar patch system like ips or ppf?
doubt it has a dedicated one but you could just use ips or xdelta i guess
https://www.bilibili.com/video/BV15r4y187Cx/ in that case I found it funny that even nes mg1 got a fan cn translation lol
when they instantiate the CPU module they pass in references to other modules the CPU needs/should have access to
but one of those includes the memory bus
and the memory bus has access to everything
so if you want to access stuff the CPU doesn't normally talk to you can just go via the bus
epic
https://en.wikipedia.org/wiki/M2_(game_developer)
Legend Of Mana Remaster was it from Playstation? Could someone verify if the PS1 emulator is also used or if it is a port.
m2fix could probably be ported to their other PSX stuff on PC lol
there's that mega man collection too
yeah, it's might really useful for other psx games port on steam
if I end up figuring out most of the core (chances are looking good currently) there may be a big incentive to do that
this project has turned out far more fun and to have way more longevity than i expected lol
from improving your favorite game series to the bigger picture
there's sooooo much of this stuff
but it's quite easy to figure out
can kinda see what i meant by the bus there though
R3000 only has INTC but you can get everything else via bus
which might be useful from these accelerator hooks
looking at the gpu now
looks great xd none of that degenerate guidra speucode xd
ahhhhhh now the bus code is making much more sense
I tend to use IDA mostly
but yeah I'm trying to define all the structures in M2Fix source
so 1. it's public knowledge and 2. can use it for some cool shit
weird
the emu kinda supports a bus that can do 64bit access but
i assume coz the psx is 32bit, it ends up passing some uninitialised stack variables to the function
red means bad
Wait was it ported the same way for mega man x collection?
i dunno i don't own it
if anyone owns it you can figure that out by just looking at the install files
wait, won't steamdb tell us this
hmm, this looks different at first glance
amazing
I would've bought it personally, but CAPCOM have been putting DRM in all their old releases for no fucking reason.
I've been curious about the X series for a while.
Some suspect spyware.
That's probable. I've seen screens of their conversations with people taking issue with the program.
Not very professional. Just makes iit more confusing.
there's no point adding DRM retroactively lmfao
steam can download old versions if you ask it politely
downloaded v1.3 MGS1 the other day
Hey, link me to something that'll tell me how, I'll download this shit.
steam://open/console
download_depot <appid> <depotid> <manifestid>
the latter two you grab off steamdb
Roger.
depotid is usually similar to the appid (incremented by some single digit)
manifestid is a very big number
Can't find the manifest on the steamdb page.
Mega Man X Legacy Collection includes the legendary 16-bit titles and the series’ exciting foray into the 32-bit era: Mega Man X, Mega Man X2, Mega Man X3, and Mega Man X4. Test your skills in the new X Challenge mode, which pits players against two deadly bosses at once.
Mega Man X Legacy Collection Steam charts, data, update history.
so click the depot you want (probably 743891)
then manifests on the left hand side
and it should show various versions
Got it
app has multiple depots (which are containers of files/folders) and each depot has multiple manifests (versions)
steam won't really give you much feedback about the download progress
you'll get a message when it starts and one when it ends
the download tab might show network/disk activity but not the name of the game it's downloading
it'll download to steamapps/content/app_* on the main disk
Right, I was starting to get worried about that.
i'm glad steam has this option even if it's hidden
probably a good thing that it's hidden
Why? No misuse by normies?
I've used this process before to download a debug version of NieR Automata before I think.
it'd cause absolute chaos if the masses were just rolling their steam copies back to arbitrary versions
we have enough trouble supporting our customers and our software is explicitly versioned in your face all the time
True enough.
Files are in. What are you looking for?
Doesn't look very much like it's emulating any ROMs.
Nah. Mostly .arc which I think is probably some wrapper for other kinds of files.
And there's a folder that says "romPC" which implies it's a port.
All the movie files are wmv
🤔
romPC?
where did they use m2engage psx before then
It's on heavy sale right now and I intended to buy this before I emulated it all anyway.
lol
But also, fuck you ya bastard
this does not use M2 frontend. I only noticed emuPc and Xemu
Oh man this... this is rough
This is not a good collection.
Honestly, people give KONAMI too much shit for the MGS1 collection, this is just woof.
Not even got proper controller support.
What's wrong with it?
I mean mega man x 1 through 3 have input lag but 4 through 8 were well ported from what I remember
My controller doesn't properly work, to begin with, and pcgamingwiki recommennds changing an ini file to fix it.
And maybe it's just me but I'm finding bugs that weren't in the original. I can charge my gun during cutscenes for example.
Very strange.
And then there's the lack of language options, when X4's dub is kinda notorious.
MGS it's a bit more forgivable because the different language versions have audio timings changed, so the subs don't work, and it'd require a bit of work with old code if they still had it.
I don't have an explanation for this surreal art piece
It lets you switch to Japanese at least
But ye
Hey nuggs if you wanna dig into it I can always gift you a copy of megaman. When i get paid i mean
lol if you want
unless it turns out magically to also be m2engage-based i probably won't spend much time on it though
can't really split my time too much
anything m2engage-based i can probably spend some time getting things working
that would generally be worth it because ideally things will share stuff in common making improvements apply to everything
from the steamdb listing it doesn't look like its m2engage
im gonna be most immediately productive on m2engage stuff because of everything i already know by this point
would be good to know a complete list of m2engage titles
it's sounding like there might be very few on PC
really wonder what's in vol2 lol and whether it includes PSP stuff
has M2 rereleased anything that was on PSP?
ah
haha
finally made it to the gpu code i was patching ages ago
in a naive attempt to boost resolution
this time i should at least have the prerequisite knowledge to understand it
I don't think so. I thought they might've worked on the PS4 release of Rondo of Blood + Symphony of the Night (which is the PSP "Dracula X Chronicles" version), but it doesn't look like they're credited. It probably just uses Sony's emulator
They probably don't have a PSP emulator which is why that remaster was only on PS4
But that was years ago, could be different now
There is very little chance that Metal Gear Solid: Peace Walker will be emulated, since it came out on different consoles apart from PSP
I would look at the Japanese catalog of M2 co., there are games that did not come out in the West and use emulation
There are emulators for Arcade, Gameboy, MegaDrive, Genesis, Nes, SNES, there is also one for GameBoyAdvance for a Japanese game. There are some 32-bit or 3D emulators in Ray'z Arcade Chronology, I thought it would have a PS1 emulator because graphically it is very similar, but they are PSX-based arcade hardware... it seems that most of them use frontend .nut and EmuTask like MGSMC.
M2 practically emulating all consoles and their variants lol
Yeah, I think there's no way Peace Walker would be emulated. But if they include Acid as bonus games those could be
Id say chances of emulation is non-existent since it was on the HD Collection, and Konami's shown they'll just swipe them
does this mean nothing will be emulated in vol2 lol
i worked out how the pal/ntsc selector works in M2
end-to-end I have it fully mapped out
I still think some games might be emulated but that depends on what game they're decking. Far as mainline goes PO might just be it
I’m sure we’ll know when we see some trailers and game pages
Hopefully Konami doesn’t make the same mistakes as they did with Vol 1 and avoid having to deal with months of fixes though
That's mostly with mgs1 with how they handled that game. 2 and 3 were bluepoints' mess save for the launcher nonsense
Only things I could imagine would get emulating is if they include PO, Ghost Babel, or Acid
Any other stuff Id figure would be native
I agree, and that’s only if
I want to say Vol2 would close out the series with the rest but who knows, hopefully they go all out
😦
wtf
just froze there lol
how do u open the bloody stance menu on keyboard
well, that's something
got the PAL version to output NTSC lines
hence being cut off
it's a value i saw months ago
controls the PAL/NTSC resolution
now I actually understand how it gets set and where it belongs, though
before I was just replacing both with bigger numbers lel
I can do it from the main() hook like:
cpu->Bus->Machine->DevGPU->VideoMode = 0;
i guess I should also try integral in PAL resolution
there should be much greater chance of anything in this area succeeding if we actually understand the structures and the code that makes the thing work
before i was basically blind patching crap
i've worked my way in from the M2 accelerators -> cpu -> bus -> psx -> gpu as you would studying the system's actual design hierarchy, now just need to chip away at the gpu bit by bit
the only "trick" so far was realising the accelerators provide the perfect interface for m2fix to toy with the emu internals
what does it do chaps
😮
I'm a little confused - are these two separate/different mods??
modifies the shaders.
Tl;dr one's for MGS2, 3, and the other titles not 1. The other's a really customized set up meant to give the most out of MGS1, and requires M2fix
Perfect, thanks very much
2/3/MSX technically have a lot in common whereas MGS1/NES technically have a lot in common
thats the reason for two main projects
they were in the same buckets @ konami
Interesting
I suppose you mean purely from the emulator's perspective, since it sounds wild to think the MSX versions would have anything in common with MGS2 and MGS3
People seems to think the MSX version is native, not emulated
and runs on the MGS3 engine lol
that's why so many folders, tho there's no many mods going on with MSX stuff
the only ones I saw on Nexus are just about menu background
if i had infinite time i would try and boot the MSX ports without the MGS3 baggage
just something more lightweight
the game logic is in those DLLs so it's almost ready-made self-contained for that purpose
but i very rarely abandon projects and MGS1 will keep me busy for some time lol
soon the M2 emulator for MGS1 will be conquered...
From what I've been told, it's partially emulated. The audio engine is supplemented by MGS3.
I know for certain the latter bit, but not the former.
it's probably the same as MGS1 conceptually
but differs drastically in their implementation approach
MGS1 is also "partially emulated"
In what way? I mean there's scripts overwriting bits at the program level rather than the emulator level, I guess.
But not as drastic as MGS3/MSX
in the sense that there's huge amounts of code recompiled as x86 lol
Is there?
yup
How bespoke is this emulation?
it is all one system with the .exe itself
with code recompiled for each game version
a huge portion of the .exe is just recompiled psx stuff
i didn't quite realise until a couple weeks ago the extent of it
That's nuts.
https://www.romhacking.net/games/998/
https://www.romhacking.net/games/2397/
Since MGSM2Fix also support Metal Gear / Snake's Revenge, Might be possible let the ketchup mod loader support these titles too? There are already some ips patch/hack on romhacking website
Classic video game modifications, fan translations, homebrew, utilities, and learning resources.
Classic video game modifications, fan translations, homebrew, utilities, and learning resources.
https://www.romhacking.net/hacks/2614/
https://www.romhacking.net/hacks/3776/
these two patches looks really sick lol
yeah it should be possible
ill download em and look into it at some point
figuring out exactly how it loads the ROMs would be interesting to know, obviously will be different
much simpler lol
but it has the same things that ketchup needs
must have a NES ROM loader in there somewhere
MGS1 doesn't really load a ROM
kinda just cheats a bit
no tricks here
straight out nes files 
yeah it's INES format: https://www.nesdev.org/wiki/INES
The .NES file format (file name suffix .nes) is the de facto standard for distribution of NES binary programs, with use even in licensed emulators such as commercialized PocketNES and Wii Virtual Console. It is often called the iNES format, as it was created by Marat Fayzullin for an emulator called iNES. The format was later extended with NES 2...
btw
do i have the most playtime on steam for this game
MGSV playtime length
M2's worked on a lot of Wii/Wii U Virtual Console and Switch Online games, so not suprised.
it's pretty much an official format
https://fxtwitter.com/LuigiBlood/status/1045349181769093121?s=20
With Nuggs' mgsm2fix settings file, if i want borderless fullscreen, would i set both of these to true?
or just borderless?
I mean, borderless windowed is a window, after all...
Likely just borderless
i've tried both and can't see any difference in behavior
neither seem like a window either, though i think they are
alright here we go
Pretty major update, fixes the input lag issue and actually makes the game look right finally
Learned how to use windowcast but currently it's a complicated process
I tried my best with the read me but I might make a tutorial video or something
Now if THAT doesn't fix everyones input issues I don't know what to tell you
And finally no more messing with reshades half assed shaders
Let me know if you have any questions or where I might be able to improve this though, I know it's a little silly of a work around and hopefully I'll find an easier way eventually but at least it works great, but I need to know if it works for all displays or just 120 hz, or just OLEDS, different resolutions
test it guys!
set both to true or it won't work be a borderless window
post it in #mod-news too
apparently I don't have permissions to send in that channel?
Guess nuggs will have to do it lol
Nah, you just need to claim the modder role in #roles
OK cool
Is that what MG1 on gog does?
not in the way i was suggesting, the MSX games in MC are ports contained in DLLs
not sure how the GOG release works
but it doesn't have those DLLs
GOG could be doing anything tbh
the thing about it being a DLL is it can be loaded into any process as long as it can resolve its imports
IDA... hasn't done a good job of discovering all of the functions in the .exe
I've not felt like doing much thinking the last day or so so I'm mindlessly going thru and fixing it all up
ok i give up with this for now as there's so fucking much of it
LMAO
i'd script it if I knew any idapython
tbh i did get a lot done maybe i'll carry on another time
i feel like im playing runescape here
ok i just forced the whole undefined range and it seems to have not made a mess of things
first time i have ever had successful results with that function
in 10 years
cue "10 years in the joint" line in Yakuza 1 English dub
so much code in the exe its unreal tbh
"gw" = graphics wrapper?
i think that's right
i think i just created every function in the native tables
wow
that was super tedious
yuge yellow bar
Good lord. What's going on here? And why?
Siggy, try that mod out, it should fix the input lag issue you were having
What input lag issue?
wait, maybe I got you mixed up wtih someone else?
Probably. I haven't been fiddling with it recently lol
OK it should fix YOUR input lag issue lol
huh wait wha
i'm confused, is this what you're talking about
yeah it's a little complicated but it will look great and should play right now
did you change the asi file at all
nope, it's just some magic that use windowcast thorugh retroarch lets you do
wait, huh
just read it, you'll understand
shouldn't make a difference now
Just use the same fixes I posted for AMD
and you should still be able to use black frame insertion with windowcast core
am i supposed to download the inspector profile thing or
no that's nvidia, below that are the AMD instructions
AMD is dumb and won't let you use profiles for individual games
only the whole card
gonna be honest it feels the exact same
listen, i'm not in a rush to go back to MGS1, so i'm fine for now
Alright that's cool, but you got it working through windowcast and loaded the shader and it still didn't do anything?
I measured almost half a frames worth of input difference on mine
In fact I didn't realize how bad master collections input delay was until I measured it against duck station
that long band of yellow used to have lots of red / white / blue lines in it where IDA had failed to auto-recognise the code as functions
it was basically either emulator or game (known as "accelerator") code
so I painfully went thru it all to correctly set the function bounds
boring job, but having that done correctly feeds into the analysis engine and it'll help studying it in future
in some cases it hadn't even identified the instructions correctly and was just treating it as bytes
lemme see if I can find the hook that disables the ass blur
so I can deliver something on this new tech
i found one that looks kinda sus
You did it!
The ass is real
THE ASS BLUR IS BACK!
Now I can play the game!
alright, got the option in
so the blur is like hide very deep in the codes?
yeah it's not really a patch
they've used the accelerator system to hook the code that loads the mosaic actor
so needs the .exe fiddled with to bring it back
so in the m2fix world it looks like this
so basically calling the hook they have to disable it if the option is disabled, otherwise just tell the CPU to execute the original PSX code to load the mosaic
interesting, wonder what else also hide in those codes
it's one of the hooks that I can't use my integral trick for
because it's duplicated for each game version with very minor differences
hence having to spell out every single version at the bottom
if there's no differences at all, usually I can just find the .exe function in each table with the info from integral
choosing integral because it has a decomp basically
oh, I also couldn't use the integral trick coz there's no blur in integral lol
yeah, the integral version is released only in Japan, makes sense Johnny wear underpants like the original JP version lol
so
one sec
there's these two hooks that I assume are both for the mosaic, but in different stages
and there's an additional two hooks that seem to do stage-specific stuff
that look different to the mosaic one
s17a
Supply Route (vs. REX)
& s18a (same hook)
and the final one is the "rank" stage after you finish the game
wonder what they changed on the supply route
so what if it's disabled - we get to see the full, horrifying browneye?
actually before nuggs figured out how to add the blur back, the current version of MGSM2Fix mod always let us see naked ass without blur
#1168512986491670548 message
Amazing you got it fixed!
When 1.50 drops from Konami, is MGSM2Fix likely to require an update? I seem to recall it did when 1.40 dropped?
Or maybe not
depends
it didn't really need an update until they actually made use of the screen options
that was more of a functional breakage
since m2fix was assuming those options were not used and it was free to do whatever
i'd say it's unlikely since the core infrastructure of m2fix is robust but they might break a specific feature like they did with the screen options
we're 2 out of 3 so far
2 updates didn't need changes, only 1 did
it's always unlikely I'd say, but I felt it was unlikely that they'd add the screen options lol
an advantage M2 gives us over the HD collection is we can hook the squirrel VM and achieve a lot with basically just one hook
and that stuff is not likely to change and cause a break because it's 3rd party code
HD collection on the other hand is almost exclusively native first party code that could be changed for any reason
https://github.com/nuggslet/MGSM2Fix/blob/master/src/patch.cpp#L251-L265 this is really the important one
it was the first one, lol
and that's just in some code they downloaded off the internet, nothing they wrote themselves
so generally it should handle updates well
That's awesome info, thanks for the breakdown
Let me re-iterate we are all very grateful of your work ❤️
hopefully it won't be so bad when they add analog
coz setting that to false in the ini basically means the game acts unmodified with input
but that wasn't the case for the screen options, m2fix would try to both turn it on or off depending on how you had it set up
which conflicted with their new settings
with analog i'd guess we just have to reset our controller profiles and disable the m2fix feature in the ini
so no update needed
?
I'm guessing you just mean this removes interference from the mod
yeah
i'm tending towards keeping the older features that we don't really use anymore
just in case someone runs an older game version for w/e reason
but over time just remove them from the ini so they're not as visible
hmm
i nearly have the whole CPU structure reversed so I might finish that off
just made some progress and there's not much left
🤔
it is kinda funny that konami tried to patch his ass and that ended up exposing it even more
streisand effect
had they not disabled the mosaic, nobody would've tried
At least justice was done. Johnny's cheeks are free
now all we have to do is waiting for the update patiently
Really wonder why they did that anyway
Maybe for consistency with the MGS4 flashback?
Can't believe fans are adding in censorship.
remove start
delete system32
remove hardware limitations
remove kebab
some of the remaining R3000 fields make no fucking sense
one of them seems to store a pointer to an object that counts division operations performed
what the fuk
that object is the GPU VRAM??????????????
w8 no not quite
its near a pointer to the vram
ok nvm it is the vram
well, that will be interesting when I reverse the memory object
why the CPU needs to inform the VRAM about division operations is anyone's guess
I was going to say maybe it was a unified RAM setup, but only the PS2 had that I guess.
it's this really kooky way that the CPU "discovers" the VRAM object
since it's actually instantiated by the GPU (ofc)
it gets leaked to some static variable and passed into the cpu with a cpu interface command when machine_psx is created
it also happens to be the last thing in the .data section
so it's not exactly part of some bigger structure
so many layers of abstraction with these "commands"
commands can call commands which can call commands
makes my head spin
e.g. you can have things like "emu_psx" -> "machine_psx" -> "cpu_r3000"
all with their own set of command IDs
I mean it makes sense from a hierarchy perspective but god damn does it take some mental load to follow
the number 3802281.2 mean anything to anyone? 
I'm assuming some kind of RTC timekeeping
phew, CPU done
gets harder towards the end to figure out the last few things
will get a release out with the blur now
before I disappear into GPU land I guess
alrightr
v1.2 lets go
work on the emulator itself is going on here: https://github.com/nuggslet/MGSM2Fix/blob/master/src/emulator.cpp
good work
Is there a version where we can show the uncensored version
As in no blur and no underwear

that's like previous version lol
you can just change the ini to get any combination of it
can even have blurred underpants in theory
but i havent tried it
next thing as far as MGS1 is concerned is to continue with the other emulated devices
I can have an initial look at the NES emu though yeah
I'm aiming towards doing the GPU in MGS1
but I think I might have to do the RTC first
because the RTC has its fingers in everything else
RTC is hopefully not too big though
i never have to look at the CPU again though
or the bus, or the "machine PSX"
so the NES one is an interesting case
because it also has the accelerator support, but it's not used for MG
btw i didn't do this for the blur hahaha
the blur just fell out of it as a consequence
always had to dive inside the emu at some point
it seems to be the case that you make more progress without a specific goal
coz then it's about learning & research and you're more thorough
if you try specifically to do one and only one thing, you cut corners and it's not as obvious
Hey nuggs idk if this is the same m2 that we know and love. But: I found a folder named m2ftg inside Like a Dragon Gaiden. It contains d3d12.dll of Motor Raid, Fighting Viper 2, and Sonic the Fighter, as well as Roms of those games and a sound folder, plus whatever FV is.
Gaiden also has Sega Racing Classic 2 and roms of retro sega titles but I don't see either in here. If it matters, one of the retro roms is Alex Kidd and the Miracle World
Idk if it leads to anything but wanna poke around in it? The games I listed are all indeed emulated ingame
M2 has worked with sega before?
they work on emulations and ports of different sega games
they are indeed the same M2, who else is in japan going by M2 that is good with emulation that isn't the one we know
There's the mtwo that people have confused before when MGS1 was concerned at launch
But i know nothing of their work. I just thought it was interesting to share and thought it might be worth checking since Yakuza has a bunch of emulated games. Outrun, the motorcycle knockoff?, Fantasy Zone, Puyo Puyo, the Master System Hokuto no Ken, Virtua Fighter 2, the xbox arcade Virtua Fighter 5, and a buuuunch of pachinko machines I'm convinced are emulated
they're in the credits for the master collection
their LOGO is in the credits and files
pretty easy tell if you have the DLLs/EXEs is something like
cat "METAL GEAR SOLID.exe" | grep 'Squirrel'
it does look more like M2 than other stuff has
a better tell is probably
cat "METAL GEAR SOLID.exe" | grep 'm2epi_machine_register'
If I had to guess it's probably something with the easter egg where you can control the guards with the port 2 controller
Also I missed the celebration of Johnny's ass and I feel sad about that
so....one thing about the .ini, if I disable johnnys boxers, and enable the blur, what does that do to versions like integral and the original japanese release?
https://github.com/nuggslet/MGSM2Fix/releases/tag/v1.2 "(except the Japanese releases which always had underpants and are unchanged)"
alright but I'm gonna test it before public release
don't want to risk some people being overexposed to pure johnny nakedness lol
even though most of us have already had to deal with that from MGS4....
btw the descriptions in the ini file is somehow vague, it might confused users for a second, like does "true" means swap back to underpants or naked ass etc
yeah I can see that, it's meant to follow a scheme of "true means MC default"
that only became confusing because they turned the mosaic off
i might invert that one next update
objective with the m2fix patch defaults is to restore the original experience except where they added something complimentary like achievements
im not too happy with where "DevMenu" sits in the ini either (or its name)
so might move some stuff
but yeah i'd expect the japanese releases can only switch between the underpants colours
there is no mosaic implemented so the option will do nothing
like there's actually no equivalent I can add for JP so
not big deal, after all, to japanese players, underpants is the original version
I think it'd be less confusing to swap the true/false and go with something like
Ass = true
Restore Johnny's blue, for use with the PS1 nude Johnny (or not)
Mosaic = true
Restore original ghost exorcism photos```
Basically "restore" for all of them. Makes it more clear for new players which option is how the game originally released too
Or "revert"
I think it’s good descriptions
Idk what I'm looking at really. I can send you screenies of what these files look like. I don't think there's going to be a .exe, I think it's built into the game itself
send the dlls if you're comfortable with that
i can't steal the game with em
might as well just be absolutely sure
(the ones under that m2 dir)
surely its about as legit as uploading something to virustotal except I have signatures for m2engage
and not viruses

m2engage-detector.exe
this bloody emu has to be used somewhere else
they put way too much time into this framework
Can do but it'll wait till i get home. I'll put them in dms
Sega, Square, Nintendo, Capcom, they do tons of stuff.
https://en.m.wikipedia.org/wiki/M2_(game_developer)
M2 Co., Ltd. (Japanese: 有限会社M2(エムツー)) is a Japanese video game developer and publisher, best known for handling emulation of re-released games, such as some Sega Ages titles, Virtual Console titles for Nintendo systems, the 3D Classics series for the Nintendo 3DS and their ShotTriggers range of classic STG games.
M2 has also created entirely ne...
oh that wasn't me wondering
@pure radish sent it all through dms. I wanna assume those games aren't playable but i wanna play it safe
We should get a betting pool going every Tuesday, to see if they release the 1.50 patch the following day 😆
I'll chuck a cautious five bucks in for tomorrow
That's optimistic
haha
yeah
sure is
I reckon mid feb but hopefully earlier would be nice
fuck i haven't played MGS in about 22 years
can't wait
shoutouts to nuggs for the MGSM2Fix somehow magically fixing the audio clicking
my theory is that removing the frontend and booting right into the game, and/or borderless window, had something to do with it
LMAO
those ROM containers in the files you sent me
use a file format called "PARC"
I was looking at the code that loads them and well, because little endian you get it reversed i.e. "CRAP"
"TaskM2E"... sus.
it looks quite different, perhaps a more recent project targeting newer consoles
I'm trying to definitively prove their authorship
the facts though are that modding this would be a new endeavour as there are basically no similarities
they're using the same sort of recompilation techniques but on steroids
wonder what "FTG" means
Context?
hmm
i had a thought while sat on the throne... maybe these are just the accelerators for each game
m2engage in MGS has the ability to load modules from separate DLLs but it's unused
and I can see that it exports symbols "module_start" "module_stop"
it'd be worth seeing what loads it, i.e. other DLLs or the EXE
looks like there are even more emus than those 3 in this game
is there an actual game here? or is it just a bunch of emulated games
I can see "runtime/media/emu/sms/smsce_w64.dll" exists, as well as "runtime/media/pre3/pre3-pxd-w64-d3d12_retail.dll"
but those are probably unrelated and provided by someone else
It's all emulated. There are indeed more emus inside. Except for Sega Racing Classic 2, all the games you see in there are all arcade minigames
Sega Racing Classic 2 is also an emulation but idk where that one is