main: display control windowing functionality
authorRobin Krens <robin@robinkrens.nl>
Sat, 11 Jun 2022 20:40:21 +0000 (22:40 +0200)
committerRobin Krens <robin@robinkrens.nl>
Sat, 11 Jun 2022 20:40:21 +0000 (22:40 +0200)
src/main.c

index 6558f99..43289fc 100644 (file)
@@ -105,6 +105,11 @@ int main(void)
        outport(IO_MAP_BASE, FG_MAP(scr2_pos) | BG_MAP(scr1_pos));
        outport(IO_SPR_TABLE, SPR_TABLE(sprite_pos));
 
+       outport(IO_FG_WIN_X0, 10);
+       outport(IO_FG_WIN_Y0, 10);
+       outport(IO_FG_WIN_X1, SCREEN_WIDTH - 10);
+       outport(IO_FG_WIN_Y1, SCREEN_HEIGHT - 10);
+
        /* icons */
        outport(0x15, 0xEE);
 
@@ -118,7 +123,7 @@ int main(void)
                *ptr++ = bgtile_gfx[i];
        }
        
-       outport(IO_DISPLAY_CTRL, BG_ON | FG_ON);
+       outport(IO_DISPLAY_CTRL, FG_OUT_WIN | FG_ON);
 
        while(1) {
        }