gbasys

diff src/intr.c @ 8:047c61960005

- added bg2 matrix support - changed some stupid const pointers to register addresses to hardcoded compile-time defines
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 22 Jun 2014 06:26:11 +0300
parents 875ef6085efc
children 85f219fcdc82
line diff
     1.1 --- a/src/intr.c	Tue Sep 04 05:05:50 2012 +0300
     1.2 +++ b/src/intr.c	Sun Jun 22 06:26:11 2014 +0300
     1.3 @@ -23,10 +23,6 @@
     1.4  
     1.5  #include "gfx.h"
     1.6  
     1.7 -unsigned short *reg_int_master = (unsigned short*)0x04000208;
     1.8 -unsigned short *reg_int_mask = (unsigned short*)0x04000200;
     1.9 -static volatile unsigned short *reg_int = (unsigned short*)0x04000202;
    1.10 -
    1.11  #define MAX_INTR	14
    1.12  static void (*intr_table[MAX_INTR])(void);
    1.13  
    1.14 @@ -38,10 +34,10 @@
    1.15  	int i;
    1.16  	unsigned short irq;
    1.17  	char buf[20];
    1.18 -	
    1.19 +
    1.20  	clr_int();
    1.21  
    1.22 -	irq = *reg_int & 0x3fff;
    1.23 +	irq = REG_INTR & 0x3fff;
    1.24  
    1.25  	for(i=0; i<MAX_INTR; i++) {
    1.26  		unsigned short irq_bit = (1 << i);
    1.27 @@ -50,7 +46,7 @@
    1.28  		}
    1.29  	}
    1.30  
    1.31 -	*reg_int = irq;
    1.32 +	REG_INTR = irq;
    1.33  
    1.34  	set_int();
    1.35  }