diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-02 01:25:49 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-02 01:25:49 +0300 |
commit | 461bc4c3c4a89852bcd70c793f55cda3eba2ff4c (patch) | |
tree | 4e77501cbffece788b04f91fd37ecf62cab65b22 /src/adlmidi_opl3.cpp | |
parent | 82e57cf34fe4b5cd01ed6499eb0db6edc67b5da3 (diff) | |
download | libADLMIDI-461bc4c3c4a89852bcd70c793f55cda3eba2ff4c.tar.gz libADLMIDI-461bc4c3c4a89852bcd70c793f55cda3eba2ff4c.tar.bz2 libADLMIDI-461bc4c3c4a89852bcd70c793f55cda3eba2ff4c.zip |
Remove duplicated "Poke" function call
It's no sense to have uint32-argument poke function as all emulators are using uint16 and uint8 data only
Diffstat (limited to 'src/adlmidi_opl3.cpp')
-rw-r--r-- | src/adlmidi_opl3.cpp | 30 |
1 files changed, 2 insertions, 28 deletions
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)); |