aboutsummaryrefslogtreecommitdiff
path: root/sky/music
diff options
context:
space:
mode:
authorRobert Göffringmann2003-07-13 06:04:11 +0000
committerRobert Göffringmann2003-07-13 06:04:11 +0000
commit3b8a1461520b542a726da1894eb6555f58f4a235 (patch)
tree6627256062373b86bcffb0b9376cb2d44afd8859 /sky/music
parent22edb8c39b45ff2a97f72ceaa926be8132245d2d (diff)
downloadscummvm-rg350-3b8a1461520b542a726da1894eb6555f58f4a235.tar.gz
scummvm-rg350-3b8a1461520b542a726da1894eb6555f58f4a235.tar.bz2
scummvm-rg350-3b8a1461520b542a726da1894eb6555f58f4a235.zip
music support for BASS floppy demo v.0.0109.
adlib doesn't really work, but the rest of the game doesn't either... so who cares, anyway. svn-id: r8966
Diffstat (limited to 'sky/music')
-rw-r--r--sky/music/adlibchannel.cpp34
-rw-r--r--sky/music/adlibmusic.cpp12
-rw-r--r--sky/music/gmmusic.cpp10
3 files changed, 40 insertions, 16 deletions
diff --git a/sky/music/adlibchannel.cpp b/sky/music/adlibchannel.cpp
index 6303e261ed..98b7a9fb17 100644
--- a/sky/music/adlibchannel.cpp
+++ b/sky/music/adlibchannel.cpp
@@ -42,18 +42,30 @@ SkyAdlibChannel::SkyAdlibChannel(FM_OPL *opl, uint8 *pMusicData, uint16 startOfD
uint16 instrumentDataLoc;
- if (SkyState::_systemVars.gameVersion == 267) {
- instrumentDataLoc = (_musicData[0x11FC] << 8) | _musicData[0x11FB];
- _frequenceTable = (uint16*)(_musicData+0x7F4);
- _registerTable = _musicData+0xDF4;
- _opOutputTable = _musicData+0xE06;
- _adlibRegMirror = _musicData+0xF55;
+ if (SkyState::_systemVars.gameVersion == 109) {
+ //instrumentDataLoc = (_musicData[0x11D0] << 8) | _musicData[0x11CF];
+ //_frequenceTable = (uint16*)(_musicData + 0x835);
+ //_registerTable = _musicData + 0xE35;
+ //_opOutputTable = _musicData + 0xE47;
+ //_adlibRegMirror = _musicData + 0xF4A;
+
+ instrumentDataLoc = READ_LE_UINT16(_musicData + 0x1204);
+ _frequenceTable = (uint16*)(_musicData + 0x868);
+ _registerTable = _musicData + 0xE68;
+ _opOutputTable = _musicData + 0xE7A;
+ _adlibRegMirror = _musicData + 0xF7D;
+ } else if (SkyState::_systemVars.gameVersion == 267) {
+ instrumentDataLoc = READ_LE_UINT16(_musicData + 0x11FB);
+ _frequenceTable = (uint16*)(_musicData + 0x7F4);
+ _registerTable = _musicData + 0xDF4;
+ _opOutputTable = _musicData + 0xE06;
+ _adlibRegMirror = _musicData + 0xF55;
} else {
- instrumentDataLoc = (_musicData[0x1206] << 8) | _musicData[0x1205];
- _frequenceTable = (uint16*)(_musicData+0x7FE);
- _registerTable = _musicData+0xDFE;
- _opOutputTable = _musicData+0xE10;
- _adlibRegMirror = _musicData+0xF5F;
+ instrumentDataLoc = READ_LE_UINT16(_musicData + 0x1205);
+ _frequenceTable = (uint16*)(_musicData + 0x7FE);
+ _registerTable = _musicData + 0xDFE;
+ _opOutputTable = _musicData + 0xE10;
+ _adlibRegMirror = _musicData + 0xF5F;
}
_instrumentMap = _musicData+instrumentDataLoc;
diff --git a/sky/music/adlibmusic.cpp b/sky/music/adlibmusic.cpp
index 5ce82a6f3c..836fe24806 100644
--- a/sky/music/adlibmusic.cpp
+++ b/sky/music/adlibmusic.cpp
@@ -85,12 +85,18 @@ void SkyAdlibMusic::premixerCall(int16 *buf, uint len) {
void SkyAdlibMusic::setupPointers(void) {
- if (SkyState::_systemVars.gameVersion == 267) {
+ if (SkyState::_systemVars.gameVersion == 109) {
// disk demo uses a different adlib driver version, some offsets have changed
- _musicDataLoc = (_musicData[0x11F8] << 8) | _musicData[0x11F7];
+ //_musicDataLoc = (_musicData[0x11CC] << 8) | _musicData[0x11CB];
+ //_initSequence = _musicData + 0xEC8;
+
+ _musicDataLoc = READ_LE_UINT16(_musicData + 0x1200);
+ _initSequence = _musicData + 0xEFB;
+ } else if (SkyState::_systemVars.gameVersion == 267) {
+ _musicDataLoc = READ_LE_UINT16(_musicData + 0x11F7);
_initSequence = _musicData + 0xE87;
} else {
- _musicDataLoc = (_musicData[0x1202] << 8) | _musicData[0x1201];
+ _musicDataLoc = READ_LE_UINT16(_musicData + 0x1201);
_initSequence = _musicData + 0xE91;
}
_nextMusicPoll = 0;
diff --git a/sky/music/gmmusic.cpp b/sky/music/gmmusic.cpp
index e1ee2fe7e1..07c021a0c5 100644
--- a/sky/music/gmmusic.cpp
+++ b/sky/music/gmmusic.cpp
@@ -20,6 +20,7 @@
*/
#include "sky/music/gmmusic.h"
+#include "sky/sky.h"
void SkyGmMusic::passTimerFunc(void *param) {
@@ -69,8 +70,13 @@ void SkyGmMusic::timerCall(void) {
void SkyGmMusic::setupPointers(void) {
- _musicDataLoc = (_musicData[0x7DD] << 8) | _musicData[0x7DC];
- _sysExSequence = ((_musicData[0x7E1] << 8) | _musicData[0x7E0]) + _musicData;
+ if (SkyState::_systemVars.gameVersion == 109) {
+ _musicDataLoc = (_musicData[0x79C] << 8) | _musicData[0x79B];
+ _sysExSequence = _musicData + 0x1EF2;
+ } else {
+ _musicDataLoc = (_musicData[0x7DD] << 8) | _musicData[0x7DC];
+ _sysExSequence = ((_musicData[0x7E1] << 8) | _musicData[0x7E0]) + _musicData;
+ }
}
void SkyGmMusic::setupChannels(uint8 *channelData) {