2020-04-19 14:20:26 +03:00
|
|
|
#ifndef __DRIVERS__VGA_TEXTMODE_H__
|
|
|
|
#define __DRIVERS__VGA_TEXTMODE_H__
|
2019-05-30 16:59:25 +03:00
|
|
|
|
2022-10-04 20:10:38 +03:00
|
|
|
#if defined (BIOS)
|
2022-10-04 01:58:00 +03:00
|
|
|
|
2022-10-04 21:39:50 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stddef.h>
|
2022-10-04 20:10:38 +03:00
|
|
|
#include <stdbool.h>
|
2023-03-29 23:43:06 +03:00
|
|
|
#include <flanterm/flanterm.h>
|
2022-10-04 21:39:50 +03:00
|
|
|
|
|
|
|
#define VD_COLS (80 * 2)
|
|
|
|
#define VD_ROWS 25
|
|
|
|
|
|
|
|
struct textmode_context {
|
2023-03-29 23:43:06 +03:00
|
|
|
struct flanterm_context term;
|
2022-10-04 21:39:50 +03:00
|
|
|
|
|
|
|
volatile uint8_t *video_mem;
|
|
|
|
|
|
|
|
uint8_t *back_buffer;
|
|
|
|
uint8_t *front_buffer;
|
|
|
|
|
|
|
|
size_t cursor_offset;
|
|
|
|
size_t old_cursor_offset;
|
|
|
|
bool cursor_status;
|
|
|
|
uint8_t text_palette;
|
|
|
|
|
|
|
|
uint8_t saved_state_text_palette;
|
|
|
|
size_t saved_state_cursor_offset;
|
|
|
|
};
|
2019-05-30 16:59:25 +03:00
|
|
|
|
2022-10-04 03:34:11 +03:00
|
|
|
void vga_textmode_init(bool managed);
|
2021-08-16 19:02:28 +03:00
|
|
|
|
2019-05-30 16:59:25 +03:00
|
|
|
#endif
|
2022-10-04 20:10:38 +03:00
|
|
|
|
|
|
|
#endif
|