MP3's in Cave Story

Jan 19, 2010 at 10:07 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
This is the biggest update you will ever see.
Thanks to my persitant annoyingness and Noxid's assembly smarts, and a little bit of Pixel's laziness, we've cracked it.
That is to say:

You can now have WAV's in Cave Story

How, you ask?
All I know is that some stuff got undummied and a few functions re-pointed.
Or something.
And that it somehow involves my earlier theory about the drums being imported as WAV's.

Either way, I present you:

CS Org Complete - Unlocks all the instruments available in OrgMaker 2.05 [Best for new mods]
CS Org Manual - Contains a pile of something that you somehow turn into assembly hacks, and a handy-dandy batch instrument importer to save you time. As a bonus, said instrument importer can be used if you plan on massive instrument changes. [Best for existing mods]

If I didn't say it already: 99% of the work for this was done by Noxid.

So there you have it.
 
Jan 19, 2010 at 11:22 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
The "missing" instruments that can be added as wave files are:

- BASS02
- BASS03
- TOM02
- SNARE02
- PER02

Wait, you're saying that, in order to get these drums to play, all we would have to do is add a resource with the appropriate wav to the .exe and give it the right name?

Because, ORGmaker 2 has a ton more drum instruments than that, so I'm thinking if that works then it should work with the new ORGmaker 2 drums, which would give you more options for things to replace.

Also, I don't see how this reduces the actual number of ORGs you can use... care to elaborate?
 
Jan 19, 2010 at 11:44 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Noxid said:
Wait, you're saying that, in order to get these drums to play, all we would have to do is add a resource with the appropriate wav to the .exe and give it the right name?

Because, ORGmaker 2 has a ton more drum instruments than that, so I'm thinking if that works then it should work with the new ORGmaker 2 drums, which would give you more options for things to replace.

Also, I don't see how this reduces the actual number of ORGs you can use... care to elaborate?

This idea would only work with ORG View, as Cave Story itself has its instruments combined into one data set, making it impossible* to change.

And it reduced the number of ORGs because, to play a wave song, you eat up one ORG.

* I'm working on it. Hyperripper turned up nothing, but it might be that it's a continuous stream of audio parsed by the game.
 
Jan 19, 2010 at 11:51 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
DragonBoots said:
This idea would only work with ORG View, as Cave Story itself has its instruments combined into one data set, making it impossible* to change.

And it reduced the number of ORGs because, to play a wave song, you eat up one ORG.

* I'm working on it. Hyperripper turned up nothing, but it might be that it's a continuous stream of audio parsed by the game.

Ah, well, if we're going to get this advanced, I already found a way to vastly expand the number of possible orgs through Assembly (or hex, if you can figure it out) editing.

And, I hope this turns out, good luck. This certainly is a very promising... I can imagine narration and music playing over a series of hand-drawn scenes... epic.
 
Jan 20, 2010 at 12:00 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Noxid said:
Ah, well, if we're going to get this advanced, I already found a way to vastly expand the number of possible orgs through Assembly (or hex, if you can figure it out) editing.

And, I hope this turns out, good luck. This certainly is a very promising... I can imagine narration and music playing over a series of hand-drawn scenes... epic.

Hmmm...
As far as I've been able to determine, this won't be possible without some assembly knowledge.
Can you figure out what parts call the resource WAVE100?
 
Jan 20, 2010 at 1:11 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Well, I did a bit of poking around, and I couldn't find where it was loaded, but when I deleted the WAV resource, there is an array at 4a4318 that gets generated with 00's, and made the game break. I loaded a fresh copy, picked one of the numbers that would get generated in there, and went back to the one with the .wav file deleted and filled all the 00's with that one number (0x05270048), where there would have been a bunch of different ones. What happened was quite curious; the song played the track E all by itself. What I find most intriguing was that I had actually deleted the .WAV file, so I didn't expect anything to be playable.

I don't know what the heck this means though, except that you may be out of luck :D

EDIT: Okay, further research shows that by replacing ALL the numbers with the correct ones, I can get all of the drums to play, but no tones. So, this obviously means that the drums are not in the .WAV file. But where could they beeeee???
 
