11 #include <sys/farptr.h>
13 static int driver_init(
char *title,
int w,
int h,
int depth,
int refresh_rate,
int flags);
53 #define CRT_PARM_LENGTH 10
55 static int driver_init(
char *title,
int w,
int h,
int depth_arg,
int refresh_rate,
int flags)
57 int depth =
MAX(8, depth_arg);
65 if ((w != 320) || (h != 240) || (depth != 8)) {
93 return fb_dos_init(title, w, h, depth, refresh_rate, flags);
104 for (plane = 0; plane < 4; plane++) {
106 outportw(
SC_INDEX, (0x100 << plane) | 0x02);
108 for (y = 0; y <
fb_dos.
h; y++) {
110 for (x = 0; x <
fb_dos.
w; x += 4, screen++) {
111 _farnspokeb(screen, buffer[x]);
124 if (depth != 8)
return NULL;
126 *size =
sizeof(
modes) /
sizeof(
int);