#Modding the MGS1 emulator

1 messages · Page 2 of 1

keen sky
#

lol excellent

red cradle
#

might not deleted by Nexus, just hidden by the author

woeful flare
#

yeah

#

but i hope it IS deleted

woeful flare
#

…because the guy is distributing a PS1 game?

frozen heron
#

tbh it was a sketchy mod claiming to extract bins for emulator use and in reality it was just a rom downloader

#

so i don't blame him

red cradle
#

Bruh they reported it with legitimate reason, what's wrong with that. Even people in this thread thought that mod is fishy too

red cradle
#

no but don't you find it weird that it straight out put the whole game on it? It's like modding the whole game then just uploaded the game with modified files. I believe even mod sites have its own rules

frozen heron
#

guys i don't think this discussion should go any further lol

#

if anything it's slowing down modding

#

i think we should call it out

#

just to make it clear modding isn't illegal, downright sharing whole roms is

#

then again, let's please stop discussing this and get back to work

#

aight man

chrome path
#

Modding isn't a legal grey area. It may be against terms of service, but TOS and EULAs are not legally binding.

#

Nobody's talking about it there.

woeful flare
#

oh um

#

ldksjfldks

#

what 💀

#

my goal is to actually report mods that are wrong and/or illegal bro, it's not that deep

#

but whatever, you do you

pure gazelle
#

damn did the la le li lo lu tell you do that eh?

wheat rover
#

#announcements message

#

Simple as.

wheat rover
#

I don't think they were the only one to report the mod as a result.

woeful flare
#

bro we had no idea what it was doing until like, two days ago 💀

#

it's not like we went

#

"oh we knew it had pirated copies this whole time, we're just sharing it cuz we want to"

#

we literally made that discovery in these channels

craggy ingot
#

to be more on topic, I've verified that, while the individual files in alldata.bin are compressed using PSB v2 and the alldata.bin itself is compressed using v3, you can actually compress both using any version and it still runs just fine, even though the formats aren't identical. v4 subjectively seems to be the fastest to compress and decompress but I haven't actually done a proper comparison

frozen heron
#

do we have individual tools for each version?

#

if so, is it possible to make a software that detects the version and uses such?

craggy ingot
#

if you're using GMWare.M2 / MArchivePacker, they're capable of supporting all versions from v2 to v4 and will detect it automatically in the header (which I assume the emulator is doing as well)

frozen heron
#

ahh so we've been doing it right, got it

#

alldata.bin is a psb too?

#

dumb question actually nvm

craggy ingot
#

it's an mArchive, though it isn't a dumb question because some of the .bin files are actually psb files (like meta_008_0000.bin)

#

I'm also putting together code to extract pngs and wav files from the textures and audio streams

frozen heron
#

about that, did we make any progress?

#

i see it is identified as a psb but gives no data whatsoever

#

other than stream files which are virtually dump files

craggy ingot
#

also you can actually hear what any of the audio files sound like if you open Audacity, go to File->Import->Raw Data, and select any of the files in /system/sound/, i extracted the streams from the metadata and I just need to add on the .wav header for them to be actual wavs

craggy ingot
# frozen heron about that, did we make any progress?

the only thing i've identified is that the very end of data_008.bin is the same as meta_008.bin, and that it definitely holds the current settings, although it doesn't seem to hold it in the PSB portion of its data, and it's basically unintelligible to me

#

once we can get a meta_008_0000.bin that actually holds some settings, i would be very intrigued

frozen heron
#

wym?

craggy ingot
#

in the dotmatrix case you mentioned, I can't actually get the game to save the dotmatrix setting inside the meta_.bin file

#

for me it always saves settings inside the data_.bin file in the user folder

#

it's interesting that the meta_.bin folder is called WinBackup though and makes me wonder if maybe the settings will save there on some crash event or something

frozen heron
#

interesting

#

for what i read data.bin holds the rom savefiles in cadvc and the mega drive mini

#

while meta.bin holds main menu settings

craggy ingot
#

what does a main menu setting mean, exactly? one that's set via the main menu's options as opposed to ingame?

frozen heron
#

precisely

#

window size, resolution, general settings for the emulator

#

everything that's outside the rom file

red cradle
frozen heron
#

CLASSNAME = MGS1
SCREEN_H
RSC_PATH = windata/
WINDOW_DPI_Y
SCREEN_W
WINDOW_H = 1080
WINDOW_DPI_X
CAPTION = METAL GEAR SOLID
WINDOW_W = 1920
VISIBLE
SOFTKEYPAD
EMBED_FONT
USE_DEPTH_STENCIL = 1
RSC_W
RSC_H
M_SPEC = win
FIT_MODE
FULLSCREEN_MODE = 1
FULLSCREEN_TYPE_PURE
SAFE_SCREEN_RATIO_Y
DISPLAYADAPTER_ID
PRINT_CAPABILITY
SAFE_SCREEN_RATIO_X
SOFTKEYPAD_TYPE
MOUSE_TO_TOUCHPAD
WINDOWEDGE_SIZING = 1
WINDOW_VSYNC = 1
D3D_PUREDEVICE
FULLSCREEN_CURSOR = 0
MOUSE_CURSOR
FULLSCREEN_REFRESHRATE
FULLSCREEN_LOGWINDOW
LAST_CLIENT_SIZE_ENABLED
LAST_CLIENT_SIZE_X
WEB_DATA_PATH
EXTERNAL_DATA_PATH
FORCE_TERMINATE_ON_CLOSE
LAST_WINDOW_POS_Y
LAST_WINDOW_POS_ENABLED
LAST_WINDOW_POS_X
LAST_CLIENT_SIZE_Y
BOOT_FULLSCREEN

#

these seem to all be features on savecfg.txt, found in the .exe

#

some are hardcoded in it

#

these are meta_008 files i got by changing the settings

#

self explanatory, align_left is what i got when i changed screen alignment, bg2 is what i got when i changed the emu background, etc

#

they all have very different footers

pure radish
#

wonder how possible it is to get the game to read uncompressed assets on disk instead of that PSB blob

red cradle
timid hemlock
#

Huh, he changed it quite a bit didn't he?

verbal comet
#

it also doesn't include the emulator or the supposed unpacker and just uses fullscreenizer for... something

dusty radish
#

"Will include builds for 1080p and 1440p at a later date." (when someone else susses it out x)

quiet lodge
#

IF someone else susses it out. It'd be nice to upscale the image but that seems like it'd be too good to be true

dusty radish
hardy elm
#

I still think duckstation looks best

pure radish
#

what does the mod do this time

dusty radish
#

looks like it adds a reshade

pure radish
#

epic

dusty radish
pure radish
#

i'm trying to add a debugger to the squirrel VM because repacking that file is painful

hardy elm
pure radish
#

does it use AMD Anti-Lag+

hardy elm
#

I Don't think so

#

I might try specialK

#

I'm focusing on MGS2 atm

cunning cliff
#

Do we have any filter mods that work on the US DLC for European copies of the game yet? 🥹

woeful flare
#

hmm

#

i will have to try this mod

#

(in quotations)

#

NO DUH

woeful flare
#

uhhh i still experience input lag

but i might have done this whole thing incorrectly anyway

#

i disabled some effects and i can't find where they are now, tried a reinstall and now they don't even show up in the reshade list...

woeful flare
#

@frozen heron alsoooo that bilinear filter patch isn't working for me anymore? even did a fresh install of the game and it's just not giving me the sharp pixels

#

does it really only work on the c drive like that github issue says? i could have sworn it worked when it was on a different drive

woeful flare
#

oh wait, i tried sammy's edit

#

it worked sdlkjflsd

