aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/adlmidi_midiplay.cpp2
-rw-r--r--src/adlmidi_opl3.cpp30
-rw-r--r--src/adlmidi_private.hpp3
3 files changed, 4 insertions, 31 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index 610c64e..16d125e 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -2066,7 +2066,7 @@ void MIDIplay::HandleEvent(size_t tk, const MIDIplay::MidiEvent &evt, int &statu
v |= 0x30;
//std::printf("OPL poke %02X, %02X\n", i, v);
//std::fflush(stdout);
- opl.PokeN(0, i, v);
+ opl.Poke(0, i, v);
return;
}
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp
index 26883a1..b4db049 100644
--- a/src/adlmidi_opl3.cpp
+++ b/src/adlmidi_opl3.cpp
@@ -178,33 +178,7 @@ OPL3::OPL3() :
#endif
}
-void OPL3::Poke(size_t card, uint32_t index, uint32_t value)
-{
- #ifdef ADLMIDI_HW_OPL
- (void)card;
- unsigned o = index >> 8;
- unsigned port = OPLBase + o * 2;
-
- #ifdef __DJGPP__
- outportb(port, index);
- for(unsigned c = 0; c < 6; ++c) inportb(port);
- outportb(port + 1, value);
- for(unsigned c = 0; c < 35; ++c) inportb(port);
- #endif//__DJGPP__
-
- #ifdef __WATCOMC__
- outp(port, index);
- for(uint16_t c = 0; c < 6; ++c) inp(port);
- outp(port + 1, value);
- for(uint16_t c = 0; c < 35; ++c) inp(port);
- #endif//__WATCOMC__
-
- #else//ADLMIDI_HW_OPL
- cardsOP2[card]->writeReg(static_cast<uint16_t>(index), static_cast<uint8_t>(value));
- #endif//ADLMIDI_HW_OPL
-}
-
-void OPL3::PokeN(size_t card, uint16_t index, uint8_t value)
+void OPL3::Poke(size_t card, uint16_t index, uint8_t value)
{
#ifdef ADLMIDI_HW_OPL
(void)card;
@@ -569,7 +543,7 @@ void OPL3::Reset(int emulator, unsigned long PCM_RATE)
for(unsigned a = 0; a < 18; ++a) Poke(i, 0xB0 + Channels[a], 0x00);
for(unsigned a = 0; a < sizeof(data) / sizeof(*data); a += 2)
- PokeN(i, data[a], static_cast<uint8_t>(data[a + 1]));
+ Poke(i, data[a], static_cast<uint8_t>(data[a + 1]));
Poke(i, 0x0BD, regBD[i] = (HighTremoloMode * 0x80
+ HighVibratoMode * 0x40
+ AdlPercussionMode * 0x20));
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index 2010b4e..8e3b158 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -281,8 +281,7 @@ public:
// 7 = percussion Hihat
// 8 = percussion slave
- void Poke(size_t card, uint32_t index, uint32_t value);
- void PokeN(size_t card, uint16_t index, uint8_t value);
+ void Poke(size_t card, uint16_t index, uint8_t value);
void NoteOff(size_t c);
void NoteOn(unsigned c, double hertz);