Skip to content

Commit

Permalink
Memory restructure
Browse files Browse the repository at this point in the history
Many things:

 * split memory.rs into multiple files: memory.rs -> lib.rs, map.rs.
 * Introduce Cartridge to handle multiple cartridge types
 * mbc_builder to create cartridges according to mbc id
 * Implement the single mbc_none used in Tetris
  • Loading branch information
joajfreitas committed Jul 25, 2024
1 parent cefdc5e commit 27c01fc
Show file tree
Hide file tree
Showing 8 changed files with 601 additions and 437 deletions.
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

0 comments on commit 27c01fc

Please sign in to comment.