Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure of memory #73

Merged
merged 6 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fpt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl Gameboy {
}

/// Sets CPU and hardware registers to the values found in the DMG0 column in the tables at
/// https://gbdev.io/pandocs/Power_Up_Sequence.html#console-state-after-boot-rom-hand-off
/// <https://gbdev.io/pandocs/Power_Up_Sequence.html#console-state-after-boot-rom-hand-off>
pub fn boot_fake(&mut self) {
// CPU registers
self.cpu.set_af(0x0100);
Expand Down Expand Up @@ -99,7 +99,7 @@ impl Gameboy {
}

pub fn load_rom(&mut self, rom: &[u8]) {
self.bus.load_cartridge(rom);
self.bus.load_rom(rom);
}

pub fn bus(&self) -> &Bus {
Expand Down
2 changes: 1 addition & 1 deletion fpt/src/lr35902.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl LR35902 {
self.bus.write(index as usize, value);
// TODO: watchpoint trigger write
// Write triggers (TODO: better solution)
if index == memory::map::BANK as u16 && value != 0 {
if (index == memory::map::BANK as u16) && (value != 0) {
self.bus.unload_bootrom();
}
if index == memory::map::LCDC as u16
Expand Down
Loading