diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-08 18:36:27 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-08 18:36:27 +0200 |
| commit | 52f3e224fb4d3e05202134f7747fdee00a03ed61 (patch) | |
| tree | 1af9c1fd2d61e628ac2f25f6fb4025890337ef16 /kernel/vesa.c | |
| parent | 907ddb48aa8896fc9564990484d562a328c9215f (diff) | |
started with mouse driver and double buffer
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]; + +} + |
