cvghivebrain / s1disasm

Sonic the Hedgehog (Mega Drive) Hivebrain 2022 disassembly
41 stars 8 forks source link

smps2asm for music and sound effects #15

Open Awuwunya opened 2 years ago

Awuwunya commented 2 years ago

The modern way to make music on the Sonic games tends to be either tools like mid2smps or xm3smps, or by editing music directly. However, hex editing music is not really all that usable, given how the music format is. Therefore, smps2asm is a great way to represent the data, because you can still assemble it directly with your assembler, but it gives nice editing experience. Kind of like 68000 asm code, but for music. In fact, SMPS music was written similarly to this all along!

The problem is that we have several variations of SMPS2ASM, and none of them are exactly perfect. S1SMPS2ASM is a little outdated, but is still fairly good. Flamewing's SMPS2ASM is more cemented, but has fairly long instruction names, uses spaces for alignment, and at least personally I do not enjoy it. My SMPS2ASM (and yes I am biased because of that, sorry) is designed to support any SMPS game, not just specific Sonic games, and I designed it to be easy to write music, but over the years I've spotted some issues with it and it was mostly designed when I was just learning about SMPS itself.

My preference would be to branch off of my SMPS2ASM, make necessary tweaks to allow for better augmentation into the disassembly, fixing issues, and have a better consensus about naming. However, I'd like some healthy discussion on this, rather than going along with it by myself.

cvghivebrain commented 2 years ago

I had planned to convert everything to ASM that could be converted, including music. However, the sound driver is the one part of the game I've never really looked at properly, so I don't have anything specific to say about it.

When I started working on Sonic 1 again, I did so without any concern for existing standards or maintaining compatibility with any programs. If you think your version of SMPS2ASM is better than the others, I'm fine with using it.

Awuwunya commented 2 years ago

given my experience with making my own sound driver, I think I have a lot of experience and factual knowledge. That said, a lot of it is my opinions, hence being hesitant to just roll with something I created with no input, on something as substantial as this

Brainulator9 commented 2 years ago

I personally would like to see something like how the source code did it, in terms of the coordination flags/commands being equates rather than always full-on macros, the idea being that a index/pointer macro set could be used to put things together. Of course, it'd be best to let people know what will and won't work with a given value.

It should be noted that both S1SMPS2ASM and Flamewing's SMPS2ASM, at least, seem to have some things that need updating:

Awuwunya commented 2 years ago

Testing out some stuff in #22, let me know how it is, and let me know if there needs to be further tweaks. I am not exactly done with it yet though