Commit graph

270 commits

Author SHA1 Message Date
刘皓
37a7559e38
Remove dependency on ghc::filesystem in libretro builds 2025-02-01 13:03:13 -05:00
刘皓
f03d8e3f5d
Embed mkxp-z version into the libretro core 2025-01-31 23:35:20 -05:00
刘皓
4a730f5e8b
Use a newer version of OpenAL Soft in libretro builds
The Emscripten build was crashing because of some unaligned memory
access in OpenAL Soft. Hopefully this fixes it.
2025-01-31 17:28:34 -05:00
刘皓
e598114a73
Fix OpenAL symbol conflict in libretro Emscripten build 2025-01-30 21:25:20 -05:00
刘皓
b6993d7f37
Add Emscripten and PlayStation Vita builds to libretro CI 2025-01-29 20:37:53 -05:00
刘皓
b249ad0d98
Add Ogg, Vorbis and libsndfile to libretro builds 2025-01-28 23:25:17 -05:00
刘皓
66720a5bc0
Use embedded GMGSx.sf2 as soundfont in libretro builds 2025-01-27 13:15:55 -05:00
刘皓
b1133b78f7
Fix some libretro compilation errors on Android, Darwin, Nintendo and Windows 2025-01-27 11:48:53 -05:00
刘皓
c42949713d
Start integrating the audio code into libretro builds 2025-01-27 00:34:52 -05:00
刘皓
84ca884f84
Reimplement WASI filesystem on top of existing mkxp-z filesystem implementation
This allows more flexibility when loading games in libretro builds,
since we can now load games either from a directory or from a ZIP or 7Z
archive. Also, the path cache is now active for all filesystem calls
made from inside Ruby.
2025-01-25 22:03:52 -05:00
刘皓
a44f3b16b3
Add SDL headers and PhysFS to libretro builds
I don't think I'll be needing SDL. Pretty sure about 100% of the
functionality of SDL that's currently being used here is either trivial
to reimplement or needs to be replaced for the libretro core to work in
the first place. For example, I already know I'm going to need to
completely replace the SDL input handling with libretro's input API.
Also, I'll need to get rid of the use of SDL threads in the audio code
later because libretro cores need to render audio synchronously with the
video rendering.

I'm including the SDL headers, though, to reduce the number of
compilation errors.
2025-01-24 23:56:00 -05:00
刘皓
dee41c7b79
Add OpenAL Soft as a dependency in libretro builds 2025-01-23 19:15:52 -05:00
刘皓
7d753e2655
Implement even more of binding-sandbox
I've made it so that `Graphics.update` pauses the Ruby VM and returns to
the libretro frontend. Once the libretro frontend calls `retro_run()`
again, the Ruby VM resumes. This allows the libretro frontend to control
the rendering loop.
2025-01-22 21:52:55 -05:00
刘皓
739185594e
Implement more of binding-sandbox 2025-01-22 11:52:10 -05:00
刘皓
019812f71e
Start writing class/method stubs for binding-sandbox
I know I've got a long road ahead of me. I'm committing my work so far
for future reference and so that I can check for CI failures.
2025-01-21 12:56:17 -05:00
刘皓
6d3296906d
Move VALUE alignment test from meson.build to sandbox-bindgen 2025-01-19 22:37:20 -05:00
刘皓
379c22833f
Store coroutine variables in the Ruby stack in libretro builds
To stop Ruby's garbage collector from freeing Ruby `VALUE`s while we're
in the middle of using them in libretro builds, we need to make sure all
the `VALUE`s we use are on the sandbox's stack.

Also, to allow Ruby to recognize `VALUE`s on the sandbox's stack on
big-endian targets, I've changed the serialization of `VALUE`s. Before,
any `VALUE`s returned by a sandbox function were always converted to the
target's endian, and any `VALUE`s passed to sandbox functions as
argument were then converted back to WebAssembly's endianness,
little-endian. Now, `VALUE`s are always little-endian; they are no
longer converted to the target's endianness. That should be fine since
`VALUE`s are supposed to be opaque values.
2025-01-19 19:08:03 -05:00
刘皓
510f1b0211
Move sandbox files to binding-sandbox directory 2025-01-16 22:16:14 -05:00
刘皓
16f21ff043
Disable -fPIC when building for PlayStation Portable
The PSPDEV toolchain doesn't seem to support position independent code.
2025-01-16 11:49:11 -05:00
刘皓
0602c97a0a
Fix dependency compilation errors when compiling for Nintendo consoles 2025-01-16 01:33:44 -05:00
刘皓
44b8d13ff8
Add Nintendo consoles, PS2 and PSP to libretro CI
I'll also add PlayStation Vita and Xbox once I figure out how.

