Custom .ORG crash mystery solved!

Jan 6, 2009 at 12:15 AM
Senior Member
"Huzzah!"
Join Date: Jun 1, 2007
Location: In Space
Posts: 191
Hello, all. I've been gone for a while, but I finally ran across a solution to something that has been plaguing me for over a year now, seems like. I figure I'd share it with the community while I can.

I apologize if this has been discovered before. For all I know someone else may have discovered it in my absence. If so, kudos to you for beating me to it. ;P

I've mentioned before that I've had trouble with getting certain .ORG files to play in Cave Story without crashing. I had somehow formulated this idea that the filesize had something to do with it. Turns out I was completely wrong.

All potential composers for Cave Story mods, take note.

As pointed out so kindly here by Cheezer (coincidentally about the same time I discovered it as well), Cave Story automatically maps the first five drum tracks to specific instruments. These are:

1. Kick01
2. Snare01
3. HiClose01
4. HiOpen01
5. Tom01

These are currently hard-coded and changing them is unknown (see Cheezer's thread for more discussion on the topic). When making an .ORG for Cave Story, be sure to map your drum tracks accordingly.

But what about drum tracks six through eight? That, my friends, I have discovered to be the source of the infamous crash. The only common denominator among all the broken .ORGs of mine turned out to be these few additional drum tracks. After removing them, they worked just fine.

To put it simply, if you try and put anything at all in the final three drum tracks and import it to CS, it will crash when trying to play the song. That's the issue, and that's the solution.

Hope this helps, all. I'm ecstatic I was able to figure this out after so long!


Also, on a semi-on-topic question, I heard someone mention Orgmaker 2 somewhere. Is it still around and has somebody updated it any? I haven't been around at all to maintain my English "translated" version so I'm wondering if anyone's touched it since. I'd like to at least update the documentation with this info (and maybe fix a few size-related bugs so there won't be trouble closing the instrument screen any more). What I said earlier about the .ORGs filesize was completely wrong and the old doc still reflects such. Silly me. ;P

And if anyone's curious about the state of Schism, that's why I'm here. I've picked up work on it again. ;P
 
Jan 6, 2009 at 1:17 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
So far I'd have to agree with you EXCEPT that there appears to be a usable 6th percussion track, the 6th percussion track (hard coded into the exe for this one as well) is an instrument that I cannot find in either org maker 134 or 205, so it is difficult. King's theme uses it as well, and it sounds similar to the snare01 I think, but it isn't snare 01. This track is usable however (as I have tested with swapping the CURLY(main theme) track).

Chances are however we could change these hardcoded instruments if we were to dabble in HEX editting, but I'll save that for someone else (no clue where to start).

Oh, your demo's great btw (lol I see you used that one unfinished track of pixel's in your mod, nice job finishing it up), check mine out if you have the time.
 
Jan 6, 2009 at 2:24 AM
Senior Member
"Huzzah!"
Join Date: Jun 1, 2007
Location: In Space
Posts: 191
I haven't had any luck getting the 6th track to work. At least, removing it allowed me to finally insert one song that had been glitching for months now. Though you're right, White.org uses it for sure. A bit mysterious, this one is.

I do admit I probably should have tested this further before being all "look an solutionz!" but I'm pretty convinced this is it. Hope so, anyway. ;P

The trick with hex editing is trying to find the right offsets. Once they're located it's hella easy to change, but such values are naturally very hard to find unless you're a crazy-good assembly hacker. That's over my head for sure. ;P

And thanks about the demo. I'm still working on releasing an updated "complete" demo with all the music tracks and enemies replaced/modified. The one I put up was really supposed to tide everyone over until I made the real release, which never came. Ah, well. It happens.
 
Jan 6, 2009 at 2:44 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
I guess it's not the instruments, it's the samples you use.
Ever thought about changing all samples of the Instruments to "Bass01"?
 
Jan 6, 2009 at 3:10 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
S. P. Gardebiter said:
I guess it's not the instruments, it's the samples you use.
Ever thought about changing all samples of the Instruments to "Bass01"?
...what?

Do you mean, say in any org, setting all of the percussion instruments to Bass01 to see if it would work with the percussions?

If so I can say that using all percussion tracks as Bass01 will work, but the tracks will play as Bass01, Snare01, HiClose01, HiOpen01 and Tom01 (and possibly Unknown01 for track 6), that will work from my experience. The game just reads the notes from those tracks, and uses the instruments hardcoded into the exe I think.... so it shouldn't matter what instruments you put there (as far as I know, could be wrong, but that's what I've seen from my experience).

If there are any notes in track 7 or 8 (and maybe track 6 according to what Xaser is seeing) the games crashes upon reading the org(I've seen this when I put my original NeverDie3.org into an exe, i used track 8 as a "bass booster" to double up on the Bass01 notes, which crashed the game (note: the NeverDie.org is an EXTREMELY large org made by me, and it did work in the game once I removed percussion track 8 , this disproves Xaser's theory of org length to my knowledge{this org can be found in this media fire link neverdie3.org} ))

But yes, no matter what the instruments are, tracks 1-5 of the percussion will work so long as there are notes in them, and will play as will play as Bass01, Snare01, HiClose01, HiOpen01 and Tom01.
 
Jan 6, 2009 at 6:09 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
My guess is that, even if you do like SP said and changed all the perc tracks to Bass01, and put stuff in all of them, and then imported it into cave story, it would still play Bass01, Snare01, HiClose, HiOpen, Tom01. I might test that if I have more free time later (or someone else could).

Also, I think SP is right about the *.exe containing samples rather than instrument numbers (in other words, samples for unused perc voices like Snare02, Crash, and such probably don't even exist in the *.exe). This means that, if you wanted to change the perc voices used, you wouldn't be able to just find a single byte in the *.exe and change it; there would be a large segment in the *.exe containing raw audio data for each voice, and you would have to change the whole thing to what you want.

Well, anyway Xaser, I'm really glad you started working on Schism again. I'd say that's my favorite mod, and I thought it was dead.
 
Jan 6, 2009 at 6:57 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
The instruments are pxt files, not audio files.
 
Jan 6, 2009 at 10:31 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Dec 6, 2008
Location: Some place full of trees that irk me
Posts: 22
My guess in how to fix it would be to attempt to add a new .pxt file for the new instrument you want and edit the .exe to be able to understand it somehow. Sadly I don't know how to do this since the only programming language I know is TruBASIC since thats the only class they ahd at my school. =/

Also, Xaser, your Schemo has too much comical dialogue for me to play safely while eating. :p
 
Jan 7, 2009 at 2:10 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
Hrm, wha?
that made absolutely no sense.
 
Jan 7, 2009 at 12:04 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Dec 6, 2008
Location: Some place full of trees that irk me
Posts: 22
Yeah.. I'm kinda confused by what I said when I read it now but I get the gist of it...

Since the instruments are .pxt files, I was thinking that you would have to create a new .pxt file for the new instrument, but then have to edit the .exe to interpet the new .pxt file as another instrument to play it for the .org files.

I think that's clearer....
 
Jan 7, 2009 at 12:22 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
I don't think you have to edit the *.exe to understand new *.pxt files, you just have to import the *.pxt files into the *.exe. Also, if SP is right about the voices being in pxt format, then I'm guessing there are limits as to what you can do with the pxt files (I don't think you can change the envelopes or have two voices). This is judging by the fact that organya is much more efficient than pxtone, and therefore probably has fewer complications.
 
Top