Hello!
I have finally gotten `nestest` to render graphically [here][https://drive.google.com/file/d/1Cl-6jT ... sp=sharing].
I tried to render Donkey Kong but the main menu renders as [this][https://drive.google.com/file/d/1b97-3w ... sp=sharing].
I found out why this screen looks so weird and basically the tiles are being picked from the first pattern table always. So instead of the tile 0x24 from the second pattern table which is an empty square for the main menu of DK, I get the tile you see repeated in cyan.
I am a bit lost as to what could make it only read from the first pattern table. All `nestest` tests pass successfully.
Here is my PPU code: https://gist.github.com/joao-conde/8f5c ... bdf483bf30
Does anyone have any hints?
PPU Emulation Wrong Pattern Table
Moderator: Moderators
Re: PPU Emulation Wrong Pattern Table
PPUCTRL (register $2000) determines which pattern table to fetch the tiles from. Figure out the last timestamp and value written there before the graphics display.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: PPU Emulation Wrong Pattern Table
Managed to find the bug, when using the control pattern background I had
```
self.control & Control::PATTERN_BACKGROUND).bits()
```
and should be
```
(self.control & Control::PATTERN_BACKGROUND).bits() >> 4)
```
```
self.control & Control::PATTERN_BACKGROUND).bits()
```
and should be
```
(self.control & Control::PATTERN_BACKGROUND).bits() >> 4)
```