diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-06-26 01:01:05 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-06-26 01:01:05 +0000 |
| commit | 306902a14b95908dfb49ce1e5c41edf90f61eaa3 (patch) | |
| tree | 30be174f00d3f32843d093a51c069ec23c144262 | |
| parent | 72524b9a4e45a26cd598474aa1302d95080f7fcf (diff) | |
| download | pcsxr-306902a14b95908dfb49ce1e5c41edf90f61eaa3.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@53626 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | libpcsxcore/misc.c | 21 | ||||
| -rw-r--r-- | libpcsxcore/psxbios.c | 2 |
3 files changed, 19 insertions, 14 deletions
@@ -1,8 +1,16 @@ +Jun 26, 2010 Wei Mingzhi <whistler_wmz@users.sf.net> + + * libpcsxcore/psxbios.c: Fixed bcopy() (FF9 battle crash with HLE BIOS - my + mistake :( ). + * libpcsxcore/misc.c: Added check for HLE BIOS in savestate, bumped savestate + version, don't byteswap savestate version as part of savestate data is not + endianness clean. + Jun 24, 2010 Wei Mingzhi <whistler_wmz@users.sf.net> * plugins/dfsound/spu.c: Reset lastch to -1 in SPUinit(). * plugins/dfsound/psemu.c: Removed support for obsoleted ancient API. - * plugins/dfsound/Makefile.am: Removed psemu.c.
+ * plugins/dfsound/Makefile.am: Removed psemu.c. * macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj: Likewise. Jun 23, 2010 Wei Mingzhi <whistler_wmz@users.sf.net> diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 8d99ef91..b7b56cbc 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -456,7 +456,7 @@ static const char PcsxHeader[32] = "STv4 PCSX v" PACKAGE_VERSION; // Savestate Versioning! // If you make changes to the savestate version, please increment the value below. -static const u32 SaveVersion = SWAPu32(0x8b410003); +static const u32 SaveVersion = 0x8b410004; int SaveState(const char *file) { gzFile f; @@ -469,7 +469,8 @@ int SaveState(const char *file) { if (f == NULL) return -1; gzwrite(f, (void *)PcsxHeader, 32); - gzwrite(f, (void *)&SaveVersion, sizeof(SaveVersion)); + gzwrite(f, (void *)&SaveVersion, sizeof(u32)); + gzwrite(f, (void *)&Config.HLE, sizeof(boolean)); pMem = (unsigned char *)malloc(128 * 96 * 3); if (pMem == NULL) return -1; @@ -520,14 +521,16 @@ int LoadState(const char *file) { int Size; char header[32]; u32 version; + boolean hle; f = gzopen(file, "rb"); if (f == NULL) return -1; gzread(f, header, sizeof(header)); gzread(f, &version, sizeof(u32)); + gzread(f, &hle, sizeof(boolean)); - if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion) { + if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE) { gzclose(f); return -1; } @@ -571,16 +574,18 @@ int CheckState(const char *file) { gzFile f; char header[32]; u32 version; + boolean hle; f = gzopen(file, "rb"); if (f == NULL) return -1; gzread(f, header, sizeof(header)); gzread(f, &version, sizeof(u32)); + gzread(f, &hle, sizeof(boolean)); gzclose(f); - if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion) + if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE) return -1; return 0; @@ -592,8 +597,6 @@ int SendPcsxInfo() { if (NET_recvData == NULL || NET_sendData == NULL) return 0; -// SysPrintf("SendPcsxInfo\n"); - NET_sendData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); NET_sendData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING); NET_sendData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING); @@ -601,8 +604,6 @@ int SendPcsxInfo() { NET_sendData(&Config.PsxType, sizeof(Config.PsxType), PSE_NET_BLOCKING); NET_sendData(&Config.Cpu, sizeof(Config.Cpu), PSE_NET_BLOCKING); -// SysPrintf("Send OK\n"); - return 0; } @@ -612,8 +613,6 @@ int RecvPcsxInfo() { if (NET_recvData == NULL || NET_sendData == NULL) return 0; -// SysPrintf("RecvPcsxInfo\n"); - NET_recvData(&Config.Xa, sizeof(Config.Xa), PSE_NET_BLOCKING); NET_recvData(&Config.Sio, sizeof(Config.Sio), PSE_NET_BLOCKING); NET_recvData(&Config.SpuIrq, sizeof(Config.SpuIrq), PSE_NET_BLOCKING); @@ -638,8 +637,6 @@ int RecvPcsxInfo() { psxCpu->Reset(); } -// SysPrintf("Recv OK\n"); - return 0; } diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index 25313780..f2751b86 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -607,7 +607,7 @@ void psxBios_tolower() { // 0x26 void psxBios_bcopy() { // 0x27 char *p1 = (char *)Ra1, *p2 = (char *)Ra0; - while (a3-- > 0) *p1++ = *p2++; + while (a2-- > 0) *p1++ = *p2++; pc0 = ra; } |
