|
Post by jlf65 on Feb 26, 2011 21:48:47 GMT -5
Plays a 4, 6, or 8 channel module (and can play sound effects, though that isn't in the example). The player shows the number of channels as well as the name. There is a source and a binary archive - included are my favorite mods, some Psygnosis game mods (3MB for you MegaCart users!), and some of Tiido's faves (a bunch on those are also on my list, just not as high as the one's I put together). There are two versions of Tiido's mods: one at 44kHz and the other at 22kHz. The 22kHz mods only use half the bandwidth, half the memory, and have 10 bit samples instead of 9 bits. But they are also half the sample rate. I suppose you can make your own mind up on which sounds better. The Psygnosis mods are at 22kHz as well. Controls: UP/DOWN = next/prev MOD, RIGHT/LEFT = raise/lower volume, START = pause/resume Nearly all sound parameters can be changed via defines. The source is currently set for 8 sample voices, and a 22kHz sample rate. An eight channel MOD would take all the sample voices, so if you intended to play 8 channel MODs + SFX, you would want to increase the number of sample voices. MODs play in stereo, and the sound effects are stereo panned, can be looped, and can be set as a one-shot or persistent. The mixer is in assembly, and the module handling is in C and is based on the ProTracker code for the Amiga by Massimiliano Scarano. The only restriction on that code was to identify the original author. My code is BSD. Note that emulators don't play this correctly. You need to use real hardware with a flash cart until the emulators get fixed. So break out the NeoMyth/Everdrive-MD/MD-Pro, MegaCart and enjoy! ModTest32X-20110226.7zModTest32X-src-20110226.7z
|
|
|
Post by jlf65 on Feb 27, 2011 14:40:16 GMT -5
Okay, here's the current binaries. I didn't make a source arc since the changes are so simple, I'll just put them here. This sounds so much like Audacious playing the mods via modplug, it's uncanny. Well, once you set modplug to use nearest resampling (which is what the SH2 mixer uses), use 22kHz sample rate, turn off the noise reduction, disable surround processing, and disable extra stereo enhancement, that is. THEN they sound exactly the same. ;D In module.c: change line 1074 to Delta = rand() & 255; /* random */ comment out line 1080 //Delta <<= 2; /* we use 4*periods so make vibrato 4 times bigger */ and change line 1130 to Delta = rand() & 255; /* random */ ModTest32X-20110227.7z
|
|
|
Post by jlf65 on Mar 1, 2011 4:44:44 GMT -5
Okay, here's my latest source and binaries for playing MOD format music on the 32X. For those just tuning in, this runs completely on the Slave SH2, and uses DMA to play the audio. The module player handles 4, 6, and 8 channel modules; the sample rate is 22kHz, which allows a 10-bit sample; this release does simple stereo (channels 0/3/4/7 to left, others to right), but can handle full panning, or add cross talk to the simple stereo. The sample voice system that actually plays the audio is set for eight voices, but can be easily changed for more or fewer. The current code is aimed at playing four channel MODs while using the other four voices for sound effects. The sound effects can be set as looping, can be stereo panned, and can be one-shot or persistent. Sound effects should be mono 8-bit signed samples up to 256KB in length; they can be any sample rate, and played back at different rates for pitch changes. The mixer sums the channels as 16-bit stereo samples for maximum quality, only scaling to 10-bit PWM samples when filling the DMA buffer. This gives very clean sound; bass instruments and sound effects in particular are much clearer in this release than previous ones. The source archive contains all the latest code as well as the MODs used in the different rom images. Most of them were obtained from The Mod Archive. The binary archive contains three test rom images that can be played on a real 32X via flash carts like the Neo Myth, Everdrive-MD, or the MD-Pro. The 3MB rom can be played on the MegaCart. If you've made the DMA PWM modification to Gens/GS, then they will also work fine with that emulator. They do NOT work properly with the stock Gens/GS r7, or with KEGA Fusion, although Fusion at least plays SOMETHING. ModTest32X-20110228.7zModTest32X-src-20110228.7z
|
|
|
Post by Tiido on Mar 1, 2011 8:52:55 GMT -5
people are not so overly excited about 32X here it seems ^^
|
|
|
Post by jlf65 on Mar 1, 2011 12:07:04 GMT -5
That's okay, it's exciting to those who know what it is. Every little bit that advances 32X homebrew helps.
|
|
|
Post by Tom Maneiro on Mar 1, 2011 14:22:20 GMT -5
If you've made the DMA PWM modification to Gens/GS, then they will also work fine with that emulator. They do NOT work properly with the stock Gens/GS r7, or with KEGA Fusion, although Fusion at least plays SOMETHING. Exactly which patch is required for Gens/GS? I've tested on Fusion, and certainly, it sounds like CRAP
|
|
|
Post by jlf65 on Mar 1, 2011 17:00:54 GMT -5
If you've made the DMA PWM modification to Gens/GS, then they will also work fine with that emulator. They do NOT work properly with the stock Gens/GS r7, or with KEGA Fusion, although Fusion at least plays SOMETHING. Exactly which patch is required for Gens/GS? I've tested on Fusion, and certainly, it sounds like CRAP Well, I did say Fusion doesn't play it right. ;D forums.sonicretro.org/index.php?showtopic=24609That is a thread I did the other day on compiling gens/gs r7, and it also has a link to the post where I posted the patched pwm.c file.
|
|
|
Post by bullis1 on Mar 3, 2011 11:11:45 GMT -5
I'm chiming in to say good work, and that I'm excited about this development. 32X and .MOD music are two of my favourite things. Also, the combined YETI 3D + MOD music demo out there is especially nice. Lots of nice new .BINs for my flashcart lately. Kudos to all involved ("Chilly Willy" mostly).
|
|
|
Post by jlf65 on Mar 3, 2011 15:04:15 GMT -5
I'm chiming in to say good work, and that I'm excited about this development. 32X and .MOD music are two of my favourite things. Also, the combined YETI 3D + MOD music demo out there is especially nice. Lots of nice new .BINs for my flashcart lately. Kudos to all involved ("Chilly Willy" mostly). That's me... CW is my handle in some places, and jlf65 is my handle in others. Anywho, here's that Yeti3D + MOD demo you mentioned. The arc has a binary and all the source. It's a practical demonstration of the sound system in this thread, showing both MOD playing and sound effects. Yeti3D with musicAnd here's another binary with some Shadow of the Beast 2 music; press MODE to switch mods. Yeti3D-B3Mods.zip
|
|
|
Post by jlf65 on Mar 4, 2011 4:18:18 GMT -5
Here's the latest archive. This has the source and binaries for both the test mod player and yeti3d. Changes include: No audio click on start up on real hardware. Proper support for beats per minute. Controls for mod player: UP/DOWN = prev/next mod LEFT/RIGHT = volume down/up START = pause/resume Controls for Yeti3D: DPAD = move/turn A = fire B = jump C = crouch X = strafe left Y = hold to look up/down Z = strafe right START = pause/resume MODE = switch mod playing download
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Mar 4, 2011 13:41:40 GMT -5
That's okay, it's exciting to those who know what it is. Every little bit that advances 32X homebrew helps. I wish I was motivated to do 32x stuff again, but honestly, I'm just not that into it anymore . Any news is exciting though - and a little bit of progress here and there is excellent It's just that, just thinking about dual sh2 CPU's and 256kbytes of RAM - ugh . Why couldn't the designers just ditch one of the SH2, and give us more RAM, why ? A long time ago, just doing a scaling and rotation (even though my code was bloated) was pretty pathetic
|
|
|
Post by jlf65 on Mar 4, 2011 15:55:07 GMT -5
That's okay, it's exciting to those who know what it is. Every little bit that advances 32X homebrew helps. I wish I was motivated to do 32x stuff again, but honestly, I'm just not that into it anymore . Any news is exciting though - and a little bit of progress here and there is excellent Which is why I keep plugging away at it. ;D The dual SH2s are okay when you get used to them. It was handy to pawn off ALL the sound work to the other CPU. The SH2 isn't so strong a CPU that it can really handle EVERYTHING all by itself, so splitting the load between two was a decent trade-off. Being two of the same processor makes it handy for the programmer - you can use the same compiler to handle both processors. It's tougher to code and debug when you have one cpu and one "specialty" chip with an oddball instruction set that may or may not have any support tools available. Just look at the Jaguar for that. The 256KB of ram is killer, though. It's the single worst part of the 32X. Every other console in it's target range (mainly the Jaguar and 3DO) had 2MB of ram. Having just 256KB really limits what you can do without a LOT of work into finding ways around the lack of ram.
|
|
|
Post by bullis1 on Mar 4, 2011 16:01:41 GMT -5
That's me... CW is my handle in some places, and jlf65 is my handle in others. Anywho, here's that Yeti3D + MOD demo you mentioned. The arc has a binary and all the source. It's a practical demonstration of the sound system in this thread, showing both MOD playing and sound effects. I phrased my post poorly. I knew you and CW were one in the same. What I really meant was to also "thank" the authors of the MOD replay and Yeti source code you used. Not that they'll ever read this... Anyway, kudos to you most of all. Thanks for the updated archives as well. Do you plan on optimizing the Yeti code for 32X at all (ASM rewrites, etc), or are you just leaving it as a sort of recompile? Also, I'm sure everyone asks you this but when will we see game logic?
|
|
|
Post by jlf65 on Mar 4, 2011 20:38:56 GMT -5
That's me... CW is my handle in some places, and jlf65 is my handle in others. Anywho, here's that Yeti3D + MOD demo you mentioned. The arc has a binary and all the source. It's a practical demonstration of the sound system in this thread, showing both MOD playing and sound effects. I phrased my post poorly. I knew you and CW were one in the same. What I really meant was to also "thank" the authors of the MOD replay and Yeti source code you used. Not that they'll ever read this... Anyway, kudos to you most of all. Thanks for the updated archives as well. Ah, no problem. I've seen much more badly worded posts. ;D Game logic? I don't really intend to do much with the game logic that is already there. It could use some improvements... for example, here's the existing game logic for the blue dudes: turn toward player - move forward. I DID just make an optimization in the code that was mostly due to an SH2 quirk - the SH2 only supports a signed shift of one bit. If you want to do signed shifts of more than one bit, a library call is made to generic signed shift functions. Shifting is done as part of the rendering loop, and a jsr to that shift function was done in every pass of the loop. So I altered the code to do an UNSIGNED shift instead. That makes the rendering much faster. Yeti3D-fasterIt's not as fast as it could be because I still don't do any assembly. By comparison, the GBA version has a number of functions converted to hand-tuned assembly. I don't really intend to put that much effort into this demo. I want to work more on the NEWER version of Yeti3D - Yeti3D-Pro. The main problem with converting to the Pro version is it uses more ram than the 32X has available, so I'm still working on getting the ram usage down. In the meantime, I've done simple things to the older Yeti3D to give people at least an idea of what you CAN do with the 32X with even the slightest effort.
|
|
|
Post by Tiido on Mar 5, 2011 4:35:49 GMT -5
The faster version is pretty cool ^^
|
|