[Scummvm-git-logs] scummvm master -> 5f70129eab58fd5fbbdaac92b9fe8f4e72b7f683
bluegr
noreply at scummvm.org
Sun Aug 11 14:54:05 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5f70129eab AUDIO: Remove unused interface for OPL reads
Commit: 5f70129eab58fd5fbbdaac92b9fe8f4e72b7f683
https://github.com/scummvm/scummvm/commit/5f70129eab58fd5fbbdaac92b9fe8f4e72b7f683
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-08-11T17:54:01+03:00
Commit Message:
AUDIO: Remove unused interface for OPL reads
Changed paths:
audio/alsa_opl.cpp
audio/fmopl.h
audio/opl2lpt.cpp
audio/rwopl3.cpp
audio/rwopl3.h
audio/softsynth/opl/dosbox.cpp
audio/softsynth/opl/dosbox.h
audio/softsynth/opl/mame.cpp
audio/softsynth/opl/mame.h
audio/softsynth/opl/nuked.cpp
audio/softsynth/opl/nuked.h
diff --git a/audio/alsa_opl.cpp b/audio/alsa_opl.cpp
index 24c79c80f7a..edb0f09c502 100644
--- a/audio/alsa_opl.cpp
+++ b/audio/alsa_opl.cpp
@@ -73,7 +73,6 @@ public:
void reset();
void write(int a, int v);
- byte read(int a);
void writeReg(int r, int v);
};
@@ -234,10 +233,6 @@ void OPL::write(int port, int val) {
}
}
-byte OPL::read(int port) {
- return 0;
-}
-
void OPL::writeReg(int r, int v) {
switch (_type) {
case Config::kOpl2:
diff --git a/audio/fmopl.h b/audio/fmopl.h
index 52435fc6f1f..76361c05854 100644
--- a/audio/fmopl.h
+++ b/audio/fmopl.h
@@ -139,14 +139,6 @@ public:
*/
virtual void write(int a, int v) = 0;
- /**
- * Reads a byte from the given I/O port.
- *
- * @param a port address
- * @return value read
- */
- virtual byte read(int a) = 0;
-
/**
* Function to directly write to a specific OPL register.
* This writes to *both* chips for a Dual OPL2. We allow
diff --git a/audio/opl2lpt.cpp b/audio/opl2lpt.cpp
index f097b2629b9..3c5a4160a27 100644
--- a/audio/opl2lpt.cpp
+++ b/audio/opl2lpt.cpp
@@ -69,7 +69,6 @@ public:
void reset();
void write(int a, int v);
- byte read(int a);
void writeReg(int r, int v);
};
@@ -150,11 +149,6 @@ void OPL::write(int port, int val) {
}
}
-byte OPL::read(int port) {
- // No read support for the OPL2LPT
- return 0;
-}
-
void OPL::writeReg(int r, int v) {
if (_type == Config::kOpl3 || _type == Config::kDualOpl2) {
r &= 0x1ff;
diff --git a/audio/rwopl3.cpp b/audio/rwopl3.cpp
index 49bbcf8cc95..ea726340297 100644
--- a/audio/rwopl3.cpp
+++ b/audio/rwopl3.cpp
@@ -181,11 +181,6 @@ void OPL::write(int portAddress, int value) {
}
}
-byte OPL::read(int portAddress) {
- // Reads are not supported by the RetroWave OPL3.
- return 0;
-}
-
void OPL::writeReg(int reg, int value) {
if (emulateDualOpl2OnOpl3(reg, value, _type)) {
writeReg(reg, value, false);
diff --git a/audio/rwopl3.h b/audio/rwopl3.h
index 63ab838396b..1d154a3db3d 100644
--- a/audio/rwopl3.h
+++ b/audio/rwopl3.h
@@ -60,7 +60,6 @@ public:
void reset() override;
void write(int portAddress, int value) override;
- byte read(int portAddress) override;
void writeReg(int reg, int value) override;
diff --git a/audio/softsynth/opl/dosbox.cpp b/audio/softsynth/opl/dosbox.cpp
index 7efc3a2bfee..35024b27297 100644
--- a/audio/softsynth/opl/dosbox.cpp
+++ b/audio/softsynth/opl/dosbox.cpp
@@ -235,29 +235,6 @@ void OPL::write(int port, int val) {
}
}
-byte OPL::read(int port) {
- switch (_type) {
- case Config::kOpl2:
- if (!(port & 1))
- //Make sure the low bits are 6 on opl2
- return _chip[0].read() | 0x6;
- break;
- case Config::kOpl3:
- if (!(port & 1))
- return _chip[0].read();
- break;
- case Config::kDualOpl2:
- // Only return for the lower ports
- if (port & 1)
- return 0xff;
- // Make sure the low bits are 6 on opl2
- return _chip[(port >> 1) & 1].read() | 0x6;
- default:
- break;
- }
- return 0;
-}
-
void OPL::writeReg(int r, int v) {
int tempReg = 0;
switch (_type) {
diff --git a/audio/softsynth/opl/dosbox.h b/audio/softsynth/opl/dosbox.h
index b30892b335d..3c736a37ab0 100644
--- a/audio/softsynth/opl/dosbox.h
+++ b/audio/softsynth/opl/dosbox.h
@@ -90,7 +90,6 @@ public:
void reset();
void write(int a, int v);
- byte read(int a);
void writeReg(int r, int v);
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp
index 5b0bedaf801..77f7dd495fe 100644
--- a/audio/softsynth/opl/mame.cpp
+++ b/audio/softsynth/opl/mame.cpp
@@ -71,10 +71,6 @@ void OPL::write(int a, int v) {
MAME::OPLWrite(_opl, a, v);
}
-byte OPL::read(int a) {
- return MAME::OPLRead(_opl, a);
-}
-
void OPL::writeReg(int r, int v) {
MAME::OPLWriteReg(_opl, r, v);
}
diff --git a/audio/softsynth/opl/mame.h b/audio/softsynth/opl/mame.h
index 217399a60b3..b0968f965ad 100644
--- a/audio/softsynth/opl/mame.h
+++ b/audio/softsynth/opl/mame.h
@@ -184,7 +184,6 @@ public:
void reset();
void write(int a, int v);
- byte read(int a);
void writeReg(int r, int v);
diff --git a/audio/softsynth/opl/nuked.cpp b/audio/softsynth/opl/nuked.cpp
index 18b5b6c2c96..143183ff90d 100644
--- a/audio/softsynth/opl/nuked.cpp
+++ b/audio/softsynth/opl/nuked.cpp
@@ -1642,10 +1642,6 @@ void OPL::dualWrite(uint8 index, uint8 reg, uint8 val) {
OPL3_WriteRegBuffered(&chip, (uint16_t)fullReg, (uint8_t)val);
}
-byte OPL::read(int port) {
- return 0;
-}
-
void OPL::generateSamples(int16*buffer, int length) {
OPL3_GenerateStream(&chip, (int16_t*)buffer, (uint16_t)length / 2);
}
diff --git a/audio/softsynth/opl/nuked.h b/audio/softsynth/opl/nuked.h
index fe584ec4371..70860d2114c 100644
--- a/audio/softsynth/opl/nuked.h
+++ b/audio/softsynth/opl/nuked.h
@@ -179,7 +179,6 @@ public:
void reset();
void write(int a, int v);
- byte read(int a);
void writeReg(int r, int v);
More information about the Scummvm-git-logs
mailing list