MD Music Player (+ scriptable SMPS2ASM)

So, here is something I've been working on just for fun for quite a while. It essentially is a SMPS player, but you can put mutiple sound drivers in it, as well as over 16000 music files. There are 4 pre-installed sound drivers with full SMPS2ASM support, as well as the application itself, tailored for this player. Download here. If you have any suggestions or feedback, let me know. But please, before calling me incompetent twat, please read the documentation! Also for anyone interested, I have the project in Github, as well as smps2asm.
Oh also, big thanks for ValleyBell for SMPS research pack as well as helping me understand few things here and there, and Bakayote for the font used.

So, I am here to bring you a huge update to SMPS2ASM and MDMusicPlayer! A lot has been done, especially with SMPS2ASM, to improve user experience and bring in a lot more features. So here, in no particular order, is the changes done:

Changelog said:

+ Full support for voices
+ Support for conversion of sound effects
+ Fake DMA feature, allows to check sound quality degredation under different loads
+ Scripts for World of Illusion and Sonic the Hedgehog 2
+ Sonic 1 port of invinciblity theme from Sonic & Knuckles
+ Changelog
* Included both asm and bin format music, for future reference
* Changed "sTone" to "VolEnv"
- Penis
s+ Debug output as a commandline option
s+ Multiple scripts per folder. See smps2asm.txt for more info
s+ Go To, Equate Change and Comment functions
s* Voices which are not at the end of file would continue to be created til end of file. This would eventually cause the ASM file to be messy and not work correctly.
s* ReadWord function would read the first byte twice, and therefore break any code that uses it.
s* Some miscellaneous crash issues
s* Script parser would not support multiple condition blocks. False condition would get overwritten by another condition block, and then it would incorrectly run instructions when it should not. Now this also uses a stack and supports theoretically infinite condition blocks.
s* Lable formats can now use variables or operators
s* lable format would place ':' in wrong places or not at all with some setups. This has now been corrected to always put one at the end.
s* Various optimizations

Click to expand...

The link in the original post has been updated, and you can download the first release here.
There may still be some odd bugs introduced by the changes. If you do find any, please report them!

I know I no longer have much of a use for that (Jester Stream Technology for the win! /plugin), but that is a bloody brilliant idea!! Considering a lot of emulators don't bother, that is a absolute cool addition right there, if I were to make any sort of music making tool, that would be one feature I totally never would have thought of...

I am also rather shocked that no-one's really replied yet, actually...

So, here is something I've been working on just for fun for quite a while. It essentially is a SMPS player, but you can put mutiple sound drivers in it, as well as over 16000 music files. There are 4 pre-installed sound drivers with full SMPS2ASM support, as well as the application itself, tailored for this player. Download here. If you have any suggestions or feedback, let me know. But please, before calling me incompetent twat, please read the documentation! Also for anyone interested, I have the project in Github, as well as smps2asm.
Oh also, big thanks for ValleyBell for SMPS research pack as well as helping me understand few things here and there, and Bakayote for the font used.

Click to expand...

By any chance could this be ported into sonic 1 and become its own routine to play multiple types of smps?

It's more than impractical. It's unreasonable and nigh unusable due to the overhead and space needed along with individual configuration. What you're asking for is detached from realistic expectation. The hardware has limitations on what it can do, and while a number of us know how to bend the rules to squeeze every drop out of the hardware possible, there are, believe it or not, boundaries for which we can't beat short of "cheating", which requires cost and specialized production that defeats the purpose of working on the console.

Basically the infinite complexity and hackyness of SMPS makes it a shit "format". There is no standardization, and so many differences and idiocy with drivers that its outright stupid to try to make it 'universal' without high quality loss, incompatability (which universal should never have) and just using too much ROM space. I meant look at the program, its 300KB with 4 sound drivers installed! Thats mad, and you suggest we have all-in-one driver with at least 300 games to support? We aren't magicians you know

Long time no see, but I am here to release yet another version! This time, I did a few major changes, which hopefully you can see as improvements;

Changelog said:

+ Revised the SMPS2ASM format and definitions (to be more accurate and simpler)
+ Added an external tool to assemble all music data.
+ Because of MusicTool, we have also now ditched the s2e_[driver]_ suffix from macro names!
+ Now channels show the tempo in addition to other fields
* smps2asm.txt and mdmusicplayer.txt updated to have actually up-to-date information
* Sound drivers are defined in separate file now, to allow MusicTool to work
* Fixed Sonic 1 volume envelopes; VolEnv_00 is hardcoded!
* Reconverted all files to match the new format
* Updated all smps2asm scripts and definition files to match the new format
* Filenames can now have spaces and other special symbols that was not possible earlier
s+ Wrote a completely new UI for defining conversion parameters
s+ You can decide if the program pauses or produces debug output from the UI
s+ Replaced =comment with the builtin comment feature for macros
s+ Added subscript importing
s* Argument equates are now parsed to exist like normal Equates, and can be referenced later in the program
s* Program warns if required subscripts are found, rather than just crashing
s* Improved error reporting for Dictionary invocation
s- Removed smpsHeaderStartSong hack, now each script can define it by themselves!

Whoops, time for another "twice-a-year" update, only to have this project be dead again for 5 more months! Am I right or amirite?

Changelog said:

