diff options
author | jrz <93400052+jrz3@users.noreply.github.com> | 2021-10-31 10:28:32 -0500 |
---|---|---|
committer | jrz <93400052+jrz3@users.noreply.github.com> | 2021-10-31 10:28:32 -0500 |
commit | 0cd12ebc6470cf7c4d8b06c9368941cf60ab6ad3 (patch) | |
tree | ad0fde5e6b89d853465b115b10eeff534f6f8fab | |
parent | 559932ee42b68b443cb9b3a26ef78cc81fd0bb2f (diff) |
Edited some variabled which changed name in commit 6aaf50ee27c175c8e54c7299fdc86d90b0b29187
-rw-r--r-- | Implementing-ipatix's-High-Quality-Audio-Mixer.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Implementing-ipatix's-High-Quality-Audio-Mixer.md b/Implementing-ipatix's-High-Quality-Audio-Mixer.md index 4d710ca..0a1651c 100644 --- a/Implementing-ipatix's-High-Quality-Audio-Mixer.md +++ b/Implementing-ipatix's-High-Quality-Audio-Mixer.md @@ -41,15 +41,15 @@ We have finished "inserting" the mixer, but DO NOT COMPILE YET. It will fail, an ### Making Room in RAM The one downside to the new mixer is that it does require more RAM than the default mixer due to the increased code size and additional mixing buffer. IWRAM is precious in GBA programming, but it is also incredibly limited (you only have 32KB). Luckily for us, there are structures that we can move from IWRAM to EWRAM without affecting the gameplay--this will allow us to make room for our new mixer. -We will be moving two structs that store data related to the RFU--that is, the Wireless Adapter. These two structs are `Rfu` and `gf_rfu_REQ_api`, both located in [src/link_rfu_2.c](https://github.com/pret/pokeemerald/blob/master/src/link_rfu_2.c). If you head to that file, you will see these two lines starting at line 44: +We will be moving two structs that store data related to the RFU--that is, the Wireless Adapter. These two structs are `gRfu` and `gRfuAPIBuffer`, both located in [src/link_rfu_2.c](https://github.com/pret/pokeemerald/blob/master/src/link_rfu_2.c). If you head to that file, you will see these two lines starting at line 44: ```c -u32 gf_rfu_REQ_api[RFU_API_BUFF_SIZE_RAM / 4]; -struct GFRfuManager Rfu; +u32 gRfuAPIBuffer[RFU_API_BUFF_SIZE_RAM / 4]; +struct RfuManager gRfu; ``` To move these to EWRAM, change these two lines to: ```c -EWRAM_DATA u32 gf_rfu_REQ_api[RFU_API_BUFF_SIZE_RAM / 4] = {}; -EWRAM_DATA struct GFRfuManager Rfu = {}; +EWRAM_DATA u32 gRfuAPIBuffer[RFU_API_BUFF_SIZE_RAM / 4] = {}; +EWRAM_DATA struct RfuManager gRfu = {}; ``` 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: |