Skip to content

Add NXDK (Xbox) support - #139

Merged
cgutman merged 1 commit into
moonlight-stream:masterfrom
ReenigneArcher:nxdk-compat
Jun 23, 2026
Merged

Add NXDK (Xbox) support#139
cgutman merged 1 commit into
moonlight-stream:masterfrom
ReenigneArcher:nxdk-compat

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Contributor

This PR adds NXDK (Original Xbox) support. This is required for https://github.com/LizardByte/Moonlight-XboxOG

Requires cgutman/enet#24

Comment thread src/Platform.h Outdated
Comment thread src/Platform.c
Comment thread src/Platform.h
@ReenigneArcher
ReenigneArcher force-pushed the nxdk-compat branch 3 times, most recently from c944d5c to f7ad9ef Compare May 24, 2026 03:45
@ReenigneArcher
ReenigneArcher marked this pull request as ready for review May 24, 2026 03:45
@ReenigneArcher

Copy link
Copy Markdown
Contributor Author

I should add. I also had to make changes to NXDK to get everything working. I have not yet submitted these upstream, but will be doing so after changes here are approved.

XboxDev/nxdk@master...ReenigneArcher:nxdk:moonlight (This also includes changes required for compiling OpenSSL with NXDK)

@ReenigneArcher

Copy link
Copy Markdown
Contributor Author

I should add. I also had to make changes to NXDK to get everything working. I have not yet submitted these upstream, but will be doing so after changes here are approved.

XboxDev/nxdk@master...ReenigneArcher:nxdk:moonlight (This also includes changes required for compiling OpenSSL with NXDK)

I've submitted required changes to nxdk via the following PRs:

@ReenigneArcher
ReenigneArcher requested a review from cgutman June 22, 2026 13:17
Comment thread nanors/deps/obl/oblas_lite.c Outdated
Comment thread src/Platform.h Outdated
Comment thread src/rswrapper.c Outdated
#define invert_mat DECORATE_FUNC(invert_mat, ISA_SUFFIX)

#if defined(__x86_64__) || defined(__i386__) || (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64)))
#if !defined(NXDK) && (defined(__x86_64__) || defined(__i386__) || (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the compiler complain about for these?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It compiles, but the original Xbox CPU does not have these instruction sets so it always uses the _def option.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, just leave it alone and let it fall back to _def as intended.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cgutman so, it turns out this guard is needed for compilation to succeed on ubuntu hosts. It works without on Windows and macOS.

Maybe due to differences in clang?

  • Ubuntu - Clang 18.1.3 with GNU-like command-line
  • Windows - 22.1.7 (via MINGW64)
  • macOS - AppleClang 17.0.0.17000013

https://github.com/LizardByte/Moonlight-XboxOG/actions/runs/28066137455/job/83090785647?pr=191#step:9:4563

Is it okay if I open a PR to add it back or do you have another recommendation?

@ReenigneArcher
ReenigneArcher marked this pull request as ready for review June 23, 2026 20:42
@ReenigneArcher

ReenigneArcher commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Did one more pass and was able to remove a couple of the guards.

@ReenigneArcher
ReenigneArcher requested a review from cgutman June 23, 2026 20:43
@cgutman
cgutman merged commit 40d8731 into moonlight-stream:master Jun 23, 2026
11 checks passed
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.

2 participants