/*1* Copyright (c) 2019-2021 CTCaer2*3* This program is free software; you can redistribute it and/or modify it4* under the terms and conditions of the GNU General Public License,5* version 2, as published by the Free Software Foundation.6*7* This program is distributed in the hope it will be useful, but WITHOUT8* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or9* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for10* more details.11*12* You should have received a copy of the GNU General Public License13* along with this program. If not, see <http://www.gnu.org/licenses/>.14*/1516#ifndef EMUMMC_H17#define EMUMMC_H1819#include <bdk.h>2021typedef enum22{23EMUMMC_TYPE_NONE = 0,24EMUMMC_TYPE_PARTITION = 1,25EMUMMC_TYPE_FILES = 2,26} emummc_type_t;2728typedef enum {29EMUMMC_MMC_NAND = 0,30EMUMMC_MMC_SD = 1,31EMUMMC_MMC_GC = 2,32} emummc_mmc_t;3334typedef struct _emummc_cfg_t35{36int enabled;37u64 sector;38u32 id;39char *path;40char *nintendo_path;41// Internal.42char *emummc_file_based_path;43u32 file_based_part_size;44u32 active_part;45int fs_ver;46} emummc_cfg_t;4748extern emummc_cfg_t emu_cfg;4950void emummc_load_cfg();51bool emummc_set_path(char *path);52int emummc_storage_init_mmc();53int emummc_storage_end();54int emummc_storage_read(u32 sector, u32 num_sectors, void *buf);55int emummc_storage_write(u32 sector, u32 num_sectors, void *buf);56int emummc_storage_set_mmc_partition(u32 partition);5758#endif5960