diff options
| author | miguel <miguel@miguel-acer.softwarefools.com> | 2014-08-28 00:08:47 +0200 |
|---|---|---|
| committer | miguel <miguel@miguel-acer.softwarefools.com> | 2014-08-28 00:08:47 +0200 |
| commit | 8496db1f6caff488b3835e7897fd079a267d8839 (patch) | |
| tree | 477208043d89cd8a23e3db39f6c0ec08117c9278 /kernel | |
| parent | 8fa69899700f78014600585f377952a780ba4c2f (diff) | |
figured out colors :)
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/vesa.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/vesa.c b/kernel/vesa.c index 8bac363..2a8230c 100644 --- a/kernel/vesa.c +++ b/kernel/vesa.c @@ -73,9 +73,13 @@ void vesa_init(vbeinfo *info,vbemodeinfo *mode,foolfont *rawfont) info->VbeVersion, info->VideoModePtr[1], info->VideoModePtr[0]); // vesa info on selected mode: + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"colors r:%d 0x%x g:%d 0x%x b:%d 0x%x", + mode->red_position,mode->red_mask, + mode->green_position,mode->green_mask, + mode->blue_position,mode->blue_mask); + log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"res: %d * %d / banks: %d / attr: 0x%x / bpp: %d / physbase: 0x%x", mode->Xres, mode->Yres, mode->banks, mode->attributes, mode->bpp,mode->physbase); - // vesa modes // todo: take segment from vbeinfo! #ifdef FOOLSOS_SHOW_VESAMODES @@ -97,9 +101,10 @@ void PutPixel(int x,int y, int color){ if (x) x = (x*(VbeModeInfoBlock->bpp>>3)); // get bytes (divide by 8) if (y) y = (y*VbeModeInfoBlock->pitch); uint8_t *cTemp=VbeModeInfoBlock->physbase; + cTemp[x+y] = (uint8_t)(color & 0xff); cTemp[x+y+1] = (uint8_t)((color>>8) & 0xff); - cTemp[x+y+2] = (uint8_t)((color>>16) & 0xff); + //cTemp[x+y+2] = (uint8_t)((color>>16) & 0xff); } void PutFont(char c, int x,int y, int color) |
