mirror of
https://github.com/mattrberry/crab.git
synced 2025-01-15 03:40:56 +01:00
ppu mode 5 because why not
This commit is contained in:
parent
b94ea60e6f
commit
86d21e5f43
1 changed files with 9 additions and 0 deletions
|
@ -101,6 +101,15 @@ class PPU
|
||||||
@framebuffer[idx * 2 + 1] = @pram[pal_idx * 2 + 1]
|
@framebuffer[idx * 2 + 1] = @pram[pal_idx * 2 + 1]
|
||||||
end
|
end
|
||||||
@gba.display.draw @framebuffer
|
@gba.display.draw @framebuffer
|
||||||
|
when 5
|
||||||
|
base = @dispcnt.display_frame_select ? 0xA000 : 0
|
||||||
|
128.times do |row|
|
||||||
|
160.times do |col|
|
||||||
|
@framebuffer[base + (row * 240 + col) * 2] = @vram[base + (row * 160 + col) * 2]
|
||||||
|
@framebuffer[base + (row * 240 + col) * 2 + 1] = @vram[base + (row * 160 + col) * 2 + 1]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@gba.display.draw @framebuffer
|
||||||
else abort "Invalid background mode: #{@dispcnt.bg_mode}"
|
else abort "Invalid background mode: #{@dispcnt.bg_mode}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue