Skip to content

Commit

Permalink
Update Mednafen to 1.24.3
Browse files Browse the repository at this point in the history
  • Loading branch information
clobber committed May 5, 2020
1 parent 930bff6 commit e1708ac
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.24.2</string>
<string>1.24.3</string>
<key>NSPrincipalClass</key>
<string>OEGameCoreController</string>
<key>OEGameCoreClass</key>
Expand Down
8 changes: 4 additions & 4 deletions Mednafen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4752,9 +4752,9 @@
OTHER_CFLAGS = (
"-fwrapv",
"-DHAVE_MKDIR",
"-DMEDNAFEN_VERSION=\\\"1.24.2\\\"",
"-DMEDNAFEN_VERSION=\\\"1.24.3\\\"",
"-DPACKAGE=\\\"mednafen\\\"",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102402",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102403",
"-DPSS_STYLE=1",
"-DMPC_FIXED_POINT",
"-DARCH_X86",
Expand Down Expand Up @@ -4818,9 +4818,9 @@
OTHER_CFLAGS = (
"-fwrapv",
"-DHAVE_MKDIR",
"-DMEDNAFEN_VERSION=\\\"1.24.2\\\"",
"-DMEDNAFEN_VERSION=\\\"1.24.3\\\"",
"-DPACKAGE=\\\"mednafen\\\"",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102402",
"-DMEDNAFEN_VERSION_NUMERIC=0x00102403",
"-DPSS_STYLE=1",
"-DMPC_FIXED_POINT",
"-DARCH_X86",
Expand Down
1 change: 1 addition & 0 deletions mednafen/ss/notes/HOST-CPU-INTENSIVE-GAMES
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Burning Rangers
Courier Crisis (most intensive game?)
Dungeon Master Nexus
DecAthlete
Grandia (FMV)
Last Bronx
Expand Down
7 changes: 5 additions & 2 deletions mednafen/ss/notes/PROBLEMATIC-GAMES
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,12 @@ Primal Rage


-------------------------------------------------------------------------------
Rely on SCSP 18-bit DAC enable
Rely on rarely-used SCSP features
-------------------------------------------------------------------------------
Daytona USA
Daytona USA - 18-bit DAC enable

Sega Ages: OutRun - Enables short waveform mode for the engine sound effect
at high engine speeds, adding a metallic roughness to the sound.


-------------------------------------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions mednafen/ss/scsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class SS_SCSP
uint32 StartAddr; // 20 bits, memory address.
uint16 LoopStart; // 16 bits, in samples.
uint16 LoopEnd; // 16 bits, in samples.
uint32 ShortWaveMask;
//
bool KeyBit;
//
Expand Down Expand Up @@ -140,8 +139,10 @@ class SS_SCSP
int16 EffectVolume[2]; // 1.14 fixed point, derived from EFSDL and EFPAN
//
//
uint32 PhaseWhacker;
uint32 ShortWaveMask;
bool ShortWave;
uint16 CurrentAddr;
uint32 PhaseWhacker;
bool InLoop;
bool LoopSub;
bool WFAllowAccess;
Expand All @@ -155,6 +156,8 @@ class SS_SCSP

uint16 EXTS[2];

void RecalcShortWaveMask(Slot* s);

void RunEG(Slot* s, const unsigned key_eg_scale);

uint8 GetALFO(Slot* s);
Expand Down
17 changes: 16 additions & 1 deletion mednafen/ss/scsp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ void SS_SCSP::RecalcMainInt(void) // Main CPU interrupts
SCSP_MainIntChanged((bool)(MCIPD & MCIEB));
}

INLINE void SS_SCSP::RecalcShortWaveMask(Slot* s)
{
const unsigned lev = s->LoopEnd & 0x780;

s->ShortWaveMask = 0xFFFFFFFF;
if(s->ShortWave && lev)
s->ShortWaveMask = (1U << MDFN_tzcount16(lev)) - 1;
}

void SS_SCSP::Reset(bool powering_up)
{
//
Expand All @@ -112,6 +121,8 @@ void SS_SCSP::Reset(bool powering_up)
Slots[i].EnvPhase = ENV_PHASE_RELEASE;

Slots[i].LFOTimeCounter = 1;
//
RecalcShortWaveMask(&Slots[i]);
}

for(unsigned i = 0; i < 2; i++)
Expand Down Expand Up @@ -268,6 +279,8 @@ INLINE void SS_SCSP::RW(uint32 A, T& DBV)

case 0x03:
s->LoopEnd = SRV;
//
RecalcShortWaveMask(s);
break;

case 0x04:
Expand Down Expand Up @@ -306,7 +319,9 @@ INLINE void SS_SCSP::RW(uint32 A, T& DBV)
case 0x08:
s->FreqNum = SRV & 0x7FF;
s->Octave = (SRV >> 11) & 0xF;
s->ShortWaveMask = (SRV & 0x8000) ? 0x7F : 0xFFFFFFFF;
s->ShortWave = (SRV >> 15) & 0x1;
//
RecalcShortWaveMask(s);
break;

case 0x09:
Expand Down

0 comments on commit e1708ac

Please sign in to comment.