diff --git a/drivers/build.xml b/drivers/build.xml index dbe7a80..4496b89 100644 --- a/drivers/build.xml +++ b/drivers/build.xml @@ -14,6 +14,7 @@ + diff --git a/drivers/pci.c b/drivers/pci.c index 5e39ed7..1f77130 100644 --- a/drivers/pci.c +++ b/drivers/pci.c @@ -305,11 +305,9 @@ static const pci_dev_t vga_devices[] = { static int vga_config_cb (const pci_config_t *config) { -#if 0 if (config->regions[0] != 0x00000000) vga_vbe_init(config->path, config->regions[0], config->sizes[0], config->regions[1], config->sizes[1]); -#endif return 0; } diff --git a/modules/video.c b/modules/video.c index 8be18ed..865552d 100644 --- a/modules/video.c +++ b/modules/video.c @@ -148,7 +148,7 @@ fill_rect( int col_ind, int x, int y, int w, int h ) while( ww-- ) *p++ = col; } else { - char *p = (char*)pp + x; + char *p = (ushort*)pp + x; while( ww-- ) *p++ = col; } @@ -181,6 +181,10 @@ set_color( int ind, ulong color ) dac[1] = ((color >> 8) & 0xff) << 24; // Green dac[1] = (color & 0xff) << 24; // Blue } +#else + vga_set_color(ind, ((color >> 16) & 0xff), + ((color >> 8) & 0xff), + (color & 0xff)); #endif } @@ -278,14 +282,7 @@ video_write(void) PUSH(len); } -static void -video_open(void) -{ - RET(-1); -} - NODE_METHODS( video ) = { - {"open", video_open }, {"dimensions", video_dimensions }, {"set-colors", video_set_colors }, {"fill-rectangle", video_fill_rect },