void mmssdd( char *b, char *p )
{
int m, s, d;
-#if defined(__BIGENDIAN__)
+#if defined(__arm__)
+ int block = (b[3] << 24) | (b[2] << 16) | (b[1] << 8) | b[0];
+#elif defined(__BIGENDIAN__)
int block = (b[0] & 0xff) | ((b[1] & 0xff) << 8) | ((b[2] & 0xff) << 16) | (b[3] << 24);
#else
int block = *((int*)b);
// Savestate Versioning!
// If you make changes to the savestate version, please increment the value below.
-static const u32 SaveVersion = 0x8b410004;
+static const u32 SaveVersion = 0x8b410006;
int SaveState(const char *file) {
gzFile f;
f = gzopen(file, "wb");
if (f == NULL) return -1;
+ new_dyna_save();
+
gzwrite(f, (void *)PcsxHeader, 32);
gzwrite(f, (void *)&SaveVersion, sizeof(u32));
gzwrite(f, (void *)&Config.HLE, sizeof(boolean));
gzread(f, &version, sizeof(u32));
gzread(f, &hle, sizeof(boolean));
- if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE) {
+ if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion) {
gzclose(f);
return -1;
}
+ Config.HLE = hle;
+
+ if (Config.HLE)
+ psxBiosInit();
psxCpu->Reset();
gzseek(f, 128 * 96 * 3, SEEK_CUR);
mdecFreeze(f, 0);
gzclose(f);
+ new_dyna_restore();
return 0;
}
gzclose(f);
- if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE)
+ if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion)
return -1;
return 0;