mirror of
https://github.com/CTCaer/hekate
synced 2024-11-20 10:59:26 +00:00
4160037c81
Using the key `emupath` on a boot entry will load the selected emuMMC. This can also be forced by using the correct boot cfg storage bit and writing the path at the emummc path offset. Check readme for these. This can only be used if the emuMMC was created via Nyx. because of the raw_based and file_based files that have emuMMC info. (emupath=emuMMC/RAW1, emupath=emuMMC/SD00, etc)
60 lines
No EOL
1.6 KiB
C
60 lines
No EOL
1.6 KiB
C
/*
|
|
* Copyright (c) 2019 CTCaer
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef EMUMMC_H
|
|
#define EMUMMC_H
|
|
|
|
#include "sdmmc.h"
|
|
#include "../utils/types.h"
|
|
|
|
typedef enum
|
|
{
|
|
EMUMMC_TYPE_NONE = 0,
|
|
EMUMMC_TYPE_PARTITION = 1,
|
|
EMUMMC_TYPE_FILES = 2,
|
|
} emummc_type_t;
|
|
|
|
typedef enum {
|
|
EMUMMC_MMC_NAND = 0,
|
|
EMUMMC_MMC_SD = 1,
|
|
EMUMMC_MMC_GC = 2,
|
|
} emummc_mmc_t;
|
|
|
|
typedef struct _emummc_cfg_t
|
|
{
|
|
int enabled;
|
|
u64 sector;
|
|
u16 id;
|
|
char *path;
|
|
char *nintendo_path;
|
|
// Internal.
|
|
char *emummc_file_based_path;
|
|
u32 file_based_part_size;
|
|
u32 active_part;
|
|
int fs_ver;
|
|
} emummc_cfg_t;
|
|
|
|
emummc_cfg_t emu_cfg;
|
|
|
|
void emummc_load_cfg();
|
|
void emummc_set_path(char *path);
|
|
int emummc_storage_init_mmc(sdmmc_storage_t *storage, sdmmc_t *sdmmc);
|
|
int emummc_storage_end(sdmmc_storage_t *storage);
|
|
int emummc_storage_read(sdmmc_storage_t *storage, u32 sector, u32 num_sectors, void *buf);
|
|
int emummc_storage_write(sdmmc_storage_t *storage, u32 sector, u32 num_sectors, void *buf);
|
|
int emummc_storage_set_mmc_partition(sdmmc_storage_t *storage, u32 partition);
|
|
|
|
#endif |