Skip to content

Commit

Permalink
added LCDC enable bit for DMG PPU
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettgu10 committed May 20, 2019
1 parent a3471a1 commit 8a4bf77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ OOPBoy is a working, fast, and cross-platform Nintendo Game Boy emulator written
The following games are perfectly playable as far as we can tell:
- The Legend of Zelda: Link's Awakening
- Super Mario Land
- Super Mario Land 2
- Tetris
- Tetris DX
- Pokemon - Red Version
Expand All @@ -30,10 +31,9 @@ The following games are perfectly playable as far as we can tell:

The following games play with major graphical glitches:
- Kirby's Dream Land
- Donkey Kong

The following games do not play at all:
- Donkey Kong
- Super Mario Land 2
- Super Mario Land 3: Wario Land
- Tennis

Expand Down
3 changes: 3 additions & 0 deletions src/org/the429ers/gameboy/PPU.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class PPU implements Serializable, IPPU {
*
*/
private static final long serialVersionUID = 2887802651514454071L;
private boolean enabled = true;
private TileSet tileset1;
private TileSet tileset2;
private TileMap map;
Expand Down Expand Up @@ -152,6 +153,8 @@ else if (cycleCount == 0) {
scrollX = mem.readByte(0xFF43);
int lcdc = mem.readByte(0xff40);
spritesEnabled = BitOps.extract(lcdc, 1, 1) == 1;
enabled = BitOps.extract(lcdc, 7, 7) == 1;
if(!enabled) return;

//spritesEnabled = true;
if (cycleCount == OAM_SEARCH_START) {
Expand Down

0 comments on commit 8a4bf77

Please # to comment.