This example will show you how to use the debug screen in a PRX. So you can make in game cheat devices and whatnot.

Code:
// crt0_prx.c
#include <pspkernel.h>
#include <pspdisplay_kernel.h>
#include <pspctrl_kernel.h>
#include <pspctrl.h>
PSP_MODULE_INFO ("ExamplePRX", 0x3008, 1, 2);
PSP_MAIN_THREAD_ATTR (0);
PSP_HEAP_SIZE_KB (-128);
SceUID thid;
void *vpVideoRam = NULL;
SceCtrlData pad;
int module_start (SceSize args, void *argp) __attribute__ ((alias ("_start")));
int module_stop (SceSize args, void *argp) __attribute__ ((alias ("_stop")));
void ShowDebugScreen ();
int mainThread ()
{
    sceCtrlSetSamplingCycle (0);
    sceCtrlSetSamplingMode (PSP_CTRL_MODE_ANALOG);
    // Wait for the kernel library to load, some functions are needed from it, and our psp will crash if we can't access them.
    while (!sceKernelFindModuleByName ("sceKernelLibrary"))
    {
        sceKernelDelayThread (150000);
    }
    pspDebugScreenInitEx (0x44000000, 0, 0);
    unsigned int uiAddress = 0;
    unsigned int uiBufferWidth = 0;
    unsigned int uiPixelFormat = 0;
    unsigned int uiSync = 0;
    while (1)
    {
        // Print the display message
        if (!vpVideoRam)
        {
            sceDisplayGetFrameBufferInternal (0, &uiAddress, &uiBufferWidth, &uiPixelFormat, &uiSync);
            if (uiAddress)
            {
                vpVideoRam = (void*) (0xA0000000 | uiAddress);
            }
            else
            {
                sceDisplayGetMode (&uiPixelFormat, &uiBufferWidth, &uiBufferWidth);
                pspDebugScreenSetColorMode (uiPixelFormat);
                pspDebugScreenSetXY (0, 0);
                pspDebugScreenSetTextColor (0xFF0000FF);
                pspDebugScreenPuts ("Double Tap The Home Button, Then Press Screen.");
            }
            sceKernelDelayThread (1);
            // Reset the loop
            continue;
        }
        // Get the button input
        sceCtrlPeekBufferPositive (&pad, 1);
        // Check for if the menu was opened
        if (pad.Buttons & PSP_CTRL_SCREEN)
        {
            ShowDebugScreen ();
        }
        sceKernelDelayThread (1);
    }
    return 0;
}
int _start (SceSize args, void *argp)
{
    thid = sceKernelCreateThread ("OurThread", &mainThread, 0x18, 0x1000, 0, NULL);
    if (thid >= 0)
    {
        sceKernelStartThread (thid, 0, NULL);
    }
    return 0;
}
int _stop (SceSize args, void *argp)
{
    sceKernelTerminateThread (thid);
    return 0;
}
void ShowDebugScreen ()
{
    // Disable the game's button input
    sceCtrlSetButtonMasks (0xFFFF, 1);
    sceCtrlSetButtonMasks (0x10000, 2);
    // Create and set up the debug screen
    sceDisplaySetFrameBufferInternal (0, vpVideoRam, 512, 0, 1);
    pspDebugScreenInitEx (vpVideoRam, 0, 0);
    // This while loop will keep us in the debug screen
    while (1)
    {
        // Get button input again
        sceCtrlPeekBufferPositive (&pad, 1);
        // If we press circle then break from the while loop
        if (pad.Buttons & PSP_CTRL_CIRCLE)
        {
            break;
        }
        // If we press home then enable the game's button input again, then return from the function
        // I do this and not break from the loop because the sceDisplaySetFramBufferInternal will close the home button screen
        if (pad.Buttons & PSP_CTRL_HOME)
        {
            sceCtrlSetButtonMasks (0x10000, 0);
            sceCtrlSetButtonMasks (0xFFFF, 0);
            return;
        }
        // You can now use the debug screen here, just as you would for homebrew.
    }
    // Close the debug screen
    sceDisplaySetFrameBufferInternal (0, 0, 512, 0, 1);
    // Enable the game's button input
    sceCtrlSetButtonMasks (0x10000, 0);
    sceCtrlSetButtonMasks (0xFFFF, 0);
    return;
}
Code:
// crt0_prx.h
#ifndef CRT0_H
#define CRT0_H
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <pspumd.h>
#include <stdio.h>
#include <stdlib.h>
#endif
Code:
// exports.c
#include <pspmoduleexport.h>
#define NULL ((void *) 0)
void extern module_start;
void extern module_stop;
void extern module_info;
static const unsigned int __syslib_exports [6] __attribute__ ((section (".rodata.sceResident"))) =
{
    0xD632ACDB, 0xCEE8593C, 0xF01D73A7,
    (unsigned int) &module_start, (unsigned int) &module_stop, (unsigned int) &module_info,
};
const struct _PspLibraryEntry __library_exports [1] __attribute__ ((section (".lib.ent"), used)) =
{
    {
        NULL,
        0x0000, 0x8000,
        4, 1, 2,
        &__syslib_exports
    },
};
Code:
# makefile
TARGET = ExamplePRXByLeetGamer
OBJS = crt0_prx.o exports.o
BUILD_PRX = 1
PSP_FW_VERSION = 150
PRX_EXPORTS = exports.exp
USE_KERNEL_LIBS = 1
USE_KERNEL_LIBC = 1
INCDIR =
CFLAGS = -O2 -G0 -w -msingle-float -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lpspchnnlsv -lpsputility -lpspdebug -lpspge_driver -lpspwlan -lpspumd -lpsppower -lpspwlan -lpspnet -lpsprtc -lpsphprm
LDFLAGS = -nostdlib  -nodefaultlibs -g
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Double tap home then press screen to open the menu.
Press O or home to close it.