MSU‐1 for Dummies - pk-hack/CoilSnake GitHub Wiki

What is MSU-1? Is it a Robot?

No, but it would be a really cool robot that could play 44.1 kHz audio instead of regular sequenced music!

Many SNES games like Pilotwings, Star Fox, and Super Mario RPG had "enhancement chips" that gave them extra hardware and features. The MSU-1 chip (MSU is short for "Media Streaming Unit") is one of these enhancement chips, although it isn't one that Nintendo ever made. It was originally developed by Near, the creator of the emulator bsnes, who thought it would be neat if a Super NES CD-ROM add-on actually went beyond the prototype phase, meaning SNES games could have had audio playing from a CD and tons of extra storage space for full-motion videos and the like. The final design of the chip was eventually implemented in many SNES emulators and a few flashcarts.

In this guide, you will learn how to use MSU-1 high-quality streamed audio tracks instead of the regular sequenced tracks that are in the game.

→ What you will need:

  • Wav2MSU
  • Audacity (Or similar, I guess idc)
  • A Windows-like computer
  • A Song you would like to convert
  • Patience
  • A few other things

Step 1: Grab the MSU-1 Tool

This part, I borrowed from the original MSU-1 tutorial from https://forum.starmen.net/forum/Community/PKHack/MSU1-A-sort-of-tutorial-showcasing/page/1

You should totally download their test ZIP too, as it's premade, and gives you an idea what you can make too.

https://drive.google.com/file/d/1yl3F2ScfnYAB6T-34h7qSiwrhbJJ96Ew/view

Also, if you just want to follow my tutorial, just download the tool yourself from here;

https://www.smwcentral.net/?p=section&a=details&id=4872

And download the MSU1.ccs file from here too;

https://gist.github.com/ShadowOne333/3010dd7433332f2d1cbda673bfcc20d9


Step 2: Grab a Compatible Emulator/Hardware-Capable Device (SD2SNES, etc)

This step seems simple at first. "Duh, of course you need to use a compatible thing to actually use this!!" However, it's important.

SNES9X 1.55+ all support MSU, as do the latest versions of BSNES, ares, and Mesen-S. Using anything below 1.55 and the others' latest versions could make it so the songs will not work.

As for Hardware-Capable Devices that you would use on a real SNES, it's complicated. Most MSU-1 "supported" hardware carts will make it apparent, even if it's rather niche. Chinese bootlegs of popular carts may sometimes also have the same capability, but they're bootlegs, so your mileage will vary.

For me, I have (what I suspect) an AliExpress SD2SNES, and it plays MSU-1 just fine. Not all carts will work, so always try the emulator first and confirm it works, before going to a hardware cart and wasting time troubleshooting.


Step 3: Grab a Song and open Audacity

Now for the 'fun' part.

Open Audacity (or similar), put in whatever song you want, and make sure that you're in 44.1 kHz mode in the project settings (or a "project rate" of 44100 Hz in the bottom left corner of the window).

For an example, say this is your music file.

The selected/highlighted section of the audio, from this point at around 5 seconds to the end, seems to loop cleanly. So the beginning of the selection is the loop point if we're making infinitely looping music. Write down what it is.

Q: 'So I should just put it in seconds, right?!'

A: No. In samples.

Please don't make my mistake and forget this, this is imperative if you want your music to actually loop. You can choose the units for this timestamp view by clicking the little dropdown arrow next to it.

Q: Now that you've got that, all good, right? You can just export as a regular wav, or at worst, just rename the .wav to a PCM?

A: No, use "Export Audio" to be sure of the settings. You must export as "Stereo, Signed 16-bit PCM, @ 44100 Hz."

If you don't, you may get an error saying "Sound is not 16 bits 44.1kHz stereo.".

And no, you can't just rename the .wav file you get from this. Which brings us to the next step...


Step 4: Using Wav2MSU (finally)

Congrats on not dying from boredom, now you can actually convert the song. Yay!

Q: So, where's the fancy program with all those cool buttons?

A: ...there is no fancy program...(yet).

