gpu : minifix

This commit is contained in:
smea 2014-03-06 22:34:53 +01:00
parent df0d3f5114
commit a2a7b86738

View File

@ -15,7 +15,6 @@ u8* gspHeap;
u32* gxCmdBuf; u32* gxCmdBuf;
u8 currentBuffer; u8 currentBuffer;
u8* topLeftFramebuffers[2];
Handle gspEvent, gspSharedMemHandle; Handle gspEvent, gspSharedMemHandle;
@ -30,13 +29,6 @@ void gspGpuInit()
u32 regData=0x01FF0000; u32 regData=0x01FF0000;
GSPGPU_WriteHWRegs(NULL, 0x202A04, &regData, 4); GSPGPU_WriteHWRegs(NULL, 0x202A04, &regData, 4);
//grab main left screen framebuffer addresses
GSPGPU_ReadHWRegs(NULL, 0x400468, (u32*)&topLeftFramebuffers, 8);
//convert PA to VA (assuming FB in VRAM)
topLeftFramebuffers[0]+=0x7000000;
topLeftFramebuffers[1]+=0x7000000;
//setup our gsp shared mem section //setup our gsp shared mem section
u8 threadID; u8 threadID;
svc_createEvent(&gspEvent, 0x0); svc_createEvent(&gspEvent, 0x0);
@ -79,9 +71,6 @@ void swapBuffers()
GSPGPU_WriteHWRegs(NULL, 0x400478, &regData, 4); GSPGPU_WriteHWRegs(NULL, 0x400478, &regData, 4);
} }
u32 gpuCmd[0x100];
u32 gpuCmdSize=0x100;
int main() int main()
{ {
initSrv(); initSrv();
@ -96,6 +85,9 @@ int main()
GPU_Init(NULL); GPU_Init(NULL);
u32* gpuCmd=(u32*)gspHeap;
u32 gpuCmdSize=0x10000;
APP_STATUS status; APP_STATUS status;
while((status=aptGetStatus())!=APP_EXITING) while((status=aptGetStatus())!=APP_EXITING)
{ {
@ -107,7 +99,7 @@ int main()
GSPGPU_WriteHWRegs(NULL, 0x202A04, &regData, 4); GSPGPU_WriteHWRegs(NULL, 0x202A04, &regData, 4);
GPUCMD_SetBuffer(gpuCmd, gpuCmdSize, 0); GPUCMD_SetBuffer(gpuCmd, gpuCmdSize, 0);
GPUCMD_AddSingleParam(0x0008025E, 0x00000000); GPUCMD_AddSingleParam(0x0008025E, 0x00000000);
GPUCMD_Finalize(); GPUCMD_Finalize();