Jan 20, 2010 at 1:27 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Well, I've put a little throught into this.
If the code responsible for pointing to the resource could be isolated in OV and transfered to CS, I could create a patch to apply it to other CS games.
^^;
Basically, I'm wanting to ram OV into CS and then tape it in place.
 
Jan 20, 2010 at 2:28 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
bad images, my lad.
 
Jan 20, 2010 at 2:32 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Lace said:
bad images, my lad.

What, can't handle a little Doukutsu on Organya View action?

Also, stop showing up when I'm about to email you asking you to show up. >:[
 
Jan 20, 2010 at 4:28 AM
squidward
"The Ultimate Sword of Extraordinary Magnitude"
Join Date: Jan 27, 2009
Location: ✨✨✨✔✔✔
Posts: 289
Age: 29
Hey, I had an idea like this before.
Never got around to it though...
 
Jan 20, 2010 at 8:40 AM
Senior Member
"Huzzah!"
Join Date: Aug 6, 2009
Location: GMT + 8 ;)
Posts: 202
Age: 35
I don't know if this will help but..

Have you tried the beta version of Orgview?

I looked at It by using res-hacker and it contains all of what is missing in the other Orgview..
 
Jan 20, 2010 at 11:07 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Fahrenheight said:
I don't know if this will help but..

Have you tried the beta version of Orgview?

I looked at It by using res-hacker and it contains all of what is missing in the other Orgview..

I actually extracted the missing instruments right out of ORG maker.
Which is where I will be looking next.
 
Jan 21, 2010 at 7:55 AM
Senior Member
"Huzzah!"
Join Date: Aug 6, 2009
Location: GMT + 8 ;)
Posts: 202
Age: 35
err I mean Replace the songs in Beta Orgview with what you are replacing...
after your done experimenting with orgmaker..


diph.php
darn I should have said clearer
 
Jan 25, 2010 at 3:20 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Jul 18, 2009
Location:
Posts: 31
I like this.
A lot.
...Probably way more than I should.
 
Jan 25, 2010 at 8:08 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
So.
Further research was furthered, and I figured out a little more.
Seems that CS stores some of the instruments as PXTs whereas OV stores them all as WAVs.
A little goofing around with SeaTone later and I've managed to replace a couple instruments, though only the drums.
Which brings me back to the resource in CS called WAVE100.
If my current theory is right, it is a concatenated series of waves; specifically those of the instruments, as well as the "missing" sounds.
My guess is the next challenge will be to parse out the individual tracks from it and then find a way to re-pack them.
 
Jan 26, 2010 at 4:30 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jul 29, 2009
Location: The Surface
Posts: 246
This is probably a really stupid idea for a reason not readily apparent to me, but try dividing the number of bytes in it by 100, and if it's evenly divisible, split it up in those increments, and test them by renaming them to .wavs?
 
Jan 26, 2010 at 5:45 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Jackalope said:
This is probably a really stupid idea for a reason not readily apparent to me, but try dividing the number of bytes in it by 100, and if it's evenly divisible, split it up in those increments, and test them by renaming them to .wavs?

Or I could search for the instruments directly. :/
Hmmm...
 
Jan 26, 2010 at 12:54 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 31
Jackalope said:
This is probably a really stupid idea for a reason not readily apparent to me, but try dividing the number of bytes in it by 100, and if it's evenly divisible, split it up in those increments, and test them by renaming them to .wavs?

It's not a stupid idea, but there is one flaw. Wav files have a "header" before the actual wave data; your idea would probably work if it were just raw wave data with no header.

I'll try taking a look at this "WAVE100" resource and see if I can figure anything out.
 
Jan 26, 2010 at 3:04 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
wedge of cheese said:
It's not a stupid idea, but there is one flaw. Wav files have a "header" before the actual wave data; your idea would probably work if it were just raw wave data with no header.

I'll try taking a look at this "WAVE100" resource and see if I can figure anything out.

Uhm.
It doesn't have a wave header.
So it is raw data. :I
Though adding one manually does yield what sounds to be a series of instruments played in rapid succession.
And replacing it with another file (regardless of type) gives a complete changing of the notes.
:/

EDIT: Just checked Jenkalopes' idea.
It divides not only evenly, but into 256. O:
I shall see what I get if I break it up into 100 byte sections (with added WAV header).
 
Top