|
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 |
---|---|
|
FM / PSG mix - testing the audio control port
Posted: Sun Dec 22, 2019 7:51 am
|
There still seems to be some confusion about how to mix PSG and FM on systems that have both available. The problem is that there's very few software that even tries to do this, basically just the japanese BIOS and ValleyBell's Sonic FM hack. I read through the thread regarding the latter and couldn't really make heads or tails of what was being reported, as it seems at least partially contradict the information on the development page.
I think a few more tests are in order to find out what's really going on. Here's a little test ROM that I made. It plays a jolly little tune on both the SN76489 and the YM2413. With the d-pad of controller 1 you can choose which value gets sent to the audio control port. It also shows which value gets read back from there. Please try out the attached ROM and report your findings. I'm especially interested in the results on the japanese SMS, the Mark III plus FM unit combo, and the PowerbaseFM. Which sound output can you hear? If you deactivate one, does the sound cut off immediately or does the last note played linger? I'll start with the systems I have access to. First value is the one that's written to the acp, the second one is the one that's read from there. The third one is read again, but with I/O interference switched back on. European SMS with VileTim FM board: ---------------------------------------------------- 00 00 00 both chips audible 01 01 01 only FM, PSG is muted immediately 02 00 00 both chips audible 03 01 01 both chips audible European SMS, FM board switched off: ---------------------------------------------------- 00 02 06 only PSG 01 02 05 only PSG 02 02 03 only PSG 03 02 07 only PSG Analogue Mega SG: ---------------------------------------------------- 00 00 00 both chips audible 01 01 01 both chips audible 02 00 00 both chips audible 03 01 01 both chips audible |
|
|
Posted: Sun Dec 22, 2019 5:46 pm |
I've been testing with an european SMS wiith Viletim's Board, and with a PowerBase FM:
European SMS with VileTim FM board: ---------------------------------------------------- 00 00 00 both chips audible 01 01 01 both chips audible !! 02 00 00 both chips audible 03 01 01 both chips audible European SMS, FM board switched off: ---------------------------------------------------- 00 02 06 only PSG 01 02 05 only PSG 02 02 03 only PSG 03 02 07 only PSG PowerBase FM ---------------------------------------------------- 00 00 00 both chips audible 01 01 01 both chips audible 02 00 00 both chips audible 03 01 01 both chips audible |
|
|
Posted: Sun Dec 22, 2019 9:02 pm |
I'll see if I can get you results for both the Mark III+FM Unit and JP SMS. My Master Everdrive's in another location right now so it might take a little bit. I'll edit this post again with my findings.
EDIT: Here's the results: JP SMS 00 00 00 - PSG only 01 01 01 - FM only 02 02 02 - No audio 03 03 03 - Both audible Mark III with FM Unit 00 00 00 - PSG only 01 01 01 - FM only 02 00 00 - PSG only 03 03 01 - FM only Also, on all the results the audio cuts out immediately and doesn't linger. |
|
|
Posted: Mon Dec 23, 2019 2:06 pm |
Thanks for testing. Those results are certainly quite interesting. I have edited the development page with the new information.
@kusfo: It's very interesting that you get different results on input $01 than me, despite also using a VileTim FM board. I think it's possible that we have different revisions of the hardware in use. Or maybe it's dependent on the host system? Mine's an early model SMS 1 with snail maze BIOS. @ApolloBoy: Your results pretty much confirm our assumptions on the functionality of the audio control port. It's good to finally have proof. However, it also confirms that it's impossible to have PSG and FM combined on a Mark III. Bummer. By the way: Would you mind testing on your Mark III with the FM unit detached to confirm it acts the same as an SMS without FM hardware? |
|
|
Posted: Mon Dec 23, 2019 2:56 pm |
Yes, it was quite extrange to get these different results. I was thinking maybe I was not noticing the PSG going silent, but it was not the case at all (but I can do a video just in case)
My Master System is a 1 model with Safari hunt and Hang On included. The Viletim board is a V2 version, I think. |
|
|
Posted: Thu Dec 26, 2019 10:15 am |
There's one strange effect that I'm experiencing when running the test ROM on the Mega SG: The FM seems to randomly drop notes.
I thought it might have to do with sending data to the port too fast, and indeed I found a few places in the code where that happened, but fixing these changed nothing. Anyone experienced anything like this on any setup? On my SMS with VileTim board it plays just fine. It did that before, too, though, even with accessing the FM port too fast. Anyway, here's a new version of the test ROM with the FM access fixed. I also managed to synchronize the two chips a little better, so it sounds slightly better than the previous version. If you do any further testing, please use the new version. EDIT: Apparently, this is a known issue and YM2413 support on the Mega SG is simply broken. Hopefully, a future firmware revision will take care of it. |
|
|
Posted: Fri Dec 27, 2019 3:55 pm |
I just checked, and my FM board is a V2.2. If you have a 2.1 or 2.0, that might explain the difference. |
|
|
Posted: Fri Dec 27, 2019 5:34 pm |
|
|
|
Posted: Sat Dec 28, 2019 9:04 am |
I must admit that the last line puzzles me. The way the test is set up, it shouldn’t actually be possible that the third number is lower than the second one. I think the line should read either 03 01 01 or 03 03 03. Could you double-check, maybe? |
|
|
Posted: Sat Dec 28, 2019 9:36 am |
I bought it in 2013, so it should be 2.0 |
|
|
Posted: Wed Mar 25, 2020 5:24 am |
I pulled out my Mark III again and here's the second take: 00 00 00 - PSG only 01 01 01 - FM only 02 00 00 - PSG only 03 01 01 - FM only |
|
|
Posted: Wed Mar 25, 2020 5:04 pm |
Brilliant. Thanks for confirming. | |
|
Posted: Thu Mar 26, 2020 1:30 am |
Oh and I also saw that you wanted me to do the test without the FM Unit attached, so here are the results from that:
00 06 06 - PSG 01 05 05 - PSG 02 03 03 - PSG 03 07 07 - PSG |
|
|
Posted: Thu Mar 26, 2020 6:35 am |
Very interesting, thanks. | |
|
Posted: Sat May 14, 2022 1:04 am |
I encountered this issue with Sydney Hunter and the Sacred Tribe, it would only play FM Music and no sound effects with my SMSFM Mod unless the switch was set to the disable FM position (where it would play PSG sound effects and music).
I fired up the ROM in Emulicious, set a breakpoint on writes to port F2 and saw several writes to the port at the beginning of the ROM. The last write wrote an 01, which I used the ACPTest2 program to confirm that a 01 write disables PSG while allowing FM on my system. My system is a US SMS with a v2.4 BIOS and a v2.2 SMSFM mod. When I changed the last write from 01 to 03, the game played with FM Music and PSG sound on my hardware. In the ROM the location to change is address $29. |
|
|
Posted: Tue Jun 07, 2022 12:18 pm |
@Great Hierophant: I wonder if they ever expected to have FM and PSG at the same time... | |