From b11263be90c72619bb360d64d7d06ffcd8addd20 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Wed, 22 Sep 2010 19:39:54 +0000 Subject: KYRA PC-98: fix endianess in music frequency svn-id: r52855 --- sound/softsynth/fmtowns_pc98/towns_euphony.cpp | 2 +- sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/softsynth') 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); -- cgit v1.2.3