Skip to content
Permalink
Browse files
Adding SEGA sound
  • Loading branch information
MainMemory committed Sep 25, 2014
1 parent 50d0a07 commit 4a950a402f872dd6d1dfbbde697dcb865c948705
Showing with 16 additions and 0 deletions.
  1. BIN SMPSOUT/Data/SEGA.wav
  2. +11 −0 SMPSOUT/SMPSOUT.cpp
  3. +4 −0 SMPSOUT/SMPSOUT.rc
  4. +1 −0 SMPSOUT/resource.h
BIN +308 KB SMPSOUT/Data/SEGA.wav
Binary file not shown.
@@ -333,6 +333,7 @@ class SMPSInterfaceClass : MidiInterfaceClass
short trackSettings[3][TrackCount];
bool trackMIDI;
MidiInterfaceClass *MIDIFallbackClass;
void *segaSnd;

INLINE UINT16 ReadBE16(const UINT8* Data)
{
@@ -782,6 +783,9 @@ class SMPSInterfaceClass : MidiInterfaceClass

if (EnableSKCHacks)
{
hres = FindResource(moduleHandle, MAKEINTRESOURCE(IDR_MISC_SEGA), _T("MISC"));
segaSnd = LockResource(LoadResource(moduleHandle, hres));

HMODULE midimodule = LoadLibrary(_T("MIDIOUTY.DLL"));
if (midimodule)
{
@@ -1157,6 +1161,13 @@ class SMPSInterfaceClass : MidiInterfaceClass

BOOL stop_song()
{
if (EnableSKCHacks)
{
if (reg_d0 == 0xFF)
return PlaySound((LPCTSTR)segaSnd, NULL, SND_MEMORY | SND_ASYNC);
else if (reg_d0 == 0xFE)
return PlaySound(NULL, NULL, SND_ASYNC);
}
if (trackMIDI)
return MIDIFallbackClass->stop_song();
if (EnableSKCHacks && reg_d0 == 0xE1)
@@ -257,3 +257,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDR_MISC_FM_DRUMS MISC ".\\Data\\Drums_FM_Columns3.bin"


LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDR_MISC_SEGA MISC ".\\Data\\SEGA.wav"


@@ -66,3 +66,4 @@
#define IDR_MISC_PSG_S3 203
#define IDR_MISC_PSG_S2 204
#define IDR_MISC_FM_DRUMS 205
#define IDR_MISC_SEGA 206

0 comments on commit 4a950a4

Please sign in to comment.