Working on ppu

This commit is contained in:
2025-02-18 22:39:56 -07:00
parent 89a1b4cec6
commit c8ec44fa39
7 changed files with 38 additions and 9 deletions

View File

@ -112,6 +112,7 @@ void ppu_mode_xfer() {
if(LCDS_STAT_INT(SS_HBLANK)) {
cpu_request_interrupt(IT_LCD_STAT);
printf("hblank!\n");
}
ppu_get_context()->rendering_window = false;
}
@ -123,6 +124,9 @@ void ppu_mode_vblank() {
if(lcd_get_context()->ly >= LINES_PER_FRAME) {
LCDS_MODE_SET(MODE_OAM);
if(LCDS_STAT_INT(SS_OAM)) {
cpu_request_interrupt(IT_LCD_STAT);
}
lcd_get_context()->ly = 0;
ppu_get_context()->window_line = 0;
}
@ -182,6 +186,9 @@ void ppu_mode_hblank() {
} else {
LCDS_MODE_SET(MODE_OAM);
if(LCDS_STAT_INT(SS_OAM)) {
cpu_request_interrupt(IT_LCD_STAT);
}
}
ppu_get_context()->line_ticks = 0;