BUGFIX GEMMARAT: fixes input bug with frequent drops of inputs from 2 input loops

CLEANUP: remove unused imports, _ unused variables
This commit is contained in:
2025-05-30 09:23:42 -04:00
parent 9b64a959f3
commit 66ab2363d8
7 changed files with 36 additions and 48 deletions
-4
View File
@@ -1,7 +1,3 @@
use std::borrow::ToOwned;
use std::clone::Clone;
use std::net::ToSocketAddrs;
use std::string::ToString;
pub const CHIP8_REGISTER_COUNT: i32 = 16;
pub const CHIP8_MEMORY_SIZE: i32 = 4096i32;
+4 -5
View File
@@ -1,12 +1,11 @@
mod test_utils;
use std::path::{Path, PathBuf};
use std::time::Instant;
use std::path::Path;
use gemma::chip8::computer::Chip8Computer;
use gemma::chip8::computer_manager::Chip8ComputerManager;
use gemma::chip8::quirk_modes::QuirkMode;
use gemma::chip8::quirk_modes::QuirkMode::{Chip8, SChipModern, XOChip};
use gemma::chip8::registers::Chip8Registers;
use gemma::constants::{CHIP8_VIDEO_MEMORY, TESTS_ROOT, TEST_ROM_ROOT};
use gemma::constants::{CHIP8_VIDEO_MEMORY, TEST_ROM_ROOT};
use crate::test_utils::{load_compressed_result, load_result, load_rom};
#[test]
@@ -73,7 +72,7 @@ fn level3_test() {
let mut x = Chip8Computer::new();
x.load_bytes_to_memory(0x200, &load_rom("3-corax+.ch8"));
for i in 0..0x180 {
for _ in 0..0x180 {
x.step_system();
}
@@ -88,7 +87,7 @@ fn level3_compressed_test() {
let mut x = Chip8Computer::new();
x.load_bytes_to_memory(0x200, &load_rom("3-corax+.ch8"));
for i in 0..0x180 {
for _ in 0..0x180 {
x.step_system();
}
-2
View File
@@ -1,6 +1,4 @@
use std::fs;
use std::io;
use flate2::write::GzDecoder;
use gemma::chip8::computer::Chip8Computer;
use std::io::prelude::*;
-2
View File
@@ -1,11 +1,9 @@
use std::fs::File;
use std::io::{Read, Write};
use std::path::Path;
use flate2::Compression;
use flate2::read::DeflateDecoder;
use flate2::write::{DeflateEncoder};
use log::debug;
const TEST_OUTPUT_SAMPLE_DIR: &str = "../resources/test/";