keen sky
pure radish
#

i can interact with the emulator's script VM at runtime now

#

should be able to add the bilinear patch using a DLL instead of unpacking/repacking alldata

#

(and do lots of other fun stuff)

keen sky
#

That sounds ideal in theory 🙂

#

Nice one

frozen heron
#

what

#

ayo how do you do that?

pure radish
#

it wasnt easy lol

#

very painful

#

should be easier from here

woeful flare
#

:0

pure radish
#

ill make it public when it does something useful, atm its only interesting for nerds

pure radish
woeful flare
#

i'm a nerd...

#

kinda

#

ish

#

i understand SOME things

pure radish
#

breakpoints work 🙂

finite peak
#

So that Mod is more than just a reshade, I included the file to put in the installation for a reason

#

It does force the emulator to run in a 4k window and eliminate input lag

#

Most fullscreenizers don’t work with it, but the one included does.

#

Not sure why other ones kill it

#

Also running windows vista compatibility mode and setting your monitor to 60hz removes sound stutter and frame issues

#

Windows vista because it forces windows to run an older sound driver that the emulator seems to like more and 60Hz obviously because it locks frames

#

Also I tried different frame limiting software but none of it seems to work with the emulator properly

#

Not to brag but my reshade is a far superior CRT filter to anything I’ve seen so far, but I’ve been building them in retroarch for the past year and I have 4 real CRTs for comparison so yeah

#

Only problem is Cathode has to be adjusted to each and every resolution, so that’s why I haven’t done it yet

#

4K only atm unless you want to go to the Cathode option and adjust it manually

finite peak
#

I tried to get my buddy to check over everything and test it before release but he was busy finishing up his work on the Majora’s Mask decomp, him and his team just reached 100%

finite peak
finite peak
finite peak
finite peak
#

I’m mostly just trying to get this thing to a playable state which has been somewhat achieved

#

Pretty soon this is all going to be almost pointless because

latent pivot
finite peak
latent pivot
#

oh huh

#

is it like a patch or do i have to recompile shit

finite peak
#

Just use all the settings I mention in the mod/above and it will work

#

It gets rid of the input lag/jumpy frames/audio stutter

#

I’ve noticed the audio still stutters a tad bit at times but its WAY less than right “out of the box” so to speak

untold briar
#

@finite peak any way to increase the render resolution?

finite peak
#

This kind of gives you a good idea though I know this is an extreme example

finite peak
finite peak
# frozen heron native?

Yeah it’s great. Why would you want to upscale 32 bit games? They look hideous upscaled.

frozen heron
#

no i mean

#

does it run natively?

#

instead of emulation

finite peak
frozen heron
#

i'll try to rephrase

#

is it possible to reverse engineer it enough to source code for compiling it into a pc game opposed to running it through an emulator?

#

because if so it can open a lot of doors to psx games

#

i've been wanting to do this for policenauts

frozen heron
#

yeah i know i'm on that server

finite peak
#

OK, so to answer your question, yes, this will run natively on PC

#

that’s more or less the whole point of decomps

#

See the mario 64 or ship of harkonian (ocarina of time) as examples

frozen heron
#

yeah those are exactly my base examples

#

difference is that sm64 and oot were leaked source codes so it made it a lot easier

finite peak
#

Yes, this project will do the same thing once the overlays are done

frozen heron
#

that's neat

finite peak
#

No they weren’t

#

In fact I know the guy and his team who decomped them

#

As in real life friends from work

#

That was not leaked

#

They used the same de planking methodology that was being used on the GTA decomp before it got assaulted by rockstar

finite peak
# frozen heron that's neat

Yeah it’s pretty awesome and will probably be the definitive way to play once released, I’m excited for it!

finite peak
finite peak
# latent pivot why does it matter to you

I mean I’m just curious, at this point I thought it was pretty much just well known upscaling games from older generations was bad which is why most emulators abandoned it altogether

latent pivot
#

yea but how does it all change the question
sorry but im annoyed when someone asks something, and others ask why they even want that instead of this or that, or try to say why its bad or something

finite peak
#

I only upscale the actual output or maybe do a 2x upscale for 480i which I personally prefer but I know most don’t

finite peak
formal sleet
#

MGS Decomp is news to me! Any idea how far along that is?

#

Also not been following MGS1 MC modding efforts for a little while, is it possible to play in native 1080p there yet?

plain hemlock
#

nope

untold briar
cerulean bough
frozen heron
#

i've been focusing in trying to make emulator settings but i'm on a dead end and no one seems rly interested or is in the same place i am

#

meanwhile i'm just making a box for a psone

pure radish
#

im deep in mgs1 but might take a while for my efforts to bear fruit

pure radish
#

oh shit, looks like my script injection is working

#

now i just need to learn how to write squirrel lol

pure radish
#

neat, can see the files its loading

finite peak
finite peak
finite peak
finite peak
pure gazelle
#

Look like MGS1 getting a update too

#

idk if it got post

woeful flare
#

i might as well be called the "input lag" person tbh

but has anything in the settings been uncovered pertaining to something that could fix it at all? or lessen it?

cerulean bough
#

I really dont notice any added input delay compared to the PS3 version (which does have a small bit of delay)

#

What im assuming people are refering to as input delay is just the analog stick issue

woeful flare
#

uhhh

#

1080p?

finite peak
#

OK hold on one sec

#

haven't posted it to my mod yet but I'll hook you up

woeful flare
#

i haven’t tweaked anything besides the bilinear filter btw

finite peak
#

ah crap hold on

#

Used that if you want fullscreen

#

also make sure you use all the instructions I posted before

#

set your monitor to 60 hz, run in vista compatibilty mode

woeful flare
#

oh right, fullscreenizer

finite peak
#

Yeah if you run in the actual fullscreen, you're gonna end up with input lag again

woeful flare
#

vista compatibility mode is crazy tho LOL

finite peak
#

yeah its just because the sound driver is older and works better with that emulator

#

it gets rid of all the sound crackling and popping

woeful flare
#

interesting…

finite peak
#

60 hz is because the emulator goes haywire when it runs over 60 fps for some reason

#

I also updated my CRT shader if you want it, but it works with the bilinear filter on so its up to you

#

haven't put it up on nexus yet

finite peak
#

Not sure if we have any cheat engine experts on here but I did find the address that writes movement values to the emulators xinput

#

00D9147C

#

currently playing with it to see if I can restore analog movement

finite peak
#

Movement Registry Address - 0227487C

finite peak
pure radish
#

wow i did it

#

a DLL that turns off the filtering

#

with no alldata mods

plush coyote
#

Are you able to load up specific .nut files with that program you're using?

pure radish
#

yeah

#

can do whatever we like at this point

#

i'll tidy it up a bit and make some sorta release

#

just wanted it to do something useful for gameplay before i released it lol

plush coyote
#

Hell yeah, that'll be awesome. Should be able to load that video options menu then

ruby hill
quartz aspen
# ruby hill 4K internal resolution and framerate unlock when?

This! I think it's gonna take time though. If the game was native code like the original PC release that GOG sells it would be easier to mod I guess. But I don't think changing framerate is possible, otherwise someone would've figured out by now.

dusty radish
pure radish
#

i gotta write a readme

#

a nice problem to have

pure radish
#

i think we're ready!

finite peak
#

Dude that’s awesome!

#

Any chance on getting a DLL to fix the analog input problem?

pure radish
#

