Add Switch to readme and fix PSP/PS Vita builds

This commit is contained in:
UnknownShadow200 2024-03-17 07:31:59 +11:00
parent 83ba419a06
commit 514d16a313
4 changed files with 14 additions and 6 deletions

View File

@ -8,9 +8,9 @@
The OSX port would not have been possible without you, thanks! The OSX port would not have been possible without you, thanks!
* Jerralish - reverse engineering and documenting the original classic map generation algorithm. * Jerralish - reverse engineering and documenting the original classic map generation algorithm.
* Cybertoon - Adding water animation, better metal step/dig sounds, identifying multiple flaws * Cybertoon - Adding water animation, better metal step/dig sounds, identifying multiple flaws
* FabTheZen - suggestions about how to improve user experience, testing.
* Cheesse - multiple suggestions, testing ClassicalSharp on AMD graphics cards. * Cheesse - multiple suggestions, testing ClassicalSharp on AMD graphics cards.
* Hemsindor - testing ClassicalSharp on OSX. * Hemsindor - testing ClassicalSharp on OSX.
* headshotnoby - developing the Switch port
And a big thanks to everyone else in the ClassiCube community (who I didn't mention here), And a big thanks to everyone else in the ClassiCube community (who I didn't mention here),
who in the past have provided many suggestions and assisted in identifying bugs. who in the past have provided many suggestions and assisted in identifying bugs.

View File

@ -82,6 +82,7 @@ And also runs on:
* PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/ps3), **usually outdated**) * PS3 - unfinished, rendering issues (can [download from here](https://www.classicube.net/download/ps3), **usually outdated**)
* Nintendo 64 - unfinished, moderate rendering issues (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_n64.yml)) * Nintendo 64 - unfinished, moderate rendering issues (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_n64.yml))
* PS2 - unfinished, major rendering and **stability issues** (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_ps2.yml)) * PS2 - unfinished, major rendering and **stability issues** (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_ps2.yml))
* Switch - unfinished, but usable (if you have a GitHub account, can [download from here](https://github.com/ClassiCube/ClassiCube/actions/workflows/build_switch.yml))
# Compiling # Compiling
@ -260,6 +261,14 @@ Run `make gamecube`. You'll need [libogc](https://github.com/devkitPro/libogc)
The GC port needs assistance from someone experienced with GameCube homebrew development - if you're interested, please get in contact with me. (`unknownshadow200` on Discord) The GC port needs assistance from someone experienced with GameCube homebrew development - if you're interested, please get in contact with me. (`unknownshadow200` on Discord)
#### Switch
Run `make switch`. You'll need [libnx](https://github.com/switchbrew/libnx) and [mesa](https://github.com/devkitPro/mesa)
**NOTE: It is highly recommended that you install the precompiled devkitpro packages from [here](https://devkitpro.org/wiki/Getting_Started) - you need the `switch-dev` group and the `switch-mesa switch-glad switch-glm` packages)**
The Switch port needs assistance from someone experienced with Switch homebrew development - if you're interested, please get in contact with me. (`unknownshadow200` on Discord)
#### PlayStation Portable #### PlayStation Portable
Run `make psp`. You'll need [pspsdk](https://github.com/pspdev/pspsdk) Run `make psp`. You'll need [pspsdk](https://github.com/pspdev/pspsdk)
@ -359,6 +368,8 @@ Further information (e.g. style) for ClassiCube's source code can be found in th
* [ares](https://github.com/ares-emulator/ares) - Emulator used to test Nintendo 64 port * [ares](https://github.com/ares-emulator/ares) - Emulator used to test Nintendo 64 port
* [ps2sdk](https://github.com/ps2dev/ps2sdk) - Backend for PS2 * [ps2sdk](https://github.com/ps2dev/ps2sdk) - Backend for PS2
* [PCSX2](https://github.com/PCSX2/pcsx2) - Emulator used to test PS2 port * [PCSX2](https://github.com/PCSX2/pcsx2) - Emulator used to test PS2 port
* [libnx](https://github.com/switchbrew/libnx) - Backend for Switch
* [Ryujinx](https://github.com/Ryujinx/Ryujinx) - Emulator used to test Switch port
## Sound Credits ## Sound Credits

View File

@ -221,6 +221,7 @@ static int ExecThread(unsigned int argc, void *argv) {
void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char* name) { void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char* name) {
#define CC_THREAD_PRIORITY 17 // TODO: 18? #define CC_THREAD_PRIORITY 17 // TODO: 18?
#define CC_THREAD_ATTRS 0 // TODO PSP_THREAD_ATTR_VFPU? #define CC_THREAD_ATTRS 0 // TODO PSP_THREAD_ATTR_VFPU?
Thread_StartFunc func_ = func;
int threadID = sceKernelCreateThread(name, ExecThread, CC_THREAD_PRIORITY, int threadID = sceKernelCreateThread(name, ExecThread, CC_THREAD_PRIORITY,
stackSize, CC_THREAD_ATTRS, NULL); stackSize, CC_THREAD_ATTRS, NULL);

View File

@ -205,6 +205,7 @@ static int ExecThread(unsigned int argc, void *argv) {
void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char* name) { void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char* name) {
#define CC_THREAD_PRIORITY 0x10000100 #define CC_THREAD_PRIORITY 0x10000100
#define CC_THREAD_ATTRS 0 // TODO PSP_THREAD_ATTR_VFPU? #define CC_THREAD_ATTRS 0 // TODO PSP_THREAD_ATTR_VFPU?
Thread_StartFunc func_ = func;
int threadID = sceKernelCreateThread(name, ExecThread, CC_THREAD_PRIORITY, int threadID = sceKernelCreateThread(name, ExecThread, CC_THREAD_PRIORITY,
stackSize, CC_THREAD_ATTRS, 0, NULL); stackSize, CC_THREAD_ATTRS, 0, NULL);
@ -213,11 +214,6 @@ void Thread_Run(void** handle, Thread_StartFunc func, int stackSize, const char*
sceKernelStartThread(threadID, sizeof(func_), (void*)&func_); sceKernelStartThread(threadID, sizeof(func_), (void*)&func_);
} }
void Thread_Start2(void* handle, Thread_StartFunc func) {
Thread_StartFunc func_ = func;
sceKernelStartThread((int)handle, sizeof(func_), (void*)&func_);
}
void Thread_Detach(void* handle) { void Thread_Detach(void* handle) {
sceKernelDeleteThread((int)handle); // TODO don't call this?? sceKernelDeleteThread((int)handle); // TODO don't call this??
} }