Commit graph

95 commits

Author SHA1 Message Date
刘皓
9f33a0acea
Implement image loading in libretro builds 2025-02-25 12:53:57 -05:00
刘皓
8ed8dd14ee
Add stb_image and PortableGL to libretro builds 2025-02-24 23:22:00 -05:00
刘皓
2029539ece
Replace pixman with pixman-region in libretro builds 2025-02-24 17:13:25 -05:00
刘皓
3506ce6cc6
Make sure pixman inherits compiler flags in libretro builds 2025-02-24 16:44:00 -05:00
刘皓
81c272cb9f
Add libpng and pixman to libretro builds 2025-02-24 15:32:02 -05:00
刘皓
9ed11ecffa
Use libretro's PlayStation 3 Docker image instead of ScummVM's 2025-02-22 16:04:51 -05:00
刘皓
9e4a221240
Fix many, many compilation errors in libretro PlayStation 3 builds 2025-02-21 14:06:28 -05:00
刘皓
f8d5fc06f5
Disable PIC in static libretro builds
Apparently Vita SDK doesn't support PIC. It throws "Invalid relocation
type 25!" while creating the .self file when building RetroArch.
2025-02-21 00:17:01 -05:00
刘皓
6cbf1b34ca
Move the FLAC fix for Vita SDK into meson.build 2025-02-20 19:20:01 -05:00
刘皓
8559091afd
Fix mpg123-related libsndfile linking error in libretro Vita SDK builds 2025-02-20 18:36:02 -05:00
刘皓
fc26ac927b
Add a pthreads shim for libretro builds on platforms without pthreads 2025-02-20 12:49:36 -05:00
刘皓
9343a5084b
Build FLAC in integer-only mode in libretro PlayStation Vita builds 2025-02-19 01:53:10 -05:00
刘皓
4d9de19266
Prelink manually instead of relying on Meson's prelink kwarg 2025-02-13 21:02:29 -05:00
刘皓
4fdb7316b2
Enable prelinking in static libretro builds 2025-02-13 19:42:29 -05:00
刘皓
76c802b901
Fix linker errors in libretro Nintendo Switch build 2025-02-12 21:30:18 -05:00
刘皓
322caeb628
Fix some libretro build errors for game consoles 2025-02-12 12:49:25 -05:00
刘皓
206e8508b6
Replace WABT's WebAssembly runtime with a custom implementation 2025-02-11 20:40:55 -05:00
刘皓
fdee58f33d
Fix mpg123 compilation error when targeting Emscripten 2025-02-10 02:04:41 -05:00
刘皓
e52e1a483b
Enable libsndfile's support for FLAC, MP3, Opus and Vorbis in libretro builds 2025-02-09 18:37:32 -05:00
刘皓
1706584e9d
Split patch files for libretro builds into smaller files 2025-02-03 23:55:44 -05:00
刘皓
d7e002f9b0
Compile Ruby with -Oz -DNDEBUG in libretro builds 2025-02-02 17:05:15 -05:00
刘皓
93d0cabd53
Disable OpenAL Soft's event thread in libretro builds
I don't think we need the event thread when all we're doing is rendering
to OpenAL Soft's loopback driver. Besides, the event thread was causing
crashes in Emscripten builds.
2025-01-31 20:51: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
刘皓
23b6a931d8
Stop OpenAL Soft from enabling -pthread when targeting Emscripten 2025-01-31 12:27:27 -05:00
刘皓
ba5a5386ed
Don't initialize PhysFS basedir and userdir in libretro builds 2025-01-31 01:07:02 -05:00
刘皓
9f8d321c84
Use a better method of fixing the Emscripten OpenAL symbol conflict 2025-01-30 22:55: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
刘皓
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
刘皓
973b33e3e5
Fix PhysFS compilation errors in libretro builds 2025-01-25 00:58:11 -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
刘皓
afed16f086
Fix OpenAL Soft devkitPro compilation errors 2025-01-24 11:37:31 -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
刘皓
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
刘皓
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
刘皓
688544096f
Add Alpine Linux and Android to libretro CI 2025-01-13 23:09:39 -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
刘皓
adf4fbf758
Rename lzma subproject to liblzma 2025-01-03 17:42:44 -05:00
刘皓
ff6d72f617
Fix LZMA compilation error on Windows 2025-01-02 19:15:15 -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
刘皓
fce135cd38
Statically link libzip and zlib 2024-12-30 13:14:27 -05:00