so for using the script debugger, it's a bit of a pain but i'll give some instructions. you can do it the hardcore way by just connecting to the socket and sending the packets that you can find in the source code (e.g. with some python)
but that's not great... the way it was historically used is with an eclipse plugin (attached)
it needs a very old version of eclipse which you can get here: https://archive.eclipse.org/eclipse/downloads/drops/R-3.2.1-200609210945/
and similarly, a very old version of java on your PATH, which you can find here: https://mirror.nforce.com/pub/drivers/java_jre/
extract the sqdev plugin and copy it to the eclipse directory, and when you open eclipse you should see syntax support for squirrel as well as a squirrel perspective and debug target
set up the debug target using localhost and the debugger port set in MGSM2Fix.ini, you'll also want to extract the alldata.bin and load the scripts into eclipse so you can do source-level debugging of the scripts

#

you need the jre-1_5_0_22 file from that link

#

x86 or x64 shouldn't matter as long as eclipse and java are the same

finite peak
#

Alright cool, I’ll look into that soon

#

Here I was trying to fix it with cheat engine and you go and drop that lol

#

Probably a way better solution though

pure radish
#

but when you have something like that script VM in the game it gets complicated to monkey patch things, but it should now be a lot easier as MGSM2Fix can speak the VM's language

#

has this got anything to do with what you want

#

what is the analog input problem

unreal bluff
#

currently the controls only go in 8 directions like the PS1 Dpad

#

presuming thats the question, if not apologies for jumping in unwanted lol

#

the fix presumably is restoring to 360 degree motion of an analog stick

#

as right now in MGS1 when you try and do a quick turn or twist around you get a weird diagonal before it corrects to the right way or you cant run exactly precise

quartz aspen
cerulean bough
#

Oh man I cant wait for the dithering effect to come back!

#

Added alot of dolor depth and visual noise I strongly associate to MGS1

pure radish
#

there's a lot of analog related scripting and presumably the M2 emulator framework supports it, it's hopefully just a case of going through all the scripts and finding what needs tweaking

#

lots of references to an emulator log file in the scripts too, would be cool to enable that if it does anything on the retail build

#

g_emu_task.setRamValue() lol

#

i haven't really looked at the scripts much yet, was too busy getting the damn thing working

red cradle
#

I'm no modder, but I can tell that DLL injection really helps the whole modding a lot easier

finite peak
#

Yeah he's right

#

that's what I was talking about

#

the analog stick is currently mapped to the D pad and doesn't have real analog movement

#

which makes some boss fights stupidly harder than they should be

#

I died like 1 0 times fighting liquid which never happens

#

granted it was extreme but still, I don't normally have problems with that

#

but without full analog stick movement, ugh

#

or the sniper wolf fight

#

also very terrible

#

cuz the analog stick is for fast movement and the dpad is for slower more procise scope movement

pure radish
#

working out how to call g_emu_task methods directly from C++

finite peak
#

Very nice!

frozen heron
#

we got crt and dotmatrix

#

there are other filters in the code but i couldnt understand how they work or if they do anything ar all

pure radish
#

the code is spaghetti tbh

#

trying to talk to the EmuTask directly because that seems to actually do things

#

can't believe how much code they wrote just to adjust settings

#

nice, i managed to disable the filtering in a better way

#

directly via EmuTask, i don't need to inject scripts now

frozen heron
#

i'm honestly very curious in knowing what the hell is 3d_mode

pure radish
#

I was just looking at that

#

can probably call it now I have this

frozen heron
#

enabling doesn't work really

#

i think it needs something else

#

if, it's supposed to do anything

#

NoticeMsg__CONFIRM_CHANGE_3D_MODE

#

hang on

#

it's all in japanese

pure radish
#

lmao

frozen heron
#

it's definitely not a finished feature if a feature at all

#

it looks like it was either unfinished or used in debugging

#

["This title supports 3D TV display.\n \nWould you like to switch the video signal to 3D display mode?"]

#

well that's boring

pure radish
#

REDBLUE_GREY, REDBLUE_COLOR, FRAMEPACKING, SIDEBYSIDE

frozen heron
#

god dammit is it anaglyph 3d mode?

#

that's outdated

pure radish
#

lol

frozen heron
#

i'm trying to read the code to see how are you supposed to unlock the secret wallpaper but i really can't read this

