It has to do with the .sfc files and .wav files being put into the ROM separately. It's similar to how when NES games are getting music put it, it exists in a .mid file before they can transfer it to the .nsf file in the final ROM data.
If that went completely over your head, use Wikipedia, because I'd rather not explain how .nsf (NES Sound Format) files work.
1) I didn't use any special tools or insert WAVs directly into the ROM. bsnes supports a (currently) fictional SNES expansion chip called the MSU1, which is capable of playing WAV audio or streaming data from external files, similar to how the unreleased SNES CD addon would have worked. The smo_msu1.sfc "ROM" is actually an ordinary folder with all the necessary files inside; try opening it in Windows Explorer if you don't believe me. ;P
2) bsnes has no MP3 support, so MP3s included in future releases will have to be converted to WAV before they can be used. I do plan to include a batch file and a copy of LAME to simplify the process for Windows users.
bsnes supports a (currently) fictional SNES expansion chip called the MSU1
speaking of which...
@byuu: slightly off-topic, but does ikari have a blog or something where progress is posted or is it entirely private? I don't think that nesdev thread has been touched in a while. It's interesting to see something like this develop.
I don't think ikari has an official thread anywhere, it's usually just brought up in various semi-related threads. He does have audio working, so SMO can really run on the real thing, but only for one person so far, heh.
That should answer a previous question, but to reiterate: MSU1 does nothing real hardware could not. The SNES has audio mixing pins on the cartridge connector and expansion port. The Super Game Boy used this to play 2MHz (not a typo) audio from Game Boy games, and the BS-X Satellaview used this to stream orchestral music and live commentary into certain games. Even if you go back another generation, the Famicom had this support, and games like Moero Yakyuu Pro! used it to store raw PCM data for vocal sound effects.
The 4GB data is simple as well. Both the S-DD1 and SPC7110 cartridges have memory map controllers to address more ROM in less space. This is even simpler as it's just a streaming read-only port like $2180.
All of this is trivial on a real system, and was only avoided because ROM chips were very expensive back in the 90s. You can call it cheating and hate it if you like, to each their own. I'd rather have simple ASM hacks that offer awesome audiovisual improvements and are still very portable than have people port entire games to a Windows PC.
I'll try and look into MP3 support, but you'll still need to extract the games. Too much RAM required to load in a full archive of MP3s/WAVs. The XML file is needed because I did not want to make up a new header byte to identify the MSU1 chip, that is what tells the emulator to enable the chip.
Lastly, I made the WAVs external precisely so that you could swap out music with your own if you really wanted, no hacking knowledge required
At this point I'd like to mention one more time that the Playstation 2 could already play WAV-Files and used discs of 4,7 GB filesize. That was several years ago. So calling this a revolution (in the year 2010) is simply wrong, since, as byuu already said, making support for this was rather simple. A real revolution would be if the WAV playback came from the 4 MB ROM itself.
Again, not to say that the MSU-1 isn't a great thing. It's pretty nice to enhance your experience. I just don't want people to go overboard with this. Never forget that it's much more revolutionary to create something great using limited technology than to have great technology that does all the work for you. ;)
I still think this is really outstanding. I just tried with a couple of different MP3s (the biggest was 60 MB large!), and all worked. Simply amazing.
I think it would be a great idea for my hack making a classical port and an enchanted music version. The first one for those who don't want to download the big file with all the songs, or can't use bsnes, the second one who love the more epic songs in the hacks. This is rather off-topic though, but eh.
So basically, I just have to copy that code that smkdan posted into LevelASM? Or something else? And do I have to use an .sfc file?
Hadron, the extension is unimportant, the actual format is 100% identical.
.smc stands for Super Magicom, which was one of the earliest SNES copiers. The irony is that 90% of dumps come from SWC DX2s and GDSF7s.
.sfc stands for Super Famicom, which makes a whole heck of a lot more sense.
Unfortunately, the former caught on in the early days because the first dumps were distributed that way through piracy BBSes and such. It continues to exist because the most popular (and lowest quality) SNES organization tool still uses SMC.
I would ask that you guys use SFC, simply run "ren *.smc *.sfc" in your ROM folder, but I can't make people change.
Running that code every frame wouldn't be a good idea, since playback stops and the (real) MSU1 goes into a "busy" state every time you write to the track register. The easiest option would be to put that code into a LevelASM init routine so it runs only once at the beginning of a level. The ideal option (and the one I used) would be to replace the original game's music handler with some slightly more complex code, so you have full control over the music at any time.
As byuu and smkdan mentioned, you'll also need to use a custom XML memory map in order to enable the MSU1. The one included with Odyssey should work with any 4MB LoROM hack; if you need to modify it or make your own, these threads should help:
Thanks byuu and BMF.
BMF: So I can choose between LevelASM Init and your option. Will you share your code with us, or you want to keep it for yourself? The full music control sounds very exciting, I wonder how it actually looks. And yeah, I guess if I started using .wav files on my ROM, I won't need Addmusic on that ROM anymore (or it still would work with the overwritten music handler?).
The XML memory map looks quite understandable, but if SMO's XML works with any 4 MB LoROMs, it's even more better.
Marioman: I could open the .sfc with Lunar Magic actually. It just asked for a ROM header, but it still worked after I added the header to it.
This is amazing. I haven't enjoyed playing a SMW hack, (wait that was a SMW Hack?!) that much, ever.
This was simply incredible. The ASM in the intro and cutscenes were fantastic, but the music... The music!
The song you picked is one of my favorites, and hearing it that clear while playing SMW is just awesome.
Aside from everything there, the level design was really great. There was always something to do.
Hmm, I tried it with LevelASM Init, I patched the code that smkdan posted, on a new, expanded (4 MB LoROM) ROM, renamed everything correctly, put the XML, WAV and MSU file into the folder, and when I try to start it in bsnes, the level doesn't start (black screen), and the original music plays. I'm sure I pointed it to free space. Then I tried with snes9x, the level worked, but the original music played. I don't really know what could be the problem...
Sorry if I make this thread a help thread or something, but still, it's related...and I'm soo interested to try this feature out.
Meh, I don't really like the music. It just doesn't give the same kind of feel that an SNES game should have. Maybe I'm alone in this, but I'd rather have the music we have on the site than the fancy WAV music.