mirror of
https://codeberg.org/hkzlab/TK2048.git
synced 2025-12-29 03:52:16 +11:00
Rewritten the irq handler
This commit is contained in:
parent
2999c7c218
commit
46f3662322
7 changed files with 87 additions and 37 deletions
|
|
@ -39,8 +39,6 @@ static state_page_data* state_page = (state_page_data*)STATE_PAGE;
|
|||
static shared_page_data *shared_page = (shared_page_data*)SHARED_PAGE;
|
||||
static uint8_t text_buf[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
__attribute__((interrupt)) void irq_handler(void);
|
||||
|
||||
void main(void) {
|
||||
uint16_t moves_count = 0;
|
||||
uint16_t score = 0;
|
||||
|
|
@ -61,7 +59,7 @@ void main(void) {
|
|||
vdp_switch_nt(0); // Make sure VDP shows the gamegrid
|
||||
|
||||
// Setup the IRQ handler
|
||||
POKEW(IRQ_HANDLER_ADDRESS, (uint16_t)irq_handler);
|
||||
POKEW(IRQ_HANDLER_ADDRESS, (uint16_t)vdp_irq_handler);
|
||||
|
||||
// Reset the game, calculate the initial score depending on which tiles we randomly get
|
||||
score = reset_game();
|
||||
|
|
@ -193,8 +191,3 @@ void main(void) {
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
__attribute__((interrupt)) void irq_handler(void) {
|
||||
vdp_write_interleaved_sat();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue