[cln] Code cleanup

Cleanup code
Add a offset delay timer
This commit is contained in:
2024-03-10 14:26:42 +05:30
parent 242919f22a
commit 31fb280fc6
8 changed files with 92 additions and 76 deletions

12
src/rom.rs Normal file
View File

@@ -0,0 +1,12 @@
use std::fs::File;
use std::io::Read;
use crate::util::EmulatorResult;
pub const ROM_SIZE: usize = 4096 - 0x200;
pub fn load_rom(rom_file_location: String) -> EmulatorResult<[u8; ROM_SIZE]> {
let mut rom_slice = [0u8; ROM_SIZE];
let mut file = File::open(rom_file_location)?;
file.read(&mut rom_slice)?;
Ok(rom_slice)
}