#Modding the MGS1 emulator
1 messages · Page 12 of 1
I think that exact string appears in MGS
yeah, some chain of imports causes these DLLs to get loaded, it's most likely the EXE
those DLLs I named are just academic since they're also emulator-related
but probably not directly related to the m2ftg stuff
at this point I should probably just buy the game
Wouldn't know where to find the dll you need but I can send you the .exe in a bit
alright, cool
I'm just looking at this: https://steamdb.info/depot/2375551/
can search files there
just searching "dll" reveals 2 others that seem emulator related
but it's the EXE that will start the ball rolling
One's probably for the racing game i mentioned, and the other sega master whatever
Probably trying to make modern hardware run the game ig
There's a folder called emu with a bunch of roms. Idk if the .dlls in there tho
Have one other idea where it might be
@pure radish dming now
cool
Yakuza uses parc file format for it's many animations, maybe some more stuff. Here's a sample mod from another game utilizing it
https://www.nexusmods.com/yakuza0/mods/198
It's not a simple drag and replace, you have to actually modify the parcs in question
I only wish i knew which file it modifies
Afaik they use this format since ps2 days
Shit no wonder why it's running so much more roughly than 6
Anything from the stuff you got?
I looked at that extra SMS DLL, and that is definitely not M2, but the original 3 are highly suspicious and quite possibly M2
Denuvo has kind of killed it dead though, and I can't really progress until that is stripped
they'll prob remove it at some stage
Denuvo is hilarious to look at
it'd probably take me at least a year to get into that thing
do ppl use hardware hax to defeat Denuvo, seems like an approach u could take
tbh based konami for not using denuvo
steamstub we can cope with
Idk how removing denuvo works
If i did I'd do it myself
Lemme take a look at yakuza 0
And deck is acting up again rip going have to wait
How long has m2 been around
their emu efforts go back to the wii era I think
m2engage is written for potato platforms
the core is all C, custom memory management, the accelerator system etc, all screams low horsepower
not sure at what point Squirrel was added
but that is just the frontend
as soon as you hit the emu core it's all C
Ok so all yakuza titles except maybe 3 might have m2
any without Denuvo 

Even earlier, they did emulation stuff for Sega on the PS2 - all the Sega Ages 2500 Series games
If so even the ps2 games might have it ig
PS2 game with Denuvo
/s
lmao
Yakuza Kiwami 2 is one of the first yakuza games to be ported to PC. dunno if it has denuvo. But it has the same m2ftg folder. The content is roms packed in .par for Virtua Fighter 2 and "omg," and a sound folder
fling EXEs my way if you want me to check
^
checking for denuvo doesn't take long with the right tools
Gimme a moment i have to reinstall the silly mod
damn can't believe all of sudden this become Yakuza modding thread lol
It's less yakuza modding and more yakuza having emulators that just so happens to use the same one as mgs1
Sent in dm. I'm going have to figure out what omg is later, assuming this doesn't have damn denuvo
Who said m2 did segaages? I just found a folder named that in 0
That one def had denuvo removed
Fantasy Zone, Outrun, and 2 other games I don't recognize
If it helps crack mgs1 emu then it'll be worthwhile
If not ig nuggs still get some new toys to mess with
no denuvo here
Not really all of them. About 10 of the 33 games have been developed by M2
They also worked on the Sega Rally Championship port for the PS2.
hmm the most common feedback I got from the CN translation mod is that they wish bundle with correct buttons ui with their prefer controller, since the setting in ini only can be set GlobalRAM = false GlobalCDROM = false so everything is showing correctly in game. But the buttons ui will be showing the original PS layout. Maybe can be done like having the controller button official patch option alone? Tho I don't know if this also one of the official patches that conflict the cn ppf before
whoops
I doubt the button patches conflict
problem is working out what is a button patch
some are obv
and for me I think it's quite low priority to sift through them all, basically anyone could do that
I'll do it eventually if no one does, but it's really a better use of my time to understand the emu
Do you have raw patch files? If so how about sharing them and having them find the prompts
hey, how are you doing with the patch?
anyone can get them with MArchiveBatchTool
but some of them are in title_patchdata.psb.json and not in their own files
there's the M2Patch.py script that will apply the patches to the ISOs too
if there's any way I can help to speed up the process, I'm all ears
there's definitely stuff other people could do
having the thing extracted with MArchiveBatchTool is really essential to look at anything, though
I did that like once 3 months ago and constantly go in there for stuff
understanding what M2Fix is actually doing requires looking at the extracted alldata
obv the main problem is some patches will depend on other patches, nothing is really going to be "clean", e.g. they'll patch some index to refer to something else that was patched in
had a day off to actually play some games / poke around with the NES emu / check out these possible other M2 sightings
but I'll resume looking at the GPU soon
hopefully if we understand the GPU enough, patching the internal res might be a more realistic prospect
I tried before but I was doing retarded blind patching whenever I saw certain numbers
I've started reversing the GPU struct like I did for the CPU but it's nowhere near finished yet
the GPU struct is much bigger but clearly a lot of it is just VRAM and similar so that should come down real fast
Hey nuggs anything come from the files i sent from kiwami
yeah, I looked but it's essentially a completely separate project - not the m2engage we see in MGS
but I found this: https://cookieplmonster.github.io/2021/04/19/virtua-fighter-5-final-showdown-unlocker/
which is exactly what you want
looks like he figured out how to launch the emus separately
has basically nothing in common with the MGS emu though
but I get a sense that M2 did it
it's just a different project entirely
much more recent codebase
vs the PS2/Wii/whatever codebase that MGS uses
the way to explore those would be taking what this guy did and putting it on steroids
this was basically my idea for MG1/2 - figure out exactly what is needed to start those DLLs and do it externally without the MGS3 chassis
Looking at what the dude said in that article, he didn't make emu launch separately, it's still through accessing a arcade machine
"As those arcade games are DLL files separate from the game executable, for the past week I’ve been experimenting with running Virtua Fighter 5 standalone; in fact, that’s how I found this unused “console mode” in the first place! At the moment, my standalone game reaches the title screen only, so it’s too early to say whether it’s going to be doable or not."
Oh I didn't get that far
ah
that's the one you want
Wonder how much progress he made
2nd post lol
he made more progress
I just linked the older one
"Audio is not implemented" seems like the biggest thing
these are very cool really because they're basically native ports
it's a spectrum
That's a lot of progress
yeah if someone fixed the audio and made it compatible with more of em it'd be very legit
Is that why gaiden uses 2 and not 5
2? 5?
Visualizing the VRAM would be interesting
Gaiden has virtua fighter 2.1, even replaced the exact same machines that was supposed to use virtua fighter 5, even though it takes place at the exact same time as Yakuza Like a Dragon
oh huh
well
the interface seems the same
"module_start" "module_stop" and the same sort of structs that this guy references
so it doesn't seem like it'd be insane to adapt what he did
and importantly the denuvo doesn't apply to the DLLs lol
yeah, MGS is using something that clearly originated on way older consoles
this is a new codebase
seems to support lua instead of squirrel
it might be like their next gen system
PSX stuff will continue with the older system
Wonder if the ps3 yakuza uses squirrel
having a look at the GPU again.. they've seemingly done some amusing things with some hardware components
like adding "secret" commands that don't exist on a real PSX
the emulation is definitely not "accurate"... just "good enough"
impressive that it's this smooth
there's stuff they just didn't even bother with and it all works fine
you know what's great? being able to find several PSX emulators on github to compare against
maybe see all opcode implement
The recompiled code of the cameras should be linked there
GPU struct is 0x2000EC bytes
but don't worry! 0x200000 of that is just a VRAM buffer
so about 0xEC bytes needs figured out there
there's also a separate "scene" struct
which is 0x13C bytes
Nice
You think there's any chance of dithering? With the mosaic blur and other patches fixed, lack of dithering is probably the main culprit in terms of accuracy
I'd completely guess it should be simpler than a res bump
Probably fewer changes required
but I know nothing about GPUs so it's a total guess for now
Resolution-related code has been inlined everywhere
So there's lots of instances of it to patch and maybe other knock-on effects
but I don't even know how most emus implement a res bump yet
e.g. this sort of pattern appears multiple times:
but I dunno if that even needs changing lol
I will try to improve the cycles, there are frame drops in open spaces
Awesome. The framerate drops significantly when pressing against boxes and stuff. When the camera shifts and more of the level is rendered, the framerate often dips to around 20fps. It can be tested by pressing snake against the box at the heliport spawnpoint.
I don't know, that's up to Konami to fix it one day
Ah sorry, thought you were talking about overclocking the emulator CPU to fix framedrops
xD true and 60fps+ unlock
nah there's literally a squirrel function that sets the run speed
you can set it to 2x
and it copes with it fine
obviously everything is sped up that way (audio, gameplay)
but it works
you can try it yourself with M2Debug.py and the debugger enabled in the ini
g_emu_task.setRunSpeed(2.0)
iirc
To be honest I thought so, the slowdown is kind of inconsistent to the PS1 version, which is seared into my mind.
Bet the torture sequence is a cunt.
LOL
https://github.com/VelocityRa/pctation im looking at this one currently to compare M2
some of the emus that are more widely used are a bit hard to quickly parse and understand
what the fuck is "qf08"

can someone please explain the entire emulator to me
thanks
🤔
Dude i can't believe you ported ghost babel to MGS1
N Gage port
My favorite game
"EmuGpuScreenTask" 👀
😯
might be fun to play like this tbh
looooool
let's gooooooo tiny MGS1
metal geaAAAAAAAAAAAAAAAAAAAAAAAA
MGS Patroit = P o r t r a i t
Awaiting on analog update to go out damn lol
Ooh cool. Figuring out resolution I take it
hmm
wonder if I can patch some of this res stuff without wanting to jump out of a window
need to figure out some ~novel~ techniques
it's inlined so aggressively
i almost need some kind of data watchpoint-based patching system
i.e. set a watchpoint on the relevant parts of the GPU struct and have that invoke a detour
this thing needs to act like a debugger
Is it possible they are doing something slightly odd, like doing a render to texture to display the actual game? I haven't kept up with your discoveries nuggs
yeah that seems to be the final destination of the thing
why would that be slightly odd? i would expect that to be the pragmatic option but i know nothing about graphics
(for an emu at least)
For an emulator maybe yeah, it's not really something you encounter in many modern games at least.
i found some GLSL shaders and shader model assembly in the exe at the GPU-facing side (not that I understand any of this)
GLSL/HLSL are like voodoo to me, it's hard enough learning x86 asm
but from looking at how other emus generally implement a render resolution boost, you need to extend the PSX-side and the GPU-facing stuff is probably not worth much investigation
trying to lie to myself by saying we don't need to rewrite the PSX-GPU module but not sure how long I can maintain that lie
stuff that handles PAL/NTSC lines is inlined all over the place, dozens of instances of it
spose I should actually look at dithering instead to start with since I expect that to be simpler
feel free to tell me to lay off the crack, but the M2 module interface is good enough that it might be tractable to attach a 3rd party emu's PSX-GPU implementation instead of trying to fix the built-in one
e.g. just hook up the duckstation renderer since everyone likes it so much
by the time the built-in one has been patched it might as well have been rewritten
That does seem a little crazy but as you say, if you have to rewrite a bunch on the GPU side it would be extremely hard to match the capabilities of something like duckstation's renderer.
i can already lie to the graphics wrapper like this
but there's only so many pixels in VRAM
there's something dirty about outsourcing the GPU emulation instead of improving the existing stuff... i dunno if it's any sillier than the squirrel hijacking we're already doing though
How many other games actually use this M2 emulator?
very good question, i'd be interested in porting to or learning from other games but we haven't found much, just a few red herrings
it has to be used somewhere and we just haven't found it
it looks like a product they sell for rereleases
has lots of tools to help with the process
That recent-ish Castelvania Advance collection was M2 right?
i think i read that somewhere, yeah
So between this image
and this one
The second is definitely rendering at a higher resolution right? I think there might be a limit of 640x512 since that's all it allocates for it.
isn't that a reversal of cause and effect? they allocate that amount because the rest of the logic will only use that amount
the problem is more that there is so much code that assumes those are the limits
mmm, I'm seeing that
in particular you can see a PAL/NTSC check that is inlined everywhere
so many code paths that individually assume that PAL means X lines and NTSC means Y lines
all this jazz right?
yup
that +0C offset you're seeing is into the GPU struct
they've kind of implemented C++ in C
so that's the GPU which is of device class, VRAM is +08
if you search for the immediate 224 you'll probably find several cases of it
even if those are fixed, there's probably more that aren't quite so visible from orbit
I'll take a drink every time I see 320 and report back
there are even commands to request the resolution from the machine object
but because everything is statically linked the toolchain has had a field day optimising so it barely makes any sense
the M2 engine can load modules from separate DLLs but that's not how MGS is shipped
best example of it making no sense is the function that references the m2epi_machine_register string
it checks that a bunch of funcptrs are not null, but it's actually just stuff that is static
what even are early returns lol
help
tf
oh SHIT
what
WHAT
thats rendering at a higher res right
ignoring that its chopped off
i can probably fix that
i have no idea how this is working
well, im very relieved it might not be as much work as i thought
ayooo
widescreen?
Hermoso!
OH SHIT
Liquid wasn’t kidding when it wasn’t over yet
Finally, mgs1 4k 144 fps mod. Complete with johnny cheeks
Prob not the end of the day its a ps1 emu. Unless we get a real pc port
Touching that messes with game speed since it wasn't made to be touched
Don't mind me I'm just meming 
Don’t worry lol it’s pretty funny
Kinda sucks though MGS1 in widescreen 60fps would be awesome
Dumb idea but hear me out
Frame generation mod
Frame gen produces an image in between each frame, effectively doubling FPS. Probably it actually works obviously,
doesn't it look like shit at lower source frame rates
I've tried a frame gen of Lossless Scaling tool with the DuckStation emulator.
Not bad in the cinematics but too much artifacts in the gameplay.
render resolution options are a v2.0 thing surely
we'll be skipping some versions lol
there's some extra bits to figure out: PGXP (whatever that actually means), dithering
well, at least the whole renderer doesn't need rewriting
with so many features, maybe can consider make a gui version of the ini?
im even thinking of making some of the ini settings game-version specific
the ini will prob be reorganised at some point
but yeah not opposed to that
it'll be when things stabilise though
PGXP (Parallel/Precision Geometry Transform Pipeline)
actual god
Genuinely nuts.
Assuming you have this link already (it's the commit duckstation added pgxp support), but it does look like a lot of it is nested in and around gte stuff from a brief glance on mobile
https://github.com/stenzek/duckstation/commit/0c1b637549d430137f57d01100b9774df92b1e81#diff-ebb5dea65ef6fa9cf55bcb758221596aa09d3d7dfcd6f288070f681807952179R1180
epic
i assume it is the cure to how wobbly this looks
the wobbly works at the low PSX res
but here it's like everything is made of jelly
anyway, GTE stuff should be simpler to hook and modify
this is nuts
unbelievable that it works
well
this is going to be a bit weird to implement it without any of the emulator code in my project
ported the duckstation code to m2fix
it's building but basically not plumbed up at all
need to do all the fancy runtime hooking i have in mind
(for PGXP, fwiw)
huh interesting, so it's like duckstation code combine with M2 emulator?
its just the PGXP bits
I could take it from any emu, seems they've all slightly customised it to fit their environment somewhat
so I may end up customising it further
its a strange thing to assign a name like "PGXP" to
because all the implementations are going to look very different
i guess the final version will be something like "M2Fix PGXP inspired by duckstation which was inspired by beetle PSX"
it seems to be essentially some technique for supplementing the potato math the PSX is doing, via extra book-keeping
it needs to know a lot about what the CPU is currently doing
which all depends on how you've implemented the CPU i guess
in this case it's even more fucked up because I don't actually have the CPU logic in my project
so i have to do a bunch of gymnastics to extend various implementations of instruction semantics
im not wholesale replacing the renderer or anything like that
no reason to, now
well, at least players will be happy playing their prefer internal resolution now
yeah, im indifferent really but some people will insist its not the best way to play the game without it
and at this point its all basically considered to be the hardest problem to solve lol
tho in 16:9, the ui probably still be stretched
the emu has some built in wide mode
but i dunno how it works yet
i need to play around with all of that further to properly figure out how all the settings play against each other so that i can make them make sense lol
Does it work at any resolution?
But yeah personally when it comes to higher res for ps1 games I usually just prefer to double it to 480p
Since that's a bump without being too much
yeah, should do
barbie?
That's Cécile Cosima Caminades from PW
Context: https://youtu.be/GDQWl1kRs4c
yup we know that already
Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu Kojima Kami Nan Desu
i can imagine Tomokazu Sugita doing this one.
From what I see, you are already seeing the VRAM code. Looks good
I thought it was Eva. I hope it looks better in the remake
I mean it's peacewalker, the worst mainline game there is
man why is that it seems like the worse I'm out of comission the better nugs does?
I get the rona and he goes and figures out the upscaling
Hey Lyall, good to see you in here! I was actually going to ask you if you had any plans to fix the scaling issues on MGR
You should try the blackframe insertion from the mod, it does wonders for the game
this may not even be possible in the way we're envisioning coz of the accelerators
if they've accelerated the code that PGXP needs to sniff
it won't mean it cannot be done, but it will mean it needs a completely custom implementation
we shall see
I may end up throwing this away
I'll get the CPU parts in first as I'll be able to see if they're being hit or not
and that'll decide whether to proceed with the rest
lol

I'm using the instruction decode function itself as an oracle to find where the semantics implementations are
works
pass it an example instruction and it returns the pointer to its implementation
I vote that you just get the HD upswcaling done and a public release for that first
if you can get the upscaling and I'm particularly interested in the widescreen I think that would be good for now
I can offer hugs
that's....not actually the worst idea I've heard
it'd be way better than those speed running bounties everyone cheats to collect
god its so bizarre extending an emulator without just being able to modify the source
everything has a high jump obstacle placed in front of it
have to solve 1 problem before you solve the one you wanted to solve
emulation is always a pain like that
just writing custom controllers scripts can be a pain in emulators because of how they operate
doing that for twin snakes was fun! (no it wasn't)
I still need to do a public release for that but I'm not sure which platform I should use
cuz the odds of konami releasing TTS at this point is....slim at best
I wasn't aware there were scaling issues with Rising. What kind of problems are there?
cool I can intercept the simulation of individual instructions now
that was a hell of a lot of gymnastics and im not throwing this bit away even if its not used for PGXP
so it'd be like this
that for christ knows how many instructions lol
at least there's a proof of concept
incredibly it doesnt crash
this is essentially what's going on here https://github.com/stenzek/duckstation/blob/cdea4eb68b231ed44bbab7ba7e7e91a0c8c16a33/src/core/cpu_core.cpp#L1102-L1113
but 10 times as fucked
iirc it's limited to 1080p max, and if you have a monitor that supports a 16:10+ aspect ratio, it'll lock you to 24hz unless you use an app called ForceFix (https://steamcommunity.com/app/235460/discussions/0/630802344702757872/) - similarish vein to the border issues that mgs2/mgs3 has where they're pulling info for the max resolution for the display instead of actual set resolution i think
I noticed some people are having issues with this game in full screen for 1080p including myself. I've created something that reconfigures the default system and reverts it back after use for full screen at 60Hz. It should work with windows 7 32bit/64bit but I'm unsure of 32bit or anything other than W7. If it fixes it for you or you are experie...
Interesting, didn't know any of that. Been a long time since I played it. Will have a look at it when I've got some free time!
Unrelated to MGS1 but what theme is that you're using in your IDE? It looks great.
i broke the game a bit
trying to see if I can even hook all the instructions required for PGXP with stubs
i cant fucking count
classic coding moment
Schrodinger would have had a hard time coding
we call them Heisenbugs for a reason
ive never even attached a debugger to this thing
i almost wish it crashed rn as i'd at least have the postmortem to work with
oh huh
i can hook every instruction
if I give them each a print
the prints are structurally integral to it working
that must be encouraging the compiler to do something it isn't doing without the prints
either some optimisation done goofed or I need to select another of x86's many calling conventions, i guess
got a sort-of instruction trace
From what version did you take this Capture? MC or DuckStation?
mc
so I got almost all of the instructions in
and then also wired up GTE_NCLIP
but the PGXP NCLIP is never valid so it always falls back to the emulator's built-in
problem here is figuring out if it's an issue with my code or they just accelerated all of this with native code
so it does seem accelerated
I think I need to do something like this instead
actually rewriting the GTE, more or less
i'll probably change gears now and come back to this l8r
aha, yeah, i see how this would have to work
i'd also have to patch the shaders like this
equiv in M2: gl_Position = projectionMatrix * vec4(1.0/16 * i_Position, 0, 1);
it doesn't seem too involved to try replacing the M2 GTE with the PsyCross version so I might give that a go
probably less work than all the fucking about I did in the last day
What the...
How did you make it look so good?
I mean... till' i know, the resolution is impossible to upscale.
... it's complex to undestand?
the fact it renders anything with a completely different GTE implementation
doesnt that kind of mean it sort of works
WOW
i had the PGXP version of the PsyCross GTE enabled without realising
if I turn off PGXP it looks totally normal and fine
literally cannot tell a difference
i accomplished a thing? i guess?
definitely using PsyCross GTE atm
btw, don't get the idea that i'm just withholding this for no reason lol, i'm literally working on it right now and trying to solve issues with it
there are bugs
mosaic broken (and some other effects)
whatever is going on here
anyone can play the game in glorious 4K in any emulator, and we kind of have one shot at releasing the big upscale update and it should do the game justice and not be riddled with broken shit like this
i don't mind a few outstanding bits to be worked on in future as long as it's broadly acceptable, but this needs some more work, clearly
just calm down a lil bit pls lmao
it literally only started to work like a day ago
after months of wild goose chase
there's something called pride in yr work and i don't want to dump a shitty release out if i can avoid it
there literally isn't a single straight line on the screen
but im less worried about that
probably widescreen, does the game not look normal in 4:3? I don't think anyone would wanna play the game stretched anyway unless they're insane 
i actually didn't even get it to display without being chopped off at 4:3
because: there is still shit I need to figure out
the stuff that configures this has a bunch of moving parts
and i don't quite understand how they cooperate yet
hence my total surprise when this worked
hmm, most of the ps1 games widescreen hack, the only stretched part is about ui
it's rare to see a hack that also fix the stretched ui
Speedrun
So it would probably be limited to 4:3 resolutions then when implemented?
Otherwise it breaks too much
well, 4:3 is currently more broken as it cuts off half the image
Oh interesting lol
first screenshot i posted was like that
sooo yea needs work to smooth things out
it's alpha as fuck
also loads of text is missing
hopefully these are all symptoms of just one or two problems
Someone should stop you. You are a monster

it's very interesting that it seems to work fine with the PGXP mode disabled, must have some clues that would point at what else is needed
but it's crazy we have some part of the emu essentially decomped lol
PsyCross in general is a good resource for how M2 is really working
I think it's because this implementation of PGXP requires that I call some function to clear the cache at the end of every frame
but iiiiiiidk when a frame ends, haven't identified a good callback for that yet
so it's probably using invalid results all the time
anyway gonna park PGXP for a bit (I had to try and integrate the PsyCross GTE stuff once I discovered it sry)
his limbs at least
bugs aside, this is probably the best looking MGS1 variation I've seen now
really? isnt it just the same as any emu?
From the grabs you've sent i'd say it looks cleaner to what i've got from emu
huh
I mean the emu is made "for" MGS1 so maybe there's some tweaks here and there
via the accelerator shit
trying to get 4:3 working rn
got it!
i'll plug some other values in to confirm my understanding
Very good. Has this improved performance at all?
i don't notice any difference
even vs 240p
unless I have log spam enabled and then it tanks while it thrashes the disk
i think the slowdown is basically emulated slowdown lol
it's not struggling its artificially limiting the game speed
to be "accurate"
still something very odd with the resolution stuff lol
hmm
the menus are still not aligned properly
even at 4:3
Dumb question but isn't the menus stuff like the original game, but everything else is memory dumping? Or however you'd explained it
Idk if that means anything
It looks like the geometry is actually being corrected in some of those scenes, but the affine texture mapping is what's making it look a bit saucy.
and then there's the screenshots of shit just being busted.
Holy shit @pure radish, I go take a little break from MGS and then I come back to this. Great work my dude, I can't wait to see where you get with it. Money's tight right now, but I'll toss you a couple ko-fi bucks when things settle down.
hmm
it looked like there was another resolution-related knob
but it seems to have no effect
I felt like that was a possibility so I'm glad I didn't waste time making the code for this clean kek
pretty sure some of these fields are top left X,Y coordinate
but.. not really as it centers 4:3 if 0,0
its an offset
that's a red herring I think, I can't imagine a reason you'd ever set it to anything but 0,0
the game has all sorts of complicated logic for setting it
umm I know that some moments it uses some panning in the camera, it's a blur effect for the cinematics. But in the gameplay, the fps drops in first person if you observe the entire scenario from very far away
this is for the entire emulator layer though
the value shouldn't be changing often if at all
dunno why you'd have such complex logic for positioning it if its already self-centering

oh shit
im retarded
it's so complicated because it interacts with the screen options in the menu
the ones they just added in 1.4
something intentional? 🤔 even leaving things unused, I wouldn't be surprised
ahh gosh the combinatorial explosion
i have loads of combinations to test
game be looking FINE in 2x res
enhancement
why tf is there a 16:9 setting in the game?
does that actually do anything?
right now with my stuff that is literally switching between 4:3 and widescreen
works with the wallpapers too
so it seems like
we need a scaling option that goes from 240p to the vertical resolution of your monitor
horizontal scaling sorts itself out
based on the ingame option and the vertical setting
im tryna work out the best way to create ini options lmfao
its so complicated and screwy and i want to simplify it
ok
so theres no point giving it 16:9 values
coz then you can't use the ingame setting to make it 4:3
but you can give 4:3 values and use the ingame setting to make it 16:9
and i don't see any point to specifying the layer size to be anything other than the game's window since it has nothing to do with the game's presentation at all
getting somewhere I think
oh hell yeah
now we're talking
as kojima-san intended
unironically looks great
how low can we go
now slap a shitty crt filter on it 😤
zero downside to setting the layer width and height to 999999999999
but it's not allowed to be too small! then everything shits the bed
since you asked nicely
i think I could still complete the game like this
mad visual design
utterly insane
the good news is: the text and effects break at lower resolutions as well as higher ones, so it's probably some hardcoded assumption somewhere that I haven't found yet
it's like you get dithering for free if you make the res super low
as the blocky pixels dance around so much
Crazy work dude 💯
Could all of this potentially be ported to Switch?
yeah - definitely can't be done with just romfs mods anymore, the mosaic fix and render res stuff needs changes to the .exe, but it's possible yeah
not sure I'm going to port it myself though, I have my hands full as it is
it'd be a fun project for someone who wants to get into switch mods
since you can basically just do what m2fix does but for ARM
You are doing a genius level stuff
Sometimes I don't even understand what you are talking about 😂
don't worry neither do I
YESSSSSSSSSSSS
heres a clip 
i'm hoping the bugs are actually all one bug
that sounds plausible and they all seem similar
Filtered
Was there something you were replying to here that's gone now or something?
just a recent burst of mild begging / rushing because 4K 144444fps luxury space metal gear hype
until there was a screenshot of upscaling working this place was chill and not triggering anxiety lol
Ah gotcha
Yeah people need to just chill out
It's very exciting but it's not like the original resolution is terrible or anything. The game looks good at the res it was designed for, anything else is just extra niceties
You're doing great work btw. Excited to see more progress being made!
lol some people need to chill 🤣 good work out there honestly, I never actually expected MGS1MC would even get res upscaling, let alone modded
ppl need to realise this stuff takes a looooong fucking time, longer than they think, i've spent hundreds and hundreds of hours on MGS1MC
i can wait to iron out the bugs, im barely playing this shit anyways
Have you played the game lol I mean the MC version
I got to the heliport 🤣
I'm using someone else's saves for the rest of the game
its only been a couple months, we wouldn't even ship one release in my day job in that time
so i'd say we're all doing extremely well with MC stuff lol
Yeah. All things considered things have been moving very quickly
the MC releases will be played for literally years to come
so
they have some "highp" option
which I infer means "high precision"
but turning it on/off I can't tell the difference
they have lots of options that don't seem to do much tbh
A comparison of the resolution of the default config and enhanced would be good
u mean the game without any internal res change?
yep
ok
I no longer remember how ugly it looked. xd
both are with the built-in "pixel perfect" option
but you can have anything in-between and ofc stretch it to 16:9
can even take it down to 0 pixels if u want :S
better
no
Oh!
atm I have it set up so you put a height in in pixels, or 0 to use the game window res
it calculates the 4:3 width for that and lets the game's built-in options handle 16:9 and shit
pretty much dead easy lol
didn't seem like there was much point allowing manual control of the width because if you do anything else it's just worse
as in: it doesn't change the visible result and just breaks the 16:9 options and such
the issue with this has been that there's like 12 different knobs and dials
but it turns out most of them aren't really usable for anything worthwhile
just had me scratching my head for a day kek
you can... cut off parts of the image, or make a row/column stretch out to infinity, or offset the image in unpredictable ways
the breakthrough was logging some machine commands and writing to the callee's stack frame 🙃
even then it was just luck that i tried the right combination of things because miss one part and it's basically 240p
i had 240p in a tiny box for a long time but no further
That implies you can mess with UI separately? If so m2 is amazing to be able to commit sugery on this game and get it to work
Also would unironically love the bitcrushed version. Outside of sniper wolf that would be a nostalgic trip to a game i never played
yeah, if the ui can simply be adjusted position through X,Y coordinate offset that would be awesome
Only just caught up
Gotta say I'm kinda speechless that nuggs somehow managed to achieve this
also kinda sad to see there were people screaming and moaning to hurry up and make it even better (lol)
Spite is a great motivator. I just wish I wasn't illiterate in programming 
it's really just amazing, like this thread is my favorite post to visit everyday 😆
Nuggs is a suspicious name for a brit, based on my knowledge of the streets.
This intrusion into M2's emulator may be entirely powered by dank peng.
for the record, that isn't what inspired the name
ffs, have to reverse some bullshit function that the compiler clobbered into dust
yes! fixed the codec bleed
Colonel, I'm dummy thicc
Wait, you're a brit nuggs? You're not English are you?
yup
My condolences
I thought you were too 😂
No, I'm one of the natural born enemies of the English. The Scottish.
could be worse, you could be fr*nch
so I think the two things we have to resolve as like P0
is some text not displaying and possibly the mosaic effect (which I suspect are the same issue)
oh
i fixed the text
but its kind of a workaround
hmm
maybe its ok to release in this state
fixed the really important problems
everything else is minor visual effects but what do you expect from upscaling without PGXP and other enhancements
this stuff has been the hardest to get working properly, lol
the save menu easily screws up
and doesnt show any level names
but seems ok now
everything works in 16:9 too, sick
@nuggs Is it stretched 16:9 or true 16:9? There is a mod for the original PC release (available on GOG) that adds true 16:9 though the hud gets stretched I think (but nothing can be done about that I guess). Awesome work! Can´t wait to try it out.
In other emulators, "true" widescreen (with correct fov) is achieved by some sort of hack. Not sure how it works, but the hud and codec screen will always be horizontally stretched. There will also be a few bugs with out of bounds areas being visible in some scenes, and some minor animation glitches in a few cutscenes.
hmm, i might be able to add a widescreen hack
since I have a working GTE replacement
that doesn't seem like a big change
i mean everything ur seeing in these clips/screenshots is using the GTE replacement lol
yep
widescreen hack works lol
now there's a reason to release the GTE replacement haha
Epic! 
I guess I should try to tie it to the in game 16:9 setting (and also an ini switch to enable)
oh my god this looks so perfect. thank you for getting this working
yeah i think now i just have to glue it all together into something coherent
lots of random experiments that need tidying up, stuff i will still work on but definitely not ready lol
so a release shouldnt be long
Is it possible to make the ui not-stretched?
Like, I don't mean keep it on the extremities, but keep the UI within a 4:3 width, and the renderspace in 16:9
I tried that with MGS2 and 3 but it resulted in screenspace effects also relegating themselves to 4:3
But MGS1 doesn't have those outside of cutscenes.
would need to patch the game itself for that
unless they accelerated it
the res hack is honestly genius
in how simple it is
Is there a layman's?
it applies a multiplier to the X component of each vertex for rotate/translate/perspective transform, so the values coming out of the GTE are squashed to account for the subsequent stretching
but its just so little code to implement
i guess what's really cool about it is that it requires no knowledge of the game
your hardware geometry engine just so happens to corrupt the results of calculations in a particular way
When I was looking at it a long time ago, it seemed like the movement of polygons behind the most foreground one would effect said most foreground polygon.
So like, doors opening in MGS1 would cause the wall they recede into to wibble a bit.
Is there any explanation for that?
its probably drawing the door the whole time so its subject to the same fixed point issues
might've just been too costly to solve it for metal gear
no Z buffer too
it'd need a bit of work to confirm but the GTE probably just says the door protrudes the wall for a sec
you can see things through walls if you create the right preconditions
like the darpa chief's bed by the elevator door
i mean its essentially a clusterfuck of aggressive rounding errors all over the scene
Yeah. There's also some forced angles. If you force MGS1's camera to bottom-up-angles illegitimately, (like say in the Tank Hangar,) the sort order always favours things that are meant to be above. (Such as, Tank Hangar's scaffolding.) This is probably why MGS1 has a lot of lag in first person at times, the game's optimised for its viewport.
It's something games still do today with like, FPS guns, since you can rub your camera against the wall and the gun doesn't clip into it somehow (leading to crazy perspective issues if you walk straight up to small objects). But that's more of a presentational case than an efficiency case.
PsyCross is hella nifty for M2 work
conceptually m2engage is similar
so it was stupid easy to use the GTE from it in M2
wonder if I can replace the GPU with the PsyCross one 
Honestly I'm more interested in how you did it than in the final product lol
yeah won't be much longer, just tidying up really
code will look like an active warzone if I don't do this
There is something I wanted to know, but maybe I should comment privately. It is more of a help, to integrate things from PSX libraries into Unity
sure, DM me if you prefer
https://twitter.com/Nintendeal/status/1754222763555061975 very interesting, I wonder if this collection use M2 emulator too
Something tells me it won't, at least not m2engage
It'll probably just use whatever the Castlevania Advance Collection used
It would be cool if you try to implement geometry correction, this way you can make this version of the game the best of all https://www.youtube.com/watch?v=aetsSOfMRq0
Don't use "CPU Mode" and "Depth Buffer"
sometimes it look better but can cause a lot problems
I hope they release it in the US and add games like Sacred Cards and Forbidden Memories. Not sure if the Tag Force games would be considered "Early Days", probably not but still. Not to get off topic, I know this is about Metal Gear Solid, I'm just a huge Yu-Gi-Oh nerd lol
that's not so simple as it can't be done in the way it is for most emulators
will still try but it's a very custom thing
definitely doesn't look like it'll be in the first release since people are desperate to use it as-is lol
next time people ask might be "60fps when" lol
144 fps wen
Real VR when
1 fps when?
Over the shoulder camera when?
it is weird that it's specifically the early era of 3D games that receive all the demands for these enhancements
nobody expects their 2D games to be rendered in 3D
nobody expects DLSS to be added to MGS2
but when it's MGS1 people want 4K resolution and corrected geom and high framerates
PS1 wasn't even designed for 3d games if I recall correctly
no Z buffer is... yeah, pretty much
I thought it was but it was in a slapdash way
I think "3D capable" is how you'd describe it
in the way that laptops 10 years ago used to have "VR ready" stickers
What people think MGS1 will suddenly look like if you add 4k res
I need TTS on Vol.2
i'd be very surprised if we got it, i honestly doubt it
emulation strategy isn't viable + team that developed it disbanded so there's no institutional knowledge
i'd guess that konami has the assets but that isn't certain either
lmfao
If we got twin snakes HD back when the Hd collection was being made we’d definitely have it but since we never got that
Not sure if TTS will be in the MC
"Kojima Productions' Sean Eyestone stated that The Twin Snakes was not included in the 2011 HD Collection as neither the developers, nor Hideo Kojima were directly involved with the creation of the game and therefore did not consider it canon"
Snake's revenge isn't canon either
Damn, thats a good point
Yeah the fact there’s world peace was a dead giveaway
kojima had his hands more in TTS than snake's revenge
guess I need to know the aspect ratio for the fullscreen display mode
to set the GTE scaling properly
Twin Snakes deserves a re-release on modern consoles and PC. I think it's underrated. But since Nintendo is involved and original developers disbanded, I don't think it's likely for a Master Collection Vol. 2.
0xa000020 {"right": 1280, "left": -1280, "left": -1280, "height": 1440, "height": 1440, "width": 2560, "top": -720, "bottom": 720}
lol
nice
not sure why it has two height keys
how does it disambiguate
Geometry correction would be great. People should be patient and wait. Plus you are doing what Konami should've (and in your free time). Respect!
i mean tbh they're just going to remake the game so
that isn't something I can do
lol
alright, that should be an attempt at correcting the aspect ratio for non-16:9 too
We’re going back in time to force Bluepoint to make TTS HD
That’s right, we’re going back in time to force Bluepoint to make TTS HD
...
What about if Konami make a Gamecube Emulator Only for that game and add HD Textures?
it'd really be more accurate to describe it as a compatibility layer
because: nintendo has the source code, so they can recompile it for a different architecture
all they need then is a bunch of shims for the old hardware peripherals
If anyone has the source code for TTS I wonder which party would
If anyone even has it
I doubt Konami would even if they own the IP
Wasn't there a somewhat credible rumor one or two weeks ago that they might be remaking MGS1 anyway?
I know we've had those for literal years, but it would make actual sense now that they have Delta on the way
since they have an appropriate engine/groundwork for it
no. it originated as a post on a random spanish blog that has literally reposted that same rumor every single year for the last 7 years.
still, more likely than them touching TTS
Oh right, interesting
good to know, not sure how I was duped so easily

oh yeah we're cooking
the time is very nearly upon us

LET'S FUCKING GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!!!!!!
LET'S GOOOOOOOOO
...
F
🥲
wow, surprised how quickly you pushed that out. I was sure it would need more investigating
amazing. i reckon if this does what you'd expect it to (eg comparable to duckstation) it'd get picked up by gaming news sites
There are FPS Drops too...
i dont see any impact on FPS anywhere
What are your PC Specs?
5800X3D & 3080
i7-11800H 3050ti Laptop
in my case it happens when got the Game Over/Mission Failed Screen
ah. don't die then
MGS1 remake is probably next after 3
🙃
IF 3 does well
i agree
1 probably doesn't need a huge budget for an insane payout
and i doubt they'll touch 2 until they've done 1
I don't think so... y´know... It´s Konami
anyway im sure this will throw up all sorts of issues on different setups
i don't really have 20 different machines lying around with radically different configurations
Honestly I think delta is already going to do fine
I mean, yeah the Remake Looks Insane in terms of Graphics, but we still don't know how it will be in terms of Gameplay and Game Design
For konamis standards
Gotta Remind you this?
So I’ve heard
The game intentionally drops to 20fps during these sequences.
Otherwise the PSSHHHEEEWWWWWWWW doesn't time correctly.
Well i think we´ll have to wait for another update... (If Nuggs wants to do it obviously)
I'll ruin your hope now, changing the game's framerate in any meaningful way would likely require a rewrite of the PS1 game code, and you're better off waiting for decomp & port. However...
There is a decomp going on, but it’s still in progress
I don't know how viable it is, but there is something done for Zelda decomp, and I've seen it injected into Unreal fighting games like Tekken, where you can produce 1 extra frame of input lag, but interpolate motion between frames A & B.
I prefer having a finished decomp for understanding the game first than any immediate ports honestly
remember, don't be rude as "modder, why the mod don't have (features list), do better!"
Sounds nerdy but I want to learn this game
Naturally, decomp is the holy grail.
I'm not requesting anything. I don't even think it's viable in an emulation layer, because I think the implementation has to be very bespoke.
nah, you good, I talked about other lol
Stupid question, but didn’t RE4 achieve 60fps by rendering everything twice?
Something along the lines doing something twice
I'm not sure what you're talking about. On Gamecube/PS2?
I think the modern ports after the PS2/Gamecube versions
I don’t fully remember where I heard this from Im probably just plain wrong
As far as I know, and I'm not too familiar, much of the game logic was programmed through time deltas (it ticks with a clock rather than calculating game logic by-frame). And 60fps ended up breaking a couple things that weren't programmed as such.
Maybe the game logic internally ticks at half the 60 refresh rate, but the renderer is working twice as hard. If you could find any source on that, I'd read it.
I’m gonna look for it when I can, I swear I heard it from somewhere
But anyways if that was even true I was wondering if there was a way to apply that to the PC version of MGS1 in some way
According to a dev for MGS1PC, it's mostly a compatibility layer over the top of the game, with some stuff injected in for saving and more PC-standard controller inputs.
I believe it because PC-only MGS1 bugs to do with weapon switching can be duplicated on emulator by manipulating the address for your currently held item.
They also downloaded the soundtrack and sound effects for the game off a Metal Gear Fansite, apparently.
Which explains the questionable audio quality.
I can pull the post up if you want.
Oh yeah I remember hearing about that, a good read honestly
Ok disregard this I can’t find any proof for it, might have been something I assumed because of a bug I found
I think seeing the sniper reload animation missing frames made me think they achieved 60fps by doing what I had previously said
All good.
MGS1 internally has a value which is almost always at 2, and it halves the 60hz output (30fps). Dynamically switching to 3 (thirding it to 20fps) when there's slowdown or game overs.
If you force it to 1, and negotiate an emulator to break the PS1's limitations, the game will run at double speed sadly. Except for codecs, which work perfectly, and cutscenes which stop-and-start to stay in sync with audio.
I always found the way developers made games run back then so weird but I can’t blame them really
For me it’s hard to imagine not making something adaptable in multiple conditions like framerates
It takes more computing power to do deltas, which they didn't have. And you can really, really, really optimise a game when you're designing it to a frame-budget.
It's a very Japanese way of doing things.
I wonder what Nuggs' got cooking next for this thing.
I’m looking forward to it even if the game acts like it got hit with FOXDIE for a while
Yep, same issue here. Screen is cut off on the right and widescreen mode ain't working. Plus I had do disable dev mode which was enabled by default. The resolution fix is working though because it looks really sharp now at my native res.
is your display area set to left align?
cause it looks like it's offset for that
Think my mgs1 is still installed. I'll give the new update a try on it
Malir sal xd
Yea infact RE4 actually has a TON of issues running at 60 FPS
RE1 Remake as well
Honestly, most GC/PS2 ports that didnt run at 60 FPS, usually have some broken shit when bumped up to it LOL
A good port remaster from that era is a dime a dozen
oh yeah the dev mode was enabled by default in this release, I believe some default options changed this time too
maybe when nuggs tested it forgot to restore it back
this same thing happens from boot for me @pure radish
in case you need specs, intel i7 11th gen CPU and an AMD Radeon RX 6750 XT GPU
I also got the screen cut half issue
same result regardless Widescreen = true or false
@pure radish Would you be alright with me making a video on how to install the internal resolution mod?
Can you screencap your in-game screen settings?
Start -> left+right bumper
Trying out on steam deck, screens splitting in half. Messing with res to see if i can get it right
Well if nothing else the internal res did work on it. I think we should have control over width for situations like this? Idk what's going on
lol did anyone get it working
does it only work for me
i did indeed ship my test ini, i've reuploaded it with the default one
having control over the width will not solve that issue, it doesn't control what you think it does
there's like 3 sets of values
that looks like something is wrong with the layer
but i set the layer to the window size
log file would help...
pls guys you might not be able to write code but do some basic due diligence lmao
not a single log file
just extracted the reuploaded release and it works 4 me by just changing some false to true
so its probably something simple
Working here, here's my config if anyone else wants to try it. Playing Integral.
oh
i managed to reproduce it
and fix it
indeed, layer issue
alright im meant to be working but, hotfix incoming
give that a try if it cut off for you
now you know why i was scratching my head about all of this
apparently 99999999 is the best thing I can put in here
Just noticed something, are these black bars at the top and bottom supposed to be present?
I have a black bar only on the bottom and any time the camera goes underwater I'm seeing random shit
lmao that's the widescreen hack
oh lol
seems to break some cameras
^Likewise
weird
Same with the camera bugging out underwater. Happens with or without widescreen
Still got em w/
[Internal Resolution]
Enabled = false
Height = 0
Widescreen = false
Oh wait, I removed m2fix and I STILL have black bars, issue with the base game then
noted that without the mod, in standard mode it's normal to have black bar on top and bottom, while in pixel perfect mode it not have black bars. Tho it's indeed weird that some pics you guys posted, the black bars are so thick
i'm lucky and have them in pixel perfect too (without the mod) :3
then yeah, maybe there's still have little mod issue to solve lol
if the hot fix solves the image being cut off, don't expect much from me in the next week
got some other shit to take care of
but yeah pixel perfect and standard will act the same with the internal resolution option enabled, for now
i swear those bars were added in an mc update, it wasn't like that during my original playthrough
or maybe i didn't notice it
yeah sure, it should be at least serviceable if the cut-off bug is fixed
i'd at least wait for one or two confirmations about that
So, tried the hotfix and now I get a weird diagonal artifact on the left side of the screen. And widescreen isn't working.
be sure toggle the in game widescreen option too
