Journey sound sample in mame2003-plus, solved
-
I'm using mame2003-plus to play journey, it works great. However it's missing the sound sample in the concert bonus. The original cabinet used a cassette player for this. So I got a "sepways.wav" sample and placed it into a "journey.zip" folder in my samples folder but this doesn't work. I'm not sure if this sample is supported or not.
Does it work with mame 2003 plus? Or if not which emulator supports it? Thanks.
-
Nope MAME2003-plus doesn't support the cassette tape sample, it's a pity you did not mention this when there were active dev's on the core
as im sure it would have been straightforward enough to have hooked up the extra sample, anyhow any build after the commit below will have
the tape sample working.........0.98u4: Aaron Giles hooked up cassette sample and fixed sprite colors in Journey. Added Samples sound (sepways.wav).
-
@arcadez2003. So mame 2010,?
And if there are no active devs. How can someone become one? -
@mahoneyt944 said in Journey sound sample in mame:
@arcadez2003. So mame 2010,?
And if there are no active devs. How can someone become one?Final Burn Neo supports some of the Midway MCR based games i dunno if journey is one of them but it's worth checking that out, as for MAME2003-plus
there is no special club you just push some commits and you might then be given full push access, that's how it worked for me at least :)BTW if you felt like taking this on the sample code for journey is straightforward enough in the driver, however you'll also have to update the sample and or mixer
core files to support the sample pause feature the tape sample requires best of luck. -
Looks like final burn has it but it might be easier to copy from mame 2010.
Quick reference for some files
Mame2010----------------------mame2003-plus Src/emu/sound/samples.h-------src/sound/samples.h Src/mame/audio/mcr.h----------src/sndhrdw/mcr.h Src/mame/drivers/mcr.c--------src/drivers/mcr2.c Src/mame/includes/mcr.h-------src/includes/mcr.h Src/emu/driver.h--------------src/driver.h
-
@mahoneyt944 As a rule the closer the MAME builds the easier the code is to backport without having to radically rework it
the mcr code is way different in those later builds from MAME78, ideally all your after is the sample code so you dont have to
update a ton of stuff.Unfortunately the tape sample addition came slap bang in the middle of a huge update to the midway mcr drivers and all related code files......
0.98u4: Merged mcr1.c and mcr2.c to mcr.c driver. Aaron Giles consolidated the MCR 1/2/3 drivers and documented all the PCBs.
0.98u2: Changed vidhrdw\mcr12.c to vidhrdw\mcr.c. Removed machine\mcr.h. Partial rewrite of the MCR video system. Should
still work roughly the same, just a little different under the covers. This is still very much a work in progress [Aaron Giles].
0.98u1: Some major cleanup on the MCR drivers [Aaron Giles]: Implemented Super Sound I/O interrupts properly. Filled
out all memory maps according to schematics. Fixed sound sync with various sound boards, allowing for kludges to be
removed from Power Drive and Star Guards. Re-verified all connections from wiring diagrams. Documented various lamp and driver boards from the games.Here is some prelim work i did on the sample code in the mcr2.c driver the other night you might wanna try and finish it, basically im trying to backport just the tape samples
without having to update all of the above but there are two issues which i'll explain briefly bellow............/* bit 0 turns cassette on/off */ //sample_set_pause(0, ~data & 1); make it stop for now sample_stop(0, ~data & 1);
This should be sample_pause MAME2003 doesn't support that feature so i've made it sample_stop for now pending a test to see if the tape sample will actually
still turn on and off on the bonus levels without having to update MAME2003's sample core to support pausing, it might however just end up playing all through
the game or at the wrong times without the pause command.Right the other thing is during the midway update they changed how the sound code is piped via the IO ports, i cant use the new handling so attempt to roll the code back
using the existing code we have for this in the older driver guesswork more or less or but i have put a little thought into it :)//ssio_set_custom_output(4, 0x01, journey_op4_w);
install_port_write_handler(0, 0x04, 0x04, journey_sample_select_w);ssio_set_custom_output(4, 0x01, wacko_op4_w);
install_port_write_handler(0, 0x04, 0x04, wacko_mux_select_w);notice wacko has the same values as journey with regards to the sound write via the IO ports in the new driver so i simply match that up in our ole driver, it could be
right it could be wrong that's guesswork afterall ;)anyway here is my current WIP it should compile in MAME2003 let me know how you get on with it.
https://www.sendspace.com/file/rp0ak7 -
Actually we cant have sample_stop(0, ~data & 1); as that define is for a later version of the MAME sample player, i think this should be ok
static WRITE_HANDLER( journey_sample_select_w )
{
/* if we're not playing the sample yet, start it */
if (!sample_playing(0))
sample_start(0, 0, 1);/* bit 0 turns cassette on/off */ if ((~data & 1)) sample_stop(0);
}
-
@arcadez2003 if I'm understanding your thoughts. You're trying to put everything journey needs for the cassette into the mcr2.c driver to be stand alone? We could add new functions in there that only support journey leaving other games undisturbed
From what I read the tape would pause when you were on the normal levels then resume in the bonus rounds. That way everytime you were on a bonus round you'd be listening to a new clip of the song instead of starting from the beginning of the song each time.
You can test the cassette from the service menu under "cassette" too btw. You can play the tape, pause it then resume. If it works there it will work in the game.
And I tested journey in mame2010, the cassette works but the sound of the rest of the game is crackling. What ever they did to the audio wasn't a good change as it sounds near perfect in mame2003-plus. And don't get me started on the menus, 2003 seems much more stable. So if we could just add the cassette without a major overhaul that would be ideal.
-
Ok good news and bad, firstly the good i have the sample up and running now which is good in the sense at least i know all the code in the driver is good
however now the bad the sample is playing constantly when it shouldn't be, i know what the problem is just not sure how to go about hacking around it
im gonna ask dink if he has any suggestions later if not then the samples will have to be updated to support the pause feature.And i may as well tell ya now this wont be easy as the sample code from MAME98 is totally different from MAME2003.
-
Is sample stop not working ?
-
@grant2258 said in Journey sound sample in mame:
Is sample stop not working ?
It's meant to pause rather than stop per say with the code they added but i think i've got it to start and stop now, certainly i can turn the sample tape on
and off now in the service mode the only problem now is im not good enough at the game to actually get to the bonus stage where the tape sample
actually kicks in to see if it'll trigger and then turn off correctly as it's meant to.Well it's upto you @mahoneyt944 to test this out with the driver i send ya earlier simply find and then replace with this.............
static WRITE_HANDLER( journey_sample_select_w )
{
if ((data & 1) == 0)
sample_stop(0);else if (!sample_playing(0)) sample_start(0, 0, 1);
}
-
ive not really played that game much it is hard though
-
@grant2258 said in Journey sound sample in mame:
ive not really played that game much it is hard though
Aye and the cheats only give ya unlimited lives, cannot die would have been better for testing hopefully @mahoneyt944 will be good at it.??
i assume so since he noticed the sample doesn't work in the first place he must be able to get to the bonus stage -
ill test and report back
-
@arcadez2003
The sample is too large and crashes the mixer....3 minute song. If I cut it to 1:30, it works. Might need to figure out the size limit and expand it to except the whole songcould probably change the code to this too?
static WRITE_HANDLER( journey_sample_select_w ) { if ((data & 1) == 0) sample_stop(0); else sample_start(0, 0, 1); }
-
Hmm might it be a memory issue with the sample.?? certainly we had to use a sample shrinking program to reduce the Toaplan samples down from 160mb
to around 20mb or so for xbox use back in the day as the games could crash due to the 64mb memory limit , as for the handler whatever you think is best
i just grabbed it from FBN and reworked it for our codebase...........static void journey_op4_write(UINT8, UINT8 data)
{
if ((data & 1) == 0) {
BurnSampleStop(0);
}
else if (!BurnSampleGetStatus(0)) {
BurnSamplePlay(0);
}
}static WRITE_HANDLER( journey_sample_select_w )
{
if ((data & 1) == 0)
{
sample_stop(0);
}
else if (!sample_playing(0))
{
sample_start(0, 0, 1);
}
}I had it like this before but it seems cleaner the above way
/*
static int tape_off = 1;
int journey_sound_playing = 0;WRITE_HANDLER( journey_sample_select_w )
{
tape_off = ((~data & 1));if (tape_off) { if (journey_sound_playing == 1) { journey_sound_playing = 0; sample_stop(0); } } else { if (journey_sound_playing == 0) { journey_sound_playing = 1; sample_start(0,0,1); // tape sample } }
}
*/ -
@arcadez2003 yeah I like this way, short and sweet. I'll test the else if statement
static WRITE_HANDLER( journey_sample_select_w ) { if ((data & 1) == 0) sample_stop(0); else sample_start(0, 0, 1); }
The full sample is 15.4MB, cut in half it works. So it's a memory issue. Need to figure that out. Worse case we can link multiple smaller samples
It would be cool to get the pause feature added so it's correct though. Plus it would get old always hearing the intro lol.
Great step in the right direction š
-
Just tested the smaller sample and there's an issue. The sample starts just before going to the bonus scene then it restarts in the beginning of the bonus scene. I'm guessing this is where the pause feature would need to be working so you don't notice the change. Or maybe it's the else if I removed š I'll test again. Man this game is hard.
-
@mahoneyt944 said in Journey sound sample in mame:
Just tested the smaller sample and there's an issue. The sample starts just before going to the bonus scene then it restarts in the beginning of the bonus scene. I'm guessing this is where the pause feature would need to be working so you don't notice the change.
Try it again with the original handler before you changed it to see if that smooths it out, listen with regards to the sample pause feature apart from not having the time
to work on adding support for it now, due to the massive rewrite of every sound core circa MAME93 i dont see any easy way to backport the code for this from MAME98.In a nutshell in MAME2003 our sample handlng is split between samples.c and mixer.c where as in later MAME both of these were combined into one file and the code
totally rewritten, it's like chalk and cheese the code is not compatible with our older core, and i dont mind telling ya it might be above my level to create the sample
pause code myself totally from scratch, but at least we have the sample playing now which although there are a few niggles here and there is better than no sample at all :)Feel free to study the code and try and add support for the sample pausing yourself if you fancy taking a stab at it sometime.............
-
@arcadez2003
Very valid points... ... Hmmmmm
I have an idea, what if we leave the song playing on loop and just mute it instead of stopping it? That way the bonus scene will always have a random sound clip playing. This would be much better than always listening to the same intro on every bonus scene. Our start option will unmute and then play. Stop will just mute but continue playing. If it's already playing just unmute. A pause workaround.Maybe
static WRITE_HANDLER( journey_sample_select_w ) { if ((data & 1) == 0) sample_set_volume(0,0); else if (!sample_playing(0)) { sample_set_volume(0, 100); sample_start(0, 0, 1); } else sample_set_volume(0, 100); }
I'll have to test the volume values.
Update this works!, Though it's a little quieter than it should be at 100, this is rock-'n'-roll so it needs to be loud :)
Now to fit the whole song :)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.