telnet now will load the IBM logo and run through it.

This commit is contained in:
2025-05-22 14:15:38 -04:00
parent 8c22cf9308
commit c9c9cf67da
3 changed files with 31 additions and 2 deletions
+6 -2
View File
@@ -5,6 +5,7 @@ use gemma::chip8::quirk_modes::QuirkMode;
use crate::telnet_utils::list_of_files_in_directory;
use std::io::Write;
use std::path::Path;
use gemma::constants::RESOURCES_ROOT;
const CANT_NOTIFY_ERROR: &str = "Unable to notify client";
const MENU_TEXT: &str = r#"
@@ -84,11 +85,14 @@ pub fn handle_client(mut stream: TcpStream) {
);
}
"load" => {
let file_to_use = p1.unwrap_or("default.ch8");
// chip8 = Chip8ComputerManager::from(chip8).load_new_program_to_system_memory()
message_to_send = format!("Preparing to load {} from disk.",
p1.unwrap_or("default.ch8").trim());
chip8.start();
chip8.load_new_program_from_disk_to_system_memory(
Path::new(format!("{}/roms/{}", RESOURCES_ROOT, file_to_use).as_str())
);
}
"menu" => {
message_to_send = MENU_TEXT.to_string();