]> Chaos Git - corbenik/corbenik.git/commitdiff
Move PxiPM to ctrulib
authorchaoskagami <chaos.kagami@gmail.com>
Fri, 14 Oct 2016 11:46:35 +0000 (07:46 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Fri, 14 Oct 2016 11:46:35 +0000 (07:46 -0400)
external/ctrulib
external/loader/source/loader.c
external/loader/source/pxipm.c [deleted file]
external/loader/source/pxipm.h [deleted file]
external/loader/source/statics.c

index 361f8d402eb16c09a49d184f3fa58844fce0e48a..af70f7daae4e41e2526308d2705e8c1abc8ed586 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 361f8d402eb16c09a49d184f3fa58844fce0e48a
+Subproject commit af70f7daae4e41e2526308d2705e8c1abc8ed586
index 78609ec1d1aaf0eb76f8577b5e7adfba22ae1c63..dfd864015655839c417b181591d495993d2c711f 100644 (file)
@@ -1,6 +1,5 @@
 #include <3ds.h>
 #include "patcher.h"
-#include "pxipm.h"
 #include <lzss.c>
 #include <string.h>
 #include <stdio.h>
diff --git a/external/loader/source/pxipm.c b/external/loader/source/pxipm.c
deleted file mode 100644 (file)
index 10ec020..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#include <3ds.h>
-#include <string.h>
-#include "pxipm.h"
-
-static Handle pxipmHandle;
-static int pxipmRefCount;
-
-Result
-pxipmInit(void)
-{
-    Result ret = 0;
-
-    if (AtomicPostIncrement(&pxipmRefCount))
-        return 0;
-
-    ret = srvGetServiceHandle(&pxipmHandle, "PxiPM");
-
-    if (R_FAILED(ret))
-        AtomicDecrement(&pxipmRefCount);
-    return ret;
-}
-
-void
-pxipmExit(void)
-{
-    if (AtomicDecrement(&pxipmRefCount))
-        return;
-    svcCloseHandle(pxipmHandle);
-}
-
-Result
-PXIPM_RegisterProgram(u64 *prog_handle, FS_ProgramInfo *title, FS_ProgramInfo *update)
-{
-    u32 *cmdbuf = getThreadCommandBuffer();
-
-    cmdbuf[0] = IPC_MakeHeader(0x2, 8, 0); // 0x20200
-    memcpy(&cmdbuf[1], &title->programId, sizeof(u64));
-    *(u8 *)&cmdbuf[3] = title->mediaType;
-    memcpy(((u8 *)&cmdbuf[3]) + 1, &title->padding, 7);
-    memcpy(&cmdbuf[5], &update->programId, sizeof(u64));
-    *(u8 *)&cmdbuf[7] = update->mediaType;
-    memcpy(((u8 *)&cmdbuf[7]) + 1, &update->padding, 7);
-
-    Result ret = 0;
-    if (R_FAILED(ret = svcSendSyncRequest(pxipmHandle)))
-        return ret;
-    *prog_handle = *(u64 *)&cmdbuf[2];
-
-    return cmdbuf[1];
-}
-
-Result
-PXIPM_GetProgramInfo(EXHEADER_header *exheader, u64 prog_handle)
-{
-    u32 *cmdbuf = getThreadCommandBuffer();
-
-    cmdbuf[0] = IPC_MakeHeader(0x1, 2, 2); // 0x10082
-    cmdbuf[1] = (u32)(prog_handle);
-    cmdbuf[2] = (u32)(prog_handle >> 32);
-    cmdbuf[3] = (0x400 << 8) | 0x4;
-    cmdbuf[4] = (u32)exheader;
-
-    Result ret = 0;
-    if (R_FAILED(ret = svcSendSyncRequest(pxipmHandle)))
-        return ret;
-
-    return cmdbuf[1];
-}
-
-Result
-PXIPM_UnregisterProgram(u64 prog_handle)
-{
-    u32 *cmdbuf = getThreadCommandBuffer();
-
-    cmdbuf[0] = IPC_MakeHeader(0x3, 2, 0); // 0x30080
-    cmdbuf[1] = (u32)(prog_handle);
-    cmdbuf[2] = (u32)(prog_handle >> 32);
-
-    Result ret = 0;
-    if (R_FAILED(ret = svcSendSyncRequest(pxipmHandle)))
-        return ret;
-
-    return cmdbuf[1];
-}
diff --git a/external/loader/source/pxipm.h b/external/loader/source/pxipm.h
deleted file mode 100644 (file)
index 0784f41..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __PXIPM_H
-#define __PXIPM_H
-
-#include <3ds/types.h>
-#include <3ds/exheader.h>
-
-Result pxipmInit(void);
-void pxipmExit(void);
-Result PXIPM_RegisterProgram(u64 *prog_handle, FS_ProgramInfo *title, FS_ProgramInfo *update);
-Result PXIPM_GetProgramInfo(EXHEADER_header *exheader, u64 prog_handle);
-Result PXIPM_UnregisterProgram(u64 prog_handle);
-
-#endif
index 2f5642bbd84a9ac2b09a58c0fa1771d147f59caa..4ac400c11dee400c01490cb994d51cb65a3b6cff 100644 (file)
@@ -1,6 +1,5 @@
 #include <3ds.h>
 #include "patcher.h"
-#include "pxipm.h"
 #include <string.h>
 #include "logger.h"