/*
* (C) Copyright 2002
- * Hyperion Entertainment, Hans-JoergF@hyperion-entertainment.com
+ * Hyperion Entertainment, Hans-JoergF@hyperion-entertainment.com
*
* See file CREDITS for list of people who contributed to this
* project.
video_inited = 1;
video_init();
memset (&vgadev, 0, sizeof(vgadev));
-
+
strcpy(vgadev.name, VIDEO_NAME);
vgadev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_SYSTEM;
vgadev.putc = video_putc;
vgadev.getc = NULL;
vgadev.tstc = NULL;
vgadev.start = video_start;
-
+
error = device_register (&vgadev);
if (error == 0)
int video_init(void)
{
- cursor_position = VIDEO_BASE; // Color text display base
+ cursor_position = VIDEO_BASE; /* Color text display base */
cursor_row = 0;
cursor_col = 0;
- current_attr = video_get_attr(); // Currently selected value for attribute.
-// video_test();
+ current_attr = video_get_attr(); /* Currently selected value for attribute. */
+/* video_test(); */
video_set_color(current_attr);
return 0;
void video_draw_box(int style, int attr, char *title, int separate, int x, int y, int w, int h)
{
- unsigned char *fb, *fb2;
+ unsigned char *fb, *fb2;
unsigned char *st = (style == SINGLE_BOX)?video_single_box : video_double_box;
unsigned char *ti = (style == SINGLE_BOX)?video_single_title : video_double_title;
int i;
*fb = st[3];
*(fb+1) = attr; fb += 2*VIDEO_COLS;
- *fb2 = st[4];
+ *fb2 = st[4];
*(fb2+1) = attr; fb2 += 2*VIDEO_COLS;
}
-
- // Draw title
+
+ /* Draw title */
if (title)
{
if (separate == 0)
fb += 2;
}
fb = video_addr(x+2, y+1);
-
+
while (*title)
{
*fb = *title;
}
void video_restore_rect(int x, int y, int w, int h, void *save_area)
-{
+{
unsigned char *save = (unsigned char *)save_area;
unsigned char *fb = video_addr(x,y);
int i,j;
}
#endif
-extern bd_t *bd_global;
extern block_dev_desc_t * ide_get_dev(int dev);
extern char version_string[];
void video_banner(void)
{
block_dev_desc_t *ide;
+ DECLARE_GLOBAL_DATA_PTR;
int i;
char *s;
int maxdev;
-
+
if (video_inited == 0) return;
#ifdef EASTEREGG
video_clear();
printf("%s\n\nCPU: ", version_string);
checkcpu();
- printf("DRAM: %ld MB\n", bd_global->bi_memsize/(1024*1024));
- printf("FSB: %ld MHz\n", bd_global->bi_busfreq/1000000);
+ printf("DRAM: %ld MB\n", gd->bd->bi_memsize/(1024*1024));
+ printf("FSB: %ld MHz\n", gd->bd->bi_busfreq/1000000);
printf("\n---- Disk summary ----\n");
for (i = 0; i < maxdev; i++)