Skip to content

Commit 008851c

Browse files
author
dashodanger
committed
Emu de MIDI updates; remove ProtoSquare/ChipFreak soundfonts
1 parent 6d9756f commit 008851c

File tree

9 files changed

+24
-114
lines changed

9 files changed

+24
-114
lines changed

docs/licenses/CC-BY-SA-4_0-International.txt

-95
This file was deleted.

docs/licenses/License Attribution.txt

-8
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ CC 1.0 Universal License
3535

3636
HandmadeMath.h - Ben Visness
3737

38-
"ProtoSquare!" soundfont - Yingchun Soul
39-
4038
===========================================================================================
4139
CC-BY-3.0 Unported License
4240
===========================================================================================
@@ -49,12 +47,6 @@ CC-BY-NC-4.0 International License
4947

5048
REKKR (various assets) - Copyright (c) 2021 Mockingbird Softworks
5149

52-
===========================================================================================
53-
CC-BY-SA-4.0 International License
54-
===========================================================================================
55-
56-
"ChipFreak" soundfont - Copyright (c) Jayvee Enaguas
57-
5850
===========================================================================================
5951
GPL3 License
6052
===========================================================================================

libraries/libemidi/source/CPSGDrum.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void CPSGDrum::_WriteReg(uint8_t reg, uint8_t val, uint32_t id)
8282
m_reg_cache[id][reg] = val;
8383
if (m_rbuf[id].size() < 8192)
8484
{
85-
m_rbuf[id].push_back(PSG_calc(m_psg[id]) << 16);
85+
m_rbuf[id].push_back(PSG_calc(m_psg[id]));
8686
if (m_env.Update())
8787
{
8888
for (int ch = 0; ch < 6; ch++)
@@ -111,7 +111,7 @@ bool CPSGDrum::Render(int32_t buf[2])
111111
{
112112
if (m_rbuf[i].empty())
113113
{
114-
buf[0] += PSG_calc(m_psg[i]) << 16;
114+
buf[0] += PSG_calc(m_psg[i]);
115115
if (m_env.Update())
116116
{
117117
for (int ch = 0; ch < 6; ch++)

libraries/libemidi/source/CSMFPlay.cpp

+13-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@
77

88
using namespace dsa;
99

10-
CSMFPlay::CSMFPlay(uint32_t rate, int mods) {
10+
CSMFPlay::CSMFPlay(uint32_t rate, CSMFPlay::PlayerMode mode, int mods) {
1111
m_mods = mods;
12-
for(int i=0;i<m_mods;i++){
13-
if(i&1)
14-
m_module[i].AttachDevice(new CSccDevice(rate,2));
15-
else
16-
m_module[i].AttachDevice(new COpllDevice(rate,2));
12+
if (mode == SCC_PSG_MODE)
13+
for(int i=0;i<m_mods;i++){
14+
if(i&1)
15+
m_module[i].AttachDevice(new CSccDevice(rate,2));
16+
else
17+
m_module[i].AttachDevice(new CPSGDrum(rate,1));
18+
}
19+
else
20+
{
21+
for(int i=0;i<m_mods;i++){
22+
m_module[i].AttachDevice(new COpllDevice(rate, 2));
23+
}
1724
}
1825
}
1926

libraries/libemidi/source/CSMFPlay.hpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ class CSMFPlay {
1212
int m_mods;
1313

1414
public:
15-
CSMFPlay(uint32_t rate, int mods=4);
15+
enum PlayerMode
16+
{
17+
OPLL_MODE,
18+
SCC_PSG_MODE
19+
};
20+
21+
CSMFPlay(uint32_t rate, PlayerMode mode = SCC_PSG_MODE, int mods=4);
1622
~CSMFPlay();
1723
void Start(bool reset = true);
1824
void SendMIDIMessage(const CMIDIMsg &msg);

soundfont/ChipFreak.sf2

-107 KB
Binary file not shown.

soundfont/ProtoSquare!.sf2

-356 KB
Binary file not shown.

source_files/edge/m_option.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ static OptionMenuItem soundoptions[] = {
528528
{kOptionMenuItemTypePlain, "", nullptr, 0, nullptr, nullptr, nullptr},
529529
{kOptionMenuItemTypeSwitch, "Stereo", "Off/On/Swapped", 3, &var_sound_stereo, nullptr, "NeedRestart"},
530530
{kOptionMenuItemTypePlain, "", nullptr, 0, nullptr, nullptr, nullptr},
531-
{kOptionMenuItemTypeSwitch, "MIDI Player", "Fluidlite/Opal/FMMIDI/Emu de MIDI", 4, &var_midi_player, OptionMenuChangeMidiPlayer,
531+
{kOptionMenuItemTypeSwitch, "MIDI Player", "Fluidlite/Opal/FMMIDI/Emu de MIDI (OPLL Mode)/Emu de MIDI (SCC-PSG Mode)", 5, &var_midi_player, OptionMenuChangeMidiPlayer,
532532
nullptr},
533533
{kOptionMenuItemTypeFunction, "Fluidlite Soundfont", nullptr, 0, nullptr, OptionMenuChangeSoundfont, nullptr},
534534
{kOptionMenuItemTypeBoolean, "PC Speaker Mode", YesNo, 2, &pc_speaker_mode, OptionMenuChangePCSpeakerMode,

source_files/edge/s_emidi.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ AbstractMusicPlayer *PlayEMIDIMusic(uint8_t *data, int length, bool loop)
313313
return nullptr;
314314
}
315315

316-
player->emidi_synth_ = new dsa::CSMFPlay(sound_device_frequency);
316+
player->emidi_synth_ = new dsa::CSMFPlay(sound_device_frequency, var_midi_player == 3 ? dsa::CSMFPlay::OPLL_MODE : dsa::CSMFPlay::SCC_PSG_MODE);
317317
if (!player->emidi_synth_)
318318
{
319319
LogDebug("Emu de MIDI player: error initializing!\n");

0 commit comments

Comments
 (0)