srv : default srv handle
APT, GSP, HID : proper return values
This commit is contained in:
parent
a8e5cb01f9
commit
9b9bbba181
@ -9,7 +9,6 @@
|
||||
#include <ctr/svc.h>
|
||||
#include "costable.h"
|
||||
|
||||
Handle srvHandle;
|
||||
Handle APTevents[2];
|
||||
Handle aptLockHandle;
|
||||
|
||||
@ -18,18 +17,18 @@ void aptInit()
|
||||
Handle aptuHandle;
|
||||
|
||||
//initialize APT stuff, escape load screen
|
||||
srv_getServiceHandle(srvHandle, &aptuHandle, "APT:U");
|
||||
srv_getServiceHandle(NULL, &aptuHandle, "APT:U");
|
||||
APT_GetLockHandle(aptuHandle, 0x0, &aptLockHandle);
|
||||
svc_closeHandle(aptuHandle);
|
||||
|
||||
svc_waitSynchronization1(aptLockHandle, U64_MAX); //APT lock handle is used because we need to wait for NS to be ready for us
|
||||
srv_getServiceHandle(srvHandle, &aptuHandle, "APT:U");
|
||||
srv_getServiceHandle(NULL, &aptuHandle, "APT:U");
|
||||
APT_Initialize(aptuHandle, APPID_APPLICATION, &APTevents[0], &APTevents[1]);
|
||||
svc_closeHandle(aptuHandle);
|
||||
svc_releaseMutex(aptLockHandle); //release the lock
|
||||
|
||||
svc_waitSynchronization1(aptLockHandle, U64_MAX);
|
||||
srv_getServiceHandle(srvHandle, &aptuHandle, "APT:U");
|
||||
srv_getServiceHandle(NULL, &aptuHandle, "APT:U");
|
||||
APT_Enable(aptuHandle, 0x0);
|
||||
svc_closeHandle(aptuHandle);
|
||||
svc_releaseMutex(aptLockHandle);
|
||||
@ -45,7 +44,7 @@ u8* topLeftFramebuffers[2];
|
||||
void gspGpuInit()
|
||||
{
|
||||
//do stuff with GPU...
|
||||
srv_getServiceHandle(srvHandle, &gspGpuHandle, "gsp::Gpu");
|
||||
srv_getServiceHandle(NULL, &gspGpuHandle, "gsp::Gpu");
|
||||
|
||||
GSPGPU_AcquireRight(gspGpuHandle, 0x0);
|
||||
GSPGPU_SetLcdForceBlack(gspGpuHandle, 0x0);
|
||||
@ -130,7 +129,7 @@ void renderEffect()
|
||||
|
||||
int main()
|
||||
{
|
||||
getSrvHandle(&srvHandle);
|
||||
initSrv();
|
||||
|
||||
aptInit();
|
||||
|
||||
@ -138,7 +137,7 @@ int main()
|
||||
|
||||
Handle hidHandle;
|
||||
Handle hidMemHandle;
|
||||
srv_getServiceHandle(srvHandle, &hidHandle, "hid:USER");
|
||||
srv_getServiceHandle(NULL, &hidHandle, "hid:USER");
|
||||
HIDUSER_GetInfo(hidHandle, &hidMemHandle);
|
||||
svc_mapMemoryBlock(hidMemHandle, 0x10000000, 0x1, 0x10000000);
|
||||
|
||||
|
@ -8,12 +8,12 @@ typedef enum{
|
||||
APPID_APPLICATION = 0x300, // Application
|
||||
}NS_APPID; // cf http://3dbrew.org/wiki/NS#AppIDs
|
||||
|
||||
void APT_GetLockHandle(Handle handle, u16 flags, Handle* lockHandle);
|
||||
void APT_Initialize(Handle handle, NS_APPID appId, Handle* eventHandle1, Handle* eventHandle2);
|
||||
Result APT_GetLockHandle(Handle handle, u16 flags, Handle* lockHandle);
|
||||
Result APT_Initialize(Handle handle, NS_APPID appId, Handle* eventHandle1, Handle* eventHandle2);
|
||||
Result APT_Enable(Handle handle, u32 a);
|
||||
Result APT_PrepareToJumpToHomeMenu(Handle handle);
|
||||
Result APT_JumpToHomeMenu(Handle handle, u32 a, u32 b, u32 c);
|
||||
u8 APT_InquireNotification(Handle handle, u32 appID);
|
||||
Result APT_InquireNotification(Handle handle, u32 appID, u8* signalType);
|
||||
Result APT_NotifyToWait(Handle handle, u32 a);
|
||||
|
||||
#endif
|
||||
|
@ -1,12 +1,12 @@
|
||||
#ifndef GSP_H
|
||||
#define GSP_H
|
||||
|
||||
void GSPGPU_AcquireRight(Handle handle, u8 flags);
|
||||
void GSPGPU_SetLcdForceBlack(Handle handle, u8 flags);
|
||||
void GSPGPU_FlushDataCache(Handle handle, u8* adr, u32 size);
|
||||
void GSPGPU_WriteHWRegs(Handle handle, u32 regAddr, u8* data, u8 size);
|
||||
void GSPGPU_ReadHWRegs(Handle handle, u32 regAddr, u8* data, u8 size);
|
||||
void GSPGPU_RegisterInterruptRelayQueue(Handle handle, Handle eventHandle, u32 flags, Handle* outMemHandle, u8* threadID);
|
||||
Result GSPGPU_AcquireRight(Handle handle, u8 flags);
|
||||
Result GSPGPU_SetLcdForceBlack(Handle handle, u8 flags);
|
||||
Result GSPGPU_FlushDataCache(Handle handle, u8* adr, u32 size);
|
||||
Result GSPGPU_WriteHWRegs(Handle handle, u32 regAddr, u8* data, u8 size);
|
||||
Result GSPGPU_ReadHWRegs(Handle handle, u32 regAddr, u8* data, u8 size);
|
||||
Result GSPGPU_RegisterInterruptRelayQueue(Handle handle, Handle eventHandle, u32 flags, Handle* outMemHandle, u8* threadID);
|
||||
Result GSPGPU_TriggerCmdReqQueue(Handle handle);
|
||||
Result GSPGPU_submitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x20], Handle handle);
|
||||
|
||||
|
@ -23,7 +23,7 @@ typedef enum
|
||||
PAD_Y = (1<<11)
|
||||
}PAD_KEY;
|
||||
|
||||
void HIDUSER_GetInfo(Handle handle, Handle* outMemHandle);
|
||||
void HIDUSER_Init(Handle handle);
|
||||
Result HIDUSER_GetInfo(Handle handle, Handle* outMemHandle);
|
||||
Result HIDUSER_Init(Handle handle);
|
||||
|
||||
#endif
|
||||
|
@ -1,9 +1,8 @@
|
||||
#ifndef SRV_H
|
||||
#define SRV_H
|
||||
|
||||
|
||||
Result srv_10002(Handle handle);
|
||||
void getSrvHandle(Handle* out);
|
||||
void srv_getServiceHandle(Handle handle, Handle* out, char* server);
|
||||
Result initSrv();
|
||||
Result srv_Initialize(Handle* handleptr);
|
||||
Result srv_getServiceHandle(Handle* handleptr, Handle* out, char* server);
|
||||
|
||||
#endif
|
||||
|
@ -5,24 +5,34 @@
|
||||
#include <ctr/APT.h>
|
||||
#include <ctr/svc.h>
|
||||
|
||||
void APT_GetLockHandle(Handle handle, u16 flags, Handle* lockHandle)
|
||||
Result APT_GetLockHandle(Handle handle, u16 flags, Handle* lockHandle)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x10040; //request header code
|
||||
cmdbuf[1]=flags;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
if(lockHandle)*lockHandle=cmdbuf[5];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void APT_Initialize(Handle handle, NS_APPID appId, Handle* eventHandle1, Handle* eventHandle2)
|
||||
Result APT_Initialize(Handle handle, NS_APPID appId, Handle* eventHandle1, Handle* eventHandle2)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x20080; //request header code
|
||||
cmdbuf[1]=appId;
|
||||
cmdbuf[2]=0x0;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
if(eventHandle1)*eventHandle1=cmdbuf[3]; //return to menu event ?
|
||||
if(eventHandle2)*eventHandle2=cmdbuf[4];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result APT_Enable(Handle handle, u32 a)
|
||||
@ -30,24 +40,35 @@ Result APT_Enable(Handle handle, u32 a)
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x30040; //request header code
|
||||
cmdbuf[1]=a;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
u8 APT_InquireNotification(Handle handle, u32 appID)
|
||||
Result APT_InquireNotification(Handle handle, u32 appID, u8* signalType)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0xB0040; //request header code
|
||||
cmdbuf[1]=appID;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
return cmdbuf[2];
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
if(signalType)*signalType=cmdbuf[2];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result APT_PrepareToJumpToHomeMenu(Handle handle)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x2b0000; //request header code
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
@ -59,7 +80,10 @@ Result APT_JumpToHomeMenu(Handle handle, u32 a, u32 b, u32 c)
|
||||
cmdbuf[2]=b;
|
||||
cmdbuf[3]=c;
|
||||
cmdbuf[4]=(b<<14)|2;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
@ -68,6 +92,9 @@ Result APT_NotifyToWait(Handle handle, u32 a)
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x430040; //request header code
|
||||
cmdbuf[1]=a;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
@ -6,25 +6,33 @@
|
||||
#include <ctr/svc.h>
|
||||
|
||||
|
||||
void GSPGPU_AcquireRight(Handle handle, u8 flags)
|
||||
Result GSPGPU_AcquireRight(Handle handle, u8 flags)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x160042; //request header code
|
||||
cmdbuf[1]=flags;
|
||||
cmdbuf[2]=0x0;
|
||||
cmdbuf[3]=0xffff8001;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void GSPGPU_SetLcdForceBlack(Handle handle, u8 flags)
|
||||
Result GSPGPU_SetLcdForceBlack(Handle handle, u8 flags)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0xB0040; //request header code
|
||||
cmdbuf[1]=flags;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void GSPGPU_FlushDataCache(Handle handle, u8* adr, u32 size)
|
||||
Result GSPGPU_FlushDataCache(Handle handle, u8* adr, u32 size)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x80082; //request header code
|
||||
@ -32,12 +40,16 @@ void GSPGPU_FlushDataCache(Handle handle, u8* adr, u32 size)
|
||||
cmdbuf[2]=size;
|
||||
cmdbuf[3]=0x0;
|
||||
cmdbuf[4]=0xffff8001;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void GSPGPU_WriteHWRegs(Handle handle, u32 regAddr, u8* data, u8 size)
|
||||
Result GSPGPU_WriteHWRegs(Handle handle, u32 regAddr, u8* data, u8 size)
|
||||
{
|
||||
if(size>0x80 || !data)return;
|
||||
if(size>0x80 || !data)return -1;
|
||||
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x10082; //request header code
|
||||
@ -45,12 +57,16 @@ void GSPGPU_WriteHWRegs(Handle handle, u32 regAddr, u8* data, u8 size)
|
||||
cmdbuf[2]=size;
|
||||
cmdbuf[3]=(size<<14)|2;
|
||||
cmdbuf[4]=(u32)data;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void GSPGPU_ReadHWRegs(Handle handle, u32 regAddr, u8* data, u8 size)
|
||||
Result GSPGPU_ReadHWRegs(Handle handle, u32 regAddr, u8* data, u8 size)
|
||||
{
|
||||
if(size>0x80 || !data)return;
|
||||
if(size>0x80 || !data)return -1;
|
||||
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x40080; //request header code
|
||||
@ -58,27 +74,39 @@ void GSPGPU_ReadHWRegs(Handle handle, u32 regAddr, u8* data, u8 size)
|
||||
cmdbuf[2]=size;
|
||||
cmdbuf[0x40]=(size<<14)|2;
|
||||
cmdbuf[0x40+1]=(u32)data;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void GSPGPU_RegisterInterruptRelayQueue(Handle handle, Handle eventHandle, u32 flags, Handle* outMemHandle, u8* threadID)
|
||||
Result GSPGPU_RegisterInterruptRelayQueue(Handle handle, Handle eventHandle, u32 flags, Handle* outMemHandle, u8* threadID)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x130042; //request header code
|
||||
cmdbuf[1]=flags;
|
||||
cmdbuf[2]=0x0;
|
||||
cmdbuf[3]=eventHandle;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
if(threadID)*threadID=cmdbuf[2];
|
||||
if(outMemHandle)*outMemHandle=cmdbuf[4];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result GSPGPU_TriggerCmdReqQueue(Handle handle)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0xC0000; //request header code
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
return cmdbuf[0];
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
//essentially : get commandIndex and totalCommands, calculate offset of new command, copy command and update totalCommands
|
||||
@ -116,10 +144,6 @@ Result GSPGPU_submitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle h
|
||||
cmdBufHeader=((cmdBufHeader)&0xFFFF00FF)|((totalCommands<<8)|0xFF00);
|
||||
}
|
||||
|
||||
if(totalCommands==1)
|
||||
{
|
||||
GSPGPU_TriggerCmdReqQueue(handle);
|
||||
}
|
||||
|
||||
if(totalCommands==1)return GSPGPU_TriggerCmdReqQueue(handle);
|
||||
return 0;
|
||||
}
|
||||
|
@ -5,17 +5,26 @@
|
||||
#include <ctr/HID.h>
|
||||
#include <ctr/svc.h>
|
||||
|
||||
void HIDUSER_GetInfo(Handle handle, Handle* outMemHandle)
|
||||
Result HIDUSER_GetInfo(Handle handle, Handle* outMemHandle)
|
||||
{
|
||||
u32* svcData=getThreadCommandBuffer();
|
||||
svcData[0]=0xa0000; //request header code
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
if(outMemHandle)*outMemHandle=svcData[3];
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0xa0000; //request header code
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
if(outMemHandle)*outMemHandle=cmdbuf[3];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void HIDUSER_Init(Handle handle)
|
||||
Result HIDUSER_Init(Handle handle)
|
||||
{
|
||||
u32* svcData=getThreadCommandBuffer();
|
||||
svcData[0]=0x110000; //request header code
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x110000; //request header code
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(handle)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
@ -5,32 +5,45 @@
|
||||
#include <ctr/srv.h>
|
||||
#include <ctr/svc.h>
|
||||
|
||||
Result srv_Initialize(Handle handle)
|
||||
Handle srvHandle;
|
||||
|
||||
Result initSrv()
|
||||
{
|
||||
Result ret=0;
|
||||
if(svc_connectToPort(&srvHandle, "srv:"))return ret;
|
||||
return srv_Initialize(&srvHandle);
|
||||
}
|
||||
|
||||
Result srv_Initialize(Handle* handleptr)
|
||||
{
|
||||
if(!handleptr)handleptr=&srvHandle;
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x10002; //request header code
|
||||
cmdbuf[1]=0x20;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(*handleptr)))return ret;
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
void getSrvHandle(Handle* out)
|
||||
{
|
||||
if(!out)return;
|
||||
|
||||
svc_connectToPort(out, "srv:");
|
||||
srv_Initialize(*out);
|
||||
}
|
||||
|
||||
void srv_getServiceHandle(Handle handle, Handle* out, char* server)
|
||||
Result srv_getServiceHandle(Handle* handleptr, Handle* out, char* server)
|
||||
{
|
||||
if(!handleptr)handleptr=&srvHandle;
|
||||
u8 l=strlen(server);
|
||||
if(!out || !server || l>8)return;
|
||||
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0]=0x50100; //request header code
|
||||
strcpy((char*)&cmdbuf[1], server);
|
||||
cmdbuf[3]=l;
|
||||
cmdbuf[4]=0x0;
|
||||
svc_sendSyncRequest(handle); //check return value...
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svc_sendSyncRequest(*handleptr)))return ret;
|
||||
|
||||
*out=cmdbuf[3];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include <ctr/svc.h>
|
||||
#include "costable.h"
|
||||
|
||||
Handle srvHandle;
|
||||
Handle APTevents[2];
|
||||
Handle aptLockHandle;
|
||||
|
||||
@ -19,18 +18,18 @@ void aptInit()
|
||||
Handle aptuHandle;
|
||||
|
||||
//initialize APT stuff, escape load screen
|
||||
srv_getServiceHandle(srvHandle, &aptuHandle, "APT:U");
|
||||
srv_getServiceHandle(NULL, &aptuHandle, "APT:U");
|
||||
APT_GetLockHandle(aptuHandle, 0x0, &aptLockHandle);
|
||||
svc_closeHandle(aptuHandle);
|
||||
|
||||
svc_waitSynchronization1(aptLockHandle, U64_MAX);
|
||||
srv_getServiceHandle(srvHandle, &aptuHandle, "APT:U");
|
||||
srv_getServiceHandle(NULL, &aptuHandle, "APT:U");
|
||||
APT_Initialize(aptuHandle, APPID_APPLICATION, &APTevents[0], &APTevents[1]);
|
||||
svc_closeHandle(aptuHandle);
|
||||
svc_releaseMutex(aptLockHandle);
|
||||
|
||||
svc_waitSynchronization1(aptLockHandle, U64_MAX);
|
||||
srv_getServiceHandle(srvHandle, &aptuHandle, "APT:U");
|
||||
srv_getServiceHandle(NULL, &aptuHandle, "APT:U");
|
||||
APT_Enable(aptuHandle, 0x0);
|
||||
svc_closeHandle(aptuHandle);
|
||||
svc_releaseMutex(aptLockHandle);
|
||||
@ -46,7 +45,7 @@ u8* topLeftFramebuffers[2];
|
||||
void gspGpuInit()
|
||||
{
|
||||
//do stuff with GPU...
|
||||
srv_getServiceHandle(srvHandle, &gspGpuHandle, "gsp::Gpu");
|
||||
srv_getServiceHandle(NULL, &gspGpuHandle, "gsp::Gpu");
|
||||
|
||||
GSPGPU_AcquireRight(gspGpuHandle, 0x0);
|
||||
GSPGPU_SetLcdForceBlack(gspGpuHandle, 0x0);
|
||||
@ -132,22 +131,22 @@ void renderEffect()
|
||||
|
||||
int main()
|
||||
{
|
||||
getSrvHandle(&srvHandle);
|
||||
|
||||
initSrv();
|
||||
|
||||
aptInit();
|
||||
|
||||
gspGpuInit();
|
||||
|
||||
Handle hidHandle;
|
||||
Handle hidMemHandle;
|
||||
srv_getServiceHandle(srvHandle, &hidHandle, "hid:USER");
|
||||
srv_getServiceHandle(NULL, &hidHandle, "hid:USER");
|
||||
HIDUSER_GetInfo(hidHandle, &hidMemHandle);
|
||||
svc_mapMemoryBlock(hidMemHandle, 0x10000000, 0x1, 0x10000000);
|
||||
|
||||
HIDUSER_Init(hidHandle);
|
||||
|
||||
Handle fsuHandle;
|
||||
srv_getServiceHandle(srvHandle, &fsuHandle, "fs:USER");
|
||||
srv_getServiceHandle(NULL, &fsuHandle, "fs:USER");
|
||||
FSUSER_Initialize(fsuHandle);
|
||||
|
||||
Handle fileHandle;
|
||||
|
Loading…
Reference in New Issue
Block a user