Other than that, I think that's all the game consoles RetroArch supports
that aren't Linux-based!
2025-01-15 22:10:50 -05:00
刘皓
fe5e23a5bc
Fix crash when libretro core is reset 2025-01-15 18:28:22 -05:00
刘皓
b1131c1a7b
Fix Android libretro builds 2025-01-14 18:51:56 -05:00
刘皓
688544096f
Add Alpine Linux and Android to libretro CI 2025-01-13 23:09:39 -05:00
刘皓
e31dd0f32e
Improve compilation flags for libretro builds 2025-01-10 17:57:10 -05:00
刘皓
2a204178fe
Implement stackful coroutine-based executor for libretro builds
This executor has the advantage of being able to work correctly when
there are Ruby stack frames underneath C/C++ stack frames in the stack.

Still need to implement handling Ruby fibers.
2025-01-08 19:39:48 -05:00
刘皓
c4d5d8af97
Turn all sandbox bindings into coroutines
We can't have them as normal functions because reentrant calls into the
Ruby API don't work if you do that, i.e. calling into the Ruby API and
that calls mkxp-z's bindings and that calls back into the Ruby API.
2025-01-07 00:02:09 -05:00
刘皓
7de761873c
Fix _sbindgen_create_func_ptr() implementation 2025-01-04 22:27:02 -05:00
刘皓
3e79e8b390
Add binding generator for Ruby in libretro builds 2025-01-04 18:13:44 -05:00
刘皓
adf4fbf758
Rename lzma subproject to liblzma 2025-01-03 17:42:44 -05:00
刘皓
acb55e42bd
Add the -static flag back into Windows builds
Meson documentation lied to me...
2025-01-03 01:35:35 -05:00
刘皓
e6a6288fc4
Fix libretro Linux builds 2025-01-03 01:20:22 -05:00
刘皓
caf0f7ef32
Statically link C++ standard library and libpthread on libretro Windows 2025-01-03 00:04:21 -05:00
刘皓
cc52f2e332
Make libzip Meson subproject use header files from the other Meson subprojects 2025-01-02 18:54:50 -05:00
刘皓
77b7dda096
Add all dependencies of libretro build as Meson subprojects 2025-01-02 17:51:22 -05:00
刘皓
a32646ff72
Define WABT_BIG_ENDIAN=1 on big-endian hosts
WebAssembly is little-endian regardless of what machine you run it on,
so the WebAssembly implementation needs to know if the machine is
big-endian or little-endian to function properly.
2025-01-01 17:36:52 -05:00
刘皓
2723b3396b
Only use gnu_symbol_visibility on macOS 2025-01-01 15:53:04 -05:00
刘皓
5893b94ac7
Replace linker flags in libretro builds with equivalent Meson options 2025-01-01 15:06:28 -05:00
刘皓
42cccfd03d
Only use pkg-config in macOS builds 2025-01-01 14:55:19 -05:00
刘皓
70959f5368
Add macOS aarch64 build to CI 2025-01-01 13:54:17 -05:00
刘皓
a56ec3ff7a
Apply some fixes to libretro CI builds 2025-01-01 02:13:15 -05:00
刘皓
e4b6a75b4a
Add Libretro Linux cross builds and Libretro Windows build to CI 2025-01-01 01:53:26 -05:00
刘皓
69fdcc0f20
Implement a generic WASI filesystem for ZIP files 2024-12-30 19:01:57 -05:00
刘皓
765afcaaa1
Define WASM_RT_TRAP_HANDLER 2024-12-30 14:12:52 -05:00
刘皓
fce135cd38
Statically link libzip and zlib 2024-12-30 13:14:27 -05:00
刘皓
ac552d6d91
Fix non-libretro builds 2024-12-29 23:58:38 -05:00
刘皓
27df4f018c
Upload base libretro core files 2024-12-29 23:35:35 -05:00
Splendide Imaginarius
631ed45c28 Support Windows resources outside of repo directory 2023-10-26 04:10:26 +00:00
Splendide Imaginarius
77d05ed600 Make the Windows resources customisable at build time
Ported from original mkxp-zr commit by Riley Pierce.
2023-10-25 23:12:35 +00:00
Struma
fa0e60b7fc Add git hash to System::VERSION
I don't really plan on putting out another "release tag" anytime soon,
so the hash for the current git commit is being added to the version string
to help tell the difference between one build and the other.
2023-05-19 08:49:32 -04:00