fix indicators, add emmc_mount, various fixes

This commit is contained in:
Christoph Baumann
2025-04-29 12:36:32 +02:00
parent 31c8ad0d88
commit 28796b417b
6 changed files with 792 additions and 423 deletions

View File

@@ -21,6 +21,7 @@
static u32 sd_rsvd_sectors = 0;
static u32 ramdisk_sectors = 0;
static u32 emummc_sectors = 0;
static u32 sfd_sectors = 0;
static bool ensure_partition(BYTE pdrv){
u8 part;
@@ -99,7 +100,7 @@ DRESULT disk_read (
case DRIVE_BOOT1:
return sdmmc_storage_read(&emmc_storage, sector, count, buff) ? RES_OK : RES_ERROR;
case DRIVE_SFD:
return sfd_read(sector, count ,buff) ? RES_OK : RES_ERROR;
return sfd_read(sector, count, buff) ? RES_OK : RES_ERROR;
}
return RES_ERROR;
@@ -187,8 +188,16 @@ DRESULT disk_ioctl (
*buf = 32768; // Align to 16MB.
break;
}
}
else // Catch all for unknown devices.
}else if(pdrv == DRIVE_SFD){
switch(cmd){
case GET_SECTOR_COUNT:
*buf = sfd_sectors;
break;
case GET_BLOCK_SIZE:
*buf = 32768;
break;
}
}else // Catch all for unknown devices.
{
switch (cmd)
{
@@ -225,6 +234,9 @@ DRESULT disk_set_info (
case DRIVE_EMU:
emummc_sectors = *buf;
break;
case DRIVE_SFD:
sfd_sectors = *buf;
break;
}
}