Skip to content

Commit d935e44

Browse files
committed
Minor changes
1 parent 908a010 commit d935e44

7 files changed

Lines changed: 20 additions & 24 deletions

File tree

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
#.PHONY: all dev emuiibo emuiibo-dev sysmodule sysmodule-dev overlay emuiigen dist clean emuiibo-clean emuiigen-clean
33

4-
# We need to provide a custom target triple since the official tier 3 one doesn't provide crypto support
54
TARGET_TRIPLE := aarch64-nintendo-switch-freestanding
65
PROGRAM_ID := 0100000000000352
76

emuiibo.lst

Lines changed: 0 additions & 2 deletions
This file was deleted.

emuiibo/.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ build-std = ["core", "compiler_builtins", "alloc"]
33
build-std-features = ["compiler-builtins-mem"]
44

55
[target.aarch64-nintendo-switch-freestanding]
6-
rustflags = ["-Ctarget-feature=+aes,+sha2"]
6+
rustflags = ["-Ctarget-feature=+aes,+sha2", "--cfg", "aes_armv8"]

emuiibo/Cargo.lock

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

emuiibo/Cargo.toml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,21 @@
22
name = "emuiibo"
33
version = "1.1.1"
44
authors = ["XorTroll"]
5-
edition = "2021"
5+
edition = "2024"
66

77
[dependencies]
8-
#nx = { git = "https://github.com/pantsman0/nx", branch = "getting_ready_for_merge", features = [
9-
# "services",
10-
# "fs",
11-
# "crypto",
12-
# "input",
13-
# "rand",
14-
#] }
15-
nx = { path = "/mnt/c/code/nx", features = ["services", "fs", "input", "rand"] }
8+
nx = { git = "https://github.com/aarch64-switch-rs/nx", features = ["services", "fs", "input", "rand"] }
169

1710
paste = "1.0"
1811
static_assertions = "1.1.0"
1912
serde = { version = "1.0", default-features = false, features = ["derive"] }
2013
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
2114
atomic_enum = "0.3.0"
2215
generic_once_cell = { version = "0.1.1", default-features = false }
23-
aes = {version = "0.8.4", features = ["zeroize"] }
24-
ctr = {version = "0.9.2", features = ["zeroize"] }
16+
aes = { version = "0.8.4", features = ["zeroize"] }
17+
ctr = { version = "0.9.2", features = ["zeroize"] }
2518
hmac = "0.12.1"
26-
sha2 = {version = "0.10.9", default-features = false}
19+
sha2 = { version = "0.10.9", default-features = false }
2720

2821
[package.metadata.nx.nsp.npdm]
2922
name = "emuiibo"

emuiibo/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ pub mod amiibo;
2929

3030
pub mod area;
3131

32-
3332
pub use ipc::emu::{EmulationService, IEmulationServiceClient};

emuiibo/src/main.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,41 @@ extern crate nx;
77
#[macro_use]
88
extern crate alloc;
99

10-
#[macro_use]
1110
extern crate emuiibo;
1211

12+
use nx::diag;
1313
use nx::diag::abort;
1414
use nx::fs;
1515
use nx::ipc::server;
1616
use nx::result::*;
17+
use nx::svc;
18+
use nx::thread;
1719
use nx::util;
1820

1921
use emuiibo::*;
2022

2123
use core::panic;
22-
use core::ptr::addr_of_mut;
2324

2425
rrt0_define_default_module_name!();
2526

2627
const CUSTOM_HEAP_SIZE: usize = 0x8000;
2728
static mut CUSTOM_HEAP: [u8; CUSTOM_HEAP_SIZE] = [0; CUSTOM_HEAP_SIZE];
2829

29-
#[no_mangle]
30+
#[unsafe(no_mangle)]
3031
#[allow(static_mut_refs)]
3132
pub fn initialize_heap(_hbl_heap: util::PointerAndSize) -> util::PointerAndSize {
3233
unsafe {
3334
// SAFETY: CUSTOM_HEAP must only ever be referenced from here, and nowhere else.
34-
util::PointerAndSize::new(addr_of_mut!(CUSTOM_HEAP) as _, CUSTOM_HEAP.len())
35+
util::PointerAndSize::new(&raw mut CUSTOM_HEAP as _, CUSTOM_HEAP.len())
3536
}
3637
}
3738

38-
#[no_mangle]
39+
use nx::diag::log::lm::LmLogger;
40+
use nx::diag::log::LogSeverity;
41+
42+
#[unsafe(no_mangle)]
3943
pub fn main() -> Result<()> {
44+
thread::set_current_thread_name("emuiibo.Main");
4045
fs::initialize_fspsrv_session()?;
4146
fs::mount_sd_card("sdmc")?;
4247
fsext::ensure_directories()?;

0 commit comments

Comments
 (0)