MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

BPzeBanshee
MAME Fan
Reged: 07/22/12
Posts: 19
Send PM
Sample hacking seibuspi.c, need help
05/31/13 07:24 AM


Raiden Legacy came out recently with so-called "HD Music" - basically hacking their emulator (which I'm 100% certain is in itself using MAME code) to play samples instead of emulating the music.
Being sick of MAME's emulation of the music myself, and after doing some modernisation work with ThunderMAME to port it over to newer versions I decided to do a bit of sample hacking myself - but with plain MAME which does most things right unlike Raiden Legacy.

I've started with Raiden Fighters JET, and have successfully gotten samples to play and then trap the command sent to play the emulated music (so that it's not playing under the samples and making it sound odd). I'm not sure if actually having the samples up is allowed here but I've uploaded my modified code here: http://www.mediafire.com/download/6e6fwqy96mi90wa/Seibuhax_V3.zip

The final hurdles I'm at however, is as follows:

1) hooking up the sample system (with the correct reference to JET's samples) so that only Raiden Fighters JET and its variants load and use the samples. I seem to have messed up my attempt at making a MACHINE_CONFIG_DERIVED that adds it because every game that isn't rfjets (the sxx2g variant that I was working with because it had a sound test), is that even the right approach? What am I doing wrong with this code?

2) the ROM Transfer tune as called in the ROM Transfer process (rather than the one available in rfjets's sound test) is proving to be a real pain. Any trapping of suspect commands sent through to the Z80 results in some kind of error, same with sending anything that isn't what it's expecting. If I set the sound off in MACHINE_CONFIG_START then I get no sfx in-game (I only want to sample replace the music for the time being). I'm wondering if maybe there's a way to just mute the sound driver itself dynamically when I know it's at the ROM Transfer process?

3) This happened in the source recently: http://git.redump.net/mame/commit/?id=6d0f90261cf96726742ac3d73f3f3e1e50e148f9
which post MAME 0.148u5 among other things removes the sound_fifo_w command I was placing my sample/trapping commands in. Apart from being a code shuffle it doesn't seem to do anything beneficial, but I'm worried this might make my method of intercepting sound requests incompatible with future MAME versions. Any ideas for how I can get around this?

Any help with this will be much appreciated. I've hit a bit of an impasse with this and not sure where to find anyone who knows enough about MAME drivers to help me out (although trap15 and the guys at #messdev have been helpful in getting me this far, credit where it's due).

Edited by BPzeBanshee (05/31/13 07:28 AM)







Entire thread
Subject Posted by Posted on
* Sample hacking seibuspi.c, need help BPzeBanshee 05/31/13 07:24 AM
. * Re: Sample hacking seibuspi.c, need help BPzeBanshee  05/31/13 02:34 PM
. * Re: Sample hacking seibuspi.c, need help R. Belmont  06/03/13 04:54 PM
. * Re: Sample hacking seibuspi.c, need help BPzeBanshee  06/04/13 12:28 PM
. * Re: Sample hacking seibuspi.c, need help hap  06/04/13 02:46 PM
. * Re: Sample hacking seibuspi.c, need help BPzeBanshee  06/05/13 01:41 PM
. * Re: Sample hacking seibuspi.c, need help Vas Crabb  06/05/13 04:49 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 109 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3580