feat(bus): implement fastmem

+100 fps in Pokemon Emerald lol
This commit is contained in:
2022-11-01 05:27:34 -03:00
parent 9eb4f8f191
commit c395c04a6e
2 changed files with 180 additions and 14 deletions

View File

@@ -882,7 +882,7 @@ const Palette = struct {
}
};
const Vram = struct {
pub const Vram = struct {
const vram_size = 0x18000;
const Self = @This();
@@ -933,7 +933,7 @@ const Vram = struct {
}
}
fn mirror(address: usize) usize {
pub fn mirror(address: usize) usize {
// Mirrored in steps of 128K (64K + 32K + 32K) (abcc)
const addr = address & 0x1FFFF;