progress
Some checks failed
Build and Test / super-mario-maker (push) Failing after 10m30s
Build and Test / fast-racing-neo (push) Failing after 11m40s
Build and Test / friends (push) Failing after 11m56s
Build and Test / wii-sports-club (push) Failing after 12m9s
Build and Test / splatoon (push) Failing after 12m14s
Build and Test / puyopuyo (push) Failing after 12m23s
Build and Test / wii-u-chat (push) Failing after 12m23s
Build and Test / mario-tennis (push) Failing after 12m23s
Build and Test / sonic-transformed (push) Failing after 12m23s
Build and Test / splatoon-testfire (push) Failing after 12m30s
Build and Test / minecraft-wiiu (push) Failing after 12m37s

This commit is contained in:
Maple Nebel 2026-07-12 18:21:18 +02:00
commit 4ff0a5efcc
187 changed files with 4526 additions and 5132 deletions

View file

@ -0,0 +1,11 @@
[package]
name = "rnex-fpd-protos"
version = "0.1.0"
edition = "2024"
[dependencies]
ctor = "1.0.8"
rnex-rmc = { path = "../../rnex-rmc" }
[lints]
workspace = true

View file

@ -0,0 +1,45 @@
use rnex_rmc::{
RmcSerialize,
any::Any,
data::Data,
method_id,
response::ErrorCode,
rmc_proto,
util::{PID, date_time::DateTime},
};
use crate::friends_wiiu::NNAInfo;
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct NintendoCreateAccountData {
#[extends]
pub data: Data,
pub nna_info: NNAInfo,
pub nex_token: String,
pub birthday: DateTime,
pub unk: u64,
}
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct AccountExtraInfo {
#[extends]
pub data: Data,
pub unk1: u64,
pub unk2: u32,
pub nex_token: String,
}
#[rmc_proto(25)]
pub trait AccountManagement {
#[method_id(27)]
async fn nintendo_create_account(
&self,
principal_name: String,
key: String,
groups: u32,
email: String,
auth_data: Any,
) -> Result<(PID, String), ErrorCode>;
}

View file

