From 02eed1c44c83cabc0143c8fe41c606f093d83c51 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Thu, 15 Aug 2024 21:06:15 +0200 Subject: [PATCH] documentation change --- docs/01_memory_map.md | 4 ++-- sw/deployer/src/main.rs | 12 ++++++------ sw/deployer/src/sc64/types.rs | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/01_memory_map.md b/docs/01_memory_map.md index 799df2a..3ea17ca 100644 --- a/docs/01_memory_map.md +++ b/docs/01_memory_map.md @@ -205,9 +205,9 @@ All `DATA` values with upper 8 bits set to `1` (`0xFFxxxxxx`) are reserved for i Refrain from using these values in your app for uses other than listed below. Currently defined reserved `DATA` values are: - - `0xFF000001` - **IO Halt** - causes the running app to stop all cartridge IO activity (PI bus and Joybus) in preparation for uploading new ROM to the SC64. + - `0xFF000001` - **Halt** - causes the running app to stop all activity and wait in preparation for uploading new ROM to the SC64. App still should listen to the AUX interrupt and respond to other messages. - - `0xFF000002` - **Reboot** - causes the running app to perform soft reset by reloading IPL3 from the ROM and start executing it. + - `0xFF000002` - **Reboot** - causes the running app to perform soft reboot by reloading IPL3 from the ROM and start executing it. App running on the N64 shall respond to the AUX message with the same `DATA` value as incoming event for all events listed above, unless it's specified otherwise. diff --git a/sw/deployer/src/main.rs b/sw/deployer/src/main.rs index d986841..4372c4c 100644 --- a/sw/deployer/src/main.rs +++ b/sw/deployer/src/main.rs @@ -88,7 +88,7 @@ struct UploadArgs { rom: PathBuf, /// Attempt to reboot the console (requires specific support in the running game) - #[arg(short, long)] + #[arg(short = 'a', long)] reboot: bool, /// Path to the save file @@ -141,7 +141,7 @@ struct _64DDArgs { rom: Option, /// Attempt to reboot the console (requires specific support in the running game) - #[arg(short, long)] + #[arg(short = 'a', long)] reboot: bool, /// Path to the save file (also used by save writeback mechanism) @@ -373,10 +373,10 @@ fn handle_list_command() -> Result<(), sc64::Error> { fn handle_upload_command(connection: Connection, args: &UploadArgs) -> Result<(), sc64::Error> { let mut sc64 = init_sc64(connection, true)?; - if args.reboot && !sc64.aux_try_notify(sc64::AuxMessage::IOHalt)? { + if args.reboot && !sc64.aux_try_notify(sc64::AuxMessage::Halt)? { println!( "{}", - "Warning: no response for [IOHalt] AUX message".bright_yellow() + "Warning: no response for [Halt] AUX message".bright_yellow() ); } @@ -470,10 +470,10 @@ fn handle_64dd_command(connection: Connection, args: &_64DDArgs) -> Result<(), s .bright_green() ); - if args.reboot && !sc64.aux_try_notify(sc64::AuxMessage::IOHalt)? { + if args.reboot && !sc64.aux_try_notify(sc64::AuxMessage::Halt)? { println!( "{}", - "Warning: no response for [IOHalt] AUX message".bright_yellow() + "Warning: no response for [Halt] AUX message".bright_yellow() ); } diff --git a/sw/deployer/src/sc64/types.rs b/sw/deployer/src/sc64/types.rs index 647dcc6..af7fa19 100644 --- a/sw/deployer/src/sc64/types.rs +++ b/sw/deployer/src/sc64/types.rs @@ -651,14 +651,14 @@ impl TryFrom for DataPacket { } pub enum AuxMessage { - IOHalt, + Halt, Reboot, } impl From for u32 { fn from(value: AuxMessage) -> Self { match value { - AuxMessage::IOHalt => 0xFF000001, + AuxMessage::Halt => 0xFF000001, AuxMessage::Reboot => 0xFF000002, } }