aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
diff options
context:
space:
mode:
authorathrxx2019-10-28 00:49:23 +0100
committerathrxx2019-12-18 20:50:39 +0100
commit900dcc4de57e68ed11409de13138adb3ca549814 (patch)
tree26cabd51a3b4896edb135776d6699258236c56b5 /audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
parent711034b74dd291286943a5b4aa17077ef05a39b2 (diff)
downloadscummvm-rg350-900dcc4de57e68ed11409de13138adb3ca549814.tar.gz
scummvm-rg350-900dcc4de57e68ed11409de13138adb3ca549814.tar.bz2
scummvm-rg350-900dcc4de57e68ed11409de13138adb3ca549814.zip
AUDIO: (FM-TOWNS/PC-98) - improve timer flags handling
Timers should be reset only the first time the enable flag is sent. This also requires some updates to drivers which didn't send these flags accurately.
Diffstat (limited to 'audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp')
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
index ed1b85170b..4a93d42454 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
@@ -1242,6 +1242,8 @@ void TownsPC98_AudioDriver::reset() {
_sfxData = 0;
_pc98a->reset();
+ setMusicTempo(84);
+ setSfxTempo(654);
for (int i = 0; i < _numChanFM; i++)
_channels[i]->reset();
@@ -1404,13 +1406,15 @@ void TownsPC98_AudioDriver::startSoundEffect() {
void TownsPC98_AudioDriver::setMusicTempo(uint8 tempo) {
writeReg(0, 0x26, tempo);
- writeReg(0, 0x27, 0x33);
+ writeReg(0, 0x27, 0x3D);
+ writeReg(0, 0x27, 0x3F);
}
void TownsPC98_AudioDriver::setSfxTempo(uint16 tempo) {
writeReg(0, 0x24, tempo & 0xff);
writeReg(0, 0x25, tempo >> 8);
- writeReg(0, 0x27, 0x33);
+ writeReg(0, 0x27, 0x3E);
+ writeReg(0, 0x27, 0x3F);
}
const uint8 TownsPC98_AudioDriver::_channelPreset[36] = {