foo
authorJohn Tsiombikas <nuclear@member.fsf.org>
Tue, 13 Apr 2021 06:28:58 +0000 (09:28 +0300)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Tue, 13 Apr 2021 06:28:58 +0000 (09:28 +0300)
src/gamescr.c
src/intr.c
src/util.c

index 1e715bf..8ce610e 100644 (file)
@@ -43,7 +43,10 @@ void gamescr(void)
                bot = vram[backbuf] + 159 * 240 / 2;
                tunptr = tunmap;
                for(i=0; i<80; i++) {
-                       for(j=0; j<240/2; j++) {
+                       top++;
+                       bot++;
+                       tunptr++;
+                       for(j=1; j<240/2; j++) {
                                uint16_t pptop, ppbot;
 
                                tun = *tunptr++;
index 7d8bdf2..5858bf1 100644 (file)
@@ -9,9 +9,7 @@ static void intr_handler(void)
        int i;
        uint16_t iflags;
 
-       intr_disable();
-       iflags = REG_IF & 0x3fff;
-
+       iflags = REG_IF;
 
        for(i=0; i<MAX_INTR; i++) {
                if((iflags & (1 << i)) && intr_table[i]) {
@@ -20,7 +18,6 @@ static void intr_handler(void)
        }
 
        REG_IF = iflags;        /* ack intr */
-       intr_enable();
 }
 
 void intr_init(void)
index c52e8af..292f67c 100644 (file)
@@ -6,7 +6,7 @@ static char *top = &__data_end__;
 
 int iwram_brk(void *addr)
 {
-       if(addr < &__data_end__) {
+       if((char*)addr < &__data_end__) {
                addr = &__data_end__;
        }
        if(addr > get_sp()) {