mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
emummc: update to support 18.1.0
This commit is contained in:
parent
9eb92f37db
commit
257ac2bd33
4 changed files with 129 additions and 0 deletions
8
emummc/source/FS/FS_offsets.c
vendored
8
emummc/source/FS/FS_offsets.c
vendored
|
@ -71,6 +71,8 @@
|
||||||
#include "offsets/1700_exfat.h"
|
#include "offsets/1700_exfat.h"
|
||||||
#include "offsets/1800.h"
|
#include "offsets/1800.h"
|
||||||
#include "offsets/1800_exfat.h"
|
#include "offsets/1800_exfat.h"
|
||||||
|
#include "offsets/1810.h"
|
||||||
|
#include "offsets/1810_exfat.h"
|
||||||
#include "../utils/fatal.h"
|
#include "../utils/fatal.h"
|
||||||
|
|
||||||
#define GET_OFFSET_STRUCT_NAME(vers) g_offsets##vers
|
#define GET_OFFSET_STRUCT_NAME(vers) g_offsets##vers
|
||||||
|
@ -153,6 +155,8 @@ DEFINE_OFFSET_STRUCT(_1700);
|
||||||
DEFINE_OFFSET_STRUCT(_1700_EXFAT);
|
DEFINE_OFFSET_STRUCT(_1700_EXFAT);
|
||||||
DEFINE_OFFSET_STRUCT(_1800);
|
DEFINE_OFFSET_STRUCT(_1800);
|
||||||
DEFINE_OFFSET_STRUCT(_1800_EXFAT);
|
DEFINE_OFFSET_STRUCT(_1800_EXFAT);
|
||||||
|
DEFINE_OFFSET_STRUCT(_1810);
|
||||||
|
DEFINE_OFFSET_STRUCT(_1810_EXFAT);
|
||||||
|
|
||||||
const fs_offsets_t *get_fs_offsets(enum FS_VER version) {
|
const fs_offsets_t *get_fs_offsets(enum FS_VER version) {
|
||||||
switch (version) {
|
switch (version) {
|
||||||
|
@ -266,6 +270,10 @@ const fs_offsets_t *get_fs_offsets(enum FS_VER version) {
|
||||||
return &(GET_OFFSET_STRUCT_NAME(_1800));
|
return &(GET_OFFSET_STRUCT_NAME(_1800));
|
||||||
case FS_VER_18_0_0_EXFAT:
|
case FS_VER_18_0_0_EXFAT:
|
||||||
return &(GET_OFFSET_STRUCT_NAME(_1800_EXFAT));
|
return &(GET_OFFSET_STRUCT_NAME(_1800_EXFAT));
|
||||||
|
case FS_VER_18_1_0:
|
||||||
|
return &(GET_OFFSET_STRUCT_NAME(_1810));
|
||||||
|
case FS_VER_18_1_0_EXFAT:
|
||||||
|
return &(GET_OFFSET_STRUCT_NAME(_1810_EXFAT));
|
||||||
default:
|
default:
|
||||||
fatal_abort(Fatal_UnknownVersion);
|
fatal_abort(Fatal_UnknownVersion);
|
||||||
}
|
}
|
||||||
|
|
3
emummc/source/FS/FS_versions.h
vendored
3
emummc/source/FS/FS_versions.h
vendored
|
@ -104,6 +104,9 @@ enum FS_VER
|
||||||
FS_VER_18_0_0,
|
FS_VER_18_0_0,
|
||||||
FS_VER_18_0_0_EXFAT,
|
FS_VER_18_0_0_EXFAT,
|
||||||
|
|
||||||
|
FS_VER_18_1_0,
|
||||||
|
FS_VER_18_1_0_EXFAT,
|
||||||
|
|
||||||
FS_VER_MAX,
|
FS_VER_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
59
emummc/source/FS/offsets/1810.h
vendored
Normal file
59
emummc/source/FS/offsets/1810.h
vendored
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
|
||||||
|
* Copyright (c) 2019 Atmosphere-NX
|
||||||
|
*
|
||||||
|
* 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 __FS_1810_H__
|
||||||
|
#define __FS_1810_H__
|
||||||
|
|
||||||
|
// Accessor vtable getters
|
||||||
|
#define FS_OFFSET_1810_SDMMC_ACCESSOR_GC 0x18AB00
|
||||||
|
#define FS_OFFSET_1810_SDMMC_ACCESSOR_SD 0x18C800
|
||||||
|
#define FS_OFFSET_1810_SDMMC_ACCESSOR_NAND 0x18AFE0
|
||||||
|
|
||||||
|
// Hooks
|
||||||
|
#define FS_OFFSET_1810_SDMMC_WRAPPER_READ 0x186A50
|
||||||
|
#define FS_OFFSET_1810_SDMMC_WRAPPER_WRITE 0x186AB0
|
||||||
|
#define FS_OFFSET_1810_RTLD 0x2A3A4
|
||||||
|
#define FS_OFFSET_1810_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44)))
|
||||||
|
|
||||||
|
#define FS_OFFSET_1810_CLKRST_SET_MIN_V_CLK_RATE 0x1A77D0
|
||||||
|
|
||||||
|
// Misc funcs
|
||||||
|
#define FS_OFFSET_1810_LOCK_MUTEX 0x17FCC0
|
||||||
|
#define FS_OFFSET_1810_UNLOCK_MUTEX 0x17FD10
|
||||||
|
|
||||||
|
#define FS_OFFSET_1810_SDMMC_WRAPPER_CONTROLLER_OPEN 0x186A10
|
||||||
|
#define FS_OFFSET_1810_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x186A30
|
||||||
|
|
||||||
|
// Misc Data
|
||||||
|
#define FS_OFFSET_1810_SD_MUTEX 0xFD13F0
|
||||||
|
#define FS_OFFSET_1810_NAND_MUTEX 0xFCCB28
|
||||||
|
#define FS_OFFSET_1810_ACTIVE_PARTITION 0xFCCB68
|
||||||
|
#define FS_OFFSET_1810_SDMMC_DAS_HANDLE 0xFB1950
|
||||||
|
|
||||||
|
// NOPs
|
||||||
|
#define FS_OFFSET_1810_SD_DAS_INIT 0x28F24
|
||||||
|
|
||||||
|
// Nintendo Paths
|
||||||
|
#define FS_OFFSET_1810_NINTENDO_PATHS \
|
||||||
|
{ \
|
||||||
|
{.opcode_reg = 3, .adrp_offset = 0x00068B08, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 3, .adrp_offset = 0x000758DC, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 4, .adrp_offset = 0x0007C77C, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 4, .adrp_offset = 0x000905C4, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __FS_1810_H__
|
59
emummc/source/FS/offsets/1810_exfat.h
vendored
Normal file
59
emummc/source/FS/offsets/1810_exfat.h
vendored
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 m4xw <m4x@m4xw.net>
|
||||||
|
* Copyright (c) 2019 Atmosphere-NX
|
||||||
|
*
|
||||||
|
* 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 __FS_1810_EXFAT_H__
|
||||||
|
#define __FS_1810_EXFAT_H__
|
||||||
|
|
||||||
|
// Accessor vtable getters
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_ACCESSOR_GC 0x195B90
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_ACCESSOR_SD 0x197890
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_ACCESSOR_NAND 0x196070
|
||||||
|
|
||||||
|
// Hooks
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_READ 0x191AE0
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_WRITE 0x191B40
|
||||||
|
#define FS_OFFSET_1810_EXFAT_RTLD 0x2A3A4
|
||||||
|
#define FS_OFFSET_1810_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44)))
|
||||||
|
|
||||||
|
#define FS_OFFSET_1810_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B2860
|
||||||
|
|
||||||
|
// Misc funcs
|
||||||
|
#define FS_OFFSET_1810_EXFAT_LOCK_MUTEX 0x18AD50
|
||||||
|
#define FS_OFFSET_1810_EXFAT_UNLOCK_MUTEX 0x18ADA0
|
||||||
|
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x191AA0
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x191AC0
|
||||||
|
|
||||||
|
// Misc Data
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SD_MUTEX 0xFE33F0
|
||||||
|
#define FS_OFFSET_1810_EXFAT_NAND_MUTEX 0xFDEB28
|
||||||
|
#define FS_OFFSET_1810_EXFAT_ACTIVE_PARTITION 0xFDEB68
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SDMMC_DAS_HANDLE 0xFBE950
|
||||||
|
|
||||||
|
// NOPs
|
||||||
|
#define FS_OFFSET_1810_EXFAT_SD_DAS_INIT 0x28F24
|
||||||
|
|
||||||
|
// Nintendo Paths
|
||||||
|
#define FS_OFFSET_1810_EXFAT_NINTENDO_PATHS \
|
||||||
|
{ \
|
||||||
|
{.opcode_reg = 3, .adrp_offset = 0x00068B08, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 3, .adrp_offset = 0x000758DC, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 4, .adrp_offset = 0x0007C77C, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 4, .adrp_offset = 0x000905C4, .add_rel_offset = 0x00000004}, \
|
||||||
|
{.opcode_reg = 0, .adrp_offset = 0, .add_rel_offset = 0}, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __FS_1810_EXFAT_H__
|
Loading…
Reference in a new issue