diff --git a/credits.txt b/credits.txt index 7f1fd4990..b564f03da 100644 --- a/credits.txt +++ b/credits.txt @@ -8,9 +8,9 @@ The OSX port would not have been possible without you, thanks! * Jerralish - reverse engineering and documenting the original classic map generation algorithm. * 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. * 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), who in the past have provided many suggestions and assisted in identifying bugs. diff --git a/readme.md b/readme.md index 1bb4e7f6e..0d81f9240 100644 --- a/readme.md +++ b/readme.md @@ -82,6 +82,7 @@ And also runs on: * 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)) * 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 @@ -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) +#### 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 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 * [ps2sdk](https://github.com/ps2dev/ps2sdk) - Backend for PS2 * [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 diff --git a/src/Platform_PSP.c b/src/Platform_PSP.c index b3dd1a8e1..43398dbf2 100644 --- a/src/Platform_PSP.c +++ b/src/Platform_PSP.c @@ -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) { #define CC_THREAD_PRIORITY 17 // TODO: 18? #define CC_THREAD_ATTRS 0 // TODO PSP_THREAD_ATTR_VFPU? + Thread_StartFunc func_ = func; int threadID = sceKernelCreateThread(name, ExecThread, CC_THREAD_PRIORITY, stackSize, CC_THREAD_ATTRS, NULL); diff --git a/src/Platform_PSVita.c b/src/Platform_PSVita.c index 525ebe237..e5e47c232 100644 --- a/src/Platform_PSVita.c +++ b/src/Platform_PSVita.c @@ -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) { #define CC_THREAD_PRIORITY 0x10000100 #define CC_THREAD_ATTRS 0 // TODO PSP_THREAD_ATTR_VFPU? + Thread_StartFunc func_ = func; int threadID = sceKernelCreateThread(name, ExecThread, CC_THREAD_PRIORITY, 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_); } -void Thread_Start2(void* handle, Thread_StartFunc func) { - Thread_StartFunc func_ = func; - sceKernelStartThread((int)handle, sizeof(func_), (void*)&func_); -} - void Thread_Detach(void* handle) { sceKernelDeleteThread((int)handle); // TODO don't call this?? }