@ -0,0 +1,254 @@
use rnex_rmc::{
RmcSerialize,
data::Data,
list::Buffer,
method_id,
response::ErrorCode,
rmc_proto,
util::{PID, date_time::DateTime},
};
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct MyProfile {
#[extends]
pub data: Data,
pub region: u8,
pub country: u8,
pub area: u8,
pub language: u8,
pub platform: u8,
pub local_friend_code_seed: u64,
pub mac_address: String,
pub serial_number: String,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct Mii {
#[extends]
pub data: Data,
pub name: String,
pub profanity: bool,
pub char_set: u8, // 0 is JPN/USA/EUR, 1 is CHN, 2 is KOR and 3 is TWN
pub mii_data: Vec<u8>,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct MiiList {
#[extends]
pub data: Data,
pub unk1: String,
pub unk2: bool,
pub unk3: u8,
pub mii_data: Vec<Buffer>,
}
#[derive(RmcSerialize, Debug)]
#[rmc_struct(0)]
pub struct GameKey {
#[extends]
pub data: Data,
pub title_id: u64,
pub version: u16,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct PlayedGame {
#[extends]
pub data: Data,
pub game_key: GameKey,
pub date_time: DateTime,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendInfo {
pub pid: u32,
pub unk2: DateTime,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendMii {
#[extends]
pub data: Data,
pub pid: PID,
pub mii: Mii,
pub modified_at: DateTime,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendMiiList {
#[extends]
pub data: Data,
pub unk1: u32,
pub mii_list: MiiList,
pub unk2: DateTime,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendRelationship {
#[extends]
pub data: Data,
pub pid: u32,
pub local_friend_code: u64,
pub relationship_type: u8,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct NintendoPresence {
#[extends]
pub data: Data,
pub changed_bit_flag: u32,
pub game_key: GameKey,
pub game_mode_desctiption: String,
pub join_availibility_flag: u32,
pub mm_system_type: u8,
pub join_game_id: u32,
pub join_game_mode: u32,
pub owner_pid: PID,
pub join_group_id: u32,
pub application_arg: Buffer,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendPresence {
#[extends]
pub data: Data,
pub pid: u32,
pub presence: NintendoPresence,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendComment {
#[extends]
pub data: Data,
pub pid: PID,
pub comment: String,
pub modified_at: DateTime,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendPicture {
#[extends]
pub data: Data,
pub unk1: u32,
pub pic_data: Vec<u32>,
pub date_time: DateTime,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct FriendPersistentInfo {
#[extends]
pub data: Data,
pub pid: PID,
pub region: u8,
pub country: u8,
pub area: u8,
pub language: u8,
pub platform: u8,
pub game_key: GameKey,
pub message: String,
pub msg_updated_at: DateTime,
pub friended_at: DateTime,
pub last_online: DateTime,
}
#[rmc_proto(101)]
pub trait Friends3DS {
#[method_id(1)]
async fn update_profile(&self, profile: MyProfile) -> Result<(), ErrorCode>;
#[method_id(2)]
async fn update_mii(&self, profile: Mii) -> Result<(), ErrorCode>;
#[method_id(3)]
async fn update_mii_list(&self, profile: MiiList) -> Result<(), ErrorCode>;
#[method_id(4)]
async fn update_played_games(&self, profile: Vec<PlayedGame>) -> Result<(), ErrorCode>;
#[method_id(5)]
async fn update_preference(
&self,
show_online_status: bool,
show_current_title: bool,
block_friend_requests: bool,
) -> Result<(), ErrorCode>;
#[method_id(6)]
async fn get_friend_mii(&self, friends: Vec<FriendInfo>) -> Result<Vec<FriendMii>, ErrorCode>;
#[method_id(7)]
async fn get_friend_mii_list(
&self,
friends: Vec<FriendInfo>,
) -> Result<Vec<FriendMiiList>, ErrorCode>;
#[method_id(8)]
async fn is_active_game(&self, unk: Vec<u32>, game_key: GameKey)
-> Result<Vec<u32>, ErrorCode>;
#[method_id(9)]
async fn get_principal_id_by_local_friend_code(
&self,
unk1: u64,
unk2: Vec<u64>,
) -> Result<Vec<FriendRelationship>, ErrorCode>;
#[method_id(10)]
async fn get_friend_relationships(
&self,
unk2: Vec<u32>,
) -> Result<Vec<FriendRelationship>, ErrorCode>;
#[method_id(11)]
async fn add_friend_by_pid(&self, unk: u64, pid: PID) -> Result<FriendRelationship, ErrorCode>;
#[method_id(12)]
async fn add_friend_by_lst_pid(
&self,
unk: u64,
pid: Vec<PID>,
) -> Result<Vec<FriendRelationship>, ErrorCode>;
#[method_id(13)]
async fn remove_friend_by_local_code(&self, local_code: u64) -> Result<(), ErrorCode>;
#[method_id(14)]
async fn remove_friend_by_pid(&self, pid: PID) -> Result<(), ErrorCode>;
#[method_id(15)]
async fn get_all_friends(&self) -> Result<Vec<FriendRelationship>, ErrorCode>;
#[method_id(16)]
async fn update_blacklist(&self) -> Result<(), ErrorCode>;
#[method_id(17)]
async fn sync_friend(
&self,
unk1: u64,
unk2: Vec<u32>,
unk3: Vec<u64>,
) -> Result<Vec<FriendRelationship>, ErrorCode>;
#[method_id(18)]
async fn update_presence(
&self,
nintendo_presence: NintendoPresence,
unk: bool,
) -> Result<(), ErrorCode>;
#[method_id(19)]
async fn update_favorite_game_key(&self, game_key: GameKey) -> Result<(), ErrorCode>;
#[method_id(20)]
async fn update_comment(&self, comment: String) -> Result<(), ErrorCode>;
#[method_id(21)]
async fn update_picture(&self, unk: u32, picture: Vec<u8>) -> Result<(), ErrorCode>;
#[method_id(22)]
async fn get_friend_presence(&self, unk: Vec<u32>) -> Result<Vec<FriendPresence>, ErrorCode>;
#[method_id(23)]
async fn get_friend_comment(
&self,
unk: Vec<FriendInfo>,
) -> Result<Vec<FriendComment>, ErrorCode>;
#[method_id(24)]
async fn get_friend_picture(&self, unk: Vec<u32>) -> Result<Vec<FriendPicture>, ErrorCode>;
#[method_id(25)]
async fn get_friend_persistent_info(
&self,
unk: Vec<u32>,
) -> Result<Vec<FriendPersistentInfo>, ErrorCode>;
#[method_id(26)]
async fn send_invitation(&self, unk: Vec<u32>) -> Result<(), ErrorCode>;
}

View file

@ -0,0 +1,244 @@
use rnex_rmc::{
RmcSerialize,
data::Data,
method_id,
qbuffer::QBuffer,
response::ErrorCode,
rmc_proto,
util::{PID, date_time::DateTime},
};
#[derive(RmcSerialize, Debug, Clone, Default)]
#[rmc_struct(0)]
pub struct MiiV2 {
#[extends]
pub data: Data,
pub name: QBuffer,
pub unk: u8,
pub unk2: u8,
pub mii_data: Vec<u8>,
pub date_time: DateTime,
}
#[derive(RmcSerialize, Debug, Clone, Default)]
#[rmc_struct(0)]
pub struct PrincipalBasicInfo {
#[extends]
pub data: Data,
pub pid: PID,
pub nnid: String,
pub mii: MiiV2,
pub unk: u8,
}
#[derive(RmcSerialize, Debug, Clone, Default)]
#[rmc_struct(0)]
pub struct NNAInfo {
#[extends]
pub data: Data,
pub principal_basic_info: PrincipalBasicInfo,
pub unk: u8,
pub unk2: u8,
}
#[derive(RmcSerialize, Clone, Copy, Debug, Default)]
#[rmc_struct(0)]
pub struct GameKey {
#[extends]
pub data: Data,
pub tid: i64,
pub version: i16,
}
#[derive(RmcSerialize, Clone, Debug, Default)]
#[rmc_struct(0)]
pub struct NintendoPresenceV2 {
#[extends]
pub data: Data,
pub changed_flags: u32,
pub is_online: bool,
pub game_key: GameKey,
pub unk: u8,
pub message: String,
pub unk2: u32,
pub unk3: u8,
pub game_server_id: u32,
pub unk4: u32,
pub pid: u32,
pub gid: u32,
pub app_data: Vec<u8>,
pub unk5: u8,
pub unk6: u8,
pub unk7: u8,
}
#[derive(RmcSerialize, Clone, Debug)]
#[rmc_struct(0)]
pub struct PrincipalPreference {
#[extends]
pub data: Data,
pub show_online: bool,
pub show_playing_title: bool,
pub block_friend_request: bool,
}
#[derive(RmcSerialize, Default, Debug)]
#[rmc_struct(0)]
pub struct Comment {
#[extends]
pub data: Data,
pub unk: u8,
pub message: String,
pub last_changed: DateTime,
}
#[derive(RmcSerialize, Default, Debug)]
#[rmc_struct(0)]
pub struct FriendInfo {
#[extends]
pub data: Data,
pub nna_info: NNAInfo,
pub presence: NintendoPresenceV2,
pub comment: Comment,
pub became_friends: DateTime,
pub last_online: DateTime,
pub unk: u64,
}
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct FriendRequestMessage {
#[extends]
pub data: Data,
pub friend_request_id: i64,
pub is_recieved: bool,
pub unk: u8,
pub message: String,
pub unk2: u8,
pub unk3: String,
pub game_key: GameKey,
pub unk4: DateTime,
pub expires_on: DateTime,
}
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct FriendRequest {
#[extends]
pub data: Data,
pub basic_info: PrincipalBasicInfo,
pub request_message: FriendRequestMessage,
pub sent_on: DateTime,
}
#[derive(RmcSerialize, Debug, Default)]
#[rmc_struct(0)]
pub struct BlacklistedPrincipal {
#[extends]
pub data: Data,
pub basic_info: PrincipalBasicInfo,
pub game_key: GameKey,
pub since: DateTime,
}
#[derive(RmcSerialize, Debug)]
#[rmc_struct(0)]
pub struct PersistentNotification {
#[extends]
pub data: Data,
pub unk1: u64,
pub unk2: u32,
pub unk3: u32,
pub unk4: u32,
pub unk5: String,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct PrincipalRequestBlockSetting {
#[extends]
pub data: Data,
pub pid: PID,
pub blocked: bool,
}
#[rmc_proto(102)]
pub trait FriendsWiiU {
#[method_id(1)]
async fn update_and_get_all_information(
&self,
info: NNAInfo,
presence: NintendoPresenceV2,
date_time: DateTime,
) -> Result<
(
PrincipalPreference,
Comment,
Vec<FriendInfo>,
Vec<FriendRequest>,
Vec<FriendRequest>,
Vec<BlacklistedPrincipal>,
bool,
Vec<PersistentNotification>,
bool,
),
ErrorCode,
>;
#[method_id(2)]
async fn add_friend(&self, friend: PID) -> Result<(FriendRequest, FriendInfo), ErrorCode>;
#[method_id(3)]
async fn add_friend_by_name(
&self,
name: String,
) -> Result<(FriendRequest, FriendInfo), ErrorCode>;
#[method_id(4)]
async fn remove_friend(&self, friend: PID) -> Result<(), ErrorCode>;
#[method_id(5)]
async fn add_friend_request(
&self,
friend: PID,
unk1: u8,
message: String,
unk2: u8,
unk3: String,
game_key: GameKey,
unk4: DateTime,
) -> Result<(FriendRequest, FriendInfo), ErrorCode>;
#[method_id(6)]
async fn cancel_friend_request(&self, id: u64) -> Result<(), ErrorCode>;
#[method_id(7)]
async fn accept_friend_request(&self, id: u64) -> Result<FriendInfo, ErrorCode>;
#[method_id(8)]
async fn delete_friend_request(&self, id: u64) -> Result<(), ErrorCode>;
#[method_id(9)]
async fn deny_friend_request(&self, id: u64) -> Result<BlacklistedPrincipal, ErrorCode>;
#[method_id(10)]
async fn mark_friend_requests_as_received(&self, ids: Vec<u64>) -> Result<(), ErrorCode>;
#[method_id(11)]
async fn add_blacklist(
&self,
principal: BlacklistedPrincipal,
) -> Result<BlacklistedPrincipal, ErrorCode>;
#[method_id(12)]
async fn remove_blacklist(&self, id: PID) -> Result<(), ErrorCode>;
#[method_id(13)]
async fn update_presence(&self, presence: NintendoPresenceV2) -> Result<(), ErrorCode>;
#[method_id(14)]
async fn update_mii(&self, presence: MiiV2) -> Result<DateTime, ErrorCode>;
#[method_id(15)]
async fn update_comment(&self, presence: Comment) -> Result<DateTime, ErrorCode>;
#[method_id(16)]
async fn update_preference(&self, preference: PrincipalPreference) -> Result<(), ErrorCode>;
#[method_id(17)]
async fn get_basic_info(&self, pids: Vec<PID>) -> Result<Vec<PrincipalBasicInfo>, ErrorCode>;
#[method_id(18)]
async fn delete_persistent_notification(
&self,
notifs: Vec<PersistentNotification>,
) -> Result<(), ErrorCode>;
#[method_id(19)]
async fn check_setting_status(&self) -> Result<u8, ErrorCode>;
#[method_id(20)]
async fn get_request_block_settings(
&self,
pids: Vec<PID>,
) -> Result<Vec<PrincipalRequestBlockSetting>, ErrorCode>;
}

View file

@ -0,0 +1,33 @@
#![allow(async_fn_in_trait)]
use rnex_rmc::define_rmc_proto;
pub mod account_management;
pub mod friends_3ds;
pub mod friends_wiiu;
pub mod nintendo_notification;
use account_management::{
AccountManagement, RawAccountManagement, RawAccountManagementInfo, RemoteAccountManagement,
};
use friends_3ds::{Friends3DS, RawFriends3DS, RawFriends3DSInfo, RemoteFriends3DS};
use friends_wiiu::{FriendsWiiU, RawFriendsWiiU, RawFriendsWiiUInfo, RemoteFriendsWiiU};
use nintendo_notification::{
NintendoNotification, RawNintendoNotification, RawNintendoNotificationInfo,
RemoteNintendoNotification,
};
define_rmc_proto!(
proto FriendsUser{
FriendsWiiU,
Friends3DS
}
);
define_rmc_proto!(
proto FriendRemote{
NintendoNotification
}
);
define_rmc_proto!(
proto FriendsGuest{
AccountManagement
}
);

View file

@ -0,0 +1,40 @@
use rnex_rmc::{RmcSerialize, any::Any, data::Data, method_id, rmc_proto, util::PID};
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct NintendoNotificationEvent {
pub event_type: u32,
pub sender: PID,
pub data: Any,
}
#[derive(RmcSerialize, Default)]
#[rmc_struct(0)]
pub struct NintendoNotificationEventGeneral {
#[extends]
pub data: Data,
pub param1: u32,
pub param2: u64,
pub param3: u64,
pub str_param: String,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct NintendoNotificationEventProfile {
#[extends]
pub data: Data,
pub region: u8,
pub country: u8,
pub area: u8,
pub language: u8,
pub platform: u8,
}
#[rmc_proto(100, NoReturn)]
pub trait NintendoNotification {
#[method_id(1)]
async fn process_nintendo_notification_event_1(&self, notif: NintendoNotificationEvent);
#[method_id(2)]
async fn process_nintendo_notification_event_2(&self, notif: NintendoNotificationEvent);
}