Fix examples
This commit is contained in:
parent
0d7a7f4d7d
commit
06f7aeb7c4
@ -29,9 +29,9 @@ int main()
|
||||
// Open an APT session so we can talk to the APT service
|
||||
aptOpenSession();
|
||||
// Prepare for the app launch
|
||||
APT_PrepareToDoAppJump(NULL, 0, 0x0004001000022400LL, 0); // *EUR* camera app title ID
|
||||
APT_PrepareToDoAppJump(0, 0x0004001000022400LL, 0); // *EUR* camera app title ID
|
||||
// Tell APT to trigger the app launch and set the status of this app to exit
|
||||
APT_DoAppJump(NULL, 0x300 /* size of buf0 */, 0x20 /* size of buf1 */, buf0, buf1);
|
||||
APT_DoAppJump(0x300 /* size of buf0 */, 0x20 /* size of buf1 */, buf0, buf1);
|
||||
// Close the APT session because we don't need APT anymore
|
||||
aptCloseSession();
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ void gpuExit(void)
|
||||
|
||||
void gpuClearBuffers(u32 clearColor)
|
||||
{
|
||||
GX_SetMemoryFill(NULL,
|
||||
GX_SetMemoryFill(
|
||||
colorBuf, clearColor, &colorBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH,
|
||||
depthBuf, 0, &depthBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
|
||||
gspWaitForPSC0(); // Wait for the fill to complete
|
||||
@ -67,11 +67,12 @@ void gpuFrameEnd(void)
|
||||
// Finish rendering
|
||||
GPU_FinishDrawing();
|
||||
GPUCMD_Finalize();
|
||||
GPUCMD_FlushAndRun(NULL);
|
||||
GPUCMD_FlushAndRun();
|
||||
gspWaitForP3D(); // Wait for the rendering to complete
|
||||
|
||||
// Transfer the GPU output to the framebuffer
|
||||
GX_SetDisplayTransfer(NULL, colorBuf, GX_BUFFER_DIM(240, 400),
|
||||
GX_SetDisplayTransfer(
|
||||
colorBuf, GX_BUFFER_DIM(240, 400),
|
||||
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
|
||||
DISPLAY_TRANSFER_FLAGS);
|
||||
gspWaitForPPF(); // Wait for the transfer to complete
|
||||
|
@ -27,7 +27,7 @@ void gpuExit(void)
|
||||
|
||||
void gpuClearBuffers(u32 clearColor)
|
||||
{
|
||||
GX_SetMemoryFill(NULL,
|
||||
GX_SetMemoryFill(
|
||||
colorBuf, clearColor, &colorBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH,
|
||||
depthBuf, 0, &depthBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
|
||||
gspWaitForPSC0(); // Wait for the fill to complete
|
||||
@ -67,11 +67,12 @@ void gpuFrameEnd(void)
|
||||
// Finish rendering
|
||||
GPU_FinishDrawing();
|
||||
GPUCMD_Finalize();
|
||||
GPUCMD_FlushAndRun(NULL);
|
||||
GPUCMD_FlushAndRun();
|
||||
gspWaitForP3D(); // Wait for the rendering to complete
|
||||
|
||||
// Transfer the GPU output to the framebuffer
|
||||
GX_SetDisplayTransfer(NULL, colorBuf, GX_BUFFER_DIM(240, 400),
|
||||
GX_SetDisplayTransfer(
|
||||
colorBuf, GX_BUFFER_DIM(240, 400),
|
||||
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
|
||||
DISPLAY_TRANSFER_FLAGS);
|
||||
gspWaitForPPF(); // Wait for the transfer to complete
|
||||
|
@ -27,7 +27,7 @@ void gpuExit(void)
|
||||
|
||||
void gpuClearBuffers(u32 clearColor)
|
||||
{
|
||||
GX_SetMemoryFill(NULL,
|
||||
GX_SetMemoryFill(
|
||||
colorBuf, clearColor, &colorBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH,
|
||||
depthBuf, 0, &depthBuf[240*400], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
|
||||
gspWaitForPSC0(); // Wait for the fill to complete
|
||||
@ -67,11 +67,12 @@ void gpuFrameEnd(void)
|
||||
// Finish rendering
|
||||
GPU_FinishDrawing();
|
||||
GPUCMD_Finalize();
|
||||
GPUCMD_FlushAndRun(NULL);
|
||||
GPUCMD_FlushAndRun();
|
||||
gspWaitForP3D(); // Wait for the rendering to complete
|
||||
|
||||
// Transfer the GPU output to the framebuffer
|
||||
GX_SetDisplayTransfer(NULL, colorBuf, GX_BUFFER_DIM(240, 400),
|
||||
GX_SetDisplayTransfer(
|
||||
colorBuf, GX_BUFFER_DIM(240, 400),
|
||||
(u32*)gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), GX_BUFFER_DIM(240, 400),
|
||||
DISPLAY_TRANSFER_FLAGS);
|
||||
gspWaitForPPF(); // Wait for the transfer to complete
|
||||
|
@ -58,7 +58,7 @@ void draw_startup()
|
||||
}
|
||||
|
||||
memset(gfxtopadr, 0, 0x46500);
|
||||
GSPGPU_FlushDataCache(NULL, inaddr, 0x46500);
|
||||
GSPGPU_FlushDataCache(inaddr, 0x46500);
|
||||
|
||||
printstring("mvd example\n");
|
||||
|
||||
@ -79,7 +79,7 @@ void draw_startup()
|
||||
|
||||
svcSleepThread(1000000000);//Not sure how to determine when frame processing finishes.
|
||||
|
||||
GSPGPU_InvalidateDataCache(NULL, outaddr, 0x100000);
|
||||
GSPGPU_InvalidateDataCache(outaddr, 0x100000);
|
||||
|
||||
f = fopen("sdmc:/mvd_outdata.bin", "w");
|
||||
if(f)
|
||||
|
Loading…
Reference in New Issue
Block a user