diff --git a/src/framebuffer.c b/src/framebuffer.c index bf4a598..570c3a3 100644 --- a/src/framebuffer.c +++ b/src/framebuffer.c @@ -67,12 +67,19 @@ void putchar( } unsigned char *rowdata = font8x8_basic[*character]; - unsigned int charx, chary; + unsigned char charx, chary, iy, ix; + unsigned char sizex=2; + unsigned char sizey=2; for (chary=0;chary<8;chary++) { for (charx=0;charx<8;charx++) { unsigned char pix = rowdata[chary] & 1 << charx; - if (pix) - putpixel(x+charx, y+chary, r*pix, g*pix, b*pix); + if (pix) { + for (iy=1;iy<=sizey;iy++) { + for (ix=1;ix<=sizex;ix++) { + putpixel(x+charx*sizex+ix, y+chary*sizey+iy, r, g, b); + } + } + } } } } diff --git a/src/kernel.c b/src/kernel.c index 91fa921..1d5fed8 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -80,30 +80,18 @@ void kmain (unsigned int mbootmagick, multiboot_info_t* mbootinfo) mbootinfo->framebuffer_green_field_position, mbootinfo->framebuffer_blue_field_position ); - // int x, y, i; - // unsigned char c = 0; - // for (;;) { - // for (;c<255;c+=5) { - // for (y=0; y < mbootinfo->framebuffer_height; y++) { - // for (x=0; x < mbootinfo->framebuffer_width; x++) { - // putpixel(x, y, 0, c, c); - // } - // } - // } - // for (;c>0;c-=5) { - // for (y=mbootinfo->framebuffer_height; y>=0; y--) { - // for (x=mbootinfo->framebuffer_width; x>=0; x--) { - // putpixel(x, y, 0, c, c); - // } - // } - // } - // } + int x, y; + for (y=mbootinfo->framebuffer_height; y>=0; y--) { + for (x=mbootinfo->framebuffer_width; x>=0; x--) { + putpixel(x, y, 0, 0x55, 0x55); + } + } putchar("r", 0, 0, 0xff, 0xff, 0xff); - putchar("O", 8, 0, 0xff, 0xff, 0xff); - putchar("S", 16, 0, 0xff, 0xff, 0xff); - putchar("k", 24, 0, 0xff, 0xff, 0xff); - putchar("a", 32, 0, 0xff, 0xff, 0xff); + putchar("O", 16, 0, 0xff, 0xff, 0xff); + putchar("S", 32, 0, 0xff, 0xff, 0xff); + putchar("k", 48, 0, 0xff, 0xff, 0xff); + putchar("a", 64, 0, 0xff, 0xff, 0xff); while(1){} serial_write_string("\nExecution finished, halting...\n");