Add support for file/partition based emummc on emmc,
Add support for emuSD
This commit is contained in:
5
fusee/program/source/fatfs/ff.h
vendored
5
fusee/program/source/fatfs/ff.h
vendored
@@ -172,8 +172,7 @@ typedef struct {
|
||||
LBA_t bitbase; /* Allocation bitmap base sector */
|
||||
#endif
|
||||
LBA_t winsect; /* Current sector appearing in the win[] */
|
||||
BYTE pad[4];
|
||||
BYTE win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */
|
||||
__attribute__((aligned(8))) BYTE win[FF_MAX_SS]; /* Disk access window for Directory, FAT (and file data at tiny cfg) */
|
||||
} FATFS;
|
||||
|
||||
|
||||
@@ -218,7 +217,7 @@ typedef struct {
|
||||
DWORD* cltbl; /* Pointer to the cluster link map table (nulled on open, set by application) */
|
||||
#endif
|
||||
#if !FF_FS_TINY
|
||||
BYTE buf[FF_MAX_SS]; /* File private data read/write window */
|
||||
__attribute__((aligned(8))) BYTE buf[FF_MAX_SS]; /* File private data read/write window */
|
||||
#endif
|
||||
} FIL;
|
||||
|
||||
|
||||
5
fusee/program/source/fatfs/fusee_diskio.cpp
vendored
5
fusee/program/source/fatfs/fusee_diskio.cpp
vendored
@@ -16,7 +16,7 @@
|
||||
#include <exosphere.hpp>
|
||||
#include "diskio_cpp.h"
|
||||
#include "../fusee_sd_card.hpp"
|
||||
#include "../fusee_emummc.hpp"
|
||||
#include "../fusee_mmc.hpp"
|
||||
|
||||
bool diskio_read_sd_card(void *dst, size_t size, size_t sector_index, size_t sector_count) {
|
||||
return R_SUCCEEDED(::ams::nxboot::ReadSdCard(dst, size, sector_index, sector_count));
|
||||
@@ -27,9 +27,10 @@ bool diskio_write_sd_card(size_t sector_index, size_t sector_count, const void *
|
||||
}
|
||||
|
||||
bool diskio_read_system(void *dst, size_t size, size_t sector_index, size_t sector_count) {
|
||||
return false;
|
||||
return R_SUCCEEDED(::ams::nxboot::ReadMmc(dst, size, ::ams::sdmmc::MmcPartition::MmcPartition_UserData, sector_index, sector_count));
|
||||
}
|
||||
|
||||
bool diskio_write_system(size_t sector_index, size_t sector_count, const void *src, size_t size) {
|
||||
/* Don't allow writes to eMMC GPP partition */
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user