mirror of https://github.com/snes9xgit/snes9x.git
Unload MSU-1 files on reset
This commit is contained in:
parent
c240cd3634
commit
907cf3efa8
2
cpu.cpp
2
cpu.cpp
|
@ -295,6 +295,7 @@ void S9xReset (void)
|
|||
S9xResetPPU();
|
||||
S9xResetDMA();
|
||||
S9xResetAPU();
|
||||
S9xResetMSU();
|
||||
|
||||
if (Settings.DSP)
|
||||
S9xResetDSP();
|
||||
|
@ -331,6 +332,7 @@ void S9xSoftReset (void)
|
|||
S9xSoftResetPPU();
|
||||
S9xResetDMA();
|
||||
S9xSoftResetAPU();
|
||||
S9xResetMSU();
|
||||
|
||||
if (Settings.DSP)
|
||||
S9xResetDSP();
|
||||
|
|
|
@ -1275,12 +1275,6 @@ static bool8 is_GNEXT_Add_On (const uint8 *data, uint32 size)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
static bool8 MsuRomExists (void)
|
||||
{
|
||||
struct stat buf;
|
||||
return (stat(S9xGetFilename(".msu", ROMFILENAME_DIR), &buf) == 0);
|
||||
}
|
||||
|
||||
int CMemory::ScoreHiROM (bool8 skip_header, int32 romoff)
|
||||
{
|
||||
uint8 *buf = ROM + 0xff00 + romoff + (skip_header ? 0x200 : 0);
|
||||
|
@ -2547,7 +2541,7 @@ void CMemory::InitROM (void)
|
|||
}
|
||||
|
||||
// MSU1
|
||||
Settings.MSU1 = MsuRomExists();
|
||||
Settings.MSU1 = S9xMSU1ROMExists();
|
||||
|
||||
//// Map memory and calculate checksum
|
||||
|
||||
|
|
14
msu1.cpp
14
msu1.cpp
|
@ -251,7 +251,7 @@ bool DataOpen()
|
|||
return dataFile.is_open();
|
||||
}
|
||||
|
||||
void S9xMSU1Init(void)
|
||||
void S9xResetMSU(void)
|
||||
{
|
||||
MSU1.MSU1_STATUS = 0;
|
||||
MSU1.MSU1_DATA_SEEK = 0;
|
||||
|
@ -277,9 +277,21 @@ void S9xMSU1Init(void)
|
|||
if (audioFile.is_open())
|
||||
audioFile.close();
|
||||
|
||||
Settings.MSU1 = S9xMSU1ROMExists();
|
||||
}
|
||||
|
||||
void S9xMSU1Init(void)
|
||||
{
|
||||
S9xResetMSU();
|
||||
DataOpen();
|
||||
}
|
||||
|
||||
bool S9xMSU1ROMExists(void)
|
||||
{
|
||||
struct stat buf;
|
||||
return (stat(S9xGetFilename(".msu", ROMFILENAME_DIR), &buf) == 0);
|
||||
}
|
||||
|
||||
void S9xMSU1Generate(int sample_count)
|
||||
{
|
||||
partial_samples += 441000 * sample_count;
|
||||
|
|
Loading…
Reference in New Issue