diff options
author | Florian Kagerer | 2010-09-22 19:39:54 +0000 |
---|---|---|
committer | Florian Kagerer | 2010-09-22 19:39:54 +0000 |
commit | b11263be90c72619bb360d64d7d06ffcd8addd20 (patch) | |
tree | 866ba31924a5640f57bc0b9aa40ceeb094e6ca64 | |
parent | f155d902c71aa79bccb81bc7dbfddfbe57107ff5 (diff) | |
download | scummvm-rg350-b11263be90c72619bb360d64d7d06ffcd8addd20.tar.gz scummvm-rg350-b11263be90c72619bb360d64d7d06ffcd8addd20.tar.bz2 scummvm-rg350-b11263be90c72619bb360d64d7d06ffcd8addd20.zip |
KYRA PC-98: fix endianess in music frequency
svn-id: r52855
-rw-r--r-- | sound/softsynth/fmtowns_pc98/towns_euphony.cpp | 2 | ||||
-rw-r--r-- | sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sound/softsynth/fmtowns_pc98/towns_euphony.cpp b/sound/softsynth/fmtowns_pc98/towns_euphony.cpp index 19dbd619d2..626c0166e5 100644 --- a/sound/softsynth/fmtowns_pc98/towns_euphony.cpp +++ b/sound/softsynth/fmtowns_pc98/towns_euphony.cpp @@ -560,7 +560,7 @@ uint8 TownsEuphonyDriver::appendEvent(uint8 evt, uint8 chan) { void TownsEuphonyDriver::sendEvent(uint8 mode, uint8 command) { if (mode == 0) { - warning("TownsEuphonyDriver: Mode 0 not implemented"); + // warning("TownsEuphonyDriver: Mode 0 not implemented"); } else if (mode == 0x10) { warning("TownsEuphonyDriver: Mode 0x10 not implemented"); diff --git a/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp b/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp index 7b7fbddc4b..72054f71c6 100644 --- a/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp +++ b/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp @@ -312,7 +312,7 @@ void TownsPC98_MusicChannel::processEvents() { void TownsPC98_MusicChannel::processFrequency() { if (_flags & CHS_RECALCFREQ) { - _frequency = (((const uint16 *)_drv->_opnFreqTable)[_frqBlockMSB & 0x0f] + _frqLSB) | (((_frqBlockMSB & 0x70) >> 1) << 8); + _frequency = (READ_LE_UINT16(&_drv->_opnFreqTable[(_frqBlockMSB & 0x0f) << 1]) + _frqLSB) | (((_frqBlockMSB & 0x70) >> 1) << 8); _drv->writeReg(_part, _regOffset + 0xa4, (_frequency >> 8)); _drv->writeReg(_part, _regOffset + 0xa0, (_frequency & 0xff)); @@ -709,7 +709,7 @@ void TownsPC98_MusicChannelSSG::processFrequency() { if (_flags & CHS_RECALCFREQ) { _block = _frqBlockMSB >> 4; - _frequency = ((const uint16 *)_drv->_opnFreqTableSSG)[_frqBlockMSB & 0x0f] + _frqLSB; + _frequency = READ_LE_UINT16(&_drv->_opnFreqTableSSG[(_frqBlockMSB & 0x0f) << 1]) + _frqLSB; uint16 f = _frequency >> _block; _drv->writeReg(_part, _regOffset << 1, f & 0xff); |