Made an account just to post this but:
Just replacing the ROM file will crash the emulator without changing corresponding config files related to the ROM.
In order to replace the ROM you need to have your replacement file located at:
Code:
\atmosphere\contents\010049900F546002\romfs\MarioSunshine\Super_Mario_Sunshine_Stardust-trimmed.gcm
The file that loads the ROM is:
Code:
\atmosphere\contents\010049900F546002\romfs\rom.json
That contains the text:
Code:
{ "UID": "MarioSunshine", "DolHash": "4e10808fdbd8a8beefab38163bb43a5002f60d63", "ROM": [ "rom:/MarioSunshine/Super_Mario_Sunshine_Stardust-trimmed.gcm" ] }
The UID is how the emulator searches the /data/ folder to replace textures and gecko codes, so in theory we could replace that with something like "NewGame" and then match that to "rom:/NewGame/NewGame.gcm" in the replacement "rom.json" file we would load with LayeredFS.
We would then also need to find out how to generate new hashes associated with a newly inserted ROM (NewGame.gcm) in the files:
Code:
\atmosphere\contents\010049900F546002\romfs\NewGame\NewGame.gcm
Code:
\atmosphere\contents\010049900F546002\romfs\NewGame\NewGame.hash
Code:
{
"hash": {
"exe": "corresponding exe hash with NewGame",
"media": "corresponding media hash with NewGame",
"full": "corresponding full hash with NewGame"
}
}
as well as
Code:
\atmosphere\contents\010049900F546002\romfs\data\database\hagi\NewGame.json
Code:
{ "Info": { "GCM": { "Name": "New Game", "CountryCode": "US", "GameID": "GAME", "DVD": 0, "ROMVersion": 0, "GCMID": "GAME.0.0" }, "Hashes": { "exe": "appropriate hash here", "media": "appropriate hash here", "full": "appropriate hash here" }, "UID": "NewGame", "ShortName": "NewGame" }, "Mxic": { "Hashes": ["appropriate hash here", "appropriate hash here"] } }
and finally the "boot" code needs the GameID ("FourCC") and VideoMode changed in this file
Code:
\atmosphere\contents\010049900F546002\romfs\data\database\config\NewGame.config
Code:
},
"Boot" :
{
"Country" : "US",
"DVDRoot" :
{
"FourCC" : "GAME"
},
"VideoMode" : "NTSC",
"Retail" : true,
"UseDolHash" : true,
"LoadBios" : false
},