mirror of
https://github.com/rvtr/GodMode9i.git
synced 2025-11-02 00:11:07 -04:00
Fix MEP RAM drive not showing
Moved first 8 sectors of MEP RAM drive to Main RAM
This commit is contained in:
parent
48b54d5d68
commit
f4d324d2ba
@ -335,7 +335,7 @@ void driveMenu (void) {
|
||||
}
|
||||
} else if (dmOperations[dmCursorPosition] == DriveMenuOperation::ndsCard && (sdMounted || flashcardMounted)) {
|
||||
ndsCardDump();
|
||||
} else if (dmOperations[dmCursorPosition] == DriveMenuOperation::ramDrive && isDSiMode() && ramdriveMounted) {
|
||||
} else if (dmOperations[dmCursorPosition] == DriveMenuOperation::ramDrive && ramdriveMounted) {
|
||||
currentDrive = Drive::ramDrive;
|
||||
chdir("ram:/");
|
||||
screenMode = 1;
|
||||
|
||||
@ -323,7 +323,7 @@ void ramdriveMount(bool ram32MB) {
|
||||
if(isDSiMode()) {
|
||||
ramdSectors = ram32MB ? 0xC800 : 0x4800;
|
||||
} else {
|
||||
ramdSectors = 0x4000;
|
||||
ramdSectors = 0x8 + 0x4000;
|
||||
}
|
||||
|
||||
fatMountSimple("ram", &io_ram_drive);
|
||||
|
||||
@ -15,12 +15,14 @@ const static u8 bootSector[] = {
|
||||
|
||||
u32 ramdSectors = 0;
|
||||
u8* ramdLoc = (u8*)NULL;
|
||||
u8* ramdLocMep = (u8*)NULL;
|
||||
|
||||
bool ramd_startup() {
|
||||
if(isDSiMode()) {
|
||||
ramdLoc = (u8*)malloc(0x4800 * SECTOR_SIZE);
|
||||
} else {
|
||||
ramdLoc = (u8*)0x09000000;
|
||||
ramdLoc = (u8*)malloc(0x8 * SECTOR_SIZE);
|
||||
ramdLocMep = (u8*)0x09000000;
|
||||
}
|
||||
|
||||
tonccpy(ramdLoc, bootSector, sizeof(bootSector));
|
||||
@ -43,9 +45,12 @@ bool ramd_read_sectors(sec_t sector, sec_t numSectors, void *buffer) {
|
||||
tonccpy(buffer, (void*)0x0D000000 + ((sector - 0x4800) << 9), numSectors << 9);
|
||||
return true;
|
||||
}
|
||||
} else if(sector < ramdSectors) {
|
||||
} else if(sector < 0x8) {
|
||||
tonccpy(buffer, ramdLoc + (sector << 9), numSectors << 9);
|
||||
return true;
|
||||
} else if(sector <= ramdSectors - 0x8) {
|
||||
tonccpy(buffer, ramdLocMep + ((sector - 0x8) << 9), numSectors << 9);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -60,9 +65,12 @@ bool ramd_write_sectors(sec_t sector, sec_t numSectors, const void *buffer) {
|
||||
tonccpy((void*)0x0D000000 + ((sector - 0x4800) << 9), buffer, numSectors << 9);
|
||||
return true;
|
||||
}
|
||||
} else if(sector < ramdSectors) {
|
||||
} else if(sector < 0x8) {
|
||||
tonccpy(ramdLoc + (sector << 9), buffer, numSectors << 9);
|
||||
return true;
|
||||
} else if(sector <= ramdSectors - 0x8) {
|
||||
tonccpy(ramdLocMep + ((sector - 0x8) << 9), buffer, numSectors << 9);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user