#
    local opened = false;
    if ( _input.key(KEY.RIGHT) ) {
      local item_param = param[_itemKey];
      if ( "secretOpened" in item_param && !item_param.secretOpened ) {
        if (subitemList[ _ope_mode ].index == subitemList[ _ope_mode ].index_max()) {
          if (m_secret_frame >= SECRET_OPEN_FRAME) {
            item_param.secretOpened = true;
            printf("(%s) Secret opened\n", _itemKey);
            opened = true;
          }
          m_secret_frame += FRAME_KEY_REPEAT_NEXT + (FRAME_KEY_REPEAT_NEXT-1) ; // キーリピートでonになることを考慮
        }
      }
    }
    if (m_secret_frame > 0) {
      m_secret_frame--;
    }
    return opened;
  }```
#

this is menu_subitem_window

pure radish
#

probably scattered all over the place

#

it is quite hard to read and make sense of

frozen heron
#

even if i still don't get it

woeful flare
#

hmmmm

#

hmmmmmmmm...

#

ok yea i'm not nerdy enough to know what this is

frozen heron
#

it's not really working for me

#

nevermind i really am fucking daft

#

i can't get the debugger to work though

frozen heron
#

it fails to check headers

finite peak
#

alright that does it I'm booting up retroarch and upscaling to 4k because I want to know why so many people want this feature lol

#

also geometry correction absolutely makes the game unplayble

#

I don't think modern gamers even know what they are asking for anymore lol

#

would be nice to get 16:9 in there though, mgs is one of the only original psx games that can do it without showing a ton of garbage hidden off screen

pure radish
#

you can see strings like emu_psxbase but no other platforms

frozen heron
#

yeah but it's the exact same structure as other M2 emus

#

so i assumed, if that thing can manage to replace the gba roms inside alldata.bin, why wouldn't it be able to replace the psx roms?

pure radish
#

oh, yeah, well that should (eventually) be possible

dusty radish
#

we could finally play croc in the mgs master collection 😍

sick osprey
frozen heron
#

castlevania advance collection was made by m2 aswell

#

both mgs and cadvc use regular roms for emulation so people modded their own roms into castlevania

finite peak
#

Honestly id just be happy if the analog stick worked at this point lol

frozen heron
#

it only swaps the files and fixes the checksum i assume

#

it's not really rocket science

#

it is if we were to do it from scratch

pure radish
#

squirrel sometimes uses 0 to mean success and -1 to mean failure, glad i lost some time to that one

#

difference between sqbool and sqresult

cerulean bough
#

But if I want to trun the game at a higher res (which defo does look appealing in its own way)

#

Defo get rid of the wobble and fix geometry issues

#

IF you forsake the aesthetics tied to MGS1 in turn for clearer visual

#

Might as well go all the way

finite peak
pure radish
#

GOD

#

i think i've solved a lot of the instability i was seeing

#

a few issues but the major one that just twigged was the game is instantiating two VMs, not just the one

#

also got rid of the injection delay so things should be super reliable now

#

wonder why they have two script VMs

cerulean bough
#

And Ive done it multiple times before, went deep fucking around with the game too

#

(I assume its PGXP geo correction method, dont know much of how the method works on Duckstation)*

finite peak
#

Yeah I did that….what resolution you play at?

cerulean bough
#

I jump thru several resolutions commonly thru it, up to the nearest 1440p neighbor

#

You tryna use the MC Collection roms for it? That could be the issue youre running into to?

finite peak
#

Want to know something interesting?

cerulean bough
#

Ive just emulated MGS1 countless times and had no issues that you described

finite peak
#

Those won’t even boot even though they are the exact same image down the kb

cerulean bough
#

Huh, yea something funky then

#

But I do really appreciate how MGS1 seamlessly works at beautiful settings on duckstation. its usually just drag and drop too

#

With very little issues

#

Its MGS2/3 emulation that gives me a headache tho LOL

finite peak
finite peak
pure radish
#

oh hey i got the scanlines to work

finite peak
pure radish
#

its an emulator function yeah

finite peak
pure radish
#

dno i'm not really interested in that sorta stuff just yet

#

tryna get the tech in place ykno

#

worry about trying to interact with the emulator before i worry about what the emulator can do

#

there's also a big difference between: what the emulator can do, and what they have implemented in their scripts

#

that's why i've been doing things this way which has took a little longer to get going

#

im assuming whoever implemented the emulator is not the same team that packaged it for an MGS release

#

but at the end of the day it's a DLL so you can do whatever you want with enough pain and suffering

#

could replace the whole thing with duckstation after it starts up (^:

#

oh man

#

its so stable now

#

doesnt crash at all while im screwing with it

frozen heron
#

i already found ab this when i was working on the bilinear patch

pure radish
#

hoping to drop a v0.2 tonight

craggy ingot
#

damn, i was so deep into this emulator a few days ago, dipped for a few days, and so much progress happened out of nowhere lol, good job @pure radish

#

i have a c# project that compresses, packs, and exports the alldata.bin, then unpacks and decompresses everything so i can continue editing and scripting stuff, plus converting psb to json and vice versa (keeping all streams intact), and also doing psb/json to png for the image files, and i'm most of the way towards psb/json to wav for audio

#

i also spent too much time on making sure the compression and packing occurs in the same order that the original alldata.bin used, so it's md5/sha1 identical if you don't change anything (which doesn't actually do anything and required a lot of extra code lol but the order they compile it in is interesting)

#

as a side effect of mac being my main platform atm i also made a mac port of sorts, but it's just a .app through wineskin

frozen heron
pure radish
#

lol, the 3D mode crashes the game

frozen heron
#

i tried to make a patch for the scanlines and dotmatrix filter and somehow locked myself in dotmatrix beyond reinstall

#

hence why i'm so invested in investigating the meta_0008 file

#

i believe that's what stores the values

#

#1168512986491670548 message

craggy ingot
#

I wonder if the dotmatrix might be improved if the palette type is changed

frozen heron
#

idk it's a very shitty filter

craggy ingot
#

true, in the code comment it literally says "pseudo-dot matrix" in japanese lol

#

same with "pseudo scanlines"

craggy ingot
pure radish
pure radish
#

there's probably more things to try, it might require other prior setup

craggy ingot
#

hmm, i see

pure radish
#

but it's not as simple as EmuTask.set3DMode(REDBLUE_GRAY)

#

that hard segfaults

craggy ingot
pure radish
#

np

craggy ingot
#

there is this possibly relevant function in systemdata_setting_screen.nut:

function SystemDataSettingScreen::set_3d_mode_default(_enable_3d)
{
local mode = M2Epi3DMode.NONE;
if (_enable_3d) {
mode = System.getStereo3DAvailable() ? M2Epi3DMode.FRAMEPACKING : M2Epi3DMode.REDBLUE_COLOR;
}

this.set_3d_mode(mode);
}

#

looks like it has both stereoscopic and anaglyph 3d which is pretty advanced considering the state of this emulator rn

wild mauve
#

any chance on increasing the render resolution

craggy ingot
#

possibly? i dove into the (currently missing) screen settings, and one that stuck out to me was a setting called "data._40_high_resolution"

#

if there's support for "high resolution" that could mean the emulator has built in support for different render resolutions in general

craggy ingot
#

when it has a line like
return System.getDebugBuild();
where exactly is it referring to by System?

#

(a nut file has that, specifically)

pure radish
#

native code

#

the scripts can invoke functions in the exe

#

System is a native class

#

this is why DLL FTW

craggy ingot
#

oh shit, I was wondering when that limitation was gonna pop up lol

#

i'll have to use your debugger to get any further with that, yeah?

pure radish
#

it's not really my debugger it's just the public squirrel one grafted onto the game, but it can probably help you find the native closure stack object if you breakpoint it

#

lots of ways to do it

craggy ingot
#

hmm, alright

pure radish
#

if you build the DLL in the debug configuration instead of release it'll add loads of stack dump prints to the log

craggy ingot
#

native code is in c++, yeah? i tried running the exe through DiE and saw it was a visual studio 2015 (c/c++) build

pure radish
#

the builds I put out are in release mode though for performance

finite peak
#

So I have a quick question

pure radish
#

hammering the log file will probably slow shit down on weaker systems

craggy ingot
#

ooh yeah i'll build it myself then

finite peak
#

Why do the image files from the BIN not load in emulators even though they are a one for one match of the original image files from the psx disc?

craggy ingot
pure radish
#

if you read a bit around how the DLL is interacting with VM objects to set smoothing and such, you can probably just query System by name

finite peak
pure radish
#

you should see an OT_NATIVECLOSURE

finite peak
#

Did I miss something or do something wrong?

craggy ingot
pure radish
#

once you find it you're going to need a disassembler/decompiler like IDA or ghidra tho

finite peak
craggy ingot
pure radish
#

^lol

craggy ingot
#

if you patch it using that official sony header (you could literally just change those bytes manually in a hex editor) it'll run in an emulator

finite peak
#

That’s wild, so that’s why this is emulator specific

craggy ingot
finite peak
#

So much makes more sense now

craggy ingot
#

yeah you extracted em fine, the game just patches them to be working roms when you run it, i assume to prevent piracy

pure radish
#

even simpler way is probably to just do a text search in the exe for that function and then cross reference a bit

#

the code in the DLL might be useful for mapping out functions in the executable

#

the DLL has squirrel source code of the same version as the game itself

#

so it helps with identifying things

finite peak
#

Now I gotta go an learn squirrel, great, thatll be so useful on a resume lol

craggy ingot
pure radish
#

squirrel is the bastard child of C and lua

craggy ingot
#

that's a good description, i thought it was just an offbrand c++ when i first saw it lol

pure radish
#

if only Konami passed the roms through rot13 instead

#

then the 20 year old game would be really secure

#

how does splitting part of the rom prevent piracy

craggy ingot
#

the part that they split off is compressed with lz4a, which to my knowledge literally nobody knows how to decompress outside of M2

pure radish
finite peak
#

Those bastards were so clever that when they modified the BIN, they even made sure the date didn’t change on the file

#

I’ll give them an A for effort

craggy ingot
#

my guess is it's their proprietary spin on lz4 becuase they didn't feel like including licensing for the real thing

pure radish
#

why use compression and for only a small part of it

#

why not use like

#

encryption

#

if their goal was to protect

craggy ingot
#

it's weird because in addition to the sony header needed for the roms, it has a lot of other junk

#

there's some code in there, item names (different in each language's lz4a, of course), and a lot of other weird stuff

#

it has a footer which includes the string "cdrom:\MGS\MGS2.EXE" as well

finite peak
finite peak
#

Sorry replied to the wrong person lol

pure radish
#

haven't looked at lots of stuff as you can tell lol

finite peak
#

But I know for a fact there’s a lot of custom stuff going on

craggy ingot
#

the reason why i say it's compressed rather than just in a strange format is because if you check the shannon entropy of the file it's ~8, which apparently indicates a strong likelihood of compression

#

based on some googling at least lol

finite peak
craggy ingot
finite peak
craggy ingot
#

i should convert every image in here to png format so i can actually find out where those textures are stored, i just haven't bothered because i'm doing this on a macbook and it takes forever lol

craggy ingot
#

i've been running a mac only operation for this tbh, i even ported the game to mac with a wineskin, i just ssh to my windows pc when i need something specific from it

#

mac being linux-adjacent means some code related things are way easier imo

finite peak
#

I use Kali Linux on my laptop whenever I need to write anything, unless I do something small, I’ll do those edits on the windows side

craggy ingot
#

i'm just now looking at the patches and it's so cool that the game has files which are literally just this

#

you definitely can't make that any simpler, nope

#

thank you M2 very cool

pure radish
#

nut scripts to generate these would take up less space

finite peak
craggy ingot
#

i like the number of times nut files will set a variable to a specific value and then immediately set it to a different value with no code in between

finite peak
# viscid meadow based

See the full discussion on that, I mean it literally seems to break the game but it may be a me thing, every time I try it I clip through walls and fall through the floor and it breaks the sky box

viscid meadow
#

oh i didn't realize you were being literal lol

#

i just think the game's aesthetic was designed with the playstation's quirks in mind and it looks best when those are respected rather than when you try to paper over them

finite peak
#

I make my own though, I haven’t found any presets that match my real CRTs but I can make ones that do

viscid meadow
#

yeah i really like crt filters conceptually but most of them don't look very much like the real thing

finite peak
#

I still think the reshade I did is going to have to be used judging by the look of the lackluster options in the emulator

viscid meadow
#

yeah it's a shame this wasn't quite the end-all be-all release it was supposed to be but i really do appreciate people like you trying to go the extra mile on it

craggy ingot
#

I like the CRT Royale NTSC Composite shader iirc, gives the feeling of a nice consumer crt without the crunchy pvm scanlines that others give

#

been a while since i've used retroarch though

finite peak
#

Hey could you look over this, I want to know if I'm getting the syntax right, and yes this is very basic but I'm only just now trying to learn this squirrel stuff

#

// Example DLL code
#include <squirrel.h>

SQInteger myFunction(HSQUIRRELVM v) {
sq_pushstring(v, "Hello from DLL", -1);
return 1; // Number of values returned to Squirrel
}

// Exported functions table
static SQRegFunction my_functions[] = {
{"myFunction", myFunction, 0, NULL},
{NULL, NULL, 0, NULL}
};

// Entry point for Squirrel to get the exported functions
SQRESULT sqext_register(HSQUIRRELVM v) {
// Register the functions in the table
sq_pushroottable(v);
sq_registerfunctions(v, my_functions, NULL);
sq_pop(v, 1);
return SQ_OK;
}

#

I haven't tested it or anything yet, I just want to know if my syntax is right, or is there something I'm missing

#

This seems to be example code to inject DLLs with squirrel but it just looks....off, like it's too much like C

timid hemlock
#

@finite peak @cerulean bough , in my experience, clipping related to PGXP correction is indeed an issue, but only if you enable CPU mode. Disable the CPU mode, and you should be good. I've only had this issue in MGS, in other games I've played CPU mode is fine. It's a bit of a shame, since CPU mode gives the most stable correction, but it's a lot better than nothing. I have a theory that enabling culling correction might help with clipping issues in MGS, but haven't tested it yet.

#

That's in duckstation by the way, but I'm sure it'll be the same in retroarch. Just disable CPU correction, and you're good.

finite peak
finite peak
timid hemlock
#

Huh, that's weird, it works for me.

finite peak
#

Guys I did a thing!

#

upscaling with the CRT filter applied over it with reshade

#

I'm still torn it though cuz the 2d elements look meh

#

I think I'm going to play with it on like this for a bit just to see what this is like, upscaling may have potential maybe if custom textures were applied

#

Native 480p for comparison

#

all the 2d elements look exactly the same

timid hemlock
#

For crt filters, i recommend crt-royale

finite peak
#

Yeah I don't like CRT-royale

#

it's.....OK

#

the problem is I don't see THAT much difference between 480p and 4k

#

I mean it smooths the jaggies some, but that's about it

#

I'm debating if it's worth it to try to replace the current emulator or not

#

right now I'm leaning towards no but I guess we'll see as time goes on

untold briar
#

As far as I know, if the emulator is replaced, the steam achievement stop working

cerulean bough
#

I truned it on and encountered ALL the issues you had

#

Or CPU Mod as well like @echocat described

cerulean bough
#

I always like SOME jaggies associated with MGS1

#

Feels more pure that way

finite peak
finite peak
#

If the native emulator has deinterlacing we might get 480p out of it

#

I dunno, I’m gonna try my hand at injecting some dlls and see what happens

#

Squirrel is kind of confusing for me

#

I’m not the greatest at this but I’m trying my best lol

pure radish
#

as squirrel is "embedded", it's possible to interact with it from the native (C/C++) world or the squirrel world

#

my DLL interacts with the squirrel VM from C++, but it's equally valid to also write squirrel and inject scripts to achieve the same things

#

if you think about it, that's essential for what the game does - the game is an exe written in C++, it needs to be able to drive the squirrel VM in C++

#

looks like the code you posted injects a function into root table, which allows it to be called from squirrel code

finite peak
#

OK I'm starting to wrap my head around this

#

but I have to take a break soon cuz I have this nasty habit called sleeping

#

I wish I could kick it but I can't lol

finite peak
kindred chasm
pure radish
#

it only turns off the smoothing by default

#

to turn the scanlines on you need to edit the ini

#

the smoothing might already be turned off if your game resolution is low enough

dusty radish
#

i did give it a go last night and couldn't get the smoothing turned off on my deck sadge

#

but the screen was also doing some resolution fuckery so it could just be linux things ™️

pure radish
#

is the smoothing even turned on on the deck

#

I can't remember what the resolution cut off was

#

if the mod is genuinely not loading on deck I'll take a look

kindred chasm
#

I don't even know what the game looks like with smoothing I can share an image real quick

#

Wait I see lines now that it's tiny. Is that supposed to be the scanlines?

wild mauve
#

easiest way to tell for me is the konami text on the main menu, if it is crisp pixels then smoothing is off, like this

kindred chasm
wild mauve
#

im on linux if that is what you mean, using v0.2

kindred chasm
#

No game version

#

Integal? NA?

wild mauve
#

oh NA

wild mauve
#

yeah that looks right

floral dock
#

Just want to say, the work you guys are doing here is incredible. This game means a lot to me and you guys are doing amazing work here.

sick osprey
#

And so quickly too

pure radish
#

i only started my mod on sunday lol

kindred chasm
#

MGS1 was done the most dirty with the MC. That game holds a special place in my heart

quiet lodge
#

It really was, and I figured it would have been but it was worse than I thought, the audio issues, the lack of configuration options within the emulator. They could have done so much more with it. I haven't played 2 or 3 yet but I'm happy to have MGS3 on PC finally and even though MGS2 was on GOG, it's cool to have that on Steam as well.

dusty radish
#

very epic mod x

pure radish
#

yeah seems like it works on deck it's just hard to tell lol

#

not sure the smoothing is on by default on the built-in display

#

800p might be close to the cut off

#

hopefully we get the plugin to do more interesting things that are obvious

pure radish
#

what res does the emu try to run at fullscreen? is it 720p?

#

ive had a great idea why dont i check myself

frozen heron
craggy ingot
pure radish
#

lol

frozen heron
#

what the fuck

#

did you actually enable the pause menu?

craggy ingot
#

this is called deleting the correct pause menu and seeing what happens

#

i deleted pause_main_mgs.nut.m out of curiosity lol

#

and then tried to pause

frozen heron
#

but mgs does not have built in pause menu

#

does it?

#

like release version?

craggy ingot
#

it does, but not with these options

#

oh wait yeah no that pause menu isn't part of the psx mgs if that's what you mean

frozen heron
#

it's not part of the master collection either

#

afaik there is no pause menu at all

#

you just load the game and that's that

craggy ingot
#

there's this menu actually

frozen heron
#

oh

#

you're right

craggy ingot
#

you get to it on keyboard controls with.. E+M, for some brilliant reason

frozen heron
#

wtf

#

they never explain that

craggy ingot
#

quite possibly the worst control system i've seen in my life

pure radish
#

i got that up by accident once

#

i think you can also trigger it via the ingame settings

#

if you go to screen settings or summit

#

there's some kinda callback from the game that opens that menu

frozen heron
#

yeah there's a wrapper between the game and the emulator as seen in the disc swap

craggy ingot
#

i really wanna know what it means by PAUSE_MAIN_SAVE and LOAD, does that mean it has a rudimentary savestate option?

#

that isn't in the finalized pause menu?

#

it unfortunately crashes instantly for me, and I'm not sure if that's due to it not being implemented or due to me removing pause_main_mgs.nut.m

keen sky
#

@craggy ingot the game only saves the "saves" when you open that pause menu.
Or at least that is one of a few points it saves any new saves.

If you make a save in game like normal then force quit the game it may not keep the save, opening the in game pause menu saves the saves proper for the emulator

#

if that makes sense

#

you can test by saving in game, then when you open the "stance menu" you'll get a little auto save icon in the top right.

Normally you don't

#

so i'm assuming it could be that

craggy ingot
#

wait that's so strange, why wouldn't they save it at the same time as you save in game lol

#

so it could be that me trying to run the PAUSE_MAIN_SAVE option crashes because i haven't saved in game

keen sky
#

I'm not sure, but its not completely unheard of, emulators used to have an option to save the ingame saves, flash carts still do it as they have no idea.

That and they expect people would quit through the stance menu because theres no other way to quit, that and opening console home menus on console or your controller disconnecting on any platform open the stance menu.

So other then people on pc being able to alt-f4 it would work fine

#

issue is people on pc being able to alt f4. and that they don't explain it

keen sky
frozen heron
#

does options actually hold the filters?

craggy ingot
#

crashes as well at the moment, but i'm using a modified build so i'm thinking i'm gonna start fresh and chip away at the file I removed to see if I can get this menu open without any issues

#

excellent comment by the devs

frozen heron
#

banger

keen sky
#

iconic

pure radish
#

trace of all the function calls

#

doesnt slow the game down much if at all

craggy ingot
#

ooooh that's nice, how'd you set that up?

#

damn are those the line numbers too?

pure radish
#

yeah, working on getting even more state out

#

im just hacking on the DLL at this point

craggy ingot
#

have you committed that/are you planning to? that'd be really useful for what i'm doing atm

pure radish
#

at some stage yeah

pure radish
#

tryna get at native closure info

#

should be possible but its making life difficult for me

woeful flare
#

so

woeful flare
#

and lyall's bilinear filter fix did not work for me

#

this is on a fresh re-install btw

#

i can post the log if need be

pure radish
#

log of what

woeful flare
pure radish
#

that aint lyall's its mine

woeful flare
#

o

#

i

#

um

#

oops!

#

my bad, i mix up names...

#

OH SO NOW IT WORKS

#

this fuckin game

pure radish
#

kek

woeful flare
#

the other point still stands, doing all that had no effect on input lag lsdkjfklds

#

the windows vista thing, 60hz monitor, fullscreenizer, the files...

pure radish
#

no idea where any of that came from tbh

woeful flare
#

he suggested that so

#

i tried it lskdjflksd

#

literally none of it worked

pure radish
#

eyy!

#

im hooking all the native closures now

#

so I can log all the functions in the exe that the scripts call

#

and also the scripts themselves

#

should help find things in the exe and piece the whole thing together

#

got all this now

#

loads of these are printf

#

lol

craggy ingot
#

wtf is it printf-ing? leftover debug messages?

craggy ingot
#

i would love to figure out the intent behind some of the leftover code here, like surely they weren't planning on adding/injecting co-op or other modes into mgs?

pure radish
#

trying to retrieve all of the native function names, but you can see some of them here

#

shows where setSmoothing is implemented in the exe

keen sky
pure radish
#

isnt it just a framework that they sell

craggy ingot
#

i'd think that except there's lots of mgs-specific code and they have special touches like the disk swapping feature

#

but it could be a base framework that they modified for sure

craggy ingot
#

i do see setSmoothing() is definitely that 0xf5a2b0

pure radish
#

squirrel has to know their names to perform the binding

#

ive gotten things like len() to show for the built-ins

#

tryna work out why setSmoothing has lost its name

craggy ingot
#

are you running this on the US version?

pure radish
#

arent they all the same version basically

craggy ingot
#

the EXEs are slightly different for whatever reason even though the alldata.bin files are almost indentical minus roms

pure radish
#

oh, thats weird

#

UK version

#

i've not really done anything toooo version-dependent though

#

there's a couple of function signatures but they should be fairly portable

#

the one good thing about the VM is once the plugin has hijacked it, you're just traversing its primitives and everything is abstracted

#

rather than doing lots of monkey patching and memory address crap

#

ive seen all the memory addresses shift massively between runs

#

so god knows how you'd do this any other way

craggy ingot
#

between the UK and US versions there's literally just a 4 byte difference lol wtf

pure radish
#

is that just some build ID or summit

#

it seems too close to the PE header to be anything of note

craggy ingot
#

that's my guess lol, build time maybe but build time is also stored in the .nut files

#

actually no i'm misremembering, build time is stored in one of the config/psb files

#

doesn't matter either way ofc lol

pure radish
#

wonder if they didn't bother with the scanlines because they look awful with that red camera in the intro cutscene inside the SDV

#

i have 30 hours in this fucking game already and i havent even started a save

craggy ingot
#

the scanlines are impressively basic, too

#

lmao

pure radish
#

oh god

#

if you resize the window to 4:3 it keeps the background

#

so you get bars at the top and bottom

#

anyway cool thing about the native closure hook is I can change parameters and return values to/from the emu

craggy ingot
#

yeah 1920x1080 is literally hardcoded it's beautiful

#

all of the motion scripting they do depend on the canvas being 1920x1080 as well

craggy ingot
#

i'm a noob at decompilation but is it standard for the function name strings to be distant from the actual code location?

pure radish
#

yeah, executables generally have different sections

#

those would get marked as non-executable and such

#

all the constants should be together, and all data that's rewritable

craggy ingot
#

hmm, that makes sense, and i don't usually see a decompiler somehow link all of the function names on its own

pure radish
#

something like ghidra or IDA should be able to do it

#

i can open this for instance

#

and see what references each string

craggy ingot
#

ooh, i see yeah

pure radish
#

oh jeez

#

i think i can print the arguments to native funcs

#

there's some type check that occurs before the native call and I can just borrow the logic

craggy ingot
#

holy shit lol, that would be insane if you could

#

i'm surprised you'd be able to do that before the non-native calls

pure radish
#

also seems possible in principle

keen sky
craggy ingot
#

lmao

#

i'm getting used to it but i still get a kick out of files like "preload.nut" or "wipe.nut"

woeful flare
pure radish
finite peak
pure radish
#

oh my god

#

i finally have all the native function names restored in the trace

#

x86 assembly

#

not even once

#

this thing is crazy to look at now

#

so much info

#

my game wasnt working for a good 3 hours there lol

finite peak
finite peak
# woeful flare i dld do this

not entirely sure then, you're the first one to say it hasn't worked so far, what are your specs and what monitor are you using?

pure radish
#

im back

#

with this delight

#

one big line haha

#

list of patches

woeful flare
#

i did set the monitor to 60 within windows settings

pure radish
#

oh

#

i got the emulator to run above 1080p fullscreen

#

that was easy

finite peak
pure radish
#

there's just some cmdline args lol

#

--window-size and --screen-size

#

surprised it took until now for anyone to try them

#

i think i know why the smoothing kicks in at a certain res

#

you can apply the smoothing to any layer. that includes the frontend graphics (good) and the emulator itself (not so good)

#

i just found yet another way to turn off the smoothing but it applies to every layer so you get jaggies at higher desktop resolutions in the launcher

#

i assume they turned it on to let the UI graphics upscale but that inadvertently turned it on for the emulator

#

at least i hope that's the reason

#

anyway don't turn the smoothing off for the UI, it sucks

finite peak
pure radish
#

god the dotmatrix filter is terrible

#

i'd add an option to enable it but

#

GOD

#

nobody gonna use that shit

finite peak
pure radish
finite peak
#

….it’s literally reversed

#

That’s why it looks so bad rofl

woeful flare
pure radish
#

nobody has made any attempt to change the psx internal render resolution yet

woeful flare
#

aaah ok ok, that's what you mean

pure radish
#

TBH i was more bothered by it forcing 1080p in fullscreen

#

even if the game is 240p i'd like the window to match my desktop resolution lol

finite peak
#

Wait I just relized, do we have a way to repack it all yet?

pure radish
#

ill prob still add a patch for the window size to default to desktop res like lyall's fix

#

repack what

woeful flare
#

there is a way to repack the .bin

#

but it's weird

#

we found this weeks ago

keen sky
#

repacking is pretty nailed down at this point, the first bilinear removal mods was just a script that unpacked and repacked it

#

was dxnteisgxne specifically I think, but alot of people found little bits here and there

keen sky
# pure radish nobody gonna use that shit

its worth noting alot of this stuff is probably left overs from other projects, as this emulator was not just used for this collection.

Or just good old experimentation

pure radish
#

yeah ive been saying that repeatedly lol

#

i doubt the original authors had much to do with MGS

#

and I doubt konami's team had much to do with M2

keen sky
#

exactly but alot of people have been making broad statements and assumptions so was just checking 🙂

frozen heron
frozen heron
#

deserializing roms is the issue

#

bc marchive can only do so much, even reserializing files does some weird binary shit where they can be either lighter or heavier in size

pure radish
#

im going to stick the dotmatrix setting in just so I can have something for v0.3 lol

#

will try to get the default resolution thing sorted too

timid hemlock
#

Anybody know if dithering will be possible? So far it seems like the emulator just doesn't support it. Nobody's mentioned any settings to toggle it.

frozen heron
#

dithering isn't mentioned at all in the code

pure radish
#

nobody has reverse engineered the entire emulator stack, though

frozen heron
#

well no, no one has reverse engineered anything so far lmao

pure radish
#

it's just not possible to say for sure within a year of release lol

frozen heron
#

development has been slow

timid hemlock
#

lol

pure radish
#

hey ive reverse engineered shit

#

im not looking at the emu core yet but i'm the closest to it

#

i at least know where it is

frozen heron
#

no yeah you've been p much the only one keeping the mgs1 emu modding active

pure radish
#

🤣

frozen heron
#

i've been busy trying to reverse engineer meta_008 files but it got to a point where not getting any help and not finding anything meaningful about the files got me tired

#

in other news i'm still trying to figure out where the hell MG1 and MG2 roms are stored

#

but then again, someone said it might be native-ish

pure radish
#

MG1/MG2 seem done more dirty than MGS1 imo

#

they're just grafted onto MGS3 like, yikes

#

at least MGS1 got some attention by itself

frozen heron
unreal bluff
#

have their been any breakthroughs finding the movement control input swap to analog from dpad 8way gate 👀

pure radish
#

nobody is actually looking

frozen heron
#

however we also found out the MG1 version in MGS3 is also the same as GOG

#

which is

pure radish
#

bigger fish to try at the moment

frozen heron
#

very damn fucking weird

#

it's not quite emulated but it's not quite native

timid hemlock
#

It just seems insane to me that the emu itself does not deal with with dithering at all. It's like a core function of psx emulation. I'm kinda confused. Maybe the emu was written for a specific projects that natively supported higher color depth or something. MGS has heavy color banding without dithering, which sucks.

unreal bluff
#

I figured after reading through but still fun to ask. the progress from the past day seems wild enough

pure radish
#

it may well be in there

unreal bluff
#

I'm amazed you got it parseable as it is lol

pure radish
#

people are just looking at scripts, so

#

the scripts don't really tell you what the emulator can do

#

just what someone decided to throw in the script at some stage

frozen heron
#

pasue

pure radish
#

pasue

unreal bluff
#

I see

timid hemlock
#

kek

frozen heron
#

hang on i had found something earlier

unreal bluff
#

the one giant line is pretty great

frozen heron
pure radish
#

i saw that and was also mortified

#

basically a war crime

frozen heron
#

it feels like self racism

keen sky
#

😮

unreal bluff
#

I believe dark souls 1 had some similar issues like that when people were playing with the cut content scripts

#

cabt recall

pure radish
#

im surprised nobody tried what I did with other M2 stuff

#

hopefully ppl take it

keen sky
#

it just takes someone to think of something others havn't sometimes

#

we're all just throwing shit at the wall and seeing what sticks

timid hemlock
#

Did other m2 stuff have issues like input lag? Or was it just pixel based stuff, like castlevania? I'm sure they didn't slap a bilinear filter on castlevania lol

frozen heron
#

it escapes my knowledge

#

i just do code man

pure radish
#

big same

#

just a different sorta code

keen sky
#

I'll comfortable say i've got no clue what you guys are doing

#

I was trying to force lower resolutions to remove the filter early on.

but otherwise just found and tried to improve on stuff where i can

pure radish
#

function is_permit_smoothing(_systemdata, emu_task, size_x, _size_y)
{
local ret = true;
// 拡大率(縦)が2倍より小さければmootihngはOFFにする
if ( abs(_size_y) < 2SIZE_BASE || abs(_size_x) < 2SIZE_BASE ) {
ret = false;
}
return ret;
}

#

what a meme

timid hemlock
#

I'm an audio engineer and graphics artist, I don't know shit about coding. I just know if stuff looks right, sounds right or feels right. And in terms of MGS Master Collection, they don't 😅

#

mootihng OFF

pure radish
#

i work in semiconductors and i know more about coding than i want to

scenic kelp
#

Hey nuggs, I'm zabaniya from the github issue. Thanks once again for the answer!

timid hemlock
#

In terms of audio, it's weird that all games have what sounds like compression issues when they were handled by different teams. Maybe the audio issues have something to do with the launcher? Just doesn't make sense to me, but maybe i should try the launcher bypass patch and investigate

pure radish
#

the launcher is definitely not to blame

timid hemlock
#

Yeah, otherwise, why would the the audio mods work

pure radish
#

on PC mgs2/mgs3 have the launchers in separate executables which terminate once the real executable is launched

#

and mgs1 is an entirely separate code base

#

and mg1/mg2, well, all i can say is "haha"

timid hemlock
#

That's what's weird to me, how did they mess up the ps1 audio? It isn't even a real port, maybe they messed up the audio chip emulation

pure radish
#

yeah, will be fun to figure that one out

#

is M2 using entirely proprietary/custom cores? or have they based off some OSS emulator?

timid hemlock
#

I'm guessing the emu was made for a specific project, and then reworked to fit mgs.

#

maybe that's why theres no dithering, since castlevania seems purely pixel based, no textures like mgs. maybe the emu was made for games that didn't support dithering anyways.

frozen heron
#

it's

#

really weird

#

because while all games on the master collection have the exact same launcher, MGS2, 3 and MG1+2 were all made in Unity

#

whereas MGS1 is just its own thing with a built in emulator

timid hemlock
#

That's like extra weird? So they wrote a completely separate launcher for mgs1? It's not the most advanced launcher, but still

frozen heron
#

moreso they kinda converted the unity launcher into something like standalone C

#

or the other way around

pure radish
#

i wonder if the unity launchers also use squirrel

#

then it would all make sense

frozen heron
#

it's C#

timid hemlock
#

lmao that's just really weird. But i guess the trouble stems from choosing m2 for MGS1, since they had a sorta functioning psx emu

pure radish
#

you can do native linkage

frozen heron
#

also p sure squirrel is just code for the emulator itself, not the launcher

#

it's definitely not .NET but

pure radish
#

its for the launcher too

#

the emulator is in C++

frozen heron
#

huh

#

well in any case it's missing a lot of code

pure radish
#

basically: squirrel in MGS1 is doing the launcher and mediation between the C++ emulator and the launcher UI

keen sky
#

is the emulator embedded in the launcher with a different code base or whatever?

#

never mind answered my question

pure radish
#

yeah it's all in one executable

#

(besides the squirrel scripts in alldata.bin)

timid hemlock
#

ahh

frozen heron
#

so it's the wrapper

pure radish
#

the game main loop in squirrel is basically an event handler for the C++ stuff

#

it handles all the initial setup, loading assets, and UI graphics

#

but the game is pure C++

#

the squirrel handles applying patches like the button graphics fixes

#

there's some C++ emulator RAM access API

timid hemlock
#

That's why the apps are split in on all platforms then? They never had an option to make a complete package? They basically need a separate launcher for mgs1 to make the patches work?

pure radish
#

them being split on things like the nintendo switch is essentially arbitrary

#

but mgs1 is not split, it's one executable

#

mgs2/3 are definitely split

#

when you select the game in the launcher, the launcher closes and starts the real game

#

mgs1 is not like that

#

the launcher is the game

frozen heron
#

here's the thing

#

MGS2+3+12 launcher is essentially what gives the games the commands to run

#

MGS1 does not need any commands to run so it just runs on itself

pure radish
#

what really happened is they compiled the PS3 HD collection mg1/2+mgs2/3 for other platforms

#

whereas mgs1 is an entirely new project

#

mgs1 didn't need a separate launcher as they were in total control

frozen heron
#

but the ps3hd menus are different

#

and wasn't mgs1 included too?

timid hemlock
#

mg1 was just a ps store game

#

mgs1

red cradle
#

yeah, they give download code

timid hemlock
#

that's why

pure radish
#

yeah, that was just "virtual console" stuff lol

#

not a true part of the HD collection

red cradle
#

that's why if you buy a used copy, the MGS1 code probably is already used

keen sky
#

and mg 1 and 2 were included in metal gear solid 3 as per the ps2 subsistance release

timid hemlock
#

I think the ps store games were running a pretty simple emulator, upscaling to 480i, and stretching to fill the screen, with some simple display options. Still essentially 240p. They hired m2 to make it run through a launcher similar to the hd versions, which included all other games in the MC

scenic kelp
#

Dumb question, but what are the params you need to use to extract .nut.m files? figured out, didn't realize you had to use another argument

timid hemlock
keen sky
timid hemlock
#

Or maybe that was just the scaling settings on my shitty old HD tv 😅 . Anyways, if the mgs1 master collection is tied to the launcher, will it be possible to enable/disable mods through modded launcher menus? Or will it just be ini edits like in nuggs filtering mod? Could make for a pretty decent user experience, with preview pictures and descriptions and stuff, if launcher mods are possible. Guess it's a bit early to tell.

frozen heron
finite peak
finite peak
frozen heron
#

homie we are not talking ab visuals lmao

finite peak
frozen heron
#

extract the roms?

#

remove the whole need of the mgs3 menu

finite peak
frozen heron
#

trust me there is

#

og mg1 has a lot of translation issues and mgshd fixed them but it just looks uglier and different

#

sprites are not the same either

#

there's a lot of difference

finite peak
#

not gonna lie, I would like to see a MG1 and MG2 where the script is completely re-written to fix continuity issues

frozen heron
#

#modding-general message

finite peak
#

suddenly I want it, and I didn't even want it before

#

being able to re-write those games......hhhmmmmm

#

now you have my brain turning over, I'm going to have to dig out the script I wrote for the MG1 remake I was working on ages ago

#

damn shame that fell apart like it did

frozen heron
#

lmao i was working on a mg1 to mgs conversion remake a few years back

#

just mg1 with mgs mechanics and better storytelling

#

also dipped

finite peak
#

my team were a bunch of morons and reached out to konami to ask about monetizing merchandise, I told them not to tell anyone anything until the game was completely done

#

guess what konami did?

frozen heron
#

i was working alone so i just dropped it

#

¯_(ツ)_/¯

finite peak
#

a script re-write on the other hand is very doable

#

I had a good script too, especially considering how young I was

scenic kelp
#

Are these enums present in the config files? Can't seem to find them in the nut files

#

Getting around the codebase and memory patching with this VM is incredibly tedious

#

I wonder whether this is related to the PS1 controller button to digital/analog the left stick, or whatever they've implemented to make it go only in 4 directions

scenic kelp
#

These are just assumptions. Hard to tell without patching it and trying it in-game

finite peak
#

For that matter, why would there be any need for an analog to digital deadzone if it wasn’t that setting?

#

I’ve never heard of deadzone being used for anything outside of controls in an emulator

#

I’ll just say it’s a fairly safe assumption

kindred chasm
#

So it's already possible to use analog stick, M2 just didn't do anything with it?

scenic kelp
#

Since the game itself supports it, there is no reason why it wouldn't be possible. It's either the emulator transforming the input into dpad or something memory patching it out of the game ( 0% chance, but even then you can just memory patch the memory patch ). It's just a matter of finding where, what and how

scenic kelp
#

I can apply a dirty patch through IDA if it's something that is present in the binary. Anything squirrel related will take me more time though. I'll piggyback off nuggs' extension to test it and then rewrite it in rust if it's the case. Though by the time I come to the conclusion, someone more experienced will already have found it hah

finite peak
# pure radish *incomprehensible noise*

Hey nuggs, would you mind if I updated my mod on nexus with your stuff? I'll credit you and the other guys in here for it, I just want to package it in a more user friendly way and update it as more fixes are found if that's OK. I got the upscaling working and I know people keep wanting that real bad lol

#

Also has anyone found any fps locks? It would really help if we could lock fps

#

the emulator goes nutz as soon as it goes over 60

finite peak
#

you said it was just a cmd line argument right?

#

I ran this "C:\Program Files (x86)\Steam\steamapps\common\MGS1\METAL GEAR SOLID.exe" --3840-2160 and --3840-2160

#

Normally I can put that on a shortcut and it will run the command line argument but I don't think it actually worked, tried it in CMD and gave me an error

#

Wait, a second....did I misunderstand and you meant a command line argument in C?

#

OK nvm....I figured it out....but 4k I don't think is a thing lol

#

I tried it and all I got was a black screen

#

and no sound

#

like insta crash

wild mauve
#

what is the format for the arg

finite peak
#

same with 1080p, insta crash, one sec

#

"C:\Program Files (x86)\Steam\steamapps\common\MGS1" -1920-1080 and -1920-1080