emoose / xenia

Non-maintained mousehook/stfs & other hacks branch, check https://github.com/marinesciencedude/xenia-canary-mousehook for more up-to-date version.
http://xenia.jp
Other
92 stars 6 forks source link

Support for cross-title save loading #31

Open emoose opened 3 years ago

emoose commented 3 years ago

(E: cross-title saves should be supported as of stfs-writer-v1.12, though Banjo-Kazooie/Tooie still hasn't been tested yet - if anyone know how stop-n-swop works there please take a look for me!)

The way cross-title saves are handled in Banjo-Kazooie/Tooie's stop-n-swop seems pretty straightforward, using XamContentAggregate* functions, and some XEX headers that specify the title IDs it can search for.

I've got some code ready that might let it work, but got no idea how to actually test this out. Does anyone know where I can find Banjo-Kazooie & Tooie saves that can be stop-n-swopped? Tried some saves I found online but couldn't find anything in-game (I don't really know any of the levels or anything though, so maybe I just didn't look in the right place).

If someone could provide saves & a walk-thru (what to do after loading the save to see if stop-n-swop is working) I'd appreciate it.

(also, does anyone know any other games besides Banjo/Mass Effect which have cross-title save support?)

Etokapa commented 3 years ago

BlazBlue: Continuum Shift Extend is another game that has cross-title save support (with BlazBlue: Continuum Shift). BBCSE

emoose commented 3 years ago

@Etokapa oh cool thanks for the find, looks like it's similar to Banjo, using the XEX_HEADER_ALTERNATE_TITLE_IDS header in the XEX to store the 415707DA title-ID, which I guess is for BlazBlue: Continuum Shift.

Do you happen to have a save for Continuum Shift I could test with by chance? E: hmm, maybe the one at https://www.thetechgame.com/Downloads/id=47788/blazblue-continuum-shift-save-data.html will work.

E2: Seem to have something working, after choosing "Load the previous games data" and going through the prompts it no longer errors, and shows "Loading the previous data..." followed by "Saving...", and then goes to main menu:

14_06_21_23_02_03_xenia

Gallery shows 16% complete, with True Ending events unlocked:

14_06_21_23_05_28_xenia

Does anything else there look like it loaded previous games data successfully? or is there anywhere I can check? (E: seems game normally starts with gallery at 0%, so hopefully this means the save loaded successfully.)

Anyway I'll clean this code up and commit it in a few. (E: stfs-writer-v1.12 posted in the canary thread: https://github.com/xenia-canary/xenia-canary/issues/21)

Etokapa commented 3 years ago

Yup! The Gallery showing unlocked CGs and the Story Mode showing different character routes unlocked means the BBCS save data loaded. I can confirm it works on my end too. Thanks for adding support for it so fast!

Etokapa commented 3 years ago

Maybe BL2 could support this as well. I'm unable to check on v1.12 because it always freezes for me when checking for DLC (none is present). https://www.eurogamer.net/articles/2012-07-07-borderlands-2-rewards-for-borderlands-1-players From master: image

Lost Planet 2 will unlock 2 character skins if it detects other titles' save data as well. I'm unable to check on v1.12 because it always freezes for me when checking for save data (none is present). Fixed in v1.12a! image

I have not tried testing this, but AC:B should also detect saves from AC2 and have a minor effect at the beginning of the game. https://redd.it/rrg29 https://gaming.stackexchange.com/questions/33923/does-assassins-creed-brotherhood-build-on-the-saved-game-from-assassins-creed

emoose commented 3 years ago

Ah think I found the issue with Borderlands 2 - looks it's the problem solved by @Gliniak's https://github.com/xenia-project/xenia/commit/a69a0589912cd979ff81549782e0d51a84247165 commit, basically game would call an API until it returned an error, but Xenia's code for the API doesn't actually let it detect any error atm, so it never signals one, making game just run the API over and over.

(I think a proper fix for that would be changing the XSUCCEEDED(result) call to result == X_ERROR_SUCCESS tho, since XSUCCEEDED is for NTSTATUS results, but result is a win32 error code instead, so XSUCCEEDED can't actually detect any error with it... I'll change it to that in stfs-writer in a sec)

Also this piece of code just showed me that XCONTENT_INTERNAL_DATA & XCONTENT_AGGREGATE_DATA are the same, so I'll merge those too.

E: Uploaded v1.12a which should help with this: https://github.com/emoose/xenia/releases/tag/mousehook-v1.13.4 Wish I knew what game the AGGREGATE_DATA stuff was added for though so I could make sure I didn't break anything there... hopefully it'll be fine. Maybe this'll help with Lost Planet 2 as well if we're lucky.

E2: Borderlands 2 seems to work well :) 15_06_21_03_01_49_xenia

Etokapa commented 3 years ago

Thanks for the update! I can confirm that LP2 is now going ingame and detects save data from other games. It turns out it can see a lot more games than I remember!

* Legendary Warrior - Have a Lost Planet save
* Decorated Soldier - Have a Lost Planet Colonies save
* I LOVE LP - Have a save from both Lost Planet and Lost Planet Colonies
* Played the Demo - Have a save from Lost Planet 2 Online Battle demo
* Street Fighter - Have a Street Fighter save
* BSAA - Have a Resident Evil 5 save
* Devil May Cry - Have a Devil May Cry 4 save
* I've Covered Wars - Have a Dead Rising save
* Capcomaniac - Given if 3 types of save-data related Noms de Guerre have been awarded

Here's LP2 awarding the player special name tags for detecting my RE5 and LPC saves.

LP2

emoose commented 3 years ago

Been trying to look into Mass Effect 2's cross-title support again, but couldn't find any completed ME1 saves online... found some that were pretty much at the end of the game, but Xenia has issues rendering ME atm so I couldn't manage to complete it.

If anyone is able to complete ME on x360 (or if you're good enough, on half-rendered Xenia) and upload the finished save somewhere I'd appreciate it. https://www.thetechgame.com/Downloads/id=53118/mass-effect-1000-1000.html has some saves that are right near the end of the game.

kcroc5 commented 2 years ago

If someone could provide saves & a walk-thru (what to do after loading the save to see if stop-n-swop is working) I'd appreciate it.

Just tested this, you have to create a Banjo-Tooie save file, then launch Banjo-Kazooie and all of the areas containing S&S items will be available. After collecting an egg or a key, exit and launch Tooie, then go to Heggy's Egg Shed near Wooded Hallow and unlockables from the first game can be activated there.

kcroc5 commented 2 years ago

https://drive.google.com/file/d/1Z3Rf8WKGF5zBiTsqjmTL_DtDw9BJgPX5/view?usp=sharing https://drive.google.com/file/d/1C0TOdUT7b1VdSBAPza8yoQA9_QxQAxVG/view?usp=sharing

Here are my saves, they both have enough progress to test for yourself if you wish.