- --
Viewing Issue Advanced Details
[ Jump to Notes ]
ID | Category [?] | Severity [?] | Reproducibility | Date Submitted | Last Update |
---|---|---|---|---|---|
05694 | Sound | Minor | Always | Sep 8, 2014, 05:28 | Nov 4, 2014, 17:06 |
Tester | Richard42 | View Status | Public | Platform | MESS (Self-compiled) |
Assigned To | Resolution | Fixed | OS | Linux | |
Status [?] | Resolved | Driver | |||
Version | 0.154 | Fixed in Version | 0.156 | Build | 64-bit |
Fixed in Git Commit | Github Pull Request # | ||||
Summary | 05694: All sets in coco12.c and coco3.c: audio output level incorrect when Cassette/Cartridge selected on SC77526 chip | ||||
Description |
The coco hardware has a fundamental design defect whereby it is impossible to read the joystick axis positions without perturbing the output audio signal, if a sound waveform is currently being played. I have written a game engine which uses the Coco's hardware in a way which minimizes the audio signal disturbance for certain cases. In order to do this, it relies on the specific behavior of the Coco's SC77256 DAC chip, but this behavior is not emulated correctly in MESS. As such, my software produces a moderately loud buzzing sound in MESS which is much quieter when run on a real Coco computer. Page 42 and 43 of the Tandy Color Computer 3 service manual state that the SC77526 chip internally biases the Sound 1 and 2 inputs (from the Cassette and Cartridge sound lines) at the midpoint of the 3.9v output range. I tested a real Coco 3 machine using a DVM to verify that this is the behavior of the real chip. However, the logic in the MESS emulator brings the output audio value to 0 whenever the Cassette or Cartridge audio lines are selected, and they are playing no sound. I have written a patch to correctly model the behavior of a real Coco for the Cassette input. When this patch is applied to the latest SVN version of MESS (I am using r31981), the emulator correctly attenuates the buzzing sound when running my game engine. I have attached the patch file to this bug report. |
||||
Steps To Reproduce | |||||
Additional Information | |||||
Github Commit | |||||
Flags | |||||
Regression Version | |||||
Affected Sets / Systems | All sets in coco12.c and coco3.c | ||||
Attached Files
|
coco3-cassette-sound-fix.diff (1,593 bytes) Sep 8, 2014, 05:28 Uploaded by Richard42 patch to fix minor sound defect [Show Content] [Hide Content]Index: src/mess/machine/coco.c =================================================================== --- src/mess/machine/coco.c (revision 31169) +++ src/mess/machine/coco.c (working copy) @@ -679,15 +679,19 @@ /* determine the sound mux status */ soundmux_status_t status = soundmux_status(); + /* the SC77526 DAC chip internally biases the AC-coupled sound inputs for Cassette and Cartridge at the midpoint of the 3.9v output range */ + bool bCassSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1)); + bool bCassPlaying = ((m_cassette->get_state() & (CASSETTE_MASK_UISTATE | CASSETTE_MASK_MOTOR | CASSETTE_MASK_SPEAKER)) == + (CASSETTE_PLAY | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED)); + UINT8 cassette_sound = ((bCassSoundEnable && !bCassPlaying) ? 0x40 : 0); + /* determine the value to send to the DAC */ m_dac_output = (m_pia_1->a_output() & 0xFC) >> 2; - UINT8 sound_output = single_bit_sound + (status == SOUNDMUX_ENABLE ? m_dac_output << 1 : 0); - m_dac->write_unsigned8(sound_output); + UINT8 dac_sound = (status == SOUNDMUX_ENABLE ? m_dac_output << 1 : 0); + m_dac->write_unsigned8(single_bit_sound + dac_sound + cassette_sound); /* determine the cassette sound status */ - cassette_state cas_sound = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1)) - ? CASSETTE_SPEAKER_ENABLED - : CASSETTE_SPEAKER_MUTED; + cassette_state cas_sound = bCassSoundEnable ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED; m_cassette->change_state(cas_sound, CASSETTE_MASK_SPEAKER); /* determine the cartridge sound status */ | ||||
Relationships
There are no relationship linked to this issue. |
Notes
2
No.10981
Tafoid Administrator
Sep 17, 2014, 10:18
|
If you have a submission you want to include in main source, this is not the correct place to submit it for review/addition. Visit http://www.mamedev.org/devwiki/index.php?title=Submitting_Source_Code |
---|---|
No.11226
Richard42 Tester
Nov 4, 2014, 15:39
|
It looks like my fix has been merged into the source repo: https://github.com/mamedev/mame/commit/7b7f2456b90847187707b2447b4143d73837a4b2 Thanks! |