static void blitscreen_dirty1_vga() {
        int w, h;

        /* while (true)
            {*/
        for (int i = 0; i < scrbitmap.height; i++) {
            System.arraycopy(scrbitmap.line[i].memory, scrbitmap.line[i].offset, back_buffer, i * scrbitmap.width, scrbitmap.width);
        }

        {
            int sbi = scrbitmap.line[skiplines].offset + skipcolumns;
            sbi = 0;
            //w = drv.screen_width;// gfx_display_columns;
            //h = drv.screen_height;// gfx_display_lines;
            //w =  gfx_display_columns;
            //h =  gfx_display_lines;

            w = scrbitmap.width;
            h = scrbitmap.height;
            if (MainApplet.inst != null) {
                for (int y = 0; y < h; y++) {

                    for (int x = 0; x < w; x++) {
                        //blit_buffer[x + (y * w)] = palette[scrbitmap.line[skiplines].buffer[sbi + x + (y * w)]];
                        MainApplet.inst._pixels[x + (y * w)] = palette[back_buffer[sbi + x + (y * w)]];
                    }
                }
                MainApplet.inst.blit();

            } else if (MainStream.inst != null) {
                for (int y = 0; y < h; y++) {

                    for (int x = 0; x < w; x++) {
                        //blit_buffer[x + (y * w)] = palette[scrbitmap.line[skiplines].buffer[sbi + x + (y * w)]];
                        MainStream.inst._pixels[x + (y * w)] = palette[back_buffer[sbi + x + (y * w)]];
                    }
                }
                MainStream.inst.blit();

            } else {
                for (int y = 0; y < h; y++) {

                    for (int x = 0; x < w; x++) {
                        //blit_buffer[x + (y * w)] = palette[scrbitmap.line[skiplines].buffer[sbi + x + (y * w)]];
                        screen._pixels[x + (y * w)] = palette[back_buffer[sbi + x + (y * w)]];
                    }
                }
                screen.blit();
            }

            //}
        }
    }