Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
03443 Sound Minor Always Sep 18, 2009, 01:34 Sep 20, 2009, 15:20
Tester Foxhack View Status Public Platform MAME (Official Binary)
Assigned To hap Resolution Fixed OS Windows XP (32-bit)
Status [?] Resolved Driver
Version 0.134 Fixed in Version 0.134u1 Build Normal
Fixed in Git Commit Github Pull Request #
Summary 03443: brapboys, brapboysj: Music samples looping incorrectly / ending too soon
Description The music in both sets ends an instant too soon. The music and vocal tracks are all samples of a certain duration. The music ends an instant too soon and starts up again, and it isn't in rhythm.
Steps To Reproduce Play the game.
Additional Information  I've noticed two spots where this is very apparent:

When you insert a coin, the game is supposed to make a scratching record sound, and after that's done, it should play the music. But the music starts immediately instead of waiting for the scratch to finish.

After the coin is inserted, the game shows the three player characters dancing to a backing song. This song ends about one or two beats too early then starts again. The attached MP3 file shows this.

The first segment of the audio is ripped from
; the second segment was recorded from MAME using Camtasia Studio, and then converted to WAV. Both segments were loaded in Audacity and spliced into one file for comparison purposes.

This looping issue is present during the entire game, however, the game will abruptly switch from one music track to another when certain things happen. For example, in Level 1, once you arrive at the amusement park, the music changes to a rap abruptly, and out of tune. This behavior is normal according to the video linked above.
Github Commit
Flags
Regression Version
Affected Sets / Systems brapboys, brapboysj
Attached Files
mp3 file icon brapboyscomparison.mp3 (401,763 bytes) Sep 18, 2009, 01:34
mp3 file icon brap_59_198.mp3 (225,723 bytes) Sep 20, 2009, 12:57
mp3 file icon brap_59_200.mp3 (248,293 bytes) Sep 20, 2009, 12:58
Relationships
There are no relationship linked to this issue.
Notes
11
User avatar
No.04952
Haze
Senior Tester
Sep 18, 2009, 07:27
It seems to be timed, so it will require the correct refresh frequency and the correct OKI frequency at least (I imagine the Oki frequency should be 2, refresh, I don't know)
User avatar
No.04953
Haze
Senior Tester
Sep 18, 2009, 07:31
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")

MDRV_SOUND_ADD("oki1", OKIM6295, 2000000)
MDRV_SOUND_CONFIG(okim6295_interface_pin7low) // clock frequency & pin 7 not verified
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)

MDRV_SOUND_ADD("oki2", OKIM6295, 2000000)
MDRV_SOUND_CONFIG(okim6295_interface_pin7low) // clock frequency & pin 7 not verified
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)

and

MDRV_SCREEN_REFRESH_RATE(59)

seems to make it much better..

59 is possible, bakubrkr was measured to be 59.. 2000000 is almost certainly correct, 1980000 is almost certainly a rounding error from when the OKI was converted to use proper frequency not sample rate.
User avatar
No.04954
Haze
Senior Tester
Sep 18, 2009, 07:33
but probably not perfect.. I'm not good with sound, but basically by tweaking the timings the looping will change, and they need to be spot on for it to be perfect.
User avatar
No.04955
Haze
Senior Tester
Sep 18, 2009, 14:12
if anybody wants to tweak the refresh (with the OKI freq set to 2) then they're more than welcome. It's not really my area.
User avatar
No.04956
Foxhack
Tester
Sep 18, 2009, 17:46
Will these changes affect other games in the driver?

(I can't compile stuff at the moment, so I can't compare these to the video, but if I could, it should be pretty easy.)
User avatar
No.04957
Haze
Senior Tester
Sep 18, 2009, 21:16
they'll affect shogun warriors, which is on the same pcb, nothing else shares that machine driver.
User avatar
No.04958
Foxhack
Tester
Sep 18, 2009, 22:44
I just tried out Shogun Warriors, and... it looks like it has this same looping issue! So maybe this will also fix that game.

I'm going to see if I can set my PC up to compile MAME and report my findings.
User avatar
No.04959
Canim
Senior Tester
Sep 20, 2009, 09:03
I tried it with 2000000 and brapboys was way better but shogwarr still had a little hikup. So I tried the 59 + 2000000 and both games have at the loop ending/begining a perfect rhythm.
User avatar
No.04960
hap
Developer
Sep 20, 2009, 13:00
I believe 59 + 1980000 gives the best result, see attachment.
User avatar
No.04961
Haze
Senior Tester
Sep 20, 2009, 13:49
1980000 seems unrealistic tho, no clocks on the pcb would divide to that, that's why I'm saying I think it should be 2000000 + 59.something
User avatar
No.04962
hap
Developer
Sep 20, 2009, 14:22
edited on: Sep 20, 2009, 14:28
ok, let's leave this open then until we have an accurate measurement

*edit* The Guru:
I just measured my B-Rap board. Use these values instead...

VSync is 59.1854Hz
HSync is 15.625kHz
M6295 clock is 2.000MHz [16/8] for both chips. Pin 7 is low.
68000 clock is 12.000MHz