-
Notifications
You must be signed in to change notification settings - Fork 6
Feature/nx #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/nx #155
Changes from 21 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
e33b89f
Initial infra
alloncm d80ceac
Link with magenboy_nx
alloncm 57fc2d2
WIP link rust to c
alloncm 52f0979
Managed to write logs from rus
alloncm 707ad28
Fix build and loaded rom
alloncm 8dca6b8
Read files from C side
alloncm 51b8c30
Add gfx device for nx
alloncm e334fd3
Add joycon support
alloncm 3e997de
Add initial audio support for nx
alloncm 36f4dc1
Improved sound quality
alloncm 463035f
Fix audio issues
alloncm 25c5737
Screen is now scaled using the switch scaler
alloncm 0172161
Fix buttons and allow to load without nxlink
alloncm fbc529f
Add roms loading at start
alloncm 4ceb1c9
Add mode detection
alloncm b6a121a
Revert back to rust 1.73
alloncm 0e22033
Build using docker
alloncm c81641a
Add nx CI step
alloncm fb313c2
Move the docker file to the nx dir and arrange abit the build
alloncm 2a3b2ef
Update readme with deps
alloncm 244a771
WIP havent tested
alloncm 9fb9ba2
I think I fixed the undefined behavior
alloncm 32e3905
Fix menu navifation and add pause menu
alloncm 118f21a
CR fixes + adding vscode settings to repo
alloncm 565c458
Move to libm for float operations in core
alloncm d1c18c4
Format the C code
alloncm 70de00d
Merge branch 'master' into feature/nx
alloncm 7cf164c
Bump version to 4.2.0 and add version to header in pause
alloncm 0349ca6
Add version and authors to the C app
alloncm d672e20
Fix warning and make the docker output plain + remove the version and…
alloncm 2717a9a
Some minor fixes
alloncm 90b91b5
Last fix
alloncm 343833c
Add turbo factor to the nx
alloncm 08467af
Add Nx docs
alloncm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| *target/ | ||
| *build/ | ||
| .github/ | ||
| docs/ | ||
| *Dockerfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,8 @@ members = [ | |
| "core", | ||
| "rpi", | ||
| "common", | ||
| "libretro" | ||
| "libretro", | ||
| "nx" | ||
| ] | ||
|
|
||
| [workspace.package] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| [package] | ||
| name = "magenboy_nx" | ||
| edition.workspace = true | ||
| version.workspace = true | ||
| authors.workspace = true | ||
| rust-version.workspace = true | ||
|
|
||
| [lib] | ||
| crate-type = ["staticlib"] | ||
|
|
||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
|
||
| [dependencies] | ||
| magenboy_core = { path = "../core", features = ["apu"] } | ||
| magenboy_common = { path = "../common", features = ["alloc"] } | ||
| log = "0.4" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # We are installing the Rust toolchain so the version does not matter | ||
| FROM rust:latest AS builder | ||
|
|
||
| # Nightly version - entered as a build argument | ||
| ARG NIGHTLY | ||
|
|
||
| # Build the Rust crate for the Nintendo Switch target | ||
alloncm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| RUN rustup toolchain install ${NIGHTLY} | ||
| RUN rustup +${NIGHTLY} component add rust-src | ||
|
|
||
| # Set the working directory | ||
| WORKDIR /magenboy | ||
|
|
||
| # Copy source files | ||
| COPY . . | ||
|
|
||
| RUN cargo +${NIGHTLY} build --release --package magenboy_nx --target aarch64-nintendo-switch-freestanding \ | ||
| -Z build-std=core,compiler_builtins,alloc -Z build-std-features=compiler-builtins-mem | ||
|
|
||
| # Use the devkitpro/devkita64 image for the second stage | ||
| FROM devkitpro/devkita64 AS final | ||
|
|
||
| # Set the working directory for the C code | ||
| WORKDIR /magenboy_nx | ||
|
|
||
| # Copy the C source files and Makefile | ||
| COPY nx/Makefile ./ | ||
| COPY nx/src ./src | ||
|
|
||
| # Copy the built Rust library from the builder stage | ||
| COPY --from=builder /magenboy/target/ ./target/ | ||
|
|
||
| RUN make --always-make | ||
|
|
||
| FROM scratch AS export | ||
| COPY --from=final /magenboy_nx/build/ /build | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.