// 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();
}
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
// 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
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
// 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
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
// 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
}
memset(gfxtopadr, 0, 0x46500);
- GSPGPU_FlushDataCache(NULL, inaddr, 0x46500);
+ GSPGPU_FlushDataCache(inaddr, 0x46500);
printstring("mvd example\n");
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)