Fix not swapping MMU mode back

This commit is contained in:
Zane Kaminski 2021-04-02 05:38:28 -04:00
parent e4b2775f11
commit 59e48ee41e
3 changed files with 9 additions and 5 deletions

Binary file not shown.

Binary file not shown.

14
rdisk.c
View File

@ -45,7 +45,7 @@ static void RDDecodeSettings(Ptr unmountEN, Ptr mountEN, Ptr ramEN, Ptr dbgEN, P
// Switch to 32-bit mode and copy
#pragma parameter C24(__A0, __A1, __D0)
void C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) {
void __attribute__ ((noinline)) C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) {
signed char mode = true32b;
SwapMMUMode(&mode);
BlockMove(sourcePtr, destPtr, byteCount);
@ -53,21 +53,25 @@ void C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) {
}
// Switch to 32-bit mode and get
#pragma parameter G24(__A2)
#pragma parameter __D0 G24(__A2)
char __attribute__ ((noinline)) G24(Ptr pos) {
long ret;
signed char mode = true32b;
SwapMMUMode(&mode);
return *pos; // Peek
ret = *pos; // Peek
SwapMMUMode(&mode);
return ret;
}
// Switch to 32-bit mode and get
#pragma parameter G24L(__A2)
#pragma parameter __D0 G24L(__A2)
long __attribute__ ((noinline)) G24L(long *pos) {
long ret;
signed char mode = true32b;
SwapMMUMode(&mode);
return *pos; // Peek
ret = *pos; // Peek
SwapMMUMode(&mode);
return ret;
}
// Switch to 32-bit mode and set