Skip to content

Commit

Permalink
Add support for SGM AY8910 sound chip. Fix #11
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Jan 4, 2024
1 parent 1af681f commit 065e37f
Show file tree
Hide file tree
Showing 9 changed files with 504 additions and 15 deletions.
2 changes: 1 addition & 1 deletion platforms/desktop-shared/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SOURCES = $(EMULATOR_DESKTOP_SHARED_SRC)/main.cpp $(EMULATOR_DESKTOP_SHARED_SRC)

SOURCES += $(IMGUI_SRC)/imgui_impl_sdl.cpp $(IMGUI_SRC)/imgui_impl_opengl2.cpp $(IMGUI_SRC)/imgui.cpp $(IMGUI_SRC)/imgui_demo.cpp $(IMGUI_SRC)/imgui_draw.cpp $(IMGUI_SRC)/imgui_widgets.cpp $(IMGUI_FILEBROWSER_SRC)/ImGuiFileBrowser.cpp

SOURCES += $(EMULATOR_SRC)/Audio.cpp $(EMULATOR_SRC)/Cartridge.cpp $(EMULATOR_SRC)/GearcolecoCore.cpp $(EMULATOR_SRC)/Input.cpp $(EMULATOR_SRC)/Memory.cpp $(EMULATOR_SRC)/opcodes.cpp $(EMULATOR_SRC)/opcodes_cb.cpp $(EMULATOR_SRC)/opcodes_ed.cpp $(EMULATOR_SRC)/Processor.cpp $(EMULATOR_SRC)/ColecoVisionIOPorts.cpp $(EMULATOR_SRC)/Video.cpp
SOURCES += $(EMULATOR_SRC)/Audio.cpp $(EMULATOR_SRC)/Cartridge.cpp $(EMULATOR_SRC)/GearcolecoCore.cpp $(EMULATOR_SRC)/Input.cpp $(EMULATOR_SRC)/Memory.cpp $(EMULATOR_SRC)/opcodes.cpp $(EMULATOR_SRC)/opcodes_cb.cpp $(EMULATOR_SRC)/opcodes_ed.cpp $(EMULATOR_SRC)/Processor.cpp $(EMULATOR_SRC)/ColecoVisionIOPorts.cpp $(EMULATOR_SRC)/Video.cpp $(EMULATOR_SRC)/AY8910.cpp

SOURCES += $(EMULATOR_AUDIO_SRC)/Blip_Buffer.cpp $(EMULATOR_AUDIO_SRC)/Effects_Buffer.cpp $(EMULATOR_AUDIO_SRC)/Sms_Apu.cpp $(EMULATOR_AUDIO_SRC)/Multi_Buffer.cpp

Expand Down
4 changes: 2 additions & 2 deletions platforms/desktop-shared/emu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void emu_init(void)
gearcoleco->Init();

sound_queue = new Sound_Queue();
sound_queue->start(44100, 2);
sound_queue->start(GC_AUDIO_SAMPLE_RATE, 2);

audio_buffer = new s16[GC_AUDIO_BUFFER_SIZE];

Expand Down Expand Up @@ -198,7 +198,7 @@ void emu_audio_volume(float volume)
void emu_audio_reset(void)
{
sound_queue->stop();
sound_queue->start(44100, 2);
sound_queue->start(GC_AUDIO_SAMPLE_RATE, 2);
}

bool emu_is_audio_enabled(void)
Expand Down
1 change: 1 addition & 0 deletions platforms/libretro/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SOURCES_CXX := $(CORE_DIR)/libretro.cpp \
$(SOURCE_DIR)/Processor.cpp \
$(SOURCE_DIR)/Video.cpp \
$(SOURCE_DIR)/Audio.cpp \
$(SOURCE_DIR)/AY8910.cpp \
$(SOURCE_DIR)/Input.cpp \
$(SOURCE_DIR)/Cartridge.cpp \
$(SOURCE_DIR)/ColecoVisionIOPorts.cpp \
Expand Down
2 changes: 2 additions & 0 deletions platforms/windows/Gearcoleco.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Audio.cpp" />
<ClCompile Include="..\..\src\AY8910.cpp" />
<ClCompile Include="..\..\src\audio\Blip_Buffer.cpp" />
<ClCompile Include="..\..\src\audio\Effects_Buffer.cpp" />
<ClCompile Include="..\..\src\audio\Multi_Buffer.cpp" />
Expand Down Expand Up @@ -44,6 +45,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\Audio.h" />
<ClInclude Include="..\..\src\AY8910.h" />
<ClInclude Include="..\..\src\audio\blargg_common.h" />
<ClInclude Include="..\..\src\audio\blargg_config.h" />
<ClInclude Include="..\..\src\audio\blargg_source.h" />
Expand Down
Loading

0 comments on commit 065e37f

Please sign in to comment.