diff options
author | 2022-01-18 17:23:12 -0900 | |
---|---|---|
committer | 2022-01-18 21:23:12 -0500 | |
commit | 412098b9e66e083d2e3e9c42ea2358ba0a489c16 (patch) | |
tree | b9e65484be1de2c32ba201f1a3f14f17b6510ba8 /src/devices/sound/nes_defs.h | |
parent | 0f1cd34f36c0dc57707df9991a591f75f0f61ced (diff) |
nes_apu.cpp: Added missing DPCM period table for PAL. (#9167)
Fixes pitch being flat for DPCM sounds for nespal (and m82p). This is most apparent in Mr. Gimmick, though it affects all software that use the DPCM channel.
Diffstat (limited to 'src/devices/sound/nes_defs.h')
-rw-r--r-- | src/devices/sound/nes_defs.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/sound/nes_defs.h b/src/devices/sound/nes_defs.h index 5651dc85a88..bd0c3401a35 100644 --- a/src/devices/sound/nes_defs.h +++ b/src/devices/sound/nes_defs.h @@ -211,10 +211,12 @@ static const int noise_freq[16] = 4, 8, 16, 32, 64, 96, 128, 160, 202, 254, 380, 508, 762, 1016, 2034, 2046 }; -/* dpcm transfer freqs */ -static const int dpcm_clocks[16] = +// dpcm (cpu) cycle period +// each frequency is determined as: freq = master / period +static const int dpcm_clocks[2][16] = { - 428, 380, 340, 320, 286, 254, 226, 214, 190, 160, 142, 128, 106, 85, 72, 54 + { 428, 380, 340, 320, 286, 254, 226, 214, 190, 160, 142, 128, 106, 85, 72, 54 }, // NTSC + { 398, 354, 316, 298, 276, 236, 210, 198, 176, 148, 132, 118, 98, 78, 66, 50 } // PAL }; /* ratios of pos/neg pulse for square waves */ |