Skip to content

Update constants and structs' layouts with reversed ones, fix code using them - #35

Open
lateleite wants to merge 10 commits into
OpenOrbis:masterfrom
lateleite:master
Open

Update constants and structs' layouts with reversed ones, fix code using them#35
lateleite wants to merge 10 commits into
OpenOrbis:masterfrom
lateleite:master

Conversation

@lateleite

Copy link
Copy Markdown

Hey,

Here's what this patch changes:

  • Updates structure and constants with their correct/reversed definitions;
  • Changes all functions impacted by the previous definitions change;
  • Replaces musl's internal wake and wait futex uses with FreeBSD's umtx;
  • Disables compilation on some API functions that are implemented by libkernel itself, or that can't be implemented on Orbis OS;
  • Fixes some pointer casts that Zig's C compiler complained about.

Sources used:

  • FreeBSD 9.00's source code
  • Kernel and user libraries dump of the retail firmware version 9.00

I've tested this changes on my PS4 by compiling and running OpenOrbis' graphics and network samples, along with a personal Zig test project.
NOTE: I didn't try rebuilding libc++.
Test environment:

  • Clang and LLD version: 22.1.8
  • Firmware: retail 9.00

Whether or not this patch gets accepted, I would appreciate if someone could verify if these updated definitions are correct, since I would like to try sending Zig a patch adding PS4 support to their std library and use this as a source of truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant