6 #include <sys/nearptr.h>
212 if ( (flags & KB_SHIFT) && ((e.
ascii >=
'A') && (e.
ascii <=
'Z') ) )
213 e.
ascii += (
'a' -
'A');
214 else if ( ((e.
ascii >=
'a') && (e.
ascii <=
'z') ) )
215 e.
ascii -= (
'a' -
'A');
220 if ( scancode >= 71 && scancode <= 83 )
235 fb_dos.
regs.x.ax = 0x7;
236 fb_dos.
regs.x.cx = 0;
237 fb_dos.
regs.x.dx = fb_dos.
w - 1;
238 __dpmi_int(0x33, &fb_dos.
regs);
241 fb_dos.
regs.x.ax = 0x8;
242 fb_dos.
regs.x.cx = 0;
243 fb_dos.
regs.x.dx = fb_dos.
h - 1;
244 __dpmi_int(0x33, &fb_dos.
regs);
247 fb_dos.
regs.x.ax = 0x2;
248 __dpmi_int(0x33, &fb_dos.
regs);
257 fb_dos.
regs.x.ax = 0x0C;
258 fb_dos.
regs.x.cx = 0xFF;
261 __dpmi_int(0x33, &fb_dos.
regs);
289 fb_dos.
regs.x.ax = 0x4;
290 fb_dos.
regs.x.cx = new_x;
291 fb_dos.
regs.x.dx = new_y;
292 __dpmi_int(0x33, &fb_dos.
regs);
294 fb_dos_mouse_x = new_x;
295 fb_dos_mouse_y = new_y;
309 fb_dos.
regs.x.ax = 0x0;
310 __dpmi_int(0x33, &fb_dos.
regs);
336 outportb(0x20, 0x20);
406 while (rate > 65536 )
408 for (i = 0; i != 4; ++i) {
409 outportb(0x43, 0x34);
410 outportb(0x40, rate & 0xff);
411 outportb(0x40, rate >> 8);
453 for (i = fb_dos.
pal_first; i < color_count; i++) {
454 outportb(0x3C9, fb_dos.
pal[i].
r);
455 outportb(0x3C9, fb_dos.
pal[i].
g);
456 outportb(0x3C9, fb_dos.
pal[i].
b);
466 while ((inportb(0x3DA) & 8) != 0);
467 while ((inportb(0x3DA) & 8) == 0);
476 fb_dos.
regs.x.ax = 0x0;
477 __dpmi_int(0x33, &fb_dos.
regs);
480 fb_dos.
regs.x.ax = 0x11;
481 __dpmi_int(0x33, &fb_dos.
regs);
487 __djgpp_nearptr_disable();
494 int fb_dos_init(
char *title,
int w,
int h,
int depth,
int refresh_rate,
int flags)
538 fb_dos.
depth = depth;
539 fb_dos.
Bpp = (depth + 7) / 8;
574 if (!fb_dos.
inited)
return;
665 void fb_hScreenInfo(ssize_t *width, ssize_t *height, ssize_t *depth, ssize_t *refresh)
669 *depth = fb_dos.
depth;