- SET_BDA(video_cols, GET_GLOBAL(vmode_g->twidth));
- SET_BDA(video_pagesize, GET_GLOBAL(vmode_g->slength));
+ if (memmodel == MM_TEXT) {
+ SET_BDA(video_cols, width);
+ SET_BDA(video_rows, height-1);
+ SET_BDA(cursor_type, 0x0607);
+ } else {
+ int cwidth = GET_GLOBAL(vmode_g->cwidth);
+ SET_BDA(video_cols, width / cwidth);
+ SET_BDA(video_rows, (height / cheight) - 1);
+ SET_BDA(cursor_type, 0x0000);
+ }
+ SET_BDA(video_pagesize, calc_page_size(memmodel, width, height));