summaryrefslogtreecommitdiff
path: root/ppu.c
diff options
context:
space:
mode:
Diffstat (limited to 'ppu.c')
-rw-r--r--ppu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ppu.c b/ppu.c
index 8280265..570f3dd 100644
--- a/ppu.c
+++ b/ppu.c
@@ -28,7 +28,7 @@ __attribute__((hot))
static inline void ppu_evaluate_sprites(struct nes_state *state) {
struct ppu_state *restrict ppu = &state->ppu;
uint8_t sprite_height = (ppu->reg_ctrl & 0x20) ? 16 : 8;
- uint8_t n = 0;
+ uint32_t n = 0;
uint8_t * restrict src = ppu->oam;
uint8_t * restrict dst = ppu->secondary_oam;
@@ -47,7 +47,7 @@ static inline void ppu_evaluate_sprites(struct nes_state *state) {
dst += 4;
n++;
} else {
- ppu->reg_status |= 0x20;
+ ppu->reg_status |= 0x20; // NOTE(peter): sprite overflow
break;
}
}