Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/drhelius/Gearsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Jan 13, 2024
2 parents 0b680fc + e43059b commit f2f4d52
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 13 deletions.
2 changes: 1 addition & 1 deletion platforms/desktop-shared/emu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void emu_set_overscan(int overscan)
}
}

void emu_disable_ym4231(bool disable)
void emu_disable_ym2413(bool disable)
{
gearsystem->GetAudio()->DisableYM2413(disable);
}
Expand Down
2 changes: 1 addition & 1 deletion platforms/desktop-shared/emu.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ EXTERN void emu_enable_bootrom_gg(bool enable);
EXTERN void emu_set_media_slot(int slot);
EXTERN void emu_set_3d_glasses_config(int config);
EXTERN void emu_set_overscan(int overscan);
EXTERN void emu_disable_ym4231(bool disable);
EXTERN void emu_disable_ym2413(bool disable);

#undef EMU_IMPORT
#undef EXTERN
Expand Down
6 changes: 3 additions & 3 deletions platforms/desktop-shared/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,12 +829,12 @@ static void main_menu(void)
}
}

if (ImGui::BeginMenu("YM4231 FM Sound"))
if (ImGui::BeginMenu("YM2413 FM Sound"))
{
ImGui::PushItemWidth(130.0f);
if (ImGui::Combo("##emu_ym4231", &config_audio.ym2413, "Auto\0Disabled\0\0"))
if (ImGui::Combo("##emu_ym2413", &config_audio.ym2413, "Auto\0Disabled\0\0"))
{
emu_disable_ym4231(config_audio.ym2413 == 1);
emu_disable_ym2413(config_audio.ym2413 == 1);
}
ImGui::PopItemWidth();
ImGui::EndMenu();
Expand Down
5 changes: 4 additions & 1 deletion platforms/windows/Gearsystem.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<ClCompile Include="..\..\src\Audio.cpp" />
<ClCompile Include="..\..\src\audio\Blip_Buffer.cpp" />
<ClCompile Include="..\..\src\audio\Effects_Buffer.cpp" />
<ClCompile Include="..\..\src\audio\emu2413\emu2413.c" />
<ClCompile Include="..\..\src\audio\Multi_Buffer.cpp" />
<ClCompile Include="..\..\src\audio\Sms_Apu.cpp" />
<ClCompile Include="..\..\src\audio\emu2413\emu2413.c" />
<ClCompile Include="..\..\src\BootromMemoryRule.cpp" />
<ClCompile Include="..\..\src\Cartridge.cpp" />
<ClCompile Include="..\..\src\CodemastersMemoryRule.cpp" />
Expand All @@ -37,6 +37,7 @@
<ClCompile Include="..\..\src\SG1000MemoryRule.cpp" />
<ClCompile Include="..\..\src\SmsIOPorts.cpp" />
<ClCompile Include="..\..\src\Video.cpp" />
<ClCompile Include="..\..\src\YM2413.cpp" />
<ClCompile Include="..\audio-shared\Sound_Queue.cpp" />
<ClCompile Include="..\desktop-shared\application.cpp" />
<ClCompile Include="..\desktop-shared\config.cpp" />
Expand All @@ -62,6 +63,7 @@
<ClInclude Include="..\..\src\audio\Blip_Buffer.h" />
<ClInclude Include="..\..\src\audio\Blip_Synth.h" />
<ClInclude Include="..\..\src\audio\Effects_Buffer.h" />
<ClInclude Include="..\..\src\audio\emu2413\emu2413.h" />
<ClInclude Include="..\..\src\audio\Multi_Buffer.h" />
<ClInclude Include="..\..\src\audio\Sms_Apu.h" />
<ClInclude Include="..\..\src\audio\Sms_Oscs.h" />
Expand Down Expand Up @@ -100,6 +102,7 @@
<ClInclude Include="..\..\src\SixteenBitRegister.h" />
<ClInclude Include="..\..\src\SmsIOPorts.h" />
<ClInclude Include="..\..\src\Video.h" />
<ClInclude Include="..\..\src\YM2413.h" />
<ClInclude Include="..\audio-shared\Sound_Queue.h" />
<ClInclude Include="..\desktop-shared\application.h" />
<ClInclude Include="..\desktop-shared\config.h" />
Expand Down
15 changes: 15 additions & 0 deletions platforms/windows/Gearsystem.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<Filter Include="core\audio">
<UniqueIdentifier>{8892c6b5-0bc8-4022-b3fb-97a4726ac30f}</UniqueIdentifier>
</Filter>
<Filter Include="core\audio\emu2413">
<UniqueIdentifier>{26b53fb0-973d-4009-9eb1-a9e8296d7b7a}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\audio-shared\Sound_Queue.cpp">
Expand Down Expand Up @@ -153,6 +156,12 @@
<ClCompile Include="..\desktop-shared\gui_events.cpp">
<Filter>desktop_shared</Filter>
</ClCompile>
<ClCompile Include="..\..\src\audio\emu2413\emu2413.c">
<Filter>core\audio\emu2413</Filter>
</ClCompile>
<ClCompile Include="..\..\src\YM2413.cpp">
<Filter>core</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\audio-shared\Sound_Queue.h">
Expand Down Expand Up @@ -353,6 +362,12 @@
<ClInclude Include="..\desktop-shared\gui_events.h">
<Filter>desktop_shared</Filter>
</ClInclude>
<ClInclude Include="..\..\src\YM2413.h">
<Filter>core</Filter>
</ClInclude>
<ClInclude Include="..\..\src\audio\emu2413\emu2413.h">
<Filter>core\audio\emu2413</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\desktop-shared\Makefile.common">
Expand Down
13 changes: 6 additions & 7 deletions src/audio/emu2413/emu2413.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,12 @@ static int32_t rks_table[8 * 2][2];
static OPLL_PATCH null_patch = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static OPLL_PATCH default_patch[OPLL_TONE_NUM][(16 + 3) * 2];

static inline int min(int i, int j) {
return (i < j) ? i : j;
}

static inline int max(int i, int j) {
return (i > j) ? i : j;
}
#ifndef min
static inline int min(int i, int j) { return (i < j) ? i : j; }
#endif
#ifndef max
static inline int max(int i, int j) { return (i > j) ? i : j; }
#endif

/***************************************************
Expand Down

0 comments on commit f2f4d52

Please sign in to comment.