Skip to content

Commit

Permalink
Emu de MIDI updates; remove ProtoSquare/ChipFreak soundfonts
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Oct 23, 2024
1 parent 6d9756f commit 008851c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 114 deletions.
95 changes: 0 additions & 95 deletions docs/licenses/CC-BY-SA-4_0-International.txt

This file was deleted.

8 changes: 0 additions & 8 deletions docs/licenses/License Attribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ CC 1.0 Universal License

HandmadeMath.h - Ben Visness

"ProtoSquare!" soundfont - Yingchun Soul

===========================================================================================
CC-BY-3.0 Unported License
===========================================================================================
Expand All @@ -49,12 +47,6 @@ CC-BY-NC-4.0 International License

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

===========================================================================================
CC-BY-SA-4.0 International License
===========================================================================================

"ChipFreak" soundfont - Copyright (c) Jayvee Enaguas

===========================================================================================
GPL3 License
===========================================================================================
Expand Down
4 changes: 2 additions & 2 deletions libraries/libemidi/source/CPSGDrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void CPSGDrum::_WriteReg(uint8_t reg, uint8_t val, uint32_t id)
m_reg_cache[id][reg] = val;
if (m_rbuf[id].size() < 8192)
{
m_rbuf[id].push_back(PSG_calc(m_psg[id]) << 16);
m_rbuf[id].push_back(PSG_calc(m_psg[id]));
if (m_env.Update())
{
for (int ch = 0; ch < 6; ch++)
Expand Down Expand Up @@ -111,7 +111,7 @@ bool CPSGDrum::Render(int32_t buf[2])
{
if (m_rbuf[i].empty())
{
buf[0] += PSG_calc(m_psg[i]) << 16;
buf[0] += PSG_calc(m_psg[i]);
if (m_env.Update())
{
for (int ch = 0; ch < 6; ch++)
Expand Down
19 changes: 13 additions & 6 deletions libraries/libemidi/source/CSMFPlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@

using namespace dsa;

CSMFPlay::CSMFPlay(uint32_t rate, int mods) {
CSMFPlay::CSMFPlay(uint32_t rate, CSMFPlay::PlayerMode mode, int mods) {
m_mods = mods;
for(int i=0;i<m_mods;i++){
if(i&1)
m_module[i].AttachDevice(new CSccDevice(rate,2));
else
m_module[i].AttachDevice(new COpllDevice(rate,2));
if (mode == SCC_PSG_MODE)
for(int i=0;i<m_mods;i++){
if(i&1)
m_module[i].AttachDevice(new CSccDevice(rate,2));
else
m_module[i].AttachDevice(new CPSGDrum(rate,1));
}
else
{
for(int i=0;i<m_mods;i++){
m_module[i].AttachDevice(new COpllDevice(rate, 2));
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion libraries/libemidi/source/CSMFPlay.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ class CSMFPlay {
int m_mods;

public:
CSMFPlay(uint32_t rate, int mods=4);
enum PlayerMode
{
OPLL_MODE,
SCC_PSG_MODE
};

CSMFPlay(uint32_t rate, PlayerMode mode = SCC_PSG_MODE, int mods=4);
~CSMFPlay();
void Start(bool reset = true);
void SendMIDIMessage(const CMIDIMsg &msg);
Expand Down
Binary file removed soundfont/ChipFreak.sf2
Binary file not shown.
Binary file removed soundfont/ProtoSquare!.sf2
Binary file not shown.
2 changes: 1 addition & 1 deletion source_files/edge/m_option.cc
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ static OptionMenuItem soundoptions[] = {
{kOptionMenuItemTypePlain, "", nullptr, 0, nullptr, nullptr, nullptr},
{kOptionMenuItemTypeSwitch, "Stereo", "Off/On/Swapped", 3, &var_sound_stereo, nullptr, "NeedRestart"},
{kOptionMenuItemTypePlain, "", nullptr, 0, nullptr, nullptr, nullptr},
{kOptionMenuItemTypeSwitch, "MIDI Player", "Fluidlite/Opal/FMMIDI/Emu de MIDI", 4, &var_midi_player, OptionMenuChangeMidiPlayer,
{kOptionMenuItemTypeSwitch, "MIDI Player", "Fluidlite/Opal/FMMIDI/Emu de MIDI (OPLL Mode)/Emu de MIDI (SCC-PSG Mode)", 5, &var_midi_player, OptionMenuChangeMidiPlayer,
nullptr},
{kOptionMenuItemTypeFunction, "Fluidlite Soundfont", nullptr, 0, nullptr, OptionMenuChangeSoundfont, nullptr},
{kOptionMenuItemTypeBoolean, "PC Speaker Mode", YesNo, 2, &pc_speaker_mode, OptionMenuChangePCSpeakerMode,
Expand Down
2 changes: 1 addition & 1 deletion source_files/edge/s_emidi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ AbstractMusicPlayer *PlayEMIDIMusic(uint8_t *data, int length, bool loop)
return nullptr;
}

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

0 comments on commit 008851c

Please sign in to comment.