Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Miouyouyou/a35cd167b3e32487dfe80288121ffa37 to your computer and use it in GitHub Desktop.
Save Miouyouyou/a35cd167b3e32487dfe80288121ffa37 to your computer and use it in GitHub Desktop.
This patch is not needed anymore as it has been applied already : https://github.com/mupen64plus/mupen64plus-core/pull/503
Device: RDRAM: Use the R4300 helpers to get the R4300 registers
Since the "regs" member is not available on the r4300_core
structure when enabling ARM DYNAREC.
Signed-off-by: Miouyouyou (Myy) <[email protected]>
---
src/device/rdram/rdram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/device/rdram/rdram.c b/src/device/rdram/rdram.c
index 5bd33c3..39481f9 100644
--- a/src/device/rdram/rdram.c
+++ b/src/device/rdram/rdram.c
@@ -202,7 +202,7 @@ void write_rdram_regs(void* opaque, uint32_t address, uint32_t value, uint32_t m
/* HACK: In the IPL3 procedure, at this point,
* the amount of detected memory can be found in s4 */
- size_t ipl3_rdram_size = rdram->r4300->regs[20] & UINT32_C(0x0fffffff);
+ size_t ipl3_rdram_size = r4300_regs(rdram->r4300)[20] & UINT32_C(0x0fffffff);
if (ipl3_rdram_size != rdram->dram_size) {
DebugMessage(M64MSG_ERROR, "IPL3 detected %u MB of RDRAM != %u MB",
ipl3_rdram_size / (1024*1024), rdram->dram_size / (1024*1024));
--
2.14.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment