VOGONS


First post, by aardvark82

User metadata
Rank Newbie
Rank
Newbie

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

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

Stock 0.74 https://instaud.io/2e4k

Reply 1 of 5, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

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/2015/10/t … sound-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

Reply 2 of 5, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

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. 😠

Reply 3 of 5, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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.

Reply 4 of 5, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

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

Reply 5 of 5, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

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

if ((data & 0x80) == 0) break;

just under

		case 1: // tone 0: volume
case 3: // tone 1: volume
case 5: // tone 2: volume
case 7: // noise: volume

in

void sn76496_base_device::write(uint8_t data)

and comment out

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.

 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!