psp late-night fixes
authornotaz <notasas@gmail.com>
Sun, 18 Nov 2007 00:26:41 +0000 (00:26 +0000)
committernotaz <notasas@gmail.com>
Sun, 18 Nov 2007 00:26:41 +0000 (00:26 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@299 be3aeb3a-fb24-0410-a615-afba39da0efa

base_readme.txt
psp/Makefile
psp/mp3.c
psp/psp.c

index db904b5..62edaaf 100644 (file)
@@ -166,12 +166,14 @@ mid-frame image changes (raster effects), so it is useful only with some games.
 \r
 Other two are accurate line-based renderers. The 8bit is faster but does not\r
 run well with some games like Street Racer.\r
+\r
 #endif\r
 #ifdef GIZ\r
 This option allows to switch between 16bit and 8bit renderers. The 8bit one is\r
 a bit faster for some games, but not much, because colors still need to be\r
 converted to 16bit, as this is what Gizmondo requires. It also introduces\r
 graphics problems for some games, so it's best to use 16bit one.\r
+\r
 #endif\r
 #ifdef PSP\r
 This option allows to switch between fast and accurate renderers. The fast one\r
@@ -179,8 +181,8 @@ is much faster, because it draws the whole frame at a time, instead of doing it
 line by line, like the accurate one does. But because of the way it works it\r
 can't render any mid-frame image changes (raster effects), so it is useful only\r
 for some games.\r
-#endif\r
 \r
+#endif\r
 #ifdef GIZ\r
 @@0. "Scanline mode"\r
 This option was designed to work around slow framebuffer access (the Gizmondo's\r
@@ -196,14 +198,15 @@ averaging and may look a bit nicer, but blurry. Horizontal scaling is only for
 games which use so called "32 column mode" (256x224 or 256x240), and scales\r
 image width to 320 pixels. Vertical scales height to 240 for games which use\r
 height 224 (most of them).\r
+\r
 #endif\r
 #ifdef GIZ\r
 @@0. "Scale low res mode"\r
 The Genesis/Megadrive had several graphics modes, some of which were only 256\r
 pixels wide. This option scales their width to 320 by using simple\r
 pixel averaging scaling. Works only when 16bit renderer is enabled.\r
-#endif\r
 \r
+#endif\r
 @@0. "Accurate timing"\r
 This adds some more emulation precision, but slows the emulation down. Without\r
 this option some games do not boot (Red Zone for example), others have sound\r
index d18c332..9161ea6 100644 (file)
@@ -70,7 +70,7 @@ endif
 OBJS += data/bg32.o data/bg40.o\r
 \r
 \r
-LIBS += -lpng -lm -lpspgu -lpsppower -lpspaudio -lpsprtc -lpspaudiocodec\r
+LIBS += -lpng -lm -lpspgu -lpsppower -lpspaudio -lpsprtc -lpspaudiocodec -lpspkubridge\r
 #LIBS += -lpspprof\r
 LDFLAGS += -Wl,-Map=PicoDrive.map\r
 \r
index ce12788..456b72b 100644 (file)
--- a/psp/mp3.c
+++ b/psp/mp3.c
@@ -9,6 +9,7 @@
 #include <pspkernel.h>
 #include <pspsdk.h>
 #include <pspaudiocodec.h>
+#include <kubridge.h>
 
 #include "../../Pico/PicoInt.h"
 #include "../../Pico/sound/mix.h"
@@ -132,9 +133,20 @@ static int read_next_frame(int which_buffer)
 
 static SceUID load_start_module(const char *prxname)
 {
-       SceUID mod = pspSdkLoadStartModule(prxname, PSP_MEMORY_PARTITION_KERNEL);
-       if (mod < 0)
-               lprintf("failed to load %s: %08x\n", prxname, mod);
+       SceUID mod, mod1;
+       int status, ret;
+
+       mod = pspSdkLoadStartModule(prxname, PSP_MEMORY_PARTITION_KERNEL);
+       if (mod < 0) {
+               lprintf("failed to load %s (%08x), trying kuKernelLoadModule\n", prxname, mod);
+               mod1 = kuKernelLoadModule(prxname, 0, NULL);
+               if (mod1 < 0) lprintf("kuKernelLoadModule failed with %08x\n", mod1);
+               else {
+                       ret = sceKernelStartModule(mod1, 0, NULL, &status, 0);
+                       if (ret < 0) lprintf("sceKernelStartModule failed with %08x\n", ret);
+                       else mod = mod1;
+               }
+       }
        return mod;
 }
 
index 99b9084..a4b7698 100644 (file)
--- a/psp/psp.c
+++ b/psp/psp.c
@@ -127,6 +127,7 @@ void psp_init(void)
 
 void psp_finish(void)
 {
+       lprintf("psp_finish..\n");
        sceGuTerm();
 
        //sceKernelSleepThread();