Yeah, that sucks, but the good news is that the wav2msu program you have is able to be used WITHOUT a fancy program!
(the Wav2MSU program is essentially just an .exe that will not do anything on its own.)

  1. Open Command Prompt; enter "Command Prompt" in the search feature in the taskbar at the bottom of the screen, and hit enter.
  2. Drag wav2msu.exe onto the command prompt.
  3. Press the Space Bar.
  4. Drag the newly created WAV file onto the command prompt.
  5. Press the Space Bar again.
  6. Type one of the following, if your song should infinitely loop:
    • -l 0 (loop at beginning of song)
    • -l 236544 (replace 236544 with the number you wrote down earlier in the Step 3 section)
    • -i (introsonghere).wav (alternate way of making the loop point, by splitting up the introduction and looping section into their own separate .wav files)
    • -l 0xlooppoint (hex version).
  7. Press Enter, and locate the new PCM that was just made (it'll be next to where your WAV was).

Step 5: Applying MSU-1 code to your CoilSnake Project

This is assuming that you have a fresh project. If you already have all the files in the project, skip to the part where we actually use the MSU file.

Congrats, you're almost done!

In your CoilSnake project, to add MSU-1 functionality to it, do the following. (You don't need to follow these steps multiple times for the same project.)

  1. Grab the msu1.ccs file from here https://gist.github.com/ShadowOne333/3010dd7433332f2d1cbda673bfcc20d9 and put this directly in your CCScript folder.
  2. Compile your CoilSnake project. (Don't skip this! Otherwise, the MSU-1 code may not be included in the ROM.)
  3. Open the File Explorer and go to the folder where your Output ROM is.
  4. Right click inside of the file explorer, hover over "New," and choose "Text Document" to create a blank .txt file. Erase the .txt part of its name, and rename it (romname).msu (press yes if Windows asks if changing this file's extension may make it unusable). (romname) should be the name of your Output ROM.
  5. With the ROM compiled with the msu1.ccs script first (MUST DO), and the .msu file in the same folder, place your new PCM in this same folder too. You will call this new file (romname)-(decimal number of EBMused entry).PCM.
    • If you don't know what the decimal number is of the song you're replacing, open EBMused and locate the song in the entry list. EBMused will list these song IDs as Hex in the song list, but you MUST convert that number into decimal. The title screen is 175, but in EBMused it will be "AF". DO NOT use AF instead of 175.
  6. Once you have verified that A) the rom was compiled with msu1.ccs, B) the .msu file, .PCM file, and ROM file are in the same folder, then load up your compatible emulator of choice. Definitely recommend that you try 175 first as it's the fastest way to check that your song works.
  7. After testing, you win, congrats! Yay!

However, if you're having issues, I have a simple troubleshooting section for you.


Troubleshooting your MSU-1 Files

What's hacking without things not working at all?

If your song is NOT playing, verify the following before wasting your time.

  1. The msu1.ccs file was in the ccscript folder, and still is, and you just compiled a fresh copy of your ROM.
  2. The .msu file, .PCM file, and ROM file are in the same folder together, unobstructed, not seperated in different directories.
  3. The PCM file you have is an actual PCM file from wav2msu, as renaming a WAV file is not enough.
  4. The emulator you used is LISTED as having MSU-1 support. If it doesn't, try SNES9X on the latest version.
  5. You didn't do a brain fart and listed the wrong song number from EBMused (like 176 instead of 175).

If you verified all these have been checked and there's nothing wrong with any of these, here's what you can do;

  1. Create a FRESH and BRAND NEW project, and import the latest versions of the relevant scripts if needed.
  2. Rename any PCM file to (romname)-175.pcm to test.
  3. Verify the emulator is actually MSU-1 compatible.
  4. If this works, figure out what was different in your original project.
  5. If this doesn't work, make 100% sure you have converted the WAV correctly, that you have a compatible emulator, and that the rom was recently compiled with an MSU-1 patch.
  6. Anything further? Ask in PKHack's Hacking Help section.

There's a lot of things that could go wrong, and that's why we stick to what we know until we've verified what we have really works.


The End, plus some notes

Congrats! You've done it.

Now you can put Megalovania all over your hack and annoy absolutely everyone with your ripped My Chemical Romance CDs.

Or, better yet, make your own music, WITHOUT EBMused, in the DAW of your choice.

Remember, MSU-1 music and music made in EBMusEd can't be playing at the same time in-game. Only SFX can play on top of either type of music. (It is okay to only have some music tracks use the MSU-1 chip and others use EBMusEd songs, though.)

Most of the volume controls involving the music_effect command work fine with MSU-1 music, but pitch shifting or slowing or muting specific audio channels doesn't work, and probably will never work.

If you would like to add more tips and tricks, just write them here.

Have fun!