This repository has been archived on 2024-11-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Dawn-GB/src/interrupts.c

20 lines
450 B
C

/**
* Copyright (c) 2022 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "interrupts.h"
void interruptOnScanline() {
if(LYC_REG == 0) {
LCDC_REG |= LCDCF_BG8000;
if((TEXTBOX_STATE & TEXTBOX_STATE_VISIBLE) != 0) {
LYC_REG = INTERRUPT_TEXTBOX_VRAM;
}
} else if(LYC_REG == INTERRUPT_TEXTBOX_VRAM) {
LCDC_REG &= ~LCDCF_BG8000;
LYC_REG = 0;
}
}