From 5bfa25cfef4afe9d9c6447a420101a10202a0afb Mon Sep 17 00:00:00 2001 From: Kurausukun Date: Wed, 19 May 2021 14:13:28 -0400 Subject: add instructions for removing rfu ewram check --- Implementing-ipatix's-High-Quality-Audio-Mixer.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Implementing-ipatix's-High-Quality-Audio-Mixer.md b/Implementing-ipatix's-High-Quality-Audio-Mixer.md index 3bc0433..29e7a92 100644 --- a/Implementing-ipatix's-High-Quality-Audio-Mixer.md +++ b/Implementing-ipatix's-High-Quality-Audio-Mixer.md @@ -51,6 +51,12 @@ To move these to EWRAM, change these two lines to: EWRAM_DATA u32 gf_rfu_REQ_api[RFU_API_BUFF_SIZE_RAM / 4] = {}; EWRAM_DATA struct GFRfuManager Rfu = {}; ``` + +Next, we need to go to [librfu_rfu](https://github.com/pret/pokeemerald/blob/master/src/librfu_rfu.c) to make a small code change to allow the Wireless Adapter to function with these structs in EWRAM. Scrolling down to [line 134](https://github.com/pret/pokeemerald/blob/master/src/librfu_rfu.c#L134) will reveal there is actually a check to see if the structs are in EWRAM, and if the check returns true, it will send an error and not allow the usage of the Wireless Adapter. I have confirmed that this works on console, so I am not sure what the purpose of this check is, but all we need to do is comment out or delete the two lines: +```diff +-if (((uintptr_t)APIBuffer & 0xF000000) == 0x2000000 && copyInterruptToRam) +- return ERR_RFU_API_BUFF_ADR; +``` Next, go to [sym_common.txt](https://github.com/pret/pokeemerald/blob/master/sym_common.txt) and delete the line that says `.include "link_rfu_2.o"` on line 37: ```diff .include "AgbRfu_LinkManager.o" -- cgit v1.2.3