From: Ken B. <kb...@mi...> - 2005-03-18 17:28:31
|
I like to log the contents of the guest terminal to a file so that I can run with nogui in batch mode. I added a simple screen dump to bx_nogui_gui_c::text_update() (and in bx_x_gui_c::text_update for testing). I noticed that if text is scrolling very fast, this doesn't capture it all -- even though the screen is updated correctly. Am I imagining things? If not, what am I doing wrong? void bx_nogui_gui_c::text_update(Bit8u *old_text, Bit8u *new_text, unsigned long cursor_x, unsigned long cursor_y, bx_vga_tminfo_t tm_info, unsigned nrows) { int text_rows = 25; int text_cols = 80; int i,j; char line[81]; BX_INFO(("text_update....")); for(i=0; i<text_rows; i++){ for(j=0; j<text_cols*2; j+=2){ if(isprint(new_text[j+i*text_cols*2])) line[j/2] = new_text[j+i*text_cols*2]; else line[j/2] = ' '; } line[80] = '\0'; BX_INFO(("%s",line)); } BX_INFO(("...complete.")); UNUSED(old_text); //UNUSED(new_text); UNUSED(cursor_x); UNUSED(cursor_y); UNUSED(tm_info); UNUSED(nrows); } |