mirror of
https://github.com/FranLMSP/rmg-001.git
synced 2024-11-23 10:12:11 +00:00
Update project name again
This commit is contained in:
parent
bdd2b4659a
commit
aa60d8586f
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -3,5 +3,5 @@
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "yargbe"
|
||||
name = "rmg-001"
|
||||
version = "0.1.0"
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "yargbe"
|
||||
name = "rmg-001"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# YARGBE
|
||||
Yet Another Rust Gameboy Emulator.
|
||||
# RMG-001
|
||||
Rust Matrix Game - 001: Yet Another Rust Gameboy Emulator.
|
||||
|
||||
This is just a fun project I'm making for learning and practice purposes. If you want a fully-featured Gameboy emulator, this is not probably the best one :P
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
use yargbe::rom::ROM;
|
||||
use yargbe::console::Console;
|
||||
use rmg_001::rom::ROM;
|
||||
use rmg_001::console::Console;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let mut console = Console::new();
|
||||
console.cpu_run();
|
||||
// println!("{:02X}", 0x0FFF + 1);
|
||||
Ok(())
|
||||
}
|
||||
|
@ -51,7 +51,8 @@ impl Bus {
|
||||
// let game_rom = match ROM::load_file("roms/cpu_instrs_individual/07-jr,jp,call,ret,rst.gb".to_string()) {
|
||||
// let game_rom = match ROM::load_file("roms/cpu_instrs_individual/08-misc instrs.gb".to_string()) {
|
||||
// let game_rom = match ROM::load_file("roms/cpu_instrs_individual/09-op r,r.gb".to_string()) {
|
||||
let game_rom = match ROM::load_file("roms/cpu_instrs_individual/10-bit ops.gb".to_string()) {
|
||||
// let game_rom = match ROM::load_file("roms/cpu_instrs_individual/10-bit ops.gb".to_string()) {
|
||||
let game_rom = match ROM::load_file("roms/cpu_instrs_individual/11-op a,(hl).gb".to_string()) {
|
||||
Ok(rom) => rom,
|
||||
_ => ROM::from_bytes(&[0; 0xFFFF])
|
||||
};
|
||||
@ -81,7 +82,7 @@ impl Bus {
|
||||
|
||||
pub fn write(&mut self, address: u16, data: u8) {
|
||||
if address == 0xFF01 {
|
||||
// print!("{}", data as char);
|
||||
print!("{}", data as char);
|
||||
}
|
||||
match MemoryMap::get_map(address) {
|
||||
MemoryMap::BankZero | MemoryMap::BankSwitchable => {
|
||||
|
@ -34,7 +34,8 @@ impl Console {
|
||||
// exit = self.cpu.get_exec_calls_count() >= 287416; // log 7
|
||||
// exit = self.cpu.get_exec_calls_count() >= 223892; // log 8
|
||||
// exit = self.cpu.get_exec_calls_count() >= 4420382; // log 9
|
||||
exit = self.cpu.get_exec_calls_count() >= 6714723; // log 10
|
||||
// exit = self.cpu.get_exec_calls_count() >= 6714723; // log 10
|
||||
// exit = self.cpu.get_exec_calls_count() >= 7429762; // log 11
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ impl CPU {
|
||||
let parameter_bytes = CPU::read_parameter_bytes(program_counter, bus);
|
||||
let opcode = CPU::parse_opcode(parameter_bytes);
|
||||
// println!("Opcode: {:02X?} | PC: {:04X?} | Params: {:02X?}", opcode, self.registers.get(Register::PC), ¶meter_bytes);
|
||||
println!("A: {:02X} F: {:02X} B: {:02X} C: {:02X} D: {:02X} E: {:02X} H: {:02X} L: {:02X} SP: {:04X} PC: 00:{:04X} ({:02X} {:02X} {:02X} {:02X})",
|
||||
/* println!("A: {:02X} F: {:02X} B: {:02X} C: {:02X} D: {:02X} E: {:02X} H: {:02X} L: {:02X} SP: {:04X} PC: 00:{:04X} ({:02X} {:02X} {:02X} {:02X})",
|
||||
self.registers.get(Register::A),
|
||||
self.registers.get(Register::F),
|
||||
self.registers.get(Register::B),
|
||||
@ -313,7 +313,7 @@ impl CPU {
|
||||
parameter_bytes.1,
|
||||
parameter_bytes.2,
|
||||
parameter_bytes.3,
|
||||
);
|
||||
); */
|
||||
self.exec(opcode, bus);
|
||||
self.increment_exec_calls_count();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user