pub fn new(readable: &mut Read, filename: String) -> Result<Rom, io::Error>
	{
		let mut buffer = [0u8; 0xCA0]; // Maximum size for ROMs is 3232 bytes
		let length = match readable.read(&mut buffer) { Ok(l) => l, Err(err) => return Err(err) };

		Ok(Rom { data: buffer, filename: filename, length: length })
	}
/// Create a new ROM from the provided file and file name.
/// File name is only used for identification and can be omitted.
/// Only the first 3232 bytes of the ROM are loaded if a larger file is provided
/// as this is the maximum number of bytes that can be copied into the CHIP-8 memory.
Create a new ROM from the provided file and file name.
File name is only used for identification and can be omitted.
Only the first 3232 bytes of the ROM are loaded if a larger file is provided
as this is the maximum number of bytes that can be copied into the CHIP-8 memory.
Create a new ROM from the provided file and file name . File name is only used for identification and can be omitted . Only the first 3232 bytes of the ROM are loaded if a larger file is provided as this is the maximum number of bytes that can be copied into the CHIP - 8 memory .
pub fn new(readable: &mut Read, filename: String) -> Result<Rom, io::Error>
	{
		let mut buffer = [0u8; 0xCA0]; // Maximum size for ROMs is 3232 bytes
		let length = match readable.read(&mut buffer) { Ok(l) => l, Err(err) => return Err(err) };
		Ok(Rom { data: buffer, filename: filename, length: length })
	}
pub fn new ( readable : & mut Read , filename : String ) -> Result < Rom , io :: Error > { let mut buffer = [ 0u8 ; 0xCA0 ] ; // Maximum size for ROMs is 3232 bytes let length = match readable . read ( & mut buffer ) { Ok ( l ) => l , Err ( err ) => return Err ( err ) } ; Ok ( Rom { data : buffer , filename : filename , length : length } ) }
Create a new ROM from the provided file and file name.
Create a new ROM from the provided file and file name .
readable
&mut Read
filename
String