PSP: Fix launcher not displaying and fix game usually crashing after several seconds (Thanks Zekiu, fixes #1144 and fixes #1145)

This commit is contained in:
UnknownShadow200 2024-02-06 11:52:14 +11:00
parent 13a7f49658
commit 57cbd94469
3 changed files with 10 additions and 4 deletions

View File

@ -76,10 +76,10 @@ And also runs on:
* Wii - unfinished, but usable (can [download from here](https://www.classicube.net/download/wii)) * Wii - unfinished, but usable (can [download from here](https://www.classicube.net/download/wii))
* GameCube - unfinished, but usable (can [download from here](https://www.classicube.net/download/gamecube)) * GameCube - unfinished, but usable (can [download from here](https://www.classicube.net/download/gamecube))
* Dreamcast - unfinished, but renders (can [download from here](https://www.classicube.net/download/dreamcast)) * Dreamcast - unfinished, but renders (can [download from here](https://www.classicube.net/download/dreamcast))
* PSP - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/psp), **untested on real hardware**) * PSP - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/psp))
* PS Vita - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/vita), **untested on real hardware**) * PS Vita - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/vita))
* Xbox - unfinished, major rendering issues (can [download from here](https://www.classicube.net/download/xbox), **untested on real hardware**) * Xbox - unfinished, major rendering issues (can [download from here](https://www.classicube.net/download/xbox), **untested on real hardware**)
* PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/ps3), **untested on real hardware**) * PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/ps3), **usually outdated**)
* Nintendo 64 - unfinished, moderate rendering issues * Nintendo 64 - unfinished, moderate rendering issues
* PS2 - unfinished, major rendering and stability issues * PS2 - unfinished, major rendering and stability issues

View File

@ -398,6 +398,11 @@ cc_result Socket_CheckWritable(cc_socket s, cc_bool* writable) {
*#########################################################################################################################*/ *#########################################################################################################################*/
void Platform_Init(void) { void Platform_Init(void) {
/*pspDebugSioInit();*/ /*pspDebugSioInit();*/
// Disabling FPU exceptions avoids sometimes crashing with this line in Physics.c
// *tx = vel->x == 0.0f ? MATH_LARGENUM : Math_AbsF(dx / vel->x);
// TODO: work out why this error is actually happening (inexact or underflow?) and properly fix it
pspSdkDisableFPUExceptions();
} }
void Platform_Free(void) { } void Platform_Free(void) { }

View File

@ -13,6 +13,7 @@
#include <pspdisplay.h> #include <pspdisplay.h>
#include <pspge.h> #include <pspge.h>
#include <pspctrl.h> #include <pspctrl.h>
#include <pspkernel.h>
#define BUFFER_WIDTH 512 #define BUFFER_WIDTH 512
#define SCREEN_WIDTH 480 #define SCREEN_WIDTH 480
@ -124,7 +125,7 @@ void Window_DrawFramebuffer(Rect2D r, struct Bitmap* bmp) {
void* fb = sceGeEdramGetAddr(); void* fb = sceGeEdramGetAddr();
sceDisplayWaitVblankStart(); sceDisplayWaitVblankStart();
sceDisplaySetFrameBuf(fb, BUFFER_WIDTH, PSP_DISPLAY_PIXEL_FORMAT_8888, PSP_DISPLAY_SETBUF_IMMEDIATE); sceDisplaySetFrameBuf(fb, BUFFER_WIDTH, PSP_DISPLAY_PIXEL_FORMAT_8888, PSP_DISPLAY_SETBUF_NEXTBUF);
cc_uint32* src = (cc_uint32*)bmp->scan0 + r.x; cc_uint32* src = (cc_uint32*)bmp->scan0 + r.x;
cc_uint32* dst = (cc_uint32*)fb + r.x; cc_uint32* dst = (cc_uint32*)fb + r.x;