[Scummvm-cvs-logs] SF.net SVN: scummvm:[52857] scummvm/branches/branch-1-2-0/sound/softsynth/ fmtowns_pc98

athrxx at users.sourceforge.net athrxx at users.sourceforge.net
Wed Sep 22 22:19:35 CEST 2010


Revision: 52857
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52857&view=rev
Author:   athrxx
Date:     2010-09-22 20:19:35 +0000 (Wed, 22 Sep 2010)

Log Message:
-----------
KYRA PC-98: backport fix in music frequency endianess

Modified Paths:
--------------
    scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_euphony.cpp
    scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp

Modified: scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_euphony.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_euphony.cpp	2010-09-22 20:05:10 UTC (rev 52856)
+++ scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_euphony.cpp	2010-09-22 20:19:35 UTC (rev 52857)
@@ -560,7 +560,7 @@
 
 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.");

Modified: scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp
===================================================================
--- scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp	2010-09-22 20:05:10 UTC (rev 52856)
+++ scummvm/branches/branch-1-2-0/sound/softsynth/fmtowns_pc98/towns_pc98_driver.cpp	2010-09-22 20:19:35 UTC (rev 52857)
@@ -312,7 +312,7 @@
 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 @@
 
 	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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list