VOGONS

Common searches


First post, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

The low notes in Zak McKracken's intro still sound wrong in all emulators when compared to a recording of its output on a real Tandy machine. The reason is that the game writes a period of zero, which does not mean zero, but 1024, similar to the 8254 PIT's period of zero meaning 65536. Current tandy_sound.cpp tries to account for that but does it incorrectly. Attached patch does it correctly, fixing Zak McKracken's intro, as well as one flubbled note in Maniac Mansion Enhanced.

--- tandy_sound.cpp.old	2013-01-15 12:10:04 +0000
+++ tandy_sound.cpp 2014-01-09 22:41:13 +0000
@@ -124,7 +124,7 @@
case 2: /* tone 1 : frequency */
case 4: /* tone 2 : frequency */
R->Period[c] = R->UpdateStep * R->Register[r];
- if (R->Period[c] == 0) R->Period[c] = 0x3fe;
+ if (R->Period[c] == 0) R->Period[c] = R->UpdateStep * 0x400;
if (r == 4)
{
/* update noise shift frequency */
@@ -165,7 +165,7 @@
case 4: /* tone 2 : frequency */
R->Register[r] = (R->Register[r] & 0x0f) | ((data & 0x3f) << 4);
R->Period[c] = R->UpdateStep * R->Register[r];
- if (R->Period[c] == 0) R->Period[c] = 0x3fe;
+ if (R->Period[c] == 0) R->Period[c] = R->UpdateStep * 0x400;
if (r == 4)
{
/* update noise shift frequency */

Last edited by NewRisingSun on 2014-01-15, 21:45. Edited 1 time in total.

Reply 1 of 2, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I added this code to my personal, ever evolving DOSBox SVN and compiled binary certainly sounds different in Zak.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 2 of 2, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Moved to DOSBox patches forum

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper