Working on ppu
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user