Mercurial > hg > index.fcgi > lj > lj046
diff src/gbaisr.iwram.c @ 0:c84446dfb3f5
initial add
author | paulo@localhost |
---|---|
date | Fri, 13 Mar 2009 00:39:12 -0700 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/gbaisr.iwram.c Fri Mar 13 00:39:12 2009 -0700 1.3 @@ -0,0 +1,15 @@ 1.4 +#include "ljgba.h" 1.5 +#define BIOS_IF (*(volatile unsigned short *)0x03FFFFF8) 1.6 + 1.7 +volatile int curTime = 0; 1.8 + 1.9 +void isr(void) { 1.10 + unsigned int interrupts = REG_IF; 1.11 + 1.12 + if (interrupts & IRQ_VBLANK) { 1.13 + ++curTime; 1.14 + } 1.15 + 1.16 + BIOS_IF |= interrupts; 1.17 + REG_IF = interrupts; 1.18 +}