mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-12-26 12:29:19 +00:00
Fix not swapping MMU mode back
This commit is contained in:
parent
e4b2775f11
commit
59e48ee41e
Binary file not shown.
BIN
bin/rom8M.bin
BIN
bin/rom8M.bin
Binary file not shown.
14
rdisk.c
14
rdisk.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user