Commit 61214e46 authored by Arthur Carlsson's avatar Arthur Carlsson

Removed unused code

parent eabb0b16
Pipeline #7510147 passed with stage
in 4 minutes and 38 seconds
......@@ -3,10 +3,12 @@ extern crate byteorder;
#[macro_use]
extern crate bitflags;
mod types;
mod rom;
mod pif_rom;
pub mod n64;
pub mod cpu;
mod n64;
mod cpu;
mod cart;
pub use pif_rom::PifRom;
pub use n64::N64;
pub use cart::Cart;
......@@ -6,8 +6,7 @@ use std::io::Read;
use std::path::Path;
use clap::{App, Arg};
use rustn64::PifRom;
use rustn64::n64;
use rustn64::{PifRom, N64, Cart};
fn main() {
let matches = App::new("RustN64")
......@@ -32,11 +31,11 @@ fn main() {
let rom = read_bin(matches.value_of("ROM").unwrap());
let pif_rom = PifRom::new(pif);
let cart = n64::Cart::new(rom);
let cart = Cart::new(rom);
println!("Running {}", cart.title());
let mut n64 = n64::N64::new(pif_rom);
let mut n64 = N64::new(pif_rom);
n64.insert_cart(cart);
n64.power_on();
n64.start()
......
......@@ -2,7 +2,7 @@ use cpu::Cpu;
use pif_rom::PifRom;
use cpu;
use super::cart::Cart;
use cart::Cart;
pub struct N64 {
cpu: Cpu,
......
trait Memory {
}
mod cart;
mod n64;
pub use self::cart::Cart;
pub use self::n64::N64;
use std::marker::PhantomData;
use std::ops::{Index, RangeFull};
use types::Word;
use byteorder::ByteOrder;
pub struct Rom<T: ByteOrder> {
......@@ -17,7 +16,7 @@ impl<T: ByteOrder> Rom<T> {
}
}
pub fn read_word(&self, addr: u32) -> Word {
pub fn read_word(&self, addr: u32) -> u32 {
T::read_u32(&self.buf[addr as usize..])
}
......
pub type Word = u32;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment