diff options
Diffstat (limited to 'kernel/vesa.c')
| -rw-r--r-- | kernel/vesa.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/kernel/vesa.c b/kernel/vesa.c index f3b333c..7b7b531 100644 --- a/kernel/vesa.c +++ b/kernel/vesa.c @@ -58,6 +58,9 @@ static int console_y; static int console_lines; static int console_cols; +static uint8_t* buffer; +static uint8_t* physbase; + void vesa_set_physbase(uint32_t addr) { VbeModeInfoBlock->physbase=addr; @@ -188,6 +191,32 @@ void PutConsoleNL() } } +//////////////// + +void vesa_render() +{ + +} + +void vesa_init_doublebuff() +{ + + int blocks=800*600*2/4096+1; + physbase=VbeModeInfoBlock->physbase; + buffer=pmmngr_alloc_blocks(blocks); + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"Init buffer of %d blocks at 0x%08X",blocks,buffer); + + VbeModeInfoBlock->physbase=buffer; + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"test"); + vesa_switch_buffers(); +} + +void vesa_switch_buffers() +{ + for(int i=0;i<800*600*2;i++)physbase[i]=buffer[i]; + +} + |
