memory map viewer

This commit is contained in:
2023-05-14 22:33:44 -05:00
parent 0cc55d7b20
commit a44895645c
6 changed files with 171 additions and 20 deletions
+1 -1
View File
@@ -1098,7 +1098,7 @@ impl CPU {
self.increment_cycles_test(addressing_mode);
}
pub fn run(&mut self, bus: &mut Bus) {
pub fn tick(&mut self, bus: &mut Bus) {
let opcode = bus.read(self.registers.get_pc_address());
self.execute_opcode(opcode, bus);
}
+1 -1
View File
@@ -16,7 +16,7 @@ pub struct Registers {
impl Registers {
pub fn new() -> Self {
Self {
sp: 0,
sp: 0x01FC,
x: 0,
y: 0,
a: 0,
+2 -2
View File
@@ -20,8 +20,8 @@ impl Emulator {
}
}
pub fn run(&mut self) {
self.cpu.run(&mut self.bus);
pub fn tick(&mut self) {
self.cpu.tick(&mut self.bus);
self.bus.ppu.tick(self.cpu.cycles);
self.cpu.cycles = 0;