Page 1 of 1

YM player for the 32X

Posted: Sun Apr 21, 2013 6:39 pm
by mic_
I recently wrote an YM player for the Neo Geo pocket Color (which turned out pretty ok), and that made me think "Hey, that should be pretty easy to do on the 32X since it's a gazillion times faster".

So I took one of ChillyWilly's mod player demos, threw out everything that was mod/xm-specific, and quickly wrote a rudimentary YM/AY emulator in pure C. Et voilĂ : youtube video (the audio in this clip is a bit loud, so turn the volume down a bit if you're using headphones).

The ROM is here in case you want to try it out yourself. I had no luck with any of the emulators I tried, but it works fine on a real 32X.

Posted: Sun Apr 21, 2013 10:38 pm
by Chilly Willy
Very nice! Yes the SH2 is way more than needed for perfect YM emulation - you could probably run it at 44kHz without a hitch. More work would be a PC FM chip emulation... probably doable in good assembly, but a lot of work.

The rom works fine in Gens/GS r7 with my PWM patches. If you run linux, I highly suggest having this.

Gens/GS r7 with CW's PWM changes:
http://www.mediafire.com/download.php?wwkcni66o61mot6

That's source and 32-bit x86 binary. For 64-bit, you can recompile it or run the 32-bit binary with 32-bit compatibility libraries.

Posted: Mon Apr 22, 2013 8:19 am
by mic_
I use Windows XP at home. An old version of Kega Fusion (3.50-ish) did at least output some sound, although heavily distorted. Fusion 3.64 gave me no sound at all, and neither did Gens KMod. It's not that much work to test on HW, just a bit tedious to take the cart out of the system to put a new ROM on it, and then back again :P

I'm hoping that I can improve on the YM emulation quality at some point. There are inaccuracies in how I emulate the envelope generator, and the mixing is probably a bit off as well.
It would also be cool to add support for Future Composer songs (completely different format, but the sound is similar in style).

Posted: Mon Apr 22, 2013 5:13 pm
by Chilly Willy
I have Kega 3.63x installed - it doesn't quite handle the PWM correctly. Supposedly, 3.64 handles PWM correctly, but I also have never been able to get it to make any sound. The audio is always disabled when I run it, no matter what I do. :cry:

I'm not sure if Gens/GS can be compiled in cygwin or mingw, but the readme says you can build it with mingw+msys.

Posted: Tue Apr 23, 2013 7:54 am
by Mamizou
Chilly Willy wrote:For 64-bit, you can recompile it or run the 32-bit binary with 32-bit compatibility libraries.
When I do './configure' it dies with 'configure: error: 64-bit is currently not supported.' I guess you have actual 64-bit compiling disabled because of the 32-bit asm?

Anyway, the demo works in the patched Gens, although a little fuzzy. Start makes it 'pause' and 'resume', but doesn't actually pause or resume the song.

Posted: Tue Apr 23, 2013 5:33 pm
by Chilly Willy
Momiji wrote:
Chilly Willy wrote:For 64-bit, you can recompile it or run the 32-bit binary with 32-bit compatibility libraries.
When I do './configure' it dies with 'configure: error: 64-bit is currently not supported.' I guess you have actual 64-bit compiling disabled because of the 32-bit asm?

Anyway, the demo works in the patched Gens, although a little fuzzy. Start makes it 'pause' and 'resume', but doesn't actually pause or resume the song.
Not me, I just did the PWM patches. But that does ring a bell. They're working on an all new version of Gens/GS which will add 64-bit native support. In the meantime, you need to run the 32-bit binary using the compatibility libraries.

All that said, real hardware will sound better than the emulator. The emulator just handles PWM well enough that you don't immediately quit and complain about how bad it sounds. :)

It's not bad, but it's not as good as it could be. I'm leaving that for the update to Gens/GS they're working on.

Posted: Tue Apr 23, 2013 6:37 pm
by mic_
Anyway, the demo works in the patched Gens, although a little fuzzy. Start makes it 'pause' and 'resume', but doesn't actually pause or resume the song.
Since releasing that first version I've implemented a crude bandpass filter which helps reduce some unwanted noise. I could probably also up the sample rate a bit.

As far as the controls go, I didn't even think of the possibility that someone would try pushing the buttons :P They're not supposed to do anything, but I might have forgot some code in there that does random things when you press a button.

Posted: Tue Apr 23, 2013 8:09 pm
by Chilly Willy
mic_ wrote:As far as the controls go, I didn't even think of the possibility that someone would try pushing the buttons :P They're not supposed to do anything, but I might have forgot some code in there that does random things when you press a button.
:lol:

Ain't that just like a user... pressing buttons and whatnot!

Posted: Sun Nov 10, 2013 3:51 pm
by mic_
I've released an updated version of my YM player, which now includes multiple songs and a TOS/GEM-inspired UI:

Image

Latest ROM
YouTube video

Posted: Sun Nov 24, 2013 9:56 am
by mic_
I released an updated version earlier this week. There's improved emulation, an updated UI, and more songs:

Image

ROM + source code
YouTube video

Posted: Sun Nov 24, 2013 5:29 pm
by Christuserloeser
Don't make me buy a 32X dude :P

Isn't there something you want to do for MD or SCD ? :wink:

Posted: Mon Nov 25, 2013 8:41 am
by mic_
Isn't there something you want to do for MD or SCD ?
I don't have a MegaCD, so that takes care of that :P

As for the MD; maybe, but not right now.

Posted: Sun Dec 15, 2013 7:33 pm
by Aly James
which I had a 32X :)
It might be interesting to only emulate the AY3 8910 or YM2149 hardware envelope on the MD to mess with the PSG volume register the same you can do with buzzers on the AY or YM2149...
To bad we cannot use the YM2612 SSG to output into the PSG directly because it is exactly that envelope!