Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PSP support #319

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add PSP support #319

wants to merge 7 commits into from

Conversation

vichoca9
Copy link

@vichoca9 vichoca9 commented Aug 15, 2024

The main issue with PSP was the crashes due to misaligned data. Now it works, but some issues were avoided in order for it to work (ini_process_word and such). Tested on real hardware (psp 2004 slim).

Note: Game still crashes whenever a short array[] op is done, due to the pragma(pop) and such (auto_moves,etc).

Copy link

@sharkwouter sharkwouter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some suggestions. It's really cool you got this running. We should take a look at why the you're getting crashes from the existing code. Some of these things may be related to us using gcc 14, which would mean easy fixes are available. Otherwise there might be some bugs in the PSPDEV sdk.

@@ -120,5 +121,31 @@ if(WIN32)
elseif(APPLE)
target_link_libraries(prince SDL2main SDL2 SDL2_image m)
else() # Linux, *BSD, etc.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep this else and use elseif(PSP)

src/CMakeLists.txt Outdated Show resolved Hide resolved
src/types.h Outdated
Comment on lines 1352 to 1356
#ifdef __PSP__ //for testing, PSP only reads input at 333mhz with 60 FPS
#define BASE_FPS 60
#else
#define BASE_FPS 60
#endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look out of place

src/seg009.c Outdated
Uint64 timer_last_counter[NUM_TIMERS];
#endif
int wait_time[NUM_TIMERS];


#ifdef USE_COMPAT_TIMER
//#if defined(USE_COMPAT_TIMER) || defined(__PSP__)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems off

vichoca9 and others added 3 commits August 18, 2024 14:43
Use pkg_search and findpkgconfig

Co-authored-by: Wouter Wijsman <[email protected]>
src/CMakeLists.txt Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants