mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 04:11:18 +00:00
emummc: update for 18.0.0
This commit is contained in:
parent
05df389d30
commit
b4d453882d
5 changed files with 130 additions and 1 deletions
2
emummc/README.md
vendored
2
emummc/README.md
vendored
|
@ -2,7 +2,7 @@
|
|||
*A SDMMC driver replacement for Nintendo's Filesystem Services, by **m4xw***
|
||||
|
||||
### Supported Horizon Versions
|
||||
**1.0.0 - 17.0.0**
|
||||
**1.0.0 - 18.0.0**
|
||||
|
||||
## Features
|
||||
* Arbitrary SDMMC backend selection
|
||||
|
|
8
emummc/source/FS/FS_offsets.c
vendored
8
emummc/source/FS/FS_offsets.c
vendored
|
@ -69,6 +69,8 @@
|
|||
#include "offsets/1603_exfat.h"
|
||||
#include "offsets/1700.h"
|
||||
#include "offsets/1700_exfat.h"
|
||||
#include "offsets/1800.h"
|
||||
#include "offsets/1800_exfat.h"
|
||||
#include "../utils/fatal.h"
|
||||
|
||||
#define GET_OFFSET_STRUCT_NAME(vers) g_offsets##vers
|
||||
|
@ -149,6 +151,8 @@ DEFINE_OFFSET_STRUCT(_1603);
|
|||
DEFINE_OFFSET_STRUCT(_1603_EXFAT);
|
||||
DEFINE_OFFSET_STRUCT(_1700);
|
||||
DEFINE_OFFSET_STRUCT(_1700_EXFAT);
|
||||
DEFINE_OFFSET_STRUCT(_1800);
|
||||
DEFINE_OFFSET_STRUCT(_1800_EXFAT);
|
||||
|
||||
const fs_offsets_t *get_fs_offsets(enum FS_VER version) {
|
||||
switch (version) {
|
||||
|
@ -258,6 +262,10 @@ const fs_offsets_t *get_fs_offsets(enum FS_VER version) {
|
|||
return &(GET_OFFSET_STRUCT_NAME(_1700));
|
||||
case FS_VER_17_0_0_EXFAT:
|
||||
return &(GET_OFFSET_STRUCT_NAME(_1700_EXFAT));
|
||||
case FS_VER_18_0_0:
|
||||
return &(GET_OFFSET_STRUCT_NAME(_1800));
|
||||
case FS_VER_18_0_0_EXFAT:
|
||||
return &(GET_OFFSET_STRUCT_NAME(_1800_EXFAT));
|
||||
default:
|
||||
fatal_abort(Fatal_UnknownVersion);
|
||||
}
|
||||
|
|
3
emummc/source/FS/FS_versions.h
vendored
3
emummc/source/FS/FS_versions.h
vendored
|
@ -101,6 +101,9 @@ enum FS_VER
|
|||
FS_VER_17_0_0,
|
||||
FS_VER_17_0_0_EXFAT,
|
||||
|
||||
FS_VER_18_0_0,
|
||||
FS_VER_18_0_0_EXFAT,
|
||||
|
||||
FS_VER_MAX,
|
||||
};
|
||||
|
||||
|
|
59
emummc/source/FS/offsets/1800.h
vendored
Normal file
59
emummc/source/FS/offsets/1800.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_1800_H__
|
||||
#define __FS_1800_H__
|
||||
|
||||
// Accessor vtable getters
|
||||
#define FS_OFFSET_1800_SDMMC_ACCESSOR_GC 0x18AB00
|
||||
#define FS_OFFSET_1800_SDMMC_ACCESSOR_SD 0x18C800
|
||||
#define FS_OFFSET_1800_SDMMC_ACCESSOR_NAND 0x18AFE0
|
||||
|
||||
// Hooks
|
||||
#define FS_OFFSET_1800_SDMMC_WRAPPER_READ 0x186A50
|
||||
#define FS_OFFSET_1800_SDMMC_WRAPPER_WRITE 0x186AB0
|
||||
#define FS_OFFSET_1800_RTLD 0x2A3A4
|
||||
#define FS_OFFSET_1800_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44)))
|
||||
|
||||
#define FS_OFFSET_1800_CLKRST_SET_MIN_V_CLK_RATE 0x1A77D0
|
||||
|
||||
// Misc funcs
|
||||
#define FS_OFFSET_1800_LOCK_MUTEX 0x17FCC0
|
||||
#define FS_OFFSET_1800_UNLOCK_MUTEX 0x17FD10
|
||||
|
||||
#define FS_OFFSET_1800_SDMMC_WRAPPER_CONTROLLER_OPEN 0x186A10
|
||||
#define FS_OFFSET_1800_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x186A30
|
||||
|
||||
// Misc Data
|
||||
#define FS_OFFSET_1800_SD_MUTEX 0xFD13F0
|
||||
#define FS_OFFSET_1800_NAND_MUTEX 0xFCCB28
|
||||
#define FS_OFFSET_1800_ACTIVE_PARTITION 0xFCCB68
|
||||
#define FS_OFFSET_1800_SDMMC_DAS_HANDLE 0xFB1950
|
||||
|
||||
// NOPs
|
||||
#define FS_OFFSET_1800_SD_DAS_INIT 0x28F24
|
||||
|
||||
// Nintendo Paths
|
||||
#define FS_OFFSET_1800_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_1800_H__
|
59
emummc/source/FS/offsets/1800_exfat.h
vendored
Normal file
59
emummc/source/FS/offsets/1800_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_1800_EXFAT_H__
|
||||
#define __FS_1800_EXFAT_H__
|
||||
|
||||
// Accessor vtable getters
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_ACCESSOR_GC 0x195B90
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_ACCESSOR_SD 0x197890
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_ACCESSOR_NAND 0x196070
|
||||
|
||||
// Hooks
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_READ 0x191AE0
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_WRITE 0x191B40
|
||||
#define FS_OFFSET_1800_EXFAT_RTLD 0x2A3A4
|
||||
#define FS_OFFSET_1800_EXFAT_RTLD_DESTINATION ((uintptr_t)(INT64_C(-0x44)))
|
||||
|
||||
#define FS_OFFSET_1800_EXFAT_CLKRST_SET_MIN_V_CLK_RATE 0x1B2860
|
||||
|
||||
// Misc funcs
|
||||
#define FS_OFFSET_1800_EXFAT_LOCK_MUTEX 0x18AD50
|
||||
#define FS_OFFSET_1800_EXFAT_UNLOCK_MUTEX 0x18ADA0
|
||||
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_CONTROLLER_OPEN 0x191AA0
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_WRAPPER_CONTROLLER_CLOSE 0x191AC0
|
||||
|
||||
// Misc Data
|
||||
#define FS_OFFSET_1800_EXFAT_SD_MUTEX 0xFE33F0
|
||||
#define FS_OFFSET_1800_EXFAT_NAND_MUTEX 0xFDEB28
|
||||
#define FS_OFFSET_1800_EXFAT_ACTIVE_PARTITION 0xFDEB68
|
||||
#define FS_OFFSET_1800_EXFAT_SDMMC_DAS_HANDLE 0xFBE950
|
||||
|
||||
// NOPs
|
||||
#define FS_OFFSET_1800_EXFAT_SD_DAS_INIT 0x28F24
|
||||
|
||||
// Nintendo Paths
|
||||
#define FS_OFFSET_1800_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_1800_EXFAT_H__
|
Loading…
Reference in a new issue