boy-debug: Use correct bus type instead of placeholder vec
This commit is contained in:
parent
f0733cde37
commit
95b3f3007e
@ -1,7 +1,7 @@
|
||||
//! Debug interface for the Boy emulator
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use boy::memory::{Bus, Cart};
|
||||
use boy::memory::{io::BusIO, Bus, Cart};
|
||||
use boy_debug::{
|
||||
bus::BusIOTools,
|
||||
cli::{lexer::Lexible, parser::Parsible},
|
||||
@ -9,17 +9,18 @@ use boy_debug::{
|
||||
message::Response,
|
||||
};
|
||||
use rustyline::{config::Configurer, history::FileHistory, Editor};
|
||||
use std::{env::args, error::Error};
|
||||
use std::{env::args, error::Error, io::Write};
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
// Set up the gameboy
|
||||
// TODO: move off the main thread
|
||||
let mut bus = vec![0; 0x10000];
|
||||
let mut cart = vec![0; 0x10000];
|
||||
for arg in std::env::args().skip(1) {
|
||||
bus.read_file(arg)?;
|
||||
cart.read_file(arg)?;
|
||||
}
|
||||
// let mut bus = Bus::new(Cart::new(bus));
|
||||
let mut gb = Gameboy::new(bus);
|
||||
let mut bus = Bus::new(Cart::new(cart, vec![]));
|
||||
bus.write(0xff44, 0x90);
|
||||
let mut gb = Gameboy::new(bus.ascii());
|
||||
|
||||
// Set up and run the REPL
|
||||
let mut rl: Editor<(), FileHistory> = Editor::new()?;
|
||||
|
Loading…
Reference in New Issue
Block a user