mirror of
https://github.com/FranLMSP/snes.git
synced 2026-08-03 08:30:01 -04:00
memory map viewer
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct Registers {
|
||||
impl Registers {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
sp: 0,
|
||||
sp: 0x01FC,
|
||||
x: 0,
|
||||
y: 0,
|
||||
a: 0,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user