-PSP_MODULE_INFO("PicoDrive", 0, 1, 34);
+extern int pico_main(void);
+
+#ifndef FW15
+
+PSP_MODULE_INFO("PicoDrive", 0, 1, 51);
+PSP_HEAP_SIZE_MAX();
+
+int main() { return pico_main(); } /* just a wrapper */
+
+#else
+
+PSP_MODULE_INFO("PicoDrive", 0x1000, 1, 51);
+PSP_MAIN_THREAD_ATTR(0);
+
+int main()
+{
+ SceUID thid;
+
+ /* this is the thing we need the kernel mode for */
+ pspSdkInstallNoDeviceCheckPatch();
+
+ thid = sceKernelCreateThread("pico_main", (SceKernelThreadEntry) pico_main, 32, 0x2000, PSP_THREAD_ATTR_USER, NULL);
+ if (thid >= 0)
+ sceKernelStartThread(thid, 0, 0);
+#ifndef GCOV
+ sceKernelExitDeleteThread(0);
+#else
+ while (engineState != PGS_Quit)
+ sceKernelDelayThread(1024 * 1024);
+#endif
+
+ return 0;
+}
+
+#endif
+
+int psp_unhandled_suspend = 0;