Merge branch 'lib' into os-patch

This commit is contained in:
Maschell 2018-03-04 16:12:27 +01:00 committed by GitHub
commit 00c33a22cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 86 additions and 1 deletions

View File

@ -26,7 +26,7 @@
u32 acp_handle __attribute__((section(".data"))) = 0; u32 acp_handle __attribute__((section(".data"))) = 0;
EXPORT_DECL(void, GetMetaXml, void * _ACPMetaXml); EXPORT_DECL(void, GetMetaXml, ACPMetaXml * _ACPMetaXml);
void InitAcquireACP(void){ void InitAcquireACP(void){
if(coreinit_handle == 0){ InitAcquireOS(); }; if(coreinit_handle == 0){ InitAcquireOS(); };

View File

@ -30,7 +30,14 @@ extern "C" {
#include "os_types.h" #include "os_types.h"
typedef struct ACPMetaXml_
{
u8 data[0x3440];
}ACPMetaXml;
extern u32 acp_handle; extern u32 acp_handle;
extern void (*GetMetaXml)(ACPMetaXml * _ACPMetaXml);
void InitACPFunctionPointers(void); void InitACPFunctionPointers(void);
void InitAcquireACP(void); void InitAcquireACP(void);

43
source/nn_fp_functions.c Normal file
View File

@ -0,0 +1,43 @@
/****************************************************************************
* Copyright (C) 2015
* by Dimok
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any
* damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any
* purpose, including commercial applications, and to alter it and
* redistribute it freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you
* must not claim that you wrote the original software. If you use
* this software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and
* must not be misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
***************************************************************************/
#include "os_functions.h"
#include "nn_fp_functions.h"
u32 nn_fp_handle __attribute__((section(".data"))) = 0;
EXPORT_DECL(void, nn_fp_GetMyPresence, void *);
EXPORT_DECL(void, nn_fp_Initialize, void);
void InitAcquireFp(void){
if(coreinit_handle == 0){ InitAcquireOS(); };
OSDynLoad_Acquire("nn_fp.rpl", &nn_fp_handle);
}
void InitFpFunctionPointers(void){
u32 *funcPointer = 0;
InitAcquireFp();
OS_FIND_EXPORT_EX(nn_fp_handle, GetMyPresence__Q2_2nn2fpFPQ3_2nn2fp10MyPresence, nn_fp_GetMyPresence)
OS_FIND_EXPORT_EX(nn_fp_handle, Initialize__Q2_2nn2fpFv, nn_fp_Initialize)
}

23
source/nn_fp_functions.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef __NN_FP_FUNCTIONS_H_
#define __NN_FP_FUNCTIONS_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "os_types.h"
/* Handle for coreinit */
extern u32 nn_fp_handle;
extern void(* nn_fp_GetMyPresence)(void *);
extern void(* nn_fp_Initialize)(void);
void InitAcquireFp(void);
void InitFpFunctionPointers(void);
#ifdef __cplusplus
}
#endif
#endif // __NN_FP_FUNCTIONS_H_

View File

@ -197,6 +197,18 @@ typedef struct _OSCalendarTime {
} OSCalendarTime; } OSCalendarTime;
typedef struct MCPTitleListType{
u64 titleId;
u8 unknwn[4];
s8 path[56];
u32 appType;
u8 unknwn1[0x54 - 0x48];
u8 device;
u8 unknwn2;
s8 indexedDevice[10];
u8 unk0x60;
} MCPTitleListType;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif