mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
Use the VGA start address for fast VirtualConsole scrolling.
Instead of memcpy'ing the entire screen every time we press enter at the bottom, use the VGA start address register to make a "view" onto the underlying memory that moves downward as we scroll. Eventually we run out of memory and have to reset to the start of the buffer. That's when we memcpy everything. It would be cool if there was some way to get the hardware to act like a ring buffer with automatic wrapping here but I don't know how to do that.
This commit is contained in:
parent
8a865c11ec
commit
3e3de67f02
6 changed files with 76 additions and 26 deletions
|
@ -51,6 +51,12 @@ private:
|
|||
byte m_saved_cursor_column { 0 };
|
||||
byte m_current_attribute { 0x07 };
|
||||
|
||||
void clear_vga_row(word row);
|
||||
void set_vga_start_row(word row);
|
||||
word m_vga_start_row { 0 };
|
||||
word m_current_vga_start_address { 0 };
|
||||
byte* m_current_vga_window { nullptr };
|
||||
|
||||
void execute_escape_sequence(byte final);
|
||||
|
||||
enum EscapeState {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue