taylus / gbdotnet

An incomplete Game Boy emulator written in .NET Core
4 stars 0 forks source link

Implement Picture Processing Unit #1

Closed taylus closed 4 years ago

taylus commented 5 years ago

The PPU should:

Overall reference:

References on how to parse video memory:

Video memory-mapped I/O registers:

What is the window layer? Maybe add a example ROM to https://github.com/taylus/gameboy-dev that uses the window layer? I'm not that familiar w/ it since I haven't used it before, but it's an obvious choice for things like a game UI that needs to draw on top of everything (Pokemon's start menu, etc).

According to pandocs it sounds like it's just another background layer that can't be scrolled (just moved via a register that sets its upper left corner's position) and is assigned to the other background map in VRAM (whichever isn't being used by the background layer).

See: http://bgb.bircd.org/pandocs.htm#lcdpositionandscrolling

FF4B - WX - Window X Position minus 7 (R/W) Specifies the upper/left positions of the Window area. (The window is an alternate background area which can be displayed above of the normal background. OBJs (sprites) may be still displayed above or behinf the window, just as for normal BG.) The window becomes visible (if enabled) when positions are set in range WX=0..166, WY=0..143. A postion of WX=7, WY=0 locates the window at upper left, it is then completly covering normal background.