#Modding the MGS1 emulator

1 messages · Page 21 of 1

pure radish
#

im hoping i can get y'all 99% of the way there with the upscaling but this kinda shit

#

a few pixels cropped

#

is on y'all to fix 😄

rancid hare
#

(but yeah, PAL did have a taller y axis on PS1)

pure radish
#

hopefully the code isn't literal vomit so someone can figure out what to do

#

for me the next gfx thing i should probably look at is PGXP

#

but the next actual thing i will probably look at is better fucking keyboard bindings

#

coz this shit piss me off

#

E+M pause go to hell

#

coz im regularly testing stuff, keyboard bindings matter to me

#

not gna plug a controller in while i work on the mod

#

snake go wasd

red cradle
#

E+M to pause is certainly a weird choice

pure radish
#

that's a very polite way of saying shit

rancid hare
#

At least it beats this shit 2003 MGS2 had where you had to grow a third hand to use the katana xD

red cradle
#

I kinda forgot, how master collection of MGS2 adjust that part on PC?

rancid hare
red cradle
#

ah a little better I guess

dawn flare
#

The deck was super dead last night, but it got it all charged and updated and games installed. Have a couple work things to do, but after lunch I should have time to get it started

rancid hare
#

That's definitely new xD

dawn flare
#

On the plus side, combined launch options work on MGS1 for sure, and if this log file any indication, good for Bonus content as well.

#

No rendering issues AFAIK for Bonus

#

Can confirm this works.

pure radish
#

damn these games are avant garde

dawn flare
#

Kojima is an auteur

dawn flare
#

Lemme know if you need any more deets

pure radish
#

priority 1 is sorting the immediate mode thing i think

#

priority 2 is steam deck ingesting LSD

pure radish
pure radish
#

and same result?

dawn flare
#

I think? That's the normal override right?

pure radish
#

yeah

dawn flare
#

Then yes. First run was dinput, did it again with both.

pure radish
#

cool, good to know

dawn flare
#

There was a change to the way the textures were mangled, but I figured they'd be a little different on each run

#

Still the same sort of effect, just not identical both times

pure radish
#

yeah, then i think having them combined is fine and not the problem

dawn flare
#

I'll double-check later tonight if I can.

pure radish
#

cool

#

i'm only asking because obviously one of them is d3d11 which is the actual graphics API used by MGS1

#

but that override is for the 64bit games, not the 32bit games

#

so in the release package, the d3d11.dll is the ASI loader for 64bit

#

the dinput8.dll is the ASI loader for 32bit

#

on Windows at least, anything with the wrong "bitness" is ignored and it falls back to system stuff, but Wine/Proton might be doing something silly with that override option

dawn flare
#

Yeah, I'll try with all three variants. Maybe I misread which one I was using.

#

I am not above user error.

pure radish
#

it's highly likely that it's a mod problem and having them combined is not the problem, i suspect

#

but worth ruling out

dawn flare
#

True, but now that you've raised the point, I don't want you chasing a ghost.

pure radish
#

we'll get it all sorted

#

we've crossed the horizon at least on my machine 😛

#

(and one other tester machine)

dawn flare
#

grump

pure radish
#

we're past the impasse, surely this is trivial nonsense

#

😄

#

as for the project name

#

it should probably stay MGSM2Fix at least until other games have more "tweaks"

#

the support for other games is very basic and just a bonus at the moment

#

if someone comes along and mods Castlevania etc with it, that's when we rename it M2Fix, I think

dawn flare
#

Sounds like a plan to meee

pure radish
#

"internally" it's already called M2Fix but presents as MGSM2Fix

pure radish
#

worth me actually figuring out how to force mine into immediate mode, then i can just debug it here

pure radish
#

yeah so

#

the thing i recalled earlier

#

if ( v2[31] == 2 )
v3 = v2[96];
else
v3 = v2[84];

#

this selects immediate or deferred

#

if that thing equals 2, its deferred

#

as for what sets it to 2, no idea yet

#

ok

#

that was not where i was expecting

#

so +124 is the "active" context, +128 is what must be set to "enable" deferred

#

so what sets +128...

#

oh

#

ohhhh

#

hahahahahahaha

#

hahahahahahahahahahah

#

hahahahahahahaahahahahahahahhahahahaah

#

the thing that sets it

#

???

#

Squirrel function System::setDrawLatency

#

isnt this what the ingame setting controls

#

system/script/mode_setting_pad_mgs.nut: System.setDrawLatency( latency );

#

for some reason konami considered it a controller setting

#

alright then

#

i should be able to go ingame, change that setting, and upscaling will break

#

yep!

#

unbelievable

#

so @rancid hare @dawn flare if you go into controller settings, and change "Controller Response Speed" back to "Stable", upscaling should start working

#

delusionally named setting

#

now i'll try and get it working with "Fast"

rancid hare
#

.....lmao

pure radish
#

you'll want to use the first build i gave you

#

the 2nd is of no worth

#

other than a quick diagnostic, it'll never work for anything

#

you can actually switch between them without restarting the game

#

upscaling, no upscaling, upscaling, no upscaling

#

alright well glad we got to the bottom of that

#

man i have full debugging power now

#

my debugging level is over 9000

#

i can just set breakpoints in the mod and see whats going on

dawn flare
#

Wtaf

#

Love it

#

Will try it shortlyish here

pure radish
#

yeah so im gonna have to hook the DeviceContext functions twice

#

alrighty

#

some boring work here to make that possible

pure radish
#

so this is going to be fun isnt it

pure radish
#

alright

#

boring job done

#

wow that was like an hour

#

now we hook all the shit twice

#

wut.. do i have the wrong immediate context

#

ffs

#

oh wait maybe this makes sense

#

lul i think i need to hook QueryInterface

pure radish
#

wow! that was awful

#

hooking QueryInterface = not fun

#

done though

red cradle
#

wow, so the controller settings effect upscaling somehow? No wonder everyone's playtest result is different

pure radish
#

