notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
plugin_lib: fix a silly crash
[pcsx_rearmed.git]
/
libpcsxcore
/
psxdma.h
diff --git
a/libpcsxcore/psxdma.h
b/libpcsxcore/psxdma.h
index
28495fa
..
eaddb38
100644
(file)
--- a/
libpcsxcore/psxdma.h
+++ b/
libpcsxcore/psxdma.h
@@
-79,6
+79,17
@@
void gpuInterrupt();
void spuInterrupt();
void gpuotcInterrupt();
void spuInterrupt();
void gpuotcInterrupt();
+static inline void *getDmaRam(u32 madr, u32 *max_words)
+{
+ // this should wrap instead of limit
+ if (!(madr & 0x800000)) {
+ madr &= 0x1ffffc;
+ *max_words = (0x200000 - madr) / 4;
+ return psxM + madr;
+ }
+ return INVALID_PTR;
+}
+
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif