Exemplo n.º 1
0
void popup()
{
	int i, j;
	char *pp;
	
#if NMOD_FRAMEBUFFER > 0 
	stop_record();
#endif
	
#if (NMOD_X86EMU_INT10 > 0)||(NMOD_X86EMU > 0)
	for (i=POP_Y; i<POP_Y + POP_H; i++) { 
		for (j=POP_X; j<POP_X + POP_W; j++) { 
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
                        save[0][i-POP_Y][j-POP_X] = *pp;  /* Save screen */
                        set_scrn_buf(i, j, ' ');
			*pp = ' ';		/* Clear */                        
			pp++;
                        save[1][i-POP_Y][j-POP_X] = *pp;
			*pp = 0x07;		/* Change Background to black */
		}
	}
#elif NMOD_FRAMEBUFFER >0
	//video_set_bg(0, 0, 0);
	for (i=POP_Y; i<POP_Y + POP_H; i++) { 
		for (j=POP_X; j<POP_X + POP_W; j++) {
                        set_scrn_buf(i, j, ' ');
			video_console_print(j, i, " ");
		}
	}
	video_set_bg(0, 0, 128);
#endif
        tty_print_region(POP_Y, POP_X, POP_Y+POP_H, POP_X+POP_W);
}
Exemplo n.º 2
0
void popdown()
{
	int i, j;
	char *pp;
	char buf[2]={0};
	
#if (NMOD_X86EMU_INT10 > 0)||(NMOD_X86EMU > 0)
	for (i=POP_Y; i<POP_Y + POP_H; i++) { 
		for (j=POP_X; j<POP_X + POP_W; j++) { 
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
			*pp = save[0][i-POP_Y][j-POP_X]; /* Restore screen */
                        set_scrn_buf(i, j, save[0][i-POP_Y][j-POP_X]);
			pp++;
			*pp = save[1][i-POP_Y][j-POP_X]; /* Restore color */
		}
	}
#elif NMOD_FRAMEBUFFER > 0
	video_set_bg(0, 0, 128);
	for (i=POP_Y; i<POP_Y + POP_H; i++) { 
		for (j=POP_X; j<POP_X + POP_W; j++) {
			buf[0] = video_get_console_char(j, i);
                        set_scrn_buf(i, j, buf[0]);
			video_console_print(j, i, buf);
		}
	}
#endif
        tty_print_region(POP_Y, POP_X, POP_Y+POP_H, POP_X+POP_W);
#if NMOD_FRAMEBUFFER >0 
	begin_record();
#endif

}
Exemplo n.º 3
0
void popup(int pop_x, int pop_y, int pop_h, int pop_w, char pop_save_buffer[2][pop_h][pop_w])
{
	int i, j;
	char *pp;

	for (i = pop_y; i < pop_y + pop_h; i++) {
		for (j = pop_x; j < pop_x + pop_w; j++) {
			/* Point to the write position in the screen */
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));

			/* pp and get_scrn_buf(i,j) should be equal here
			 * except on board that don't have screen (e.g. only serial port)
			 * that's why we save the screen buffer:
			 * save screen buffer */
			pop_save_buffer[0][i - pop_y][j - pop_x] = get_scrn_buf(i, j);
			*pp = ' ';               /* Clear screen */
			set_scrn_buf(i, j, ' '); /* Clear screen buffer */
			pp++;
			pop_save_buffer[1][i - pop_y][j - pop_x] = *pp; /* Save screen background color */
			*pp = 0x07;             /* Change screen Background to black */
		}
	}
	/* print the screen buffer in the serial console */
	tty_print_region(pop_y, pop_x, pop_y+pop_h, pop_x+pop_w);
}
Exemplo n.º 4
0
void popclear()
{
    int i, j;

    for (i=POP_Y; i<POP_Y + POP_H; i++) {
        for (j=POP_X; j<POP_X + POP_W; j++) {
            set_ega_char(i, j, ' ');
            set_scrn_buf(i, j, ' ');
        }
    }
    tty_print_region(POP_Y, POP_X, POP_Y+POP_H, POP_X+POP_W);
}
Exemplo n.º 5
0
void popdown()
{
    int i, j;

    for (i=POP_Y; i<POP_Y + POP_H; i++) {
        for (j=POP_X; j<POP_X + POP_W; j++) {
            set_ega_char_color(i, j, save[0][i-POP_Y][j-POP_X],
                               save[1][i-POP_Y][j-POP_X]);
            set_scrn_buf(i, j, save[0][i-POP_Y][j-POP_X]);
        }
    }
    tty_print_region(POP_Y, POP_X, POP_Y+POP_H, POP_X+POP_W);
}
Exemplo n.º 6
0
void popup()
{
    int i, j;

    for (i=POP_Y; i<POP_Y + POP_H; i++) {
        for (j=POP_X; j<POP_X + POP_W; j++) {
            save[0][i-POP_Y][j-POP_X] = get_ega_char(i, j);
            set_scrn_buf(i, j, ' ');
            save[1][i-POP_Y][j-POP_X] = get_ega_color(i, j);
            set_ega_char_color (i, j, ' ', 07);
        }
    }
    tty_print_region(POP_Y, POP_X, POP_Y+POP_H, POP_X+POP_W);
}
Exemplo n.º 7
0
void pop2clear()
{
	int i, j;
	char *pp;

	for (i=POP2_Y; i<POP2_Y + POP2_H; i++) { 
		for (j=POP2_X; j<POP2_X + POP2_W; j++) { 
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
			*pp = ' ';		/* Clear popup */
			set_scrn_buf(i, j, ' ');
			pp++;
		}
	}
        tty_print_region(POP2_Y, POP2_X, POP2_Y+POP2_H, POP2_X+POP2_W);
}
Exemplo n.º 8
0
void pop2down()
{
	int i, j;
	char *pp;

	for (i=POP2_Y; i<POP2_Y + POP2_H; i++) { 
		for (j=POP2_X; j<POP2_X + POP2_W; j++) { 
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
			*pp = save2[0][i-POP2_Y][j-POP2_X]; /* Restore screen */
			set_scrn_buf(i, j, save2[0][i-POP2_Y][j-POP2_X]);
			pp++;
			*pp = save2[1][i-POP2_Y][j-POP2_X]; /* Restore color */
		}
	}
        tty_print_region(POP2_Y, POP2_X, POP2_Y+POP2_H, POP2_X+POP2_W);
}
Exemplo n.º 9
0
void popclear(int pop_x, int pop_y, int pop_h, int pop_w, char pop_save_buffer[2][pop_h][pop_w])
{
	int i, j;
	char *pp;

	for (i = pop_y; i < pop_y + pop_h; i++) {
		for (j  =pop_x; j < pop_x + pop_w; j++) {
			/* Point to the write position in the screen */
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
			*pp = ' ';               /* Clear screen */
			set_scrn_buf(i, j, ' '); /* Clear screen buffer */
			pp++;
		}
	}
	/* print the screen buffer in the serial console */
	tty_print_region(pop_y, pop_x, pop_y+pop_h, pop_x+pop_w);
}
Exemplo n.º 10
0
void pop2up()
{
	int i, j;
	char *pp;

	for (i=POP2_Y; i<POP2_Y + POP2_H; i++) { 
		for (j=POP2_X; j<POP2_X + POP2_W; j++) { 
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
			save2[0][i-POP2_Y][j-POP2_X] = *pp;  /* Save screen */
			set_scrn_buf(i, j, ' ');
			*pp = ' ';		/* Clear */
			pp++;
			save2[1][i-POP2_Y][j-POP2_X] = *pp;
			*pp = 0x07;		/* Change Background to black */
		}
	}
        tty_print_region(POP2_Y, POP2_X, POP2_Y+POP2_H, POP2_X+POP2_W);
}
Exemplo n.º 11
0
void popdown(int pop_x, int pop_y, int pop_h, int pop_w, char pop_save_buffer[2][pop_h][pop_w])
{
	int i, j;
	char *pp;

	for (i = pop_y; i < pop_y + pop_h; i++) {
		for (j = pop_x; j < pop_x + pop_w; j++) {
			/* Point to the write position in the screen */
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
			*pp = pop_save_buffer[0][i-pop_y][j-pop_x]; /* Restore screen */
			set_scrn_buf(i, j, pop_save_buffer[0][i - pop_y][j - pop_x]); /* Restore the screen buffer*/
			pp++;
			*pp = pop_save_buffer[1][i - pop_y][j - pop_x]; /* Restore screen color */
		}
	}
	/* print the screen buffer in the serial console */
	tty_print_region(pop_y, pop_x, pop_y+pop_h, pop_x+pop_w);
}
Exemplo n.º 12
0
void popclear()
{
	int i, j;
	char *pp;
	
	for (i=POP_Y; i<POP_Y + POP_H; i++) { 
		for (j=POP_X; j<POP_X + POP_W; j++) { 
#if (NMOD_X86EMU_INT10 > 0)||(NMOD_X86EMU > 0)
			pp = (char *)(SCREEN_ADR + (i * 160) + (j * 2));
			*pp = ' ';		/* Clear popup */
			pp++;
#elif NMOD_FRAMEBUFFER >0
			video_console_print(j, i, " ");
#endif
                        set_scrn_buf(i, j, ' ');
		}
	}
        tty_print_region(POP_Y, POP_X, POP_Y+POP_H, POP_X+POP_W);
}