Closed KMFDManic closed 3 years ago
Would this be a replacement sample for a existing sample or a new optional ost sample? Haven't looked at the drivers yet.
The samples are netlist based so therefore not compatible here, but im sure they added em as bonafida samples for the FBNEO core although whether their code would be portable across to this one is another matter.
@mahoneyt944 @KMFDManic This my attempt to port across the sample code from FBN it's rough and untested right enough maybe ya's can take a peek sometime with a view to fixing any errors on my side, as i had nothing to compare it to there are a couple of things im unsure about firstly how many channels to use and whether i've set the sample start defines correctly..........
struct Samplesinterface tr606_samples_interface = { 7, // correct ??
static WRITE_HANDLER( irem_samples_w ) { if (data == 0xff) { //bprintf(0, _T("M62 Analog drumkit init.\n")); return; }
/ ripped from FBN if (data > 0) { if (data & 0x01) // bass drum BurnSamplePlay(2); if (data & 0x02) // snare drum BurnSamplePlay(1); if (data & 0x04) // open hat BurnSamplePlay(3); if (data & 0x08) // closed hat BurnSamplePlay(0); } /
/* not sure if these values are correct */
if (data > 0) {
if (data & 0x01) // bass drum
sample_start(2, 2, 0); // correct ??
if (data & 0x02) // snare drum
sample_start(1, 1, 0); // correct ??
if (data & 0x04) // open hat
sample_start(3, 3, 0); // correct ??
if (data & 0x08) // closed hat
sample_start(0, 0, 0); // correct ??
}
Code MHY.zip
I added this to it's own branch for testing.
Hat.wav was missing from your sample list not sure if that effected how you set your triggers or not.
Samples tr606drumkit.zip
Branch https://github.com/libretro/mame2003-plus-libretro/compare/Irem
@mahoneyt944 Thanks bigman you've more experience of the ole sample code than me i only spent 10 mins on this more or less, i counted seven samples but "forgot to add one whoops" hence i made it seven channels i dunno if that's correct.?? but looking at other drivers that seems to be how they set it.
As for the sample_start since we cant just have (2) as per FBN and after looking at how this is setup in MAME78 there are many variables so i just played it save with (2, 2, 0) but ya know im only guessing here as i cant state that i fully understand the samples setup hence i was hoping you'd sort this amatuerish attempt sometime down the road :)
I added a test in with on screen logging. it turns out that "data" is always reading 0 in this function. probably the first issue to figure out. headed out for the time being though
@mahoneyt944 @arcadez2003 I looked at the code i think the sample code should be going here. https://github.com/libretro/mame2003-plus-libretro/blob/9d0705ded5ac0297c5427c95b8ad4d879b60d9ca/src/sndhrdw/irem.c#L18-L21 Im working ten hours shifts at the moment but will have a look at the weekend when im off. We only have 2 channels and the sample interface only needs the sample names and the rom name for the samples if this isint the same as any rom the rom managers will complain but it will still work. Seems like it should drop in just make sure the samples arent looping and playing through channel 0 or 1 or both for this core.
@mahoneyt944 @arcadez2003 Thanks a hell of a lot for checking this out. I found these really cool to play around with. @dinkc64 originally added the support into FBA like 6 years back, based off MAME code. Love Yamaha and FM style sound effects, which also show up in Sharp X68000, as well as in PC-98. You don't need to watch this whole video. But, listen to the "real sounding drums", which really make a huge impact in the overall gameplay:)
https://www.youtube.com/watch?v=YhRgsEObN6s&t=106s
Again, thanks:) Looking forward to testing the commits out, and feel these will make for a most welcome sound enhancement! Will be hard to ever go back to the original sound:) The other games sound fantastic, too, including Horizon (bit like Moon Patrol) and Spelunker!
ok guys added it real quick followed the code dont think the hi hat is right but is what we have.
@mahoneyt944 fixed it up best as i could on a quick whim grab the files from my wip branch they dont include arcades updates @KMFDManic can let you know what other games need the samples added
KMFDManic that's not true, I added samples to fb[alpha at the time] several years ago based on my own reverse engineering.
Yea is based on arcadez port of it code ls above arcade linked it
@dinkc64 I in no way, shape, or form, meant to downplay your role in inplementing these samples. I was referring to your description about the information you utilized to pull it off, from your 6 year old video:)
Never, ever, for a moment, think you are anything less than amazing when you code in or reverse engineer this stuff. You are always one that i shout out to in release notes, along with arcadez2003, grant2258, mahoneyt944, markwkidd:) I apologize if you misinterpreted the meaning behind my initial message, due to how I worded things:)
I am especially thankful for the sheer amount of patience you put into those SGM Coleco Games! Those are my childhood:)
@KMFDManic there's not need to apologize slight oversights happen :)
But yeah @dinkc64 tends to quite often add his own sample code created from scratch to FBN rather than attempt to port other dev's work across from MAME, a prime example would be Red Clash as FBN is the only emulator to have sound for this game via samples created for that purpose.
Regards.
KMFDManic, it's no problem, I worded it wrong on the video, if it weren't for the mame driver in the first place, we'd probably be way behind on the M62 emulation (or it probably wouldn't exist). The sample part was my harebrained idea though :)
@grant2258 nice work. I noticed you added Hat.wav to the bottom of the list where as in fbneo they have it at the top. That may be why the triggers had to be reordered unless you did this intentionally? I updated the irem branch here with a medley of fbneo, arcadez, yours, and my work. I ordered the samples the way fbneo did and that seems to get the right trigger order for the samples. Though some are missing. Of our 7 samples, we only have triggers for 4 of them? why? something to do with the routes?
Maybe high and low bits?
@arcadez @grant2258 ok fixed one issue. The sample pack was corrupted. I hand made a new one, now things are getting closer. I'm also going to update my old post above with the right samples. tr606drumkit.zip
I think its probably best to keep the samples named the same as fbneo/alpha code we got it from. its not really a big issue is eaier for users that have the fbneo samples that way. Ill grab the samples and have a listen i also need to remove the if else and replace with if. I put in to see if we where missing any since dinks already done the testing its good to go
updated irem branch naming to match fbneo. Heres the proper sample pack. As it turns out, I think my original download got corrupted... seems fine now
ok its fixed working great! merging
Kidniki, spelunkr, spelnkrj, spelunk2, yanchamr, and horizon all tested to be working. How's the level sound? Is it too loud?
The samples in my core are treated differently with volume levels. Its best to hear from others how they find it sits with there ears. These are normal samples for the question you asked before not ost ones. As for the other sounds not being used that was what kidnikki used for samples. I played this game as a kid the drums do make a big difference!
Yeah they all seem to be playing properly now. I tweaked the volume down a hair after comparing to other cores and YouTube. Seems good to me. Nice work fellas.
@dinkc64 @grant2258 @mahoneyt944 @arcadez2003 Thanks so much all of you. This truly is one of the coolest additions, to date:) Crank up the sound system, and enjoy the Real Drums! I will do some more test videos. I will get this stuff added to Xtreme, too, including the Kid Niki "crash" fix, which I will likely need.
I believe we can promote these now from imperfect sound. Via the samples the sound seems proper enough
@mahoneyt944 Had a nice test of them last night, and sounded great:) Spelunker 2 is actually a pretty interesting game...kind of reminds me of a better "Super Pitfall" Super Pitfall is the type of game that a kid got for Xmas or a gift, that they did not want! And, it is probably impossible to beat, unless you had Nintendo Power or called the Tip Line. Spelunker games, on the other hand, you can generally know what you gotta do, so the journey is a bit more fun:)
I think the bass drum needs a volume boost thats about it.
@arcadez2003 @mahoneyt944
One of the coolest things you can do with some of the Irem Games is use "Yamaha Drum Samples", to have an effect of real percussion, in games such as Kid Niki (especially, with the latest crash fix implemented:), Spelunker 1, 2, Horizon, (possibly Kung Fu Master?). FBA/FBNEO Cores have the support added. Here is a test video, showing what I refer to. Yeah, I have a better video setup than in previous videos:) You can run 4 games with these FM drum samples! I can fill in more details, if unfamiliar. But, I feel we can get these added into Plus/Xtreme!
https://www.youtube.com/watch?v=YJPo8rFW2cI