Tandy 3 Voice missing a channel in SVN

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Tandy 3 Voice missing a channel in SVN

Postby aardvark82 » 2018-5-25 @ 12:21

For example, opening music in Sentinel Worlds I: Future Magic

SVN r4105 https://instaud.io/2e4j

Stock 0.74 https://instaud.io/2e4k
aardvark82
Newbie
 
Posts: 3
Joined: 2017-6-08 @ 09:41

Re: Tandy 3 Voice missing a channel in SVN

Postby Great Hierophant » 2018-5-26 @ 18:13

The noise channel is missing from the SVN r4106 version from what I can hear. The noise is not gone, it just isn't being heard as it should due to the peculiar way the noise channel works on variants of the SN76496. The change occurred in SVN r4075. The change in that revision was "Merge the mamesound branch into trunk" This suggests that the coder took open source MAME code for the SN76489/SN76496 and changed whatever the DOSBox source was to make it behave like MAME. Thus for Maniac Mansion (unenhanced), the title music in DOSBox prior to r4075 used to sound like the second recording here : http://nerdlypleasures.blogspot.com/201 ... -chip.html Now it sounds like the first.

Ideally DOSBox should emulate the noise channel behavior of both the official TI SN76496 and the NCR8496 clone because both can be found in PC compatibles. The TI SN76496 will be found in the IBM PCjr. and Tandy 1000/A/HD and may be found in the Tandy 1000 EX/SX. The NCR8496 can be found as a discrete chip in the Tandy 1000 EX/SX and will be found in the Tandy 1000 HX/TX (discrete) and the Tandy 1000 SL(/2)/TL(/2/3)/RL(-HD)/RLX(-HD) (integrated in PSSJ). While MAME's implementation may be necessary for arcade machines, assumed to use TI chips, it really is not ideal for DOSBox because most of the later games that support Tandy sound expect the clone and early games tend not to use the noise channel much.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2369
Joined: 2003-4-27 @ 08:20

Re: Tandy 3 Voice missing a channel in SVN

Postby NewRisingSun » 2018-5-27 @ 00:22

What was the point of merging in a bunch of MAME cores anyway? It seems to have broken things randomly, does not audibly improve emulation accuracy or sound quality.... I'm certainly not going to incorporate that in my build. :angry:
NewRisingSun
Oldbie
 
Posts: 798
Joined: 2005-9-02 @ 02:26

Re: Tandy 3 Voice missing a channel in SVN

Postby Harekiet » 2018-5-27 @ 07:52

Well dosbox used to include mame sources of dubious copyright legality and I thought why not just go for the freshest mame sources now that they changed their license. The mame implementation for the SN76496 contains all kinds of implementation with different noise tap inputs. I wonder if any of those sound different though.

Although looking over my code again I kinda doubt the sample rate conversion logic makes much sense. To really do this properly we'd need a high quality resampler in dosbox as well but that would require some big rewrites so I'll cheat a bit and hope it sounds decent enough.
User avatar
Harekiet
DOSBox Author
 
Posts: 1049
Joined: 2002-7-01 @ 07:14
Location: Fryslan

Re: Tandy 3 Voice missing a channel in SVN

Postby Great Hierophant » 2018-6-02 @ 18:04

Actually, this may be serendipitous. Both behaviors have validity with real hardware as I have proven. I would suggest designating the "MAME" behavior to be used when the machine type is pcjr and the "DOSBox 0.74" behavior to be used when the machine type is tandy or anything else and tandy sound is forced.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2369
Joined: 2003-4-27 @ 08:20

Re: Tandy 3 Voice missing a channel in SVN

Postby Qbix » 2018-7-04 @ 12:00

Found a way to make it sound more similar to 0.74

It's also related to the volume controls, might not be directly related to the noise channel per se, although the volume of it is of course controlled this way as well.

Add a
Code: Select all
if ((data & 0x80) == 0) break;


just under
Code: Select all
      case 1: // tone 0: volume
      case 3: // tone 1: volume
      case 5: // tone 2: volume
      case 7: // noise: volume


in
Code: Select all
void sn76496_base_device::write(uint8_t data)


and comment out
Code: Select all
m_RNG = m_feedback_mask;

a few lines below that

Both seem to be needed. Not 100% sure yet if it can be limited to only the noise channel or only for writes here the highest bit is missing.

Edit: had some more changes in the file.
Code: Select all
 sn76496_device::sn76496_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
-   : sn76496_base_device(mconfig, SN76496, tag, 0x10000, 0x04, 0x08, false, false, 8, true, owner, clock)
+   : sn76496_base_device(mconfig, SN76496, tag, 0x4000, 0x01, 0x10, false, false, 8, false, owner, clock)
 {
 }

. Need to check how much they influence things
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10595
Joined: 2002-11-27 @ 14:50
Location: Fryslan


Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 1 guest