RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Journey sound sample in mame2003-plus, solved

    Scheduled Pinned Locked Moved Help and Support
    samplesjourney
    86 Posts 7 Posters 16.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      grant2258 Banned
      last edited by grant2258

      The sample works fine i tested it on final fight you problems is else where. Do this on retropie in the bios folder make the following directories mame2003-plus/samples/ffight
      copy the sepways.wav there and rename it too track02-01.wav

      start final fight put the the cheats on and listen it play from start to finish it will start on the first level dont pass this level or you'll get the normal music because you missing the other samples.

      M 1 Reply Last reply Reply Quote 1
      • M
        mahoneyt944 @grant2258
        last edited by

        @grant2258 interesting, if you take the journey sample from the link and test it in the journey service menu under cassette, do you get the same screech then crash after a few seconds I'm experiencing?

        1 Reply Last reply Reply Quote 0
        • G
          grant2258 Banned
          last edited by

          well thats the sample tested is working fine

          M 1 Reply Last reply Reply Quote 0
          • M
            mahoneyt944 @grant2258
            last edited by mahoneyt944

            @grant2258 hmm well that's a good test anyhow. We must not be setting the parameters up right in our driver.

            I saw this in common.h that looked interesting, but I'm just browsing through files. Game sample large caught my eye.

            struct GameSamples
            {
            	int total;	/* total number of samples */
            	struct GameSample *sample[1];	/* extendable */
            };
             
            #define	GAME_SAMPLE_LARGE		10000000 // 10MB
            
            1 Reply Last reply Reply Quote 0
            • G
              grant2258 Banned
              last edited by

              thats stuff we added during adding flac support

              M 1 Reply Last reply Reply Quote 0
              • M
                mahoneyt944 @grant2258
                last edited by mahoneyt944

                @grant2258
                Let's find the difference in cps1.c to our mcr2.c if the sample works there. The first difference I see is the attribute supports stereo. Final fight is using 2 channels.

                1 Reply Last reply Reply Quote 0
                • G
                  grant2258 Banned
                  last edited by grant2258

                  thats not a issue it support 2 mono samples for stereo if you have them both else it plays the one mono sample in both channels. Again this is part of the ost flac support update. Have you debugged it at all to see where its crashing?

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mahoneyt944 @grant2258
                    last edited by mahoneyt944

                    @grant2258 no, I'm at work so I can't right now. What happens though is when I go to the service menu and enter the cassette test menu. When I flip the up button to start the cassette I hear screeching. If I press down it stops. If I let it play eventually after about 30 seconds it crashes the emulator and throws me to emulationstation. So I took that sample, opened it in audacity cut it to 1:50 (originally 3:03) then exported it as .wav 16 bit pcm. I retest the above senario and the sample works just fine. So next I try the cut sample at 1:55, this time I get the screech and crash. For some reason it doesn't like the sample size over a certain size.

                    But then you got the sample to work through final fight, so I really don't know. It must be related to how we are initiating the sample with the mcr driver? Maybe the output is wrong, 2010mame looks like this:

                    static DRIVER_INIT( journey )
                    {
                    	mcr_init(machine, 91475, 91464, 90913);
                    	mcr_sound_init(machine, MCR_SSIO);
                    
                    	ssio_set_custom_output(4, 0x01, journey_op4_w);
                    }
                    

                    And our 2003plus wip

                    static DRIVER_INIT( journey )
                    {
                    	MCR_CONFIGURE_SOUND(MCR_SSIO);
                    	install_port_write_handler(0, 0x00, 0x00, mcr_control_port_w);
                    	install_port_write_handler(0, 0x04, 0x04, journey_sample_select_w);
                    
                    	mcr12_sprite_xoffs = 0;
                    	mcr12_sprite_xoffs_flip = 0;
                    }
                    
                    arcadez2003A 1 Reply Last reply Reply Quote 0
                    • G
                      grant2258 Banned
                      last edited by

                      to be honest i just compiled it a while back and got the same result not really looked into it much yet cold be anything need to see where its segfaulting to get a clue else your just guessing. The driver is completely different to the one we are using

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        mahoneyt944 @grant2258
                        last edited by mahoneyt944

                        @grant2258 yeah that's the next step.

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          skj @mahoneyt944
                          last edited by

                          Have you tried the sample at Twistys mame samples?

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mahoneyt944 @skj
                            last edited by

                            @skj I think it's the same sample from what I can tell

                            1 Reply Last reply Reply Quote 0
                            • G
                              grant2258 Banned
                              last edited by

                              https://github.com/libretro/mame2003-plus-libretro/blob/0134c428b75882aa474f78dbbf2c6ecde49b97b7/src/common.c#L302

                              comment this for now and change it to if(1) something else must be triggering this will need to follow the code at some point this code.

                              M 1 Reply Last reply Reply Quote 1
                              • M
                                mahoneyt944 @grant2258
                                last edited by mahoneyt944

                                @grant2258 that's what I was looking at earlier but passed it when you said about in being flac related. Does that fix the issue with the sample loading? Can't we just raise the GAME_SAMPLE_LARGE to fit our sample it's capped at 10 mb and our sample is 15+

                                1 Reply Last reply Reply Quote 0
                                • G
                                  grant2258 Banned
                                  last edited by

                                  I think i know what the problem is there is a flag that checks if contents is ost sample

                                  https://github.com/libretro/mame2003-plus-libretro/blob/0134c428b75882aa474f78dbbf2c6ecde49b97b7/src/sound/samples.c#L32-L45

                                  will check it later on i would guess this is the issue with using big samples like this.

                                  1 Reply Last reply Reply Quote 0
                                  • G
                                    grant2258 Banned
                                    last edited by

                                    @arcadez2003 do you have links to them samples you had to shrink sorted the problem will test the ole samples that never worked before as well. This is actually great doing it this way because it unloads the sample when it stops if its huge its so smaller systems like the mini collection can play the samples without loading em all at one time.

                                    arcadez2003A 1 Reply Last reply Reply Quote 0
                                    • arcadez2003A
                                      arcadez2003 @grant2258
                                      last edited by

                                      @grant2258 said in Journey sound sample in mame:

                                      @arcadez2003 do you have links to them samples you had to shrink sorted the problem will test the ole samples that never worked before as well. This is actually great doing it this way because it unloads the sample when it stops if its huge its so smaller systems like the mini collection can play the samples without loading em all at one time.

                                      I still got the one for Teki Paki how to get it to ya though.?? im not sure if we can share samples on here.??

                                      Arcade Addict

                                      1 Reply Last reply Reply Quote 0
                                      • G
                                        grant2258 Banned
                                        last edited by

                                        think samples are ok to be honest as long as its not the full metallica collection! I could always drive round bring a thumb stick sanitize it throw it you while maintaining a two meter distance just for something to do during this lockdown is driving me nuts!. Seriously thrown me a link anywhere on github if you dont want to post a link here.

                                        arcadez2003A 1 Reply Last reply Reply Quote 0
                                        • arcadez2003A
                                          arcadez2003 @mahoneyt944
                                          last edited by arcadez2003

                                          @mahoneyt944 said in Journey sound sample in mame:

                                          @grant2258 no, I'm at work so I can't right now. What happens though is when I go to the service menu and enter the cassette test menu. When I flip the up button to start the cassette I hear screeching. If I press down it stops. If I let it play eventually after about 30 seconds it crashes the emulator and throws me to emulationstation. So I took that sample, opened it in audacity cut it to 1:50 (originally 3:03) then exported it as .wav 16 bit pcm. I retest the above senario and the sample works just fine. So next I try the cut sample at 1:55, this time I get the screech and crash. For some reason it doesn't like the sample size over a certain size.

                                          But then you got the sample to work through final fight, so I really don't know. It must be related to how we are initiating the sample with the mcr driver? Maybe the output is wrong, 2010mame looks like this:

                                          static DRIVER_INIT( journey )
                                          {
                                          	mcr_init(machine, 91475, 91464, 90913);
                                          	mcr_sound_init(machine, MCR_SSIO);
                                          
                                          	ssio_set_custom_output(4, 0x01, journey_op4_w);
                                          }
                                          

                                          And our 2003plus wip

                                          static DRIVER_INIT( journey )
                                          {
                                          	MCR_CONFIGURE_SOUND(MCR_SSIO);
                                          	install_port_write_handler(0, 0x00, 0x00, mcr_control_port_w);
                                          	install_port_write_handler(0, 0x04, 0x04, journey_sample_select_w);
                                          
                                          	mcr12_sprite_xoffs = 0;
                                          	mcr12_sprite_xoffs_flip = 0;
                                          }
                                          

                                          I think how i set it up is correct but when dealing with code written for a totally different driver and reworking it to fit our older one can always be problematic.
                                          certainly all i know is with both my MAME72 and MAME84 xbox ports i can play the journey sample from twistys site from beginning to end with no problems.
                                          and that's the full on sample btw i've not altered it whatsoever.

                                          Now the main problem for me at least is listening to that uncool song so many times now has got me actually singing it in the shower etc etc :)

                                          Arcade Addict

                                          1 Reply Last reply Reply Quote 0
                                          • arcadez2003A
                                            arcadez2003 @grant2258
                                            last edited by

                                            @grant2258 said in Journey sound sample in mame:

                                            think samples are ok to be honest as long as its not the full metallica collection! I could always drive round bring a thumb stick sanitize it throw it you while maintaining a two meter distance just for something to do during this lockdown is driving me nuts!. Seriously thrown me a link anywhere on github if you dont want to post a link here.

                                            Ok check the comments in my last commit to MAME2003+ in 10 mins or so

                                            Arcade Addict

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.