git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@53080 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
8b3e743e6b
commit
6aa1a8e807
22
ChangeLog
22
ChangeLog
|
@ -1,14 +1,26 @@
|
|||
Jun 21, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* libpcsxcore/psxbios.c: Use a separate flag to identify whether we are
|
||||
inside a softcall or not, as ra might be modified inside the interrupt
|
||||
handler.
|
||||
* libpcsxcore/psxbios.h: Likewise.
|
||||
* libpcsxcore/psxcommon.c: Likewise.
|
||||
* plugins/dfsound/spu.c: Moved initialization routine from SPUopen() into
|
||||
SPUinit().
|
||||
* plugins/dfsound/freeze.c: Save spuAddr as well.
|
||||
* po/Makefile.in.in: Silenced warning.
|
||||
|
||||
Jun 20, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* plugins/dfsound/freeze.c: Reset lastch when loading state, which fixes
|
||||
occasionally crash after state loading.
|
||||
* plugins/dfsound/spu.c: Likewise.
|
||||
|
||||
Jun 19, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* macosx/PcsxController.m: Do not simulate CD case open if user clicked
|
||||
Cancel in switch ISO dialog.
|
||||
|
||||
Jun 19, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* macosx/PcsxController.m: Do not simulate CD case open if user clicked
|
||||
Cancel in switch ISO dialog.
|
||||
|
||||
Jun 16, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
|
||||
|
||||
* libpcsxcore/psxcommon.c: Do not allow hotkeys inside a softcall from HLE
|
||||
|
|
|
@ -257,11 +257,17 @@ static TCB Thread[8];
|
|||
static int CurThread = 0;
|
||||
static FileDesc FDesc[32];
|
||||
|
||||
boolean hleSoftCall = FALSE;
|
||||
|
||||
static inline void softCall(u32 pc) {
|
||||
pc0 = pc;
|
||||
ra = 0x80001000;
|
||||
|
||||
hleSoftCall = TRUE;
|
||||
|
||||
while (pc0 != 0x80001000) psxCpu->ExecuteBlock();
|
||||
|
||||
hleSoftCall = FALSE;
|
||||
}
|
||||
|
||||
static inline void softCall2(u32 pc) {
|
||||
|
@ -269,8 +275,12 @@ static inline void softCall2(u32 pc) {
|
|||
pc0 = pc;
|
||||
ra = 0x80001000;
|
||||
|
||||
hleSoftCall = TRUE;
|
||||
|
||||
while (pc0 != 0x80001000) psxCpu->ExecuteBlock();
|
||||
ra = sra;
|
||||
|
||||
hleSoftCall = FALSE;
|
||||
}
|
||||
|
||||
static inline void DeliverEvent(u32 ev, u32 spec) {
|
||||
|
@ -2568,6 +2578,8 @@ void psxBiosInit() {
|
|||
|
||||
// memory size 2 MB
|
||||
psxHu32ref(0x1060) = SWAPu32(0x00000b88);
|
||||
|
||||
hleSoftCall = FALSE;
|
||||
}
|
||||
|
||||
void psxBiosShutdown() {
|
||||
|
|
|
@ -43,6 +43,8 @@ extern void (*biosA0[256])();
|
|||
extern void (*biosB0[256])();
|
||||
extern void (*biosC0[256])();
|
||||
|
||||
extern boolean hleSoftCall;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "psxcommon.h"
|
||||
#include "r3000a.h"
|
||||
#include "psxbios.h"
|
||||
|
||||
#include "cheat.h"
|
||||
#include "ppf.h"
|
||||
|
@ -52,7 +53,7 @@ void EmuShutdown() {
|
|||
|
||||
void EmuUpdate() {
|
||||
// Do not allow hotkeys inside a softcall from HLE BIOS
|
||||
if (!Config.HLE || psxRegs.GPR.n.ra != 0x80001000)
|
||||
if (!Config.HLE || !hleSoftCall)
|
||||
SysUpdate();
|
||||
|
||||
ApplyCheats();
|
||||
|
|
|
@ -42,7 +42,7 @@ typedef struct
|
|||
{
|
||||
unsigned short spuIrq;
|
||||
uint32_t pSpuIrq;
|
||||
uint32_t dummy0;
|
||||
uint32_t spuAddr;
|
||||
uint32_t dummy1;
|
||||
uint32_t dummy2;
|
||||
uint32_t dummy3;
|
||||
|
@ -55,8 +55,8 @@ typedef struct
|
|||
|
||||
void LoadStateV5(SPUFreeze_t * pF); // newest version
|
||||
void LoadStateUnknown(SPUFreeze_t * pF); // unknown format
|
||||
|
||||
extern int lastch;
|
||||
|
||||
extern int lastch;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// SPUFREEZE: called by main emu on savestate load/save
|
||||
|
@ -96,6 +96,9 @@ long CALLBACK SPUfreeze(uint32_t ulFreezeMode,SPUFreeze_t * pF)
|
|||
pFO->spuIrq=spuIrq;
|
||||
if(pSpuIrq) pFO->pSpuIrq = (unsigned long)pSpuIrq-(unsigned long)spuMemC;
|
||||
|
||||
pFO->spuAddr=spuAddr;
|
||||
if(pFO->spuAddr==0) pFO->spuAddr=0xffffffff;
|
||||
|
||||
for(i=0;i<MAXCHAN;i++)
|
||||
{
|
||||
memcpy((void *)&pFO->s_chan[i],(void *)&s_chan[i],sizeof(SPUCHAN));
|
||||
|
@ -125,14 +128,12 @@ long CALLBACK SPUfreeze(uint32_t ulFreezeMode,SPUFreeze_t * pF)
|
|||
|
||||
xapGlobal=0;
|
||||
|
||||
if(!strcmp(pF->szSPUName,"PBOSS") &&
|
||||
pF->ulFreezeVersion==5)
|
||||
LoadStateV5(pF);
|
||||
if(!strcmp(pF->szSPUName,"PBOSS") && pF->ulFreezeVersion==5)
|
||||
LoadStateV5(pF);
|
||||
else LoadStateUnknown(pF);
|
||||
|
||||
spuAddr = 0xffffffff;
|
||||
lastch = -1;
|
||||
|
||||
lastch = -1;
|
||||
|
||||
// repair some globals
|
||||
for(i=0;i<=62;i+=2)
|
||||
SPUwriteRegister(H_Reverb+i,regArea[(H_Reverb+i-0xc00)>>1]);
|
||||
|
@ -161,8 +162,14 @@ void LoadStateV5(SPUFreeze_t * pF)
|
|||
|
||||
pFO=(SPUOSSFreeze_t *)(pF+1);
|
||||
|
||||
spuIrq = pFO->spuIrq;
|
||||
if(pFO->pSpuIrq) pSpuIrq = pFO->pSpuIrq+spuMemC; else pSpuIrq=0;
|
||||
spuIrq = pFO->spuIrq;
|
||||
if(pFO->pSpuIrq) pSpuIrq = pFO->pSpuIrq+spuMemC; else pSpuIrq=NULL;
|
||||
|
||||
if(pFO->spuAddr)
|
||||
{
|
||||
spuAddr = pFO->spuAddr;
|
||||
if (spuAddr == 0xffffffff) spuAddr = 0;
|
||||
}
|
||||
|
||||
for(i=0;i<MAXCHAN;i++)
|
||||
{
|
||||
|
|
|
@ -814,18 +814,6 @@ void CALLBACK SPUplayCDDAchannel(short *pcm, int nbytes)
|
|||
FeedCDDA((unsigned char *)pcm, nbytes);
|
||||
}
|
||||
|
||||
// INIT/EXIT STUFF
|
||||
|
||||
// SPUINIT: this func will be called first by the main emu
|
||||
long CALLBACK SPUinit(void)
|
||||
{
|
||||
spuMemC=(unsigned char *)spuMem; // just small setup
|
||||
memset((void *)s_chan,0,MAXCHAN*sizeof(SPUCHAN));
|
||||
memset((void *)&rvb,0,sizeof(REVERBInfo));
|
||||
InitADSR();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// SETUPTIMER: init of certain buffers and threads/timers
|
||||
void SetupTimer(void)
|
||||
{
|
||||
|
@ -916,10 +904,14 @@ void RemoveStreams(void)
|
|||
CDDAStart = NULL;
|
||||
}
|
||||
|
||||
// SPUOPEN: called by main emu after init
|
||||
long SPUopen(void)
|
||||
// INIT/EXIT STUFF
|
||||
|
||||
// SPUINIT: this func will be called first by the main emu
|
||||
long CALLBACK SPUinit(void)
|
||||
{
|
||||
if (bSPUIsOpen) return 0; // security for some stupid main emus
|
||||
spuMemC = (unsigned char *)spuMem; // just small setup
|
||||
memset((void *)&rvb, 0, sizeof(REVERBInfo));
|
||||
InitADSR();
|
||||
|
||||
iVolume = 3;
|
||||
iReverbOff = -1;
|
||||
|
@ -934,11 +926,17 @@ long SPUopen(void)
|
|||
iSPUIRQWait = 1;
|
||||
|
||||
ReadConfig(); // read user stuff
|
||||
|
||||
SetupSound(); // setup sound (before init!)
|
||||
|
||||
SetupStreams(); // prepare streaming
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// SPUOPEN: called by main emu after init
|
||||
long CALLBACK SPUopen(void)
|
||||
{
|
||||
if (bSPUIsOpen) return 0; // security for some stupid main emus
|
||||
|
||||
SetupSound(); // setup sound (before init!)
|
||||
SetupTimer(); // timer for feeding data
|
||||
|
||||
bSPUIsOpen = 1;
|
||||
|
@ -949,22 +947,22 @@ long SPUopen(void)
|
|||
// SPUCLOSE: called before shutdown
|
||||
long CALLBACK SPUclose(void)
|
||||
{
|
||||
if (!bSPUIsOpen) return 0; // some security
|
||||
if (!bSPUIsOpen) return 0; // some security
|
||||
|
||||
bSPUIsOpen = 0; // no more open
|
||||
bSPUIsOpen = 0; // no more open
|
||||
|
||||
RemoveTimer(); // no more feeding
|
||||
|
||||
RemoveSound(); // no more sound handling
|
||||
|
||||
RemoveStreams(); // no more streaming
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// SPUSHUTDOWN: called by main emu on final exit
|
||||
long CALLBACK SPUshutdown(void)
|
||||
{
|
||||
SPUclose();
|
||||
RemoveStreams(); // no more streaming
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ VPATH = @srcdir@
|
|||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
libdir = @libdir@
|
||||
localedir = $(libdir)/locale
|
||||
gnulocaledir = $(datadir)/locale
|
||||
|
|
Loading…
Reference in New Issue