r/EmuDev • • Oct 25 '26

Need help with PPU background rendering

Building a Game Boy (DMG) emulator in Rust. The CPU passes Blargg test roms & the SM83 JSON test suite.

Current Behavior:

  1. Dr. Mario: Title screen renders properly, but after a few frames, the graphics get garbled up.
After a few seconds
  1. Tetris: Stuck rendering a screen grid of 00 tiles on startup.
Stuck on 0's
  1. Blargg Test Roms: Renders correctly.
  • OAM, DMA & Sprites have not been implemented yet, just the background and the window.
  • The Joypad returns 0xCF

I have no idea on where to even look for the bug. Any direction would be very helpful. Thank You.

6 Upvotes

9 comments sorted by

View all comments

2

u/devraj7 Oct 25 '26

The blargg tests are not enough.

Pass the Single Step Tests, they will very likely find bugs in your CPU, and that might resolve the problems you're seeing here.

1

u/[deleted] Oct 25 '26

I think you missed it but I do mention that those are passing too. (SM83)