Posté le 21/06/2017 à 18:13 Membre depuis le 06/06/2014, 51 messages
Though there have been some great strides in various parts of Neo-Geo content creation in the past few years, one thing is still bothering me: music and sound playback without using the ADPCM channels. (Also, playing FM/SSG along with PCM channels, but that can be dealt with after the others.)

Chris Covell managed to figure out the ADK driver and its use of MML, but I personally find composing with MML to be a hassle. I guess that's really my fault for liking tracker-based workflows better. (Also I don't really want to emulate another system to track music unless it's the Amiga; stubborn freem strikes again!)

One of the first ideas I had was to make a native tracker (running on the Neo-Geo), but after realizing that the 68K<->Z80 comms would be a bottleneck, I scratched it. (Maybe it's not a lost cause, but that was the main issue on top of trying to figure out how to implement a decent interface.)

Back in 2015, I started to hack up the MVSTracker source code, to see if that was a viable way forward. I had no real idea what I was doing, so the project got shelved after some frustration. Fast forward to today, where I've picked it up again (knowing slightly more than I did before), but am still having troubles (primarily with rewriting the Z80 driver and having it still be able to preview music). Sometimes, I wonder if throwing it out and writing a new tracker from scratch is a better idea.

The real reason I'm posting this is that I want to not really duplicate effort in this (or any FM/SSG related) field, just in case someone else has been working on something. Trying to figure out a reasonable path forward would be nice, as well as alternate avenues (for the adventurous).

List of dumb things to think about:
  • Converting the Echo sound driver to Neo-Geo
  • Conversion tools for S3M (ScreamTracker 3) songs that use AdLib instruments; AdLib Tracker 2 files (or some other 4-op capable AdLib composers); Deflemask files for Genesis/Mega Drive? (Among various other options)
  • Some sort of VGM converter (since uncompressed VGMs are too big for Z80) and player
  • Deflemask getting Neo-Geo support (as an alternative to converting from Gen/MD)
  • You might think about using various tools on MSX, PC-88, X68K, or other computing platforms... as mentioned above, I'd prefer to avoid it, but don't let me stop you.
avatar
Posté le 21/06/2017 à 22:21 Membre depuis le 28/01/2003, 160 messages
Been updating 2610 info lately so I had some thinking about it.

I believe the only good solution comes with writing a proper tracker. I wouldn't pursue with MVStracker and its z80 emulation approach tho.
In a nutshell you want to import and run the mame 2610 core in your application, then you can simply play instruments by writing to its ports. Keep z80 out of the equation for now. From there playing instruments is trivial and 95% of the job is writing a tracker display/interface.
That's basically rewriting Deflemask but it's not open source, so yeah...

Once you have the tracker writing the Z80 driver should be a separate project.
Posté le 22/06/2017 à 01:13 Membre depuis le 06/06/2014, 51 messages
Thanks for the advice and comments, HPMAN. Time to dig in:

HPMAN (./2) :
I believe the only good solution comes with writing a proper tracker. I wouldn't pursue with MVStracker and its z80 emulation approach tho.
That's what I figured. There's only so much you can do without rewriting the entire thing from scratch.

HPMAN (./2) :
In a nutshell you want to import and run the mame 2610 core in your application, then you can simply play instruments by writing to its ports.
Simple enough; this was the one part of MVSTracker that I knew worked, even after my hacks, and even with older code. Main issue here is working around MAME's device system... maybe I can get lucky and find an older version before the conversion to devices or something.

I've been hammering away at a skeleton of a tracker in C# with WinForms for a bit, but it's nowhere near complete. Most of the work is being done in the back-end, preparing the required data structures and routines. I'm not sure if anyone would like to help with the project, but I'm making a public note of it just in case.
avatar
Posté le 22/06/2017 à 02:17 Membre depuis le 28/01/2003, 160 messages
There's neocd/sdl sources available, hooking 2610 mame core with SDL layer. The FM core used is much older tho and probably not as good as nowadays.

Stripping the 2610 core out of mame specific formats/usages is probably the most painful part of this project heh.
Posté le 23/06/2017 à 15:07 Membre depuis le 28/01/2003, 160 messages
Ok, I have the neocd version kinda working barebones.

One issue however: FM/ADPCM core outputs 2 PCM data streams (L+R channels), SSG core outputs 3 PCM data streams (1 per channel, mono)
How does one mix all this together back to L+R channels?
(neocd just ignore the SSG part it seems)

52025eeec856113fa9000014_736.jpg
Posté le 23/06/2017 à 19:39 Membre depuis le 06/06/2014, 51 messages
Good question, as audio mixing isn't always straightforward. My initial thought is to convert the SSG channels to stereo (just duplicating the existing waveform onto L/R channels), and then mix those in with the FM/ADPCM somehow.

Might not be accurate, might not be the best way to go, but I don't have knowledge on either of those fronts. :s
avatar
Posté le 26/06/2017 à 15:49 Membre depuis le 28/01/2003, 160 messages
Do you have a good way to play an audio stream with C#? Tried using SDL_OpenAudio with a SDL C# wrapper and the thing crashes the application.
Posté le 11/07/2017 à 16:41 Membre depuis le 28/01/2003, 160 messages
Turn on your skype, got a couple files to send you