| Age | Commit message (Collapse) | Author |
|
|
|
|
|
We now build STB image library directly in the `cart` module, so
we no longer need to build it as a static library.
|
|
In order to play around and understand how to use WAMR and what
host functions are actually needed by the PICO-8 WASM module, add
some test code to PICO-w. **This will be removed**.
|
|
The `png` module was tiny and not worth being on its own. Instead
build the STB image code into a `lib/stbi.c`. This was prompted
because we wanted to lint with `clang-tidy` and it was pulling in
STB code because it is a single header library.
|
|
Update WAMR to the latest release (2.4.4). Note that we needed to
pull in a couple additional unused headers (AoT related stuff,
which we do not have enabled).
|
|
We now build WAMR sources directly into our binary (instead of using a
static library). Additionally, we now split the build into multiple
files to make things more manageable.
|
|
We now embed the PICO-w sysroot files (the WASM blob,
data pod and boot rom) into the final `picow` binary in
order to simplify distribution. This commit adds a new
`generate-sysroot` tool to achieve it.
|
|
In our WAMR test, export memory and table to make sure the runtime works
with the PICO-8 WASM blob.
|
|
We now support global imports; this was quite a bit more complicatd than
expected:
1. `clang` does not have a built-in mechanism for emitting Wasm with
global imports, so we need to do some manual `__asm__` in order to
get it to work.
2. There are not runtime functions in WARM for linking global imports in
a module. We added a runtime function for manually linking global
imports with a specified list of native globals. In theory, it would
have been nice to register the globals so that they get linked at
module initialization time, but this would have been a lot more work
as it would have required editing the loader code.
|
|
We now have a dedicated `custom` folder, and build is a bit nicer IMO.
No idea how to global imports works though :/
|
|
We can now run the fibonacci program, including a native function
import. This is a great first step, and now we need to start
implementing PICO-8 library functions (basically, `emcc` library, but
one that is both more stubbed and supports the `setjmp` and `longjmp`
which does not appear to be the case for the included implementation
in WAMR).
But before, a small build system refactoring detour to make building
WAMR and PICO-w easier for both SDL platforms and Vita platform.
Additionally, the platform stubs that we use in the WAMR test might
need to change a bit, in order to allow PICO-w SDL and Vita platforms
to implement certain details differently.
|
|
However, it looks like the native function we install isn't getting
called correctly for whatever reason. I wonder if it is related to the
fact that we are using the `invokeNative_general` implementation
instead of the dedicated `aarch64` one?
|
|
We compile, link, and load a module. We are still erroring out, but we
are getting closer little by litte!
|
|
There are a bunch of symbols that the linker can't find that we need to
start stubbing. I _hope_ the PS Vita has enough support for all of them!
|
|
It requires us to stub a bunch of Unix APIs, and we will arguably need
to implement a custom version that matches the behaviour of the PICO-8
exported JavaScript file.
|
|
We can now build WAMR with a stubbed platform, but no idea if it
actually works and links!
|
|
We can decode PNGs from memory buffers, and soon be able to also load
the cart roms from there.
Still need to figure out if how the scanlines are organized in memory
are correct, or if I got some order backwards (I'm new to C
multi-dimentional arrays hehe...)
|
|
We now start an SDL3 front-end for PICO-w. We can load roms :)
|