2019-06-14 14:37:25 +01:00
|
|
|
/*
|
2020-01-24 10:10:40 +00:00
|
|
|
* Copyright (c) 2018-2020 Atmosphère-NX
|
2019-06-14 14:37:25 +01:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
2019-06-19 07:54:53 +01:00
|
|
|
|
2019-06-14 14:37:25 +01:00
|
|
|
#ifndef EXOSPHERE_EMUMMC_CONFIG_H
|
|
|
|
#define EXOSPHERE_EMUMMC_CONFIG_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2019-12-09 11:58:48 +00:00
|
|
|
#include <vapours/ams_version.h>
|
2019-06-14 14:37:25 +01:00
|
|
|
|
|
|
|
/* "EFS0" */
|
|
|
|
#define MAGIC_EMUMMC_CONFIG (0x30534645)
|
|
|
|
|
|
|
|
#define EMUMMC_FILE_PATH_MAX (0x80)
|
|
|
|
|
|
|
|
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 enum {
|
|
|
|
FS_VER_1_0_0 = 0,
|
|
|
|
|
|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|
|
|
FS_VER_11_0_0_EXFAT,
|
|
|
|
|
2019-06-14 14:37:25 +01:00
|
|
|
FS_VER_MAX,
|
|
|
|
} emummc_fs_ver_t;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t magic;
|
|
|
|
uint32_t type;
|
|
|
|
uint32_t id;
|
|
|
|
uint32_t fs_version;
|
|
|
|
} emummc_base_config_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint64_t start_sector;
|
|
|
|
} emummc_partition_config_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char path[EMUMMC_FILE_PATH_MAX];
|
|
|
|
} emummc_file_config_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
emummc_base_config_t base_cfg;
|
|
|
|
union {
|
|
|
|
emummc_partition_config_t partition_cfg;
|
|
|
|
emummc_file_config_t file_cfg;
|
|
|
|
};
|
2019-06-15 05:20:53 +01:00
|
|
|
char emu_dir_path[EMUMMC_FILE_PATH_MAX];
|
2019-06-14 14:37:25 +01:00
|
|
|
} exo_emummc_config_t;
|
|
|
|
|
2019-06-15 05:20:53 +01:00
|
|
|
_Static_assert(sizeof(exo_emummc_config_t) == 0x110, "exo_emummc_config_t definition!");
|
2019-06-14 14:37:25 +01:00
|
|
|
|
|
|
|
#endif
|