1. Gaara4

    OP Gaara4 Member
    Newcomer

    Joined:
    Jan 13, 2015
    Messages:
    42
    Country:
    Germany
    First off I apologize for not being word-perfect in English it is not my first language so please be gentle =)


    Prerequisites:
    • A hacked PS Vita
    • Stardew Valley v1.03
    • at9tool
    • HxD
    • Audacity
    • unxwb (optional)
    • rePatch plugin
    • ID List



    Step 1. Get your Music.xwb

    1. Open VitaShell and navigate to your copy of Stardew Valley to get the Music.xwb. You should find it under

    "ux0:/app/PCSB01226/Content/XACT/”

    2. Connect your Vita and use USB or FTP to make a copy somewhere on your PC.



    Step 2. (optional) Extract the music files

    1. Download unxwb and extract the archive in the same place you stored your Music.xwb.

    2. Open cmd.exe and navigate to the same folder or press Strg+ right click to get the option to open cmd.exe in the same folder so you don´t need to navigate to the right path.

    3. Type in unxwb -R -D Music.xwb without the “ “ and hit Enter.

    4. You will get 84 .dat files which are the sound files of the game. You should move them to a new folder to organize it.

    5. These .dat files are WAV Files with the ATRAC 9 CODEC, so if you change for example 0000000.dat to 0000000.at9 you could play the file for example with VGAStream.



    Step 3. Get the music to want to add

    1. In the next step we need to convert the music we want use in the game into the right format. Every sound file you want to add needs to be in the .wav format, so if you have some tracks which are for example in .mp3 you can use Audacity to convert them into .WAV 16-bit PCM files.

    2. If your sound files are now in the .WAV format you need to convert them with the at9tool. Copy your sound files in the same folder with the at9tool. Open cmd.exe in the same folder and type this

    "at9tool -e -br 96 Yourmusicname.wav Yourmusicname.at9"

    3. Just change "Yourmusicname.wav" to your Filename and Yourmusicname.at9 to whatever you want.

    4. Now you should have a new created .at9 file in the same folder.



    Step 4. Hex editing

    1. Open HxD and with it you need to open your Music.xwb and your own created .at9 file. First of remove the header from the .at9 file with the Hex editor. It should always look the same in every .at9 file. Look at the picture to be sure to remove the right part.

    2. Now after you remove the .WAV header you need to mark everything and press Strg + C to copy it.
    [​IMG]

    3. Switch between the tabs to your Music.xwb and press Strg + E to get into the menu to mark a specific area in the file. Now you need to know in which part each music track is stored. I have made a list where you can find in which offset you can find the specific soundtrack of the game you want to switch out. So, look up in the list and type in the offset values from the song to want to replace. Link to the list is at the end of this post!
    [​IMG]

    4. Hit OK and right after that press Strg +B and confirm it again to write your hex values which your new created .at9 file into the Music.xwb.

    5. Save your modded Music.xwb.



    Step 5. Add your new Music.xwb to the game
    1. For the last step you need have to use rePatch for the Vita. There are plenty of guides and tools to install it, so I won´t explain it here. If you have rePatch installed open the repatch folder on your PC or directly on your Vita with Vitashell and create the following folder structure

    "PCSB01226/Content/XACT/"

    [​IMG]

    2.Now copy your modded Music.xwb into the XACT folder and start your game. If everything works out you should now hear your soundtrack whenever the normal soundtrack would play.




    IMPORTANT in regards to the ID list:
    The ID list is not complete because I don’t know the name of every soundtrack. Also, I cannot guarantee that got all the hex values are right. Maby I misstyped or got the wrong line in the Hex editor so feel free to contribute to the list if you find any mistakes. I just tested a few songs and it worked for me.


    Link to the list --> https://drive.google.com/file/d/1KoojoQD8fJT6oAHMe784Zk-HN1Eo5Sjr/view?usp=sharing
     
    Last edited by Gaara4, May 18, 2019
  2. Fugelmir

    Fugelmir GBAtemp Advanced Fan
    Member

    Joined:
    Mar 9, 2016
    Messages:
    515
    Country:
    Canada
    I had no idea SDV was on the vita.
     
  3. stev88982

    stev88982 Member
    Newcomer

    Joined:
    Oct 3, 2019
    Messages:
    15
    Country:
    United Kingdom
    so hard doing this for PCSE01235 us version only replace portraits and characters trying to get chrono trigger music to work

    repatch or mai dump better?
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Tutorial, Stardew, Modding