because its not really a controller setting

#

it's purely a rendering setting

#

whether that has some perceived effect on input latency idk

#

but it's definitely just toggling between immediate or deferred rendering

pure radish
#

ah

#

had to disable COMDAT folding

#

maybe i dont need the QueryInterface hook then

#

ok things slightly better behaved now

#

aight we crashing in the gfx driver but at least im attacking the actual problem now haha

#

I've had this like 3 times so far, reasons vary but usually I'm doing something dum

#

it might be running out of memory in some object heaps, doubt I'm releasing everything properly

#

maybe deferred gets some better cleanup

rancid hare
#

Things are looking great on my end so far w/ normal response btw, it's even playing nice with with reshade

red cradle
pure radish
#

hacked by hideo

#

it doesnt crash in renderdoc coz of the API validation so thats handy

pure radish
#

spot the problem

#

man there's no mercy is there

#

cool

#

i have it working in immediate mode now

#

i.e. works with the "controller" setting either stable or fast

#

oh wait no, ive broken deferred

#

lmao what

#

oh nvm

#

they both work but switching between them breaks

#

maaaaybe i see why

pure radish
#

yeah just faffing i have to do now

#

in principle it can work

#

but good that you guys can test it with deferred, it's functionally no different with a working immediate build, looks identical

pure radish
#

obviously a bit embarrassing now if it takes me another year to release it, so we've planted a flag in the ground

#

it starts a timeline

red cradle
#

I mean that's neat, but if someone want to download this current version of mod now they can't find the introduction

pure radish
#

well, it can be found, with a few more clicks

#

the idea is it's not there for very long

#

and by the time the update comes out it will make enough noise that people will want to redownload anyway

#

the old version is so antiquated and fucked at this point that it's not worth downloading

#

i may be saying that with the benefit of the new mod, but still, it commits many crimes

#

it's all there, you can view past revisions

#

the source is available, the artifacts are available

#

people repackage the thing on nexusmods anyway

#

it's just a mod, and a bit of self-deprecation after such a delay

#

frankly that it took so long for someone to notice rather makes the point that it doesnt matter 😛

red cradle
#

I see, for now seems like everything is sorted?

pure radish
#

with the new version?

#

definitely getting there, just some smaller issues to iron out

red cradle
#

yeah

pure radish
#

each mode can work if it was enabled from startup but switching between is breaking

#

which is probably something simple

#

bearing in mind the other mode wasnt working at all 24 hours ago

#

oh, now i have switching working

#

i am overcomplicating things

#

remove code

#

it improves

#

wow, the game has null cancelling

#

state of the art

#

yay even the "watermark" works on both

#

and when switching

#

these "release" APIs are dangerous lmfao

#

but it would be nice to make sure im not leaking d3d11 resources

pure radish
#

well

#

it doesnt seem to be leaking anything

#

shrug

#

good i guess

pure radish
#

nice, tidied things up a bit and it seems really robust again

#

I may have another build for you both @rancid hare @dawn flare soon which shouldn't care which "controller" mode you use

#

i need to check out this steam deck issue next

#

unless I somehow magically fixed it by accident

pure radish
#

sent 🙂

#

if you can check if steam deck is still on LSD that would be helpful, it'll be a few hours until I can get to it

#

there's a chance it got fixed via changes I made

pure radish
#

super glad we fixed that bug though, that woulda been awful to release

pure radish
#

ok steam deck is still under the influence

pure radish
#

getting renderdoc working on a 32bit game on steam deck is painful so I am conferring with chatgpt

#

bbl

#

the renderdoc guy doesn't provide 32bit builds on Linux

wanton phoenix
#

from what i've read you need to record an apitrace and then pass it to renderdoc

#

but this info is just from a quick search, no idea how accurate that is

pure radish
#

apitrace just causes the game to crash pretty quickly

#

probably because i am also hooking d3d11 to perform the fix

#

maybe i got something

#

lol

#

slightly less corrupted with the debug stuff, but still corrupted enough

#

how anyone does steam deck development i have no idea

#

your process tree is a mile deep in impenetrable nonsense

#

wanna know what else is a pressure-vessel? my fucking brain

#

all the debug tools just make things crash

wanton phoenix
#

Maybe the folks in the Linux game dev discord would be able to provide some help

#

lots of really knowledgeable people there, including some Proton devs

pure radish
#

hoooly crap i finally got renderdoc to load

#

but the gfx corruption is almost fixed this way

#

there is still a slight bit of smearing so hopefully just enough to debug

#

i had to:

#

install lib32-renderdoc

#

copy the librenderdoc.so to the game's local directory (system directory did not work for this)

#

run with PRESSURE_VESSEL_SHELL=instead WINEDLLOVERRIDES="dinput8=n,b" %command%

#

in the shell spawned, amend the command in $@ with:
LD_PRELOAD=./librenderdoc.so PROTON_USE_WINED3D=1

#

(that can probably just be rolled into the steam launch options, i just ended up spawning a shell for convenience)

#

DXVK renderdoc just wasn't working

#

where the fuck is it going to save my captures though

#

shit just ends up tossed all over the filesystem

wanton phoenix
#

Is the performance acceptable with WINED3D? DXVK is much more performant

pure radish
#

60fps so yeah

#

but im not trying to enforce WINED3D i just needed something to capture a frame with the issue

#

hell yeah brother i have captures

#

wine-preloader-whatever.rdc

#

it is weird that by switching to WINED3D and then adding renderdoc, the graphical corruption became less and less

#

with them both combined it's almost gone but i can see it still

#

god, and this is the environment valve is trying to popularise

#

as a user it's fantastic

#

but everything is containers in containers and 1000 character command lines and you have no visibility besides obscure environment variables that change between proton releases

#

please open it up, debuggability is important

#

omfg for real

#

oh fair enough its gonna give it a go

#

weird, it looks fine in renderdoc

#

ha ha ha

wanton phoenix
#

WineD3D uses a whole different graphics pipeline than DXVK

pure radish
#

i get that

#

gonna launch this again to visually compare

#

oooh

#

i relaunched

#

its much worse again

#

and i can capture it

#

so there's run-to-run variance

#

that is so bizarre

#

now if these look good in renderdoc something fucky is afoot

#

YEP

#

the corruption vanishes in renderdoc

#

so it's some video driver stuff? the graphics API use is apparently fine?

pure radish
#

i can maybe try replaying the capture on the steam deck itself, and see if that reproduces it

#

since i've transported the captures to windows

#

yes

#

now i have the corruption in the capture

#

it happens quite "late"

#

earlier in the pipeline the text is fine

#

the last GL drawcall

#

chatgpt says:

#

The texture corruption is not in your app logic, not in the input texture, not in the shader code —
but in the OpenGL driver implementation on Linux (Mesa) or WineD3D's translation to OpenGL.

#

and therefore DXVK as well?

#

that's quite fucking insane

#

there has to be a way i can work around it

#

absolutely mental

#

let me ferry a screenshot of this

#

as replayed on deck

#

as replayed on glorious nvidia silicon and microsoft system software

#

the same capture file

#

explain this atheists

#

lets see what a mate makes of this

pure radish
#

there's nothing more the actual steam deck can tell me i think

#

i just have to try stuff (i've got a few suggestions)

pure radish
#

tried all of chatgpt's suggestions

#

now I have to use my own brain, damn

pure radish
#

gonna need to get a better debugging setup on steam deck

#

having it set up as a remote windows debugger would be good

#

maybe the game can run under a system wine

#

then there's less fucking about

pure radish
#

neato

#

even i am surprised it works up to this point

#

if i can really get this working it even apparently handles build deployment for me

#

then i can just churn out builds with random fix attempts

pure radish
#

oh shit i got it working

#

needs native Windows webservices.dll

#

hell yeah brother remote control of MGS on my deck

#

shame the ASI loader moans about the 64bit binary

#

isnt there a way to turn that off

#

actually fuck it ill just delete the 64bit builld

#

this warning doesnt appear if launched in a sane way

#

its something to do with how im hacking my wineprefix

#

fucking sick

#

even build deployment works

#

now i don't have to touch the deck at all

#

this is actually a debug session on the deck in proton, insane

#

alright that's all the horrible shit abstracted into the trash

#

now it is just a windows machine

#

breakpoints work etc

#

with StartGame = true in the ini I don't have to touch any deck inputs

#

this is peak deck debugging

humble ravine
#

I've litrelly held off getting MGS1 for Deck for this moment

pure radish
#

the problem doesnt seem to be in the d3d11 hooks at all

#

i can just flat out turn them off and its still fucked

#

wow, interesting

#

so if i just disable the upscaling entirely what happens

#

that works....

#

wtaf

#

what depends on this flag lmfao

#

i thought i just bisected everything

#

dude the convenience at which i can debug on deck now

#

total shitshow yesterday now its bliss

#

there's like one thing i havent tried disabling

#

lets try that

#

and now its fixed but the image is cut off

#

so i know where the problem is

#

this is derived from the game's builtin code but adjusted to allow upscaling

#

what values is it setting

#

1280x400

#

what does it set on my desktop

#

1280x720

#

i.e. exactly half of my resolution

dawn flare
#

These bugs are now fixed.

pure radish
#

so i mean lets just try some numbers

pure radish
#

actually how did i implement this function in v2.2

#

the issue wasnt there on steam deck before?

#

wait what the fuck

#

oh nvm

#

previous code set steam deck to 1280x384

#

but

#

doesn't fix the problem

#

however

#

i think I know what does

#

lol

#

fixed

#

those two parameters I removed coz they no longer seemed necessary on PC

#

put them back and deck is working again

#

so time to figure out what they actually control

#

wow was it worth getting the VS remote debugger working

#

that woulda taken a week otherwise to track down

#

whatever those values control it's not a current hook of mine in the d3d11 api

#

lemme renderdoc capture it and see if it's a parameter somewhere

#

we just have these

#

two values

#

no idea what they are

#

the old upscaling needed them increased

#

the new upscaling only needs it on deck

#

the way the game calculates them is complicated

#

and i think for the OG upscaling i tried it, and it wasn't sufficient

#

but it is now? ok

#

wow it's really

#

particular

#

i have one working set of values lol

#

i need to reverse this and see where it goes

pure radish
#
 *(args[0]) = (2560 - w) >> 1;
 *(args[1]) = (M2Config::iInternalHeight * ((x - y) >> 1)) / x;
 *(args[2]) = (w * M2Config::iInternalHeight) / 256;
 *(args[3]) = (std::min(h, x) * M2Config::iInternalHeight) / 256;
#

looks like it should be this

#

working on deck and desktop

#

i have variables y and x reversed from usual meaning just by order that they're in the code lol

#

guess i should fix that

#

one issue im tracking remaining to fix until i am happy

#

lets see if i know where it is first

#

yes i do

#

the rewritten widescreen hack has introduced some geometry clipping

#

its very slight

#

yeah, even in the mode where it shouldn't be applying any adjustment, there is clipping

#

on large scale it is working, and is correcting aspect ratio, but there's some subtle math inaccuracy ig

#

don't wanna reintroduce the old stuff coz it was a batshit lot of code pulled in for only a small part of it adjusted

dawn flare
pure radish
#

fixed it

#

oh w8

#

nvm maybe i didnt

#

lmao

#

okay

#

now ive fixed it

#

yep

#

that's got it

#

a few issues there lol

#

in my IDA database i correctly labelled the hook location

#

but when translating that into the fix, i ended up hooking the Y axis not the X axis

#

that still worked out because i was setting the right register

#

but it meant a bunch of flags were not set correctly

#

so ive moved it to the correct place, adjusted it so both registers are set now

#

then i also broke the thing that tells the GTE hook what the ratio is during some cleanup, that's also fixed

#

now it works flawlessly

#

alright

#

hopefully the final beta build

#

one last check on desktop and deck

dawn flare
#

Sick

pure radish
#

all looks good

dawn flare
#

Is it worth checking against the various mgs1 disks?

pure radish
#

yes definitely

#

especially PAL vs NTSC

#

so i.e. Integral vs Europe

dawn flare
#

You gonna send it out to us, or just do the testing on your own?

pure radish
#

yeah sending it in a sec

dawn flare
#

No rush, I'm still working for a few hours

pure radish
#

builds dispatched

dawn flare
#

Just thinking out loud, we may want to find somewhere in the game that generates a FMV clip

pure radish
#

yep, all good stuff to check

dawn flare
#

Just trying to think of other edge cases

pure radish
#

so "controller mode" should be fixed (either work and changing between)

#

deck fixed

#

geometry clipping fixed

#

looking at the deck playing the intro rn

dawn flare
#

Codec numbers/savenames fixed

pure radish
#

that was in alpha 😄

#

but yes

#

underwater fixed, cutscenes fixed

#

but yes also double check widescreen mode n stuff

#

since that was broken recently

#

its working now for me

#

I don't have much more planned for 3.0 unless we find some bug

#

there's one tiny code cleanup thing I want to do (moving some game-specific magic numbers under the purview of the game logic) and then I'm just preparing release notes and screenshots

#

accepting more testers at this point again now we cleared that backlog - particularly if you have strange system setups (AMD GPU, linux etc), though I think we have Steam Deck handled

#

not saying having AMD GPU is strange but i think we all have NVIDIA

#

so the only AMD GPU this has seen so far is Steam Deck

#

the amount of work thats gone into this just for some cutscenes and codec numbers is staggering

wanton phoenix
#

I use an AMD GPU, but I'm running Linux - I can do some testing If you need it
It shouldn't be a lot different than running it on a Steam Deck though, so you probably don't need it

#

I use openSUSE Tumbleweed (with GNOME as the DE) with AMD RX 7700 XT

pure radish
#

cool, one moment

#

sent 🙂

#

time to give my steam deck a rest

pure radish
#

well that's mysterious, there's some values passed to the GW device setup that seemed to be double the required size, and in renderdoc there was a load of wasted space

#

well we just found a GPU that seems to require that

#

so I've doubled it on top of the upscaled resolution as well 😛

#

graphics programming sucks if you don't need to make it work on just one GPU

#

its just random shit everywhere

#

like the entire point of the graphics API should be to hide the device specifics :S

#

the original values here were 640x512 which for a 320x256 game seemed weird, and the latter worked for everything except this one GPU

#

how did they work this out

#

somehow it's really important that three quarters of that texture is black

#

for reasons

red cradle
#

well hope for the best that playtest is going smooth this time

pure radish
#

I might play some on deck

pure radish
#

ocelot fight looked so good haha

#

FMVs seem fine, getting the nuclear weapons stock footage

#

rip old dude

#

I have 270 hours in the steam game

red cradle
#

is the wobbling still there or still need that PGXP thing

pure radish
#

yup needs pgxp

#

I quite like the wobbling though 😛

#

doesn't look like PS1 for me without it

#

that'll be post-3.0

#

hopefully without such a delay this time

#

finally have the tools

#

will be a separate option so we can keep people happy who like wobbling

#

i already have a pretty good idea of how to do pgxp, i looked into that a lot a year ago

pure radish
#

wow

#

i noticed "fullscreen" on steam deck had broken/missing geometry but 16:9 didn't

#

that GTE hook is fiddly as fuck

#

fixed it though and found a cleaner way to correct the math

#

it was working fine on desktop lol

#

new version working on both tho

#

hard to fuck this up

#

crazy how subtle that issue must've been coz it was working fine for 99% of stuff

pure radish
#

deck experience is now 👌

dawn flare
pure radish
#

there was some strange artifacting that happened on the PAL games when you opened the save menu

#

i think that always happened tbh even unmodded

#

but its worse with the upscaling so i've put a fix in

#

nvm fix doesnt help

#

lmfao

#

fuck it

#

w8 maybe i can improve it

#

oh maybe it works now

#

basically just for a couple frames, blank the screen since it happens during menu transitions which are already supposed to be black anyway

#

first attempt was just one frame, now I set it to 5, haven't seen it since

#

(i am just fixing very low priority things while i wait for feedback)

#

that seems to have cracked it, nice

pure radish
#

😛

#

caught a whole class of potential issues there

pure radish
#

good news: that was the cause of the last bug we were tracking

#

having the old mod and the new mod both installed breaks upscaling

#

i broke scanlines (for everyone, and we just realised), but that's probably something stupid

#

no idea how the scanlines render, so this'll be interesting

#

huh, the game just decides to not bother drawing them

#

this whole bit goes missing

#

maybe it has some resolution cap

#

will need to find the game code for it

pure radish
#

found which bit of the upscaling causes them to get disabled

#

idk why yet

#

none of the d3d11 stuff tho

pure radish
#

lol this is wild

#

so the scanlines get finer and finer

#

as the resolution increases

#

and eventually? it must decide that they don't exist, so it doesn't render them

rancid hare
#

I always assumed they were just a texture lmao

pure radish
#

maybe we just recommend reshade if people want it with the upscaling

#

they're not great scanlines anyway

#

as far as i know this is the only issue now

#

if you can even call it one

#

its kind of a feature

#

lemme try one more thing

hoary pier
#

I imagine the people who'd want a higher resolution isn't generally the same crowd that'd want scanlines anyway tbh

pure radish
#

yeah

#

shouldnt hold up this release i think

dawn flare
#

Caaan you set a separate upscaling value for that specific texture? I doubt it.

pure radish
#

its not really a texture

#

but i mean this must've been an issue on the old mod as well

rancid hare
pure radish
#

it's very hard to justify delaying release prep and stuff, for this

#

especially when its so bad anyway

red cradle
#

for sure, for the stuff achieve so far, that would be a big decent release

pure radish
#

it looks non-trivial and yet more fucking about

#

interesting way to render it, given its so shit

dawn flare
#

Yeah. I'd like to see a better (included) scanline implementation, but for now I think it's totally fine to put on the to-do list

pure radish
#

aint gonna get it by making this one just show up tho

dawn flare
#

Lol

pure radish
#

i didnt realise how much is in this release tbh

#

this brings the full family of supported games

#

well, good job, team, we definitely pipe-cleaned this shit haha

#

it's gonna be a much better release thanks to y'all helping and reporting issues

#

immediate mode would've been a disaster

#

steam deck was also a total mess

#

and an issue with some GPUs

red cradle
#

good job, this really is my favorite thread in the modding forum

rancid hare
#

In B4 Konami drops a new patch with the new metal gear hotline in 2 days that breaks everything

red cradle
#

I wonder if they figure out the issues in MGS1 as we did

pure radish
#

they definitely could've done something about it but they'd have to think about how to represent it in the ingame settings etc

#

not as easy as just smacking a number in a .ini

pure radish
#

time to run my auto-test script again haha

#

all good

#

okay

dawn flare
#

_>

pure radish
#

thought it was something i did xD

#

well we are very close to release now

#

you could say we have never been closer

red cradle
#

midnight release let's go

pure radish
#

alright windows updates installed and visual studio works again

pure radish
#

readme, license and release notes updated (again)

wanton phoenix
#

Seeing the news about CRT filters on not being in at first, I begun preparation

#

Turns out one guy made a nice script to install reshade for games played via Proton on Linux and I got it working

#

It doesn't look too shabby

pure radish
#

way better than the built-in stuff

wanton phoenix
pure radish
#

well now we are real close

#

im doing some final checks on the actual release build

pure radish
#

it's go time.

humble ravine
#

Huuuugee

red cradle
pure radish
#

yeah, lots of them are really feature requests which is nice

#

that used to be 1400 lines

#

well it was a long journey to get here lol

#

started with a rewrite and changing all the hooking like 6 months ago

#

phew, glad we got there

#

last few days I just wanted it to be over haha

#

I like working on it but the moment right before release is very tense

red cradle
pure radish
#

what if you enable upscaling?

#

okay something very weird is going on for you lol

#

oh

#

it's creating multiple devices

#

what

#

do you have two GPUs?

#

shouldnt be seeing

#

ID3D11Device hook succeeded

#

twice

red cradle
#

ok let me see

pure radish
#

basically bombs out after the first device is created

#

the game creates them in a sort of priority order

#

HARDWARE, REFERENCE, WARP

#

i would surely expect it to use a hardware device... otherwise your performance must be miserable

red cradle
#

oh my god, that works lol

pure radish
#

does upscaling work with it?

#

if so i can quickly rerelease that

red cradle
#

so yeah my gpu is that this

#

oh yeah let me try

pure radish
#

aha

#

is it using the correct GPU

#

we didn't have multi-GPU testers 😛

#

hopefully that won't impact too many

#

but shouldn't be too hard to fix it

#

yeah, i see in your log now

#

[2025-06-11 21:18:30.392] [MGSM2Fix] [info] [System] GPU: Intel(R) UHD Graphics 630 (driver 25.20.100.6617)
[2025-06-11 21:18:30.394] [MGSM2Fix] [info] [System] GPU: NVIDIA GeForce GTX 1060 (driver 32.0.15.7652)

#

it was probably hooking something it already hooked and ending up in a stack overflow 😛

#

this is the "nice" kind of issue to fix

#

just need to make sure its using the right GPU

#

(and upscaling works)

red cradle
#

ok first thing first, without checking the GPU, turn on and off upscaling both works

pure radish
#

awesome

#

won't even need a new version number at this rate 😛

red cradle
#

and seems like I'm on GPU 0 lol

pure radish
#

hmm ok

#

are you on GPU 0 without the mod?

red cradle
#

yeah without any ppf mod

pure radish
#

ok so thats not unusual then

#

i'll rerelease with the fix

red cradle
#

nice, will report back if encounter problems again

pure radish
#

glad that was nice and simple

red cradle
#

"MGS 1: Ketchup mod folders will be automatically created for every game version.", oh I see that it's kinda different now, although the readme section still used the old directory

pure radish
#

oh, thats coz its making the wrong folders lol

#

will fix (and rerelease)

#

fixed

#

i don't mind rereleasing the same version if it's quick, and the fixes are small 😛

#

hopefully thats everything

pure radish
#

finally its a good way to play the game, according to github issues guy

#

😛

red cradle
#

ok seems like this time the simplified chinese mod can't enter the game, regardless DisableRAM and DisableCDROM is true or false, or both true/false

pure radish
#

is it crashing?

red cradle
#

yeah, master collection menu is fine, it's just when enter the game it crash

#

without this mod, it's all fine, can run the game

pure radish
#

ok one moment

#

man there is just so much to test already haha

red cradle
#

well thankfully only few used this mod so far, so take your time to check lol

pure radish
#

I believe I've fixed it

#

one moment

#

basically forgot to convert the old SQArray to Sqrat::Array

#

now i get all this and the game starts, so

#

thanks chatgpt

red cradle
#

very nice, fixed

#

cool now all the stuff is fixed, time to test and explore more possibility

pure radish
#

❤️

edgy hedge
#

Hey Nuggs! First, thank you so much for all the hard work of the last months on this project

#

I have a question, is it normal to have those small black bars even if I think I set up the widescreen options correctly?

pure radish
#

the NTSC games have them, seems quite intentional as they go out of their way to add them, I think we could remove them but it hasn't been done yet so it's future work

#

for now I kept them to make sure all the math maintained correct ratios

#

as there was already enough going on getting this to work 😛

#

now this works properly we can think about removing them

edgy hedge
#

No worries, it was just to know if I screwed something up

#

the game is already beautiful enough thanks to this new release

#

thanks again!

pure radish
#

for this release it just made sense to eliminate any extra variables, but yeah I will look at that going forward

#

switching to PAL will remove the bars but then you have a lower framerate so

#

which would also be nice to fix

edgy hedge
#

The future releases will make it the definitive remaster then

#

do you think it's also possible to overclock the internal emulator like Duckstation does, to avoid framerate dipping?

pure radish
#

yeah, we've solved the really hard problems in this release, you won't be waiting another year for refinements 😛

pure radish
#

actually i know it is

#

as i did it once, kinda

#

i had the game running double speed

dawn flare
#

Actually, that would be real nice, provided it doesn't bork in-game logic etc

#

Also, congrats @pure radish! Thank you for all the hard work you've put into making this the best(?) MGS1 release

#

Again, I'm back in the bug tracker, looking to see what I should bug you about adding/fixing next 😛

pure radish
#

i am probably going to try and sort out the keyboard bindings first

#

but that surely won't take too long

#

it just needs someone to sit and do it

#

they bug me probably more than other people because im sat here coding and then i try to open menus and its E+M

#

just please work like a conventional game what are they doing

#

would be nice if the mouse did something as well but not sure what, but there are at least two nice buttons there

#

might check out the GOG bindings to see if they're more sensible

#

but it'll be customisable

meager yacht
#

Congrats with new release!

#

Is there anything could be done with black bars at the top and the bottom in US version?

pure radish
#

eventually: yes

#

in v3.0: no

#

i will look at that for next release

meager yacht
#

Gooood

pure radish
#

didnt want to for this release, wanted to keep all the ratios correct in the math to ensure i wasnt introducing problems for myself

#

but now this is working correctly i will do it

meager yacht
#

Yeah, it's working great

pure radish
#

thank god we tested it

#

(mostly)

rancid hare
meager yacht
edgy hedge
#

Oh, which shader in particular does the trick?

edgy hedge
#

thank you!

pure radish
#

oh hey now a mod i use for another game got an update as well

#

what a strange day this is

#

trade deal

pure radish
#

thx again those who sent ko-fi ❤️ appreciated

dawn flare
#

Work is still up in the air until the end of the month. Will try to help out once things are more secure.

#

Oh, did you update the gifs on the GitHub now that stretching is fixed?

pure radish
#

i added a new one

#

alright another hotfix just went out for another multiple GPU issue

#

M2 made it really easy for me in that i just latch the first stuff to get initialised because that ends up being the correct instance to use

#

can ignore any other shit it initialises later because its not used for the game it seems

#

if you don't have multiple GPU issues or care about ketchup none of these hotfixes apply to you really

#

i guess it doesnt actually matter which one i pick, i just have to pick one and stick with it

#

the issue is probably just it trying to do it multiple times

#

but whichever GPU or device context ends up being used, as long as i attached only once, it works regardless of which one i picked

#

both multi-GPU issues were fixed in the same way basically

#

just did the same thing in another place xD

#

that should cover it though

#

crazy how its 2 lines of code

#

thank god for @rancid hare with the system info logging 😛

dawn flare
#

10/10

pure radish
#

thats fixed every upscaling bug today

#

i put the driver version stuff in which tbf hasnt been useful but its cute

rancid hare
#

got a new headache now xD

pure radish
#

oh this happened on an old version too and i did some stupid shit to bypass it

#

lemme see if reversing that stupid shit helps

dawn flare
#

I knew you were spying on me

#

Just had to know what I was doing in my other monitor (it was pr0ns) while testing

pure radish
#

fuck knows what i have to do to appear legitimate

#

probably not interfere with process memory, but

#

i have PE resources!

dawn flare
#

You may want to throw a note on the github until you get it sorted

pure radish
#

that makes me legitimate

#

i mean its fundamentally not my problem to solve

#

i can try to dodge it

#

but there is no foolproof solution

#

otherwise the hackers would use it

#

optimise for speed rather than size

#

last time i switched from speed to size, and that helped.. somehow

dawn flare
#

Newp

pure radish
#

the hell is "lazy"

#

nothing lazy about this shit

#

the problem is like

#

some malware uses some public library

#

that gets signature'd

#

then everyone using that library is fucked

#

even for legit use

dawn flare
#

MS Defender reports clean

#

FWIW

rancid hare
pure radish
#

defender is the bigger problem coz its built into the OS and is very hard to silence

dawn flare
#

"A primitive virus, which resembles the Stupid virus in that it does not reserve the area it occupies. This may result in a system crash if a large program is run, but the most obvious effect of the virus is a general slowdown of the system. " - https://www.f-secure.com/v-descs/lazy.shtml

pure radish
#

last time it was defender that triggered

#

but i never see it because the builds originate on my machine

#

"I know this thread is very old, but for people which will come here - to fix this issue simply add icon to the program, im not even joking, it works."

dawn flare
#

standby

pure radish
#

can you add an icon to a DLL

#

we need an icon

#

i was on the right lines about PE resources

#

pretty sure icons are those

#

mine are just HLSL shaders and squirrel scripts

rancid hare
dawn flare
#

Scanned the entire unzipped latest release, and it seems gouda for Defender

pure radish
#

even if you kludge it

rancid hare
#

i tried that a few weeks back with mgshdfix sadly, yes xD

pure radish
#

its interesting as we use the same "tech"

#

both using safetyhook etc now

dawn flare
pure radish
#

Resource Hacker is often used to put icons to a dll file.

#

see

dawn flare
#

¯_(ツ)_/¯

pure radish
#

they are just PE files

#

DLL and EXE are not too different

#

there must be a way

rancid hare
#

well if you do find a way lemme know, i'd love to use this .ico i made up lol

pure radish
#

if you open the .asi in 7zip and go to one of the rsrc folders, you can extract the hlsl shaders im using

#

basically the same thing is used for icons

dawn flare
#

Yessssss

pure radish
#

also thats nice

#

we need an icon as well

#

isnt that too high resolution for a PE icon

#

what a nice problem this is to have

#

the mod works great but we need to insert a fucking icon

#

i have a placeholder icon

rancid hare
pure radish
#

You need to use an .ico file. You cannot use a PNG image file for your executable's icon, it will not work. You must use .ico.

rancid hare
#

it is an .ico.

pure radish
#

i need to convert mine

dawn flare
#

You'll want to zip it

#

Discord autoconverted it

#

Classic

pure radish
#

wat

dawn flare
#

If Avevis uploaded the ico, Discord seems to have made it a ping

pure radish
#

oh

#

eyy i did it

#

the icon obv doesnt show up in explorer coz of the file extension, but

#

if you rename it to .exe

#

it does

#

lets test the icon theory

#

otherwise we need to buy a fucking Windows signing certificate

rancid hare
#

swapped out mcafee for symantec, so weird lol

pure radish
#

damn

#

i mean what are you supposed to google, really

#

"how to evade anti virus"

rancid hare
#

lmao

pure radish
#

i think the malware developers would've tried that

rancid hare
#

i wonder if chatgpt/whatever ai is able to identify what's being flagged in the code

pure radish
#

i'd need to make an account

#

to upload a file

#

every chatgpt query ive done so far has been without an account

rancid hare
#

oh, also if you use resharper at all, i found a 3 month free code the other day

pure radish
#

is that a CLR / C# decompiler?

#

sounds like one

#

oh

#

no

#

its a "language intelligence tool"

#

does it do C++

#

looks very C# oriented

rancid hare
pure radish
#

i'd give it a go and see what i think

rancid hare
#

3 month code - CHRISBLAKELY
then for their ai stuff, you can just keep renewing the free trial lol

pure radish
#

i don't like things that are going to write code on my behalf, there's a sweet spot of machine assistance i think

#

doing this stuff myself is healthy brain activity 😛

#

but yeah i was knee deep in shit during the huge rewrite

#

had no idea if it would all go back together into one piece

#

tearing chunks out of it left right and centre

#

installing

#

try navigating SystemVerilog without any machine assistance

#

"wow, i am going around in circles"

#

does this mean nexusmods enforces some virus scan?

#

maybe you should just upload a text file with a link to github 😛

rancid hare
#

yup, they use virustotal. if it's only a couple hits like there are, you can just email their support for them to manually flag it as fine

pure radish
#

i mean fuck sake

#

of course game mods are gonna do stuff like code injection

#

this is telling me the license key is invalid

#

am i being silly

rancid hare
#

iirc there's a checkbox to the left of license, make sure that's unchecked - that's for if you have a local / corporate licensing server handling it

pure radish
rancid hare
#

oh that's not a key, it's a promo code for their website

pure radish
#

oh

#

ooooh

#

i am being silly

#

so i guess i need an account

#

wot

#

wat am i doing

#

oh i can log in with github at least

#

where do u put the promo code in

#

i mean im at the checkout

rancid hare
#

then it's the discount code button underneath product on the actual checkout page

pure radish
#

oh im blind

#

i was on that page and just didnt see that link

#

god

#

felt like a right boomer doing that

#

holy shit

#

we made it

#

i am nuggs nuggs

#

not sure why it did that lmfao

#

right whats it make of my code

#

"its shit"

#

nifty

#

we'll see how we go

wanton phoenix
#

Or you could try contacting the company that provides the AV, I assume it's a false positive

#

It would be fun to run a scan on some mods from nexusmods, and see how many get flagged

#

Though not sure how the AV companies operate, whether they'd be willing to review it

#

their job would be really easy though, since they'd have access to the source code

pure radish
#

you maybe hope they already crawl places like GitHub over time

#

but maybe that is wishful thinking

wanton phoenix
#

I just checked one mod from nexus mods, and it gets flagged by the Cynet AV

#

One of the AVs that flag your mod

pure radish
#

¯_(ツ)_/¯

#

can't fix stupid

#

i mean hypothetically you fix it for one release

#

we'll just be back here next time

#

indeed its open source and uses MSVC now so just build it yourself if you use any of this shitware

#

Windows Defender is a slightly different issue because it's a builtin component

#

but thankfully clean there this time

#

its unfortunate because malware is gonna do similar sorts of code injection to mods lol

#

and the process is just totally opaque

#

like i said you can't google "how to evade anti virus"

#

all you can do is submit it to each vendor... for every release

#

that won't get tedious at all

#

you just hope they are crawling GitHub releases for projects with enough downloads

#

27k downloads before this release which is not nothing and that will go up now for sure

#

i love using SkipNotice + StartGame on desktop tbh

#

start it on Steam and ur straight into the game, glorious

pure radish
#

you can ask chatgpt to summarise m2fix

#

slightly terrifying

#

full circle, summarise a project with code that it helped write

pure radish
#

phew, no more complaints? 😄

#

glad we have a really solid release for once

rancid hare
#

It didn't make me breakfast, terrible mod 0/10

pure radish
#

finally its something to be proud of

#

in both code quality and outcome

dawn flare
#

It didn't make @rancid hare breakfast, great mod 10/10

rancid hare
#

"released with mixed reviews"

dawn flare
#

So... Now what? I almost feel aimless now that I can't harass Nuggs about an update

#

Maybe now Snake can finally rest

rancid hare
#

Harass Konami for more games

dawn flare
#

I did just hear that there's an upcoming metal Gear event so...

#

Would be nice to get some fixes on the outstanding issues, but we're definitely in the "nice to have" phase of dev

fringe shore
#

I played for about 2 hours yesterday and everything worked flawlessly. Just want to express my gratitude to nuggs and everyone else on here who made this possible! Yall are pretty good mgnYPG

dawn flare
#

Uhm... Does RB+LB still work for you folks to open the pause menu?

#

Yeah, my controller is giving me grief until I alt-tab... Weird.

fringe shore
#

Worked fine for me yesterday. I was using the steam deck and have one of the back buttons specifically for it lol

dawn flare
#

Hm, could just be my controller or something with my system.

#

Oh. ALL the MGS1 bindings are fucked for some reason.

#

LT is bringing up the in-game pause

fringe shore
#

I was thinking that. I know in mgs2 if I move the in-game controls around it moves the menu to those buttons as well. Might just need to reset to default

dawn flare
#

It's reporting keyboard input, which is weird in and of itself

fringe shore
#

Check steam input

dawn flare
#

SteamIn is disabled

#

You know what though, I did just firmware update the controller, so maybe it's borked

fringe shore
#

Steam input must be enabled on this game, there’s no xinput support

dawn flare
#

Also, looks like that one line of pixels in PAL is gone now

#

Ah. I still had the 8bitdo firmware updater open in the background. When I closed it I got the USB jingle, and now it works fine.

#

@pure radish You may want to add "upload the MGSM2Fix.log to your bug report" as a requirement for posting a github bug

pure radish
#

would that requirement affect feature requests tho

#

tbh github issues isn't really good at separating the two

dawn flare
#

Oh, there's no way to have a separate template for each type?

#

Makes sense

pure radish
#

not sure

dawn flare
pure radish
#

there are definitely some bug reports on there that I've never been able to reproduce and nobody has provided much diagnostic evidence for

dawn flare
#

Yeah. I figured I'd poke them and if they don't get back to you in a couple weeks, you can close 'em out

pure radish
#

I just flagged them all yesterday and I'm just gonna close them at some point

dawn flare
#

If it's not helpful, I'll stop. 🙂

pure radish
#

no no its good

#

go for it

#

I'm too embarrassed to reply to them

dawn flare
#

Lol, I'll take them bullets

pure radish
#

💀

dawn flare
#

I feel that ADHD guilt :p

pure radish
#

the cursor one is weird i mean

#

ive never seen a cursor and im sat at a desktop

dawn flare
#

Yeah. It should be easy to replicate

pure radish
#

i tried to remedy some of them even in v2.0

dawn flare
#

So I'm thinking it's probably an issue on the user's end

pure radish
#

the mod forces things like FULLSCREEN_CURSOR to zero as of v2.0

#

to try and help with that

dawn flare
#

@pure radish I assume the M2 logs are safe to post in public? Nothing majorly identifiable unless I installed the game to c:\users\firstnamelastname\desktop\mgs

#

Also, does the log report the game language/region? I took a brief look but didn't catch it.

pure radish
#

yeah, and obv it has hardware info at the top

pure radish
dawn flare
pure radish
#

so if you boot integral or US or Spain it will show that

dawn flare
pure radish
#

yeah

#

but i mean anyone could select whatever version, it's not really personally identifiable

#

i play integral a lot and im not japanese

dawn flare
#

Yeah, not related to personal info, just didn't want to bother reporting it if it's included already

pure radish
#

but that's pretty much it, as you say don't install it to your Windows user folder lol

dawn flare
#

Lolol

pure radish
#

it doesn't print anything about your steam account etc

dawn flare
#

Nah, I didn't think so.

#

I can't really think of much (useful) info it could pull that would also be PII, but I did want to check since I threw a log in GitHub without thinking. Since otherwise we've been posting them in here which is relatively more private.

pure radish
#

yeah, nothing in there in that sense

#

feel free to check every line 😛

dawn flare
#

Nah, I trust you well enough. But I did figure it was worth asking in case you hadn't been thinking about it

#

Fun (for me, not for you) feature request: It would be lovely if M2Fix could self-update on run. I dunno if there will be enough updates to warrant the effort tho. Would be handy for stuff like the Steamdeck where it's a bit of a hassle to drop to desktop mode and go download it.

Second thought: Is it possible to update the ini during runtime and reload? Might be handy if we could do that via the "console"

pure radish
#

self-update is hard because the game will have to restart

dawn flare
#

Ah, probably the same with the config

pure radish
#

ini updates could be done but some behaviours are "one shot" so it needs thought about what that means

#

hooks can be unhooked

#

fairly easily

dawn flare
#

Yeah, just throwing it out there as a thought. For stuff like changing the upscaling for testing etc

pure radish
#

external resolution options are only sampled once at startup, so it doesn't really make sense to change those on the fly

dawn flare
#

Ah, yeah

pure radish
#

internal resolution could be changed dynamically though

dawn flare
#

Potentially useful?

#

I think?

#

Worth the work? Dunno.

pure radish
#

would basically need to free all the resources and start again with the new value

#

but these are very much "nice to have"

dawn flare
#

Oh absolutely

pure radish
#

not even worth thinking about until we've actually ticked off the genuine game enhancements

dawn flare
#

I'll genuine game enhance you

pure radish
#

even then you'd probably start looking at other games for bonus features

dawn flare
#

Yeah. That's why I'm soft-lobbing them here instead of making a github req.

#

Okay, I'm done being annoying in github. Everything else looks like feature requests that haven't come up in here as something you're considering.

pure radish
#

good timing for konami to put the master collection on sale lol

dawn flare
#

YEAH!

#

Ugh. I really want someone to mod English item descriptions and codec text to Integral

#

I wonder what a good bounty would be for that..

pure radish
#

not my kinda gig

#

i want it too though

#

knowing how the chinese mod was done (every detail) would be useful for that

dawn flare
#

Samesies

#

Oh that was interesting

pure radish
#

really needs a more "romhacking" skillset than mine though

dawn flare
#

I used devmode to load into S07A for a screenshot, and the elevator had no textures until I went and looked at the keypad

pure radish
#

oh yeah expect all sorts of weird shit using the stage select

#

that's normal

dawn flare
#

Iiiii can't seem to upload gifs?

#

or any images?

#

There we go. Fresh gif. I dunno if it's actually different than the one already up on the github aside from the black bars

pure radish
#

yeah i think discord uploads are broken rn

#

but also that link isnt working for me either

#

onedrive too busy trying to hack my browser via javascript