mamedev / mame

MAME
https://www.mamedev.org/
Other
7.95k stars 1.98k forks source link

New patch for sms.cpp: fix Out Run sound in FM mode #1496

Closed enikland2 closed 7 years ago

enikland2 commented 7 years ago

Micko asked me to post a diff here as an alternative for patch submission. It fixes a bug present for a long time that I haven't noticed until recently.

Changelog:

Enik mame_sms_outrun_fm.txt

p1pkin commented 7 years ago

pushed, thanks.

enikland2 commented 7 years ago

Hi MetalliC!

 

Thank you for having pushed my patches!

Could you make a little adjustment for me?

In this last patch, I used "set_output_gain(0, ..." but would be better if had used "set_output_gain(ALL_OUTPUTS, ...".

I did the former based on an example found in Mameworld Programming forum, but the latter would be more appropriate for  my patch. The function is used in files src/mame/machine/sms.cpp and src/devices/bus/sg1000_exp/fm_unit.cpp.

I want to avoid open another issue just for this adjustment. I would be glad if you or someone else could do this change for me!

Enik

 

Sent: Monday, October 10, 2016 at 10:58 PM From: MetalliC notifications@github.com To: mamedev/mame mame@noreply.github.com Cc: enikland2 enikland@gmx.com, Author author@noreply.github.com Subject: Re: [mamedev/mame] New patch for sms.cpp: fix Out Run sound in FM mode (#1496)

pushed, thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

 

p1pkin commented 7 years ago

all occurrences have to be replaced ?

enikland2 commented 7 years ago

I think so, the 4 occurrences of each file. It's really necessary for the YM2413, because has two audio outputs, Melody (MO) and Rhythm (RO), that are joined together in the circuit line that can be switched on and off, according to FM Unit and SMSJ schematics. About the SN6489 chip, it have only one audio output line, so the change at least will match what is declared by the MCFG_SOUND_ROUTE macro in machine config. In the case of the FM Unit, the chip doesn't have internal connection to it, because the unit connects with the audio out line of the Mark III, that hypothetically could be merged output of more than one line.

p1pkin commented 7 years ago

ok, done