--- /dev/null
+TARGET = laz0r
+OBJS = main.o game.o
+
+PSP_FW_VERSION=401
+BUILD_PRX=1
+
+INCDIR =
+CFLAGS = -O2 -G0 -Wall
+CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
+ASFLAGS = $(CFLAGS)
+
+LIBDIR =
+LDFLAGS =
+
+PSPSDK=$(shell psp-config --pspsdk-path)
+include $(PSPSDK)/lib/build.mak
--- /dev/null
+#include <malloc.h>
+#include <pspkernel.h>
+#include <pspdebug.h>
+#include <pspdisplay.h>
+#include <stdio.h>
+#include <game.h>
+
+/* Define the module info section */
+PSP_MODULE_INFO("template", 0, 1, 1);
+
+/* Define the main thread's attribute value (optional) */
+PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU);
+
+// Exit callback
+int exit_callback(int arg1, int arg2, void *common) {
+ sceKernelExitGame();
+ return 0;
+}
+
+// Callback thread
+int callback_thread(SceSize args, void *argp) {
+ int cbid;
+
+ cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
+ sceKernelRegisterExitCallback(cbid);
+
+ sceKernelSleepThreadCB();
+
+ return 0;
+}
+
+// Sets up the callback thread and returns its thread id
+int setup_callbacks(void) {
+ int thid = 0;
+
+ thid = sceKernelCreateThread("update_thread", callback_thread, 0x11, 0xFA0, 0, 0);
+ if(thid >= 0) {
+ sceKernelStartThread(thid, 0, 0);
+ }
+
+ return thid;
+}
+
+
+int main(int argc, char *argv[])
+{
+ setup_callbacks();
+ return game_main(argc, argv);
+}