2022-09-02 03:29:12 +03:00
|
|
|
#if defined (BIOS)
|
2021-03-02 12:23:43 +03:00
|
|
|
|
2019-05-30 16:59:25 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
2020-06-05 22:34:11 +03:00
|
|
|
#include <stdbool.h>
|
2020-11-20 21:55:18 +03:00
|
|
|
#include <drivers/vga_textmode.h>
|
2020-09-21 13:15:55 +03:00
|
|
|
#include <sys/cpu.h>
|
2020-04-24 16:22:46 +03:00
|
|
|
#include <lib/real.h>
|
2020-11-20 21:55:18 +03:00
|
|
|
#include <lib/libc.h>
|
2022-08-27 00:44:47 +03:00
|
|
|
#include <lib/misc.h>
|
2021-04-04 04:38:38 +03:00
|
|
|
#include <lib/term.h>
|
2020-11-20 21:55:18 +03:00
|
|
|
#include <mm/pmm.h>
|
2019-05-30 16:59:25 +03:00
|
|
|
|
|
|
|
#define VIDEO_BOTTOM ((VD_ROWS * VD_COLS) - 1)
|
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
static void draw_cursor(struct textmode_context *ctx) {
|
|
|
|
uint8_t pal = ctx->back_buffer[ctx->cursor_offset + 1];
|
|
|
|
ctx->video_mem[ctx->cursor_offset + 1] = ((pal & 0xf0) >> 4) | ((pal & 0x0f) << 4);
|
2019-05-30 16:59:25 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_save_state(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->saved_state_text_palette = ctx->text_palette;
|
|
|
|
ctx->saved_state_cursor_offset = ctx->cursor_offset;
|
2022-01-19 01:46:25 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_restore_state(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette = ctx->saved_state_text_palette;
|
|
|
|
ctx->cursor_offset = ctx->saved_state_cursor_offset;
|
2022-01-19 01:46:25 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_swap_palette(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette = (ctx->text_palette << 4) | (ctx->text_palette >> 4);
|
2021-08-16 19:02:28 +03:00
|
|
|
}
|
2021-07-08 17:33:24 +03:00
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_scroll(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
2021-07-08 17:33:24 +03:00
|
|
|
|
2019-05-30 16:59:25 +03:00
|
|
|
// move the text up by one row
|
2022-10-04 01:58:00 +03:00
|
|
|
for (size_t i = _ctx->scroll_top_margin * VD_COLS;
|
|
|
|
i < (_ctx->scroll_bottom_margin - 1) * VD_COLS; i++) {
|
|
|
|
ctx->back_buffer[i] = ctx->back_buffer[i + VD_COLS];
|
2021-07-07 04:37:29 +03:00
|
|
|
}
|
2019-05-30 16:59:25 +03:00
|
|
|
// clear the last line of the screen
|
2022-10-04 01:58:00 +03:00
|
|
|
for (size_t i = (_ctx->scroll_bottom_margin - 1) * VD_COLS;
|
|
|
|
i < _ctx->scroll_bottom_margin * VD_COLS; i += 2) {
|
|
|
|
ctx->back_buffer[i] = ' ';
|
|
|
|
ctx->back_buffer[i + 1] = ctx->text_palette;
|
2019-05-30 16:59:25 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_revscroll(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
2022-01-19 01:46:25 +03:00
|
|
|
// move the text up by one row
|
2022-10-04 01:58:00 +03:00
|
|
|
for (size_t i = (_ctx->scroll_bottom_margin - 1) * VD_COLS - 2; ; i--) {
|
|
|
|
ctx->back_buffer[i + VD_COLS] = ctx->back_buffer[i];
|
|
|
|
if (i == _ctx->scroll_top_margin * VD_COLS) {
|
2022-01-19 01:46:25 +03:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// clear the first line of the screen
|
2022-10-04 01:58:00 +03:00
|
|
|
for (size_t i = _ctx->scroll_top_margin * VD_COLS;
|
|
|
|
i < (_ctx->scroll_top_margin + 1) * VD_COLS; i += 2) {
|
|
|
|
ctx->back_buffer[i] = ' ';
|
|
|
|
ctx->back_buffer[i + 1] = ctx->text_palette;
|
2022-01-19 01:46:25 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_clear(struct term_context *_ctx, bool move) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
2019-05-30 16:59:25 +03:00
|
|
|
for (size_t i = 0; i < VIDEO_BOTTOM; i += 2) {
|
2022-10-04 01:58:00 +03:00
|
|
|
ctx->back_buffer[i] = ' ';
|
|
|
|
ctx->back_buffer[i + 1] = ctx->text_palette;
|
|
|
|
}
|
|
|
|
if (move) {
|
|
|
|
ctx->cursor_offset = 0;
|
2019-05-30 16:59:25 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_enable_cursor(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
2019-05-30 16:59:25 +03:00
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
ctx->cursor_status = true;
|
2019-05-30 16:59:25 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static bool text_disable_cursor(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
2021-08-16 19:02:28 +03:00
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
bool ret = ctx->cursor_status;
|
|
|
|
ctx->cursor_status = false;
|
2021-08-16 19:02:28 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_full_refresh(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
2021-08-16 19:02:28 +03:00
|
|
|
|
|
|
|
for (size_t i = 0; i < VD_ROWS * VD_COLS; i++) {
|
2022-10-04 01:58:00 +03:00
|
|
|
ctx->video_mem[i] = ctx->front_buffer[i];
|
|
|
|
ctx->back_buffer[i] = ctx->front_buffer[i];
|
2021-08-16 21:56:39 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
if (ctx->cursor_status) {
|
|
|
|
draw_cursor(ctx);
|
|
|
|
ctx->old_cursor_offset = ctx->cursor_offset;
|
2021-09-28 03:05:47 +03:00
|
|
|
}
|
2021-08-16 19:02:28 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_double_buffer_flush(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
|
|
|
if (ctx->cursor_status) {
|
|
|
|
draw_cursor(ctx);
|
2021-09-28 03:05:47 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
if (ctx->cursor_offset != ctx->old_cursor_offset || ctx->cursor_status == false) {
|
|
|
|
ctx->video_mem[ctx->old_cursor_offset + 1] = ctx->back_buffer[ctx->old_cursor_offset + 1];
|
2021-09-28 03:05:47 +03:00
|
|
|
}
|
|
|
|
|
2020-11-20 21:55:18 +03:00
|
|
|
for (size_t i = 0; i < VD_ROWS * VD_COLS; i++) {
|
2022-10-04 01:58:00 +03:00
|
|
|
if (ctx->back_buffer[i] == ctx->front_buffer[i]) {
|
2020-11-20 21:55:18 +03:00
|
|
|
continue;
|
2021-09-28 03:05:47 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
if (ctx->cursor_status && i == ctx->cursor_offset + 1) {
|
2021-09-28 03:05:47 +03:00
|
|
|
continue;
|
|
|
|
}
|
2020-11-20 21:55:18 +03:00
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
ctx->front_buffer[i] = ctx->back_buffer[i];
|
|
|
|
ctx->video_mem[i] = ctx->back_buffer[i];
|
2020-11-20 21:55:18 +03:00
|
|
|
}
|
2021-07-07 04:37:29 +03:00
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
if (ctx->cursor_status) {
|
|
|
|
ctx->old_cursor_offset = ctx->cursor_offset;
|
2021-09-28 03:05:47 +03:00
|
|
|
}
|
2020-04-19 14:20:26 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_get_cursor_pos(struct term_context *_ctx, size_t *x, size_t *y) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
|
|
|
*x = (ctx->cursor_offset % VD_COLS) / 2;
|
|
|
|
*y = ctx->cursor_offset / VD_COLS;
|
2020-01-25 06:49:11 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_move_character(struct term_context *_ctx, size_t new_x, size_t new_y, size_t old_x, size_t old_y) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
2021-08-16 19:02:28 +03:00
|
|
|
if (old_x >= VD_COLS / 2 || old_y >= VD_ROWS
|
|
|
|
|| new_x >= VD_COLS / 2 || new_y >= VD_ROWS) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-10-04 01:58:00 +03:00
|
|
|
ctx->back_buffer[new_y * VD_COLS + new_x * 2] = ctx->back_buffer[old_y * VD_COLS + old_x * 2];
|
2021-07-31 21:52:46 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_set_cursor_pos(struct term_context *_ctx, size_t x, size_t y) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
2021-08-16 19:02:28 +03:00
|
|
|
if (x >= VD_COLS / 2) {
|
2021-09-11 09:43:39 +03:00
|
|
|
if ((int)x < 0) {
|
|
|
|
x = 0;
|
|
|
|
} else {
|
|
|
|
x = VD_COLS / 2 - 1;
|
|
|
|
}
|
2021-07-20 15:13:56 +03:00
|
|
|
}
|
2021-08-16 19:02:28 +03:00
|
|
|
if (y >= VD_ROWS) {
|
2021-09-11 09:43:39 +03:00
|
|
|
if ((int)y < 0) {
|
|
|
|
y = 0;
|
|
|
|
} else {
|
|
|
|
y = VD_ROWS - 1;
|
|
|
|
}
|
2021-07-20 15:13:56 +03:00
|
|
|
}
|
2022-10-04 01:58:00 +03:00
|
|
|
ctx->cursor_offset = y * VD_COLS + x * 2;
|
2019-05-30 16:59:25 +03:00
|
|
|
}
|
|
|
|
|
2021-08-16 19:02:28 +03:00
|
|
|
static uint8_t ansi_colours[] = { 0, 4, 2, 6, 1, 5, 3, 7 };
|
2020-09-02 10:55:56 +03:00
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_set_text_fg(struct term_context *_ctx, size_t fg) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette = (ctx->text_palette & 0xf0) | ansi_colours[fg];
|
2019-05-30 16:59:25 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_set_text_bg(struct term_context *_ctx, size_t bg) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette = (ctx->text_palette & 0x0f) | (ansi_colours[bg] << 4);
|
2020-09-02 10:55:56 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_set_text_fg_bright(struct term_context *_ctx, size_t fg) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette = (ctx->text_palette & 0xf0) | (ansi_colours[fg] | (1 << 3));
|
2021-08-16 19:02:28 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_set_text_bg_bright(struct term_context *_ctx, size_t bg) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette = (ctx->text_palette & 0x0f) | ((ansi_colours[bg] | (1 << 3)) << 4);
|
2021-08-17 01:37:24 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_set_text_fg_rgb(struct term_context *ctx, uint32_t n) {
|
|
|
|
(void)ctx;
|
|
|
|
(void)n;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void text_set_text_bg_rgb(struct term_context *ctx, uint32_t n) {
|
|
|
|
(void)ctx;
|
|
|
|
(void)n;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void text_set_text_fg_default(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette = (ctx->text_palette & 0xf0) | 7;
|
2021-08-01 00:51:48 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_set_text_bg_default(struct term_context *_ctx) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
ctx->text_palette &= 0x0f;
|
2021-08-01 00:51:48 +03:00
|
|
|
}
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_putchar(struct term_context *_ctx, uint8_t c) {
|
2022-10-04 01:58:00 +03:00
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
|
|
|
ctx->back_buffer[ctx->cursor_offset] = c;
|
|
|
|
ctx->back_buffer[ctx->cursor_offset + 1] = ctx->text_palette;
|
|
|
|
if (ctx->cursor_offset / VD_COLS == _ctx->scroll_bottom_margin - 1
|
|
|
|
&& ctx->cursor_offset % VD_COLS == VD_COLS - 2) {
|
|
|
|
if (_ctx->scroll_enabled) {
|
|
|
|
text_scroll(_ctx);
|
|
|
|
ctx->cursor_offset -= ctx->cursor_offset % VD_COLS;
|
2021-08-16 19:02:28 +03:00
|
|
|
}
|
2022-10-04 01:58:00 +03:00
|
|
|
} else if (ctx->cursor_offset >= (VIDEO_BOTTOM - 1)) {
|
|
|
|
ctx->cursor_offset -= ctx->cursor_offset % VD_COLS;
|
2021-08-16 19:02:28 +03:00
|
|
|
} else {
|
2022-10-04 01:58:00 +03:00
|
|
|
ctx->cursor_offset += 2;
|
2021-08-16 19:02:28 +03:00
|
|
|
}
|
2019-05-30 16:59:25 +03:00
|
|
|
}
|
2021-03-02 12:23:43 +03:00
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
static void text_deinit(struct term_context *_ctx, void (*_free)(void *, size_t)) {
|
|
|
|
struct textmode_context *ctx = (void *)_ctx;
|
|
|
|
|
|
|
|
if (ctx->back_buffer != NULL) {
|
|
|
|
_free(ctx->back_buffer, VD_ROWS * VD_COLS);
|
|
|
|
ctx->back_buffer = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ctx->front_buffer != NULL) {
|
|
|
|
_free(ctx->front_buffer, VD_ROWS * VD_COLS);
|
|
|
|
ctx->front_buffer = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-04 08:24:42 +03:00
|
|
|
static struct textmode_context term_local_struct;
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
void vga_textmode_init(bool managed) {
|
2022-10-05 16:01:01 +03:00
|
|
|
if (term != NULL) {
|
|
|
|
term->deinit(term, pmm_free);
|
|
|
|
term = NULL;
|
|
|
|
}
|
|
|
|
|
2022-10-04 09:21:59 +03:00
|
|
|
if (quiet) {
|
2022-10-04 03:34:11 +03:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (current_video_mode != 0x3) {
|
|
|
|
struct rm_regs r = {0};
|
|
|
|
r.eax = 0x0003;
|
|
|
|
rm_int(0x10, &r, &r);
|
|
|
|
|
|
|
|
current_video_mode = 0x3;
|
|
|
|
}
|
|
|
|
|
2022-10-04 08:24:42 +03:00
|
|
|
struct textmode_context *ctx = &term_local_struct;
|
|
|
|
term = &term_local_struct.term;
|
2022-10-04 03:34:11 +03:00
|
|
|
|
|
|
|
if (ctx->back_buffer == NULL) {
|
|
|
|
ctx->back_buffer = ext_mem_alloc(VD_ROWS * VD_COLS);
|
|
|
|
} else {
|
|
|
|
memset(ctx->back_buffer, 0, VD_ROWS * VD_COLS);
|
|
|
|
}
|
|
|
|
if (ctx->front_buffer == NULL) {
|
|
|
|
ctx->front_buffer = ext_mem_alloc(VD_ROWS * VD_COLS);
|
|
|
|
} else {
|
|
|
|
memset(ctx->front_buffer, 0, VD_ROWS * VD_COLS);
|
|
|
|
}
|
|
|
|
|
|
|
|
ctx->cursor_offset = 0;
|
|
|
|
ctx->cursor_status = true;
|
|
|
|
ctx->text_palette = 0x07;
|
|
|
|
|
|
|
|
ctx->video_mem = (volatile uint8_t *)0xb8000;
|
|
|
|
|
|
|
|
text_clear(term, false);
|
|
|
|
|
|
|
|
// VGA cursor code taken from: https://wiki.osdev.org/Text_Mode_Cursor
|
|
|
|
|
|
|
|
if (!managed) {
|
|
|
|
text_disable_cursor(term);
|
|
|
|
|
|
|
|
outb(0x3d4, 0x0a);
|
|
|
|
outb(0x3d5, (inb(0x3d5) & 0xc0) | 14);
|
|
|
|
outb(0x3d4, 0x0b);
|
|
|
|
outb(0x3d5, (inb(0x3d5) & 0xe0) | 15);
|
|
|
|
outb(0x3d4, 0x0f);
|
|
|
|
outb(0x3d5, 0);
|
|
|
|
outb(0x3d4, 0x0e);
|
|
|
|
outb(0x3d5, 0);
|
|
|
|
|
|
|
|
struct rm_regs r = {0};
|
|
|
|
r.eax = 0x0200;
|
|
|
|
rm_int(0x10, &r, &r);
|
|
|
|
} else {
|
|
|
|
outb(0x3d4, 0x0a);
|
|
|
|
outb(0x3d5, 0x20);
|
|
|
|
}
|
|
|
|
|
|
|
|
text_double_buffer_flush(term);
|
|
|
|
|
2022-10-04 06:39:48 +03:00
|
|
|
if (managed && serial) {
|
2022-10-06 04:58:04 +03:00
|
|
|
term->cols = 80;
|
|
|
|
term->rows = 24;
|
2022-10-04 03:34:11 +03:00
|
|
|
} else {
|
|
|
|
term->cols = 80;
|
|
|
|
term->rows = 25;
|
|
|
|
}
|
|
|
|
|
|
|
|
term->raw_putchar = text_putchar;
|
|
|
|
term->clear = text_clear;
|
|
|
|
term->enable_cursor = text_enable_cursor;
|
|
|
|
term->disable_cursor = text_disable_cursor;
|
|
|
|
term->set_cursor_pos = text_set_cursor_pos;
|
|
|
|
term->get_cursor_pos = text_get_cursor_pos;
|
|
|
|
term->set_text_fg = text_set_text_fg;
|
|
|
|
term->set_text_bg = text_set_text_bg;
|
|
|
|
term->set_text_fg_bright = text_set_text_fg_bright;
|
|
|
|
term->set_text_bg_bright = text_set_text_bg_bright;
|
|
|
|
term->set_text_fg_rgb = text_set_text_fg_rgb;
|
|
|
|
term->set_text_bg_rgb = text_set_text_bg_rgb;
|
|
|
|
term->set_text_fg_default = text_set_text_fg_default;
|
|
|
|
term->set_text_bg_default = text_set_text_bg_default;
|
|
|
|
term->move_character = text_move_character;
|
|
|
|
term->scroll = text_scroll;
|
|
|
|
term->revscroll = text_revscroll;
|
|
|
|
term->swap_palette = text_swap_palette;
|
|
|
|
term->save_state = text_save_state;
|
|
|
|
term->restore_state = text_restore_state;
|
|
|
|
term->double_buffer_flush = text_double_buffer_flush;
|
|
|
|
term->full_refresh = text_full_refresh;
|
|
|
|
term->deinit = text_deinit;
|
|
|
|
|
2022-10-04 20:10:38 +03:00
|
|
|
term->in_bootloader = true;
|
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
term_context_reinit(term);
|
2022-10-04 20:10:38 +03:00
|
|
|
term->full_refresh(term);
|
2022-10-04 03:34:11 +03:00
|
|
|
|
2022-10-04 20:10:38 +03:00
|
|
|
term_backend = TEXTMODE;
|
2022-10-04 03:34:11 +03:00
|
|
|
}
|
|
|
|
|
2021-03-02 12:23:43 +03:00
|
|
|
#endif
|