[Scummvm-git-logs] scummvm master -> 9577fd888af0cc1a93e194aac86533fb6c1c51d2
dreammaster
noreply at scummvm.org
Mon Aug 3 00:22:30 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
9577fd888a MADS: NEBULAR: Fix incorrect pitchBend causing ASan mame.cpp crash
Commit: 9577fd888af0cc1a93e194aac86533fb6c1c51d2
https://github.com/scummvm/scummvm/commit/9577fd888af0cc1a93e194aac86533fb6c1c51d2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2026-08-03T10:22:21+10:00
Commit Message:
MADS: NEBULAR: Fix incorrect pitchBend causing ASan mame.cpp crash
Assisted-by: Claude Code:claude-opus-4.8
Changed paths:
engines/mads/nebular/sound/asound.cpp
engines/mads/nebular/sound/asound.h
diff --git a/engines/mads/nebular/sound/asound.cpp b/engines/mads/nebular/sound/asound.cpp
index a55577700a9..7dcd7c9fd6b 100644
--- a/engines/mads/nebular/sound/asound.cpp
+++ b/engines/mads/nebular/sound/asound.cpp
@@ -250,11 +250,11 @@ void ASound::noise() {
}
}
-void ASound::write(int reg, int val) {
+void ASound::write(uint8 reg, uint8 val) {
_opl->writeReg(reg, val);
}
-int ASound::write2(int state, int reg, int val) {
+int ASound::write2(int state, uint8 reg, uint8 val) {
_ports[reg] = val;
write(reg, val);
return state;
@@ -782,7 +782,7 @@ void ASound::channelCommand(byte *&pSrc, bool &updateFlag) {
break;
case 5:
- chan->_pitchBend = *++pSrc;
+ chan->_pitchBend = (int8)*++pSrc;
chan->_pSrc += 2;
break;
diff --git a/engines/mads/nebular/sound/asound.h b/engines/mads/nebular/sound/asound.h
index ffaffd1171b..146676fea9b 100644
--- a/engines/mads/nebular/sound/asound.h
+++ b/engines/mads/nebular/sound/asound.h
@@ -218,12 +218,12 @@ protected:
/**
* Queue a byte for an Adlib register
*/
- void write(int reg, int val);
+ void write(uint8 reg, uint8 val);
/**
* Queue a byte for an Adlib register, and store it in the _ports array
*/
- int write2(int state, int reg, int val);
+ int write2(int state, uint8 reg, uint8 val);
/**
* Turn a channel on
@@ -318,7 +318,7 @@ public:
int _pollResult;
int _resultFlag;
byte _nullData[2];
- int _ports[256];
+ uint8 _ports[256];
bool _stateFlag;
int _activeChannelReg;
int _outputReg; // scratch OPL operator register offset used within loadSample()
More information about the Scummvm-git-logs
mailing list