Skip to content

Commit

Permalink
Table
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed May 3, 2024
1 parent bebad13 commit 556d789
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/ppu/ppu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,13 @@ impl PPU {
}

fn draw_bg(&mut self) {
// If TILE_DATA_AREA = 1 TILE_DATA_AREA = 0
// 0-127 = $8000-$87FF; $8800-$8FFF
// 128-255 = $8800-$8FFF; $9000-$97FF
// ┌──────────────────┬──────────────────┬──────────────────┐
// │ TILE_DATA_AREA │ 1 │ 0 │
// ╞══════════════════╪══════════════════╪══════════════════╡
// │ Range 0-127 │ $8000 - $87FF │ $8800 - $8FFF │
// ├──────────────────┼──────────────────┼──────────────────┤
// │ Range 128-255 │ $8800 - $8FFF │ $9000 - $97FF │
// └──────────────────┴──────────────────┴──────────────────┘
let tile_data_base = if self.lcdc.contains(LCDC::TILE_DATA_AREA) {
0x8000
} else {
Expand Down

0 comments on commit 556d789

Please sign in to comment.