|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
![]() |
Author | Message |
---|---|
|
Help with PSGSFX
![]() |
I'm having trouble with PSGSFX. About 50% of the time it won't play the sound effect even when I tell it to. Right now a sound effect should happen when:
- burger touches chicken nugget - fry has been fired - fry shot down milkshake - fry shot down onion ring - fry shoots at boss But I can't get it to consistently play every sound effect like I want it to. What am I doing wrong? |
|
![]() ![]() ![]() |
|
|
![]() |
it seems to me it's working correctly. remember that if you play a SFX immediately after another, the first one gets cancelled as you can't play two SFXs together - so sometimes it might seem one SFX didn't play. | |
![]() ![]() ![]() |
|
|
![]() |
Could it be my choice of emulator then? I'm using Emulicious. | |
![]() ![]() ![]() |
|
|
![]() |
I'm also using it. I think I can hear all the SFX that don't get cancelled by others. If you think the problem still persist, please describe exactly how to reproduce it, as I couldn't do that. | |
![]() ![]() ![]() |
|
|
![]() |
I made a YouTube video of what I have been witnessing when playing the game on Emulicious.
https://youtu.be/AEgKhSwIbHY As you can see, a couple of times, some sound effects don't play at all. |
|
![]() ![]() ![]() |
|
|
![]() |
When you are very close to an enemy and shoot it, the shooting sfx starts fine but is shortly afterwards interrupted by silence, as if an "empty" sfx is played if you hit an enemy.
You could try using the debug console and print messages when PSGSFXPlay is called to see which sfx are started when. Maybe there's a problem in the collision routines. Or maybe the same sfx is repeatedly triggered and has silence at the beginning? But I'm just guessing. |
|
![]() ![]() ![]() |
|
|
![]() |
found the problem
when you call PSGSFXPlay, you should set HL to the address of the SFX you want to play (you're doing that correctly already) *and* you should also set C to the mask that indicates which channels the SFX will use (and you're not doing that...) possible values for C are:
|
|
![]() ![]() ![]() |
|
|
![]() |
Yep, that was what the problem was! Thanks, sverx!
This additional info isn't in the SN76489 page https://www.smspower.org/Development/SN76489, or not that I could see, anyway. Perhaps if it's not there, it would be great if you could include it. |
|
![]() ![]() ![]() |
|
|
![]() |
good you could fix it.
that info isn't listed on the SN76489 page because it has nothing to do with the hardware itself, it's how PSGlib works (yeah, I should write proper documentation...) |
|
![]() ![]() ![]() |
|
|
![]() |
Another thing you should mention when redoing the PSGLib manual is state that all PSGs must have a volume of 15, and then you can adjust the volume via the code in your game and not in the PSG file itself. I had trouble, I had all the notes to volume 8 and it would not play in my game. After I adjusted the notes to 15, they played. | |
![]() ![]() ![]() |
|
|
![]() |
well, I think when writing the music one should use all the needed volume range anyway, then if the game needs to lower the volume you can do that in code using PSGSetMusicVolumeAttenuation... | |
![]() ![]() ![]() |
![]() |