aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/ppf.h
diff options
context:
space:
mode:
authornotaz2011-02-15 14:14:00 +0200
committernotaz2011-02-15 14:14:00 +0200
commitae4e7dc990c2acd9cb208dd8fb02f1c96f915b7c (patch)
tree0026abde6b562e1a9506bd62984ce56ab40610d0 /libpcsxcore/ppf.h
parent122289173e2732c71a03584d6a34a0382725f020 (diff)
downloadpcsx_rearmed-ae4e7dc990c2acd9cb208dd8fb02f1c96f915b7c.tar.gz
pcsx_rearmed-ae4e7dc990c2acd9cb208dd8fb02f1c96f915b7c.tar.bz2
pcsx_rearmed-ae4e7dc990c2acd9cb208dd8fb02f1c96f915b7c.zip
add redump.org SBI support
This is based on PCSX-Reloaded (as usual) but done a bit different, loaded as .sub file instead of as ppf patch.
Diffstat (limited to 'libpcsxcore/ppf.h')
-rw-r--r--libpcsxcore/ppf.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libpcsxcore/ppf.h b/libpcsxcore/ppf.h
index f578028..fdb11eb 100644
--- a/libpcsxcore/ppf.h
+++ b/libpcsxcore/ppf.h
@@ -27,6 +27,21 @@ void BuildPPFCache();
void FreePPFCache();
void CheckPPFCache(unsigned char *pB, unsigned char m, unsigned char s, unsigned char f);
+int LoadSBI(const char *fname, int sector_count);
+void UnloadSBI(void);
+
+extern unsigned char *sbi_sectors;
+
+static inline int CheckSBI(const u8 *t)
+{
+ int s;
+ if (sbi_sectors == NULL)
+ return 0;
+
+ s = MSF2SECT(btoi(t[0]), btoi(t[1]), btoi(t[2]));
+ return (sbi_sectors[s >> 3] >> (s & 7)) & 1;
+}
+
#ifdef __cplusplus
}
#endif