+ Ristar SMPS2ASM scripts
+ Megaman The Wily Wars SMPS2ASM scripts
* Migrate to new SMPS2ASM format
* Add few voice-only scripts
* Voices -> Patches
* Fixed a bug that would cause MDMusicPlayer to not properly function on
hardware
- Effort
s+ You can now create labels at any address you desire
s+ New operator that allows you to get the current "program counter" (Offset
of the song + current offset inside of the song file) ("pc")
s+ Operator that returns the offset of the file ("of")
s+ Operator that returns the size of the entire file ("sz")
s+ Operator that allows SMPS2ASM find the next already defined lable, that is
after the current "program counter" ("an")
s+ Operator that allows SMPS2ASM find the previous already defined lable, that
is before the current "program counter" ("al")
s* Operators for Ristar-specific offsets
s* Reversed label parsing, so that patches may be evaluated last
s* Now . (dot) is used as operator symbol, over / which was used before.
s* Fixed some cases where strings with decimal points failed to be parsed as
longs.
s- Remove the hacky method of resolving patches in favour of using the new
operators.
s- sHeaderInit is no longer hardcoded

Click to expand...

You know the drill. The reason i decided to update so abruptly, is because I decided I got enough of SMPS2ASM, and it really badly needs a rewrite. I was going to add new features (like new drivers, something ASM68K fans will love, sekrits), but since I am rewriting SMPS2ASM eventually, and I don't have too much time to work on this right now, I need a lot of time to accomplish all of those things. However, once I get to work on all this stuff, it'll be awesome!

Happy new year! I am finally done working on stuff. I haven't finished everything I wanted yet, but I've been working on this for so long time now, I wanted to get something released. I will be still working on the other stuff, but later.

Changelog said:

+ Ristar sound driver
+ Z80 LANG macro support
+ J League Pro Striker 2 SMPS2ASM scripts
+ Knuckles Chaotix SMPS2ASM scripts
+ Yuu Yuu Hakusho SMPS2ASM scripts
+ QuackShot SMPS2ASM scripts
+ Converter for QuackShot E1, E2, ED, EE flags to real frequencies
+ Support for dual DAC drivers
+ Modulation Frequency is now shown
+ All sound drivers now have boilerplate voice and sfx types
+ You can now define per-driver chaninfo data
+ Sonic 1 Boss theme
+ Song name and origin are now in different lines
* Frequency is now correctly shown
* Fixed VolEnv and MovEnv ID's for games
* Changed saDetune to ssDetune, the latter is what the actual function is
* For MegaPCM driver, changed PSG 0-8 to VolEnv 1-9
* Sonic3K VolEnv and ModEnv ID's corrected
~ Change old crash handler to Vladikcomper's crash handler
~ GEMS now builds with Z80 source code rather than bunch of fucking dc.b's
~ Made it more CRT friendly
- 2017
- Removed separate and unnecessary scripts for sfx and voices
- GnG Level 4 music
s. Rewrote the whole shitfest
s+ Comments are now supported
s+ You can now control the convesion flow
s+ New operator allowing you to print stuff in the console
s+ New operator for doing while loops
s+ Subscripts can be optimized into a look-up table for faster conversion
s+ Now the program can run standalone scripts
s+ Now you can select the type of script to run, script can decide actions
according to it
s* The program now correctly deals with tabs
s* Tons of small bugs. Don't care to remember all of them.
s* Improvements into equate handling
s~ Lables are now evaluated when macro is ran, instead of all the time
s~ The symbol for if is 'c', and the symbol for for is 'f'
m+ Updated for the origin display

Click to expand...

Magical link. Because of the new changes, I expect some bugs to happen. If you see one, please poke me about it!

lol happy new year, again! As it turns out, I only release this once a year or something... I've been working on this throughout the year, adding some thing every now and then. I've been very busy though so I haven't had the chance to work on this as much as I wanted. But I hope that these new features will be exciting!

Changelog said:

+ Added generic default scripts for 68k and z80 base drivers
+ Scripts for Sonic 2 Master System and Michael Jackson's Moonwalker
+ Created specific smps2asm files for AS and ASM68K
* Merged code/smps2asm.asm with driver specific smps2asm files
* Fixed many inconsistent naming conventions and misnomers
* Migrated all SMPS2ASM scripts to the new format
* SSG-EG flag was disassembling incorrectly
* Sonic3K driver had incorrect setup for DAC banks
* Sonic3K had some incorrect names for commands
* Sonic3K Universal Voice Bank is now disassembled
* Updated some WOI flags to use more user-friendly name
* QuackShot was incorrectly using dw instead of littleEndian macro
* QuackShot had some incorrect names for commands
~ Moved note definitions into their own separate file
~ Switched ICZ1 out in favour of LBZ2 music
~ VolEnv_ and ModEnv_ prefixes for smps2asm changed to v and m respectively
s+ Added new operators
s+ Added bugs and weird quirks
s+ Made it possible to make equate names dynamic
s+ Arguments can now be removed, and directly updated
s+ You can refer to arguments using operators
s+ Files can now finally be included into scripts at parse time
s+ You can now decide which macro type to use for disassembled music
s~ Equates are now stored in a dictionary, instead of individual elements.
s~ Equates can now overwrite values from any place
s~ Made console display the validity of data as you type, instead of when you switch line
m~ Updated to accommodate the new file structure

Click to expand...

Super new years link. I am thinking I'll eventually get to rewrite SMPS2ASM once again. Yes I know, I just did, but I thought having a GUI instead of the crummy console application would be great and more user-friendly approach. This could give me an opportunity to optimize it even further and add more features. If you have any in mind, please let me know!