FreeBASIC  0.91.0
gfx_dos.c File Reference
#include "../fb_gfx.h"
#include "fb_gfx_dos.h"
#include <pc.h>
#include <sys/nearptr.h>
Include dependency graph for gfx_dos.c:

Go to the source code of this file.

Macros

#define TIMER_HZ   1000
 

Functions

static void fb_dos_save_video_mode (void)
 
static void fb_dos_restore_video_mode (void)
 
void fb_dos_mouse_isr_start (void)
 
void fb_dos_mouse_isr (void)
 
void fb_dos_mouse_isr_end (void)
 
void fb_hSoftCursor_code_start (void)
 
void fb_hSoftCursor_code_end (void)
 
void fb_hBlit_code_start (void)
 
void fb_hBlit_code_end (void)
 
void fb_hBlitMMX_code_start (void)
 
void fb_hBlitMMX_code_end (void)
 
void fb_MMX_code_start (void)
 
void fb_MMX_code_end (void)
 
void fb_hPostEvent_code_start (void)
 
void fb_hPostEvent_code_end (void)
 
static void fb_dos_multikey_hook (int scancode, int flags)
 
static void fb_dos_kb_init (void)
 
static void fb_dos_kb_exit (void)
 
static int fb_dos_mouse_init (void)
 
int fb_dos_get_mouse (int *x, int *y, int *z, int *buttons, int *clip)
 
void fb_dos_set_mouse (int x, int y, int cursor, int clip)
 
static void fb_dos_mouse_exit (void)
 
static int fb_dos_timer_handler (unsigned irq)
 
static void end_fb_dos_timer_handler (void)
 
static int fb_dos_timer_set_rate (int rate)
 
static int fb_dos_timer_set_freq (int freq)
 
static int fb_dos_timer_init (int freq)
 
static void fb_dos_timer_exit (void)
 
void fb_dos_set_palette (int idx, int r, int g, int b)
 
void fb_dos_vga_set_palette (void)
 
void fb_dos_vga_wait_vsync (void)
 
void fb_dos_detect (void)
 
int fb_dos_init (char *title, int w, int h, int depth, int refresh_rate, int flags)
 
void fb_dos_exit (void)
 
void fb_dos_lock (void)
 
void fb_dos_unlock (void)
 
void fb_dos_set_window_title (char *title)
 
void fb_hScreenInfo (ssize_t *width, ssize_t *height, ssize_t *depth, ssize_t *refresh)
 
ssize_t fb_hGetWindowHandle (void)
 

Variables

GFXDRIVER fb_gfxDriverVESAlinear
 
GFXDRIVER fb_gfxDriverVESA
 
GFXDRIVER fb_gfxDriverBIOS
 
GFXDRIVER fb_gfxDriverVGA
 
GFXDRIVER fb_gfxDriverModeX
 
const GFXDRIVER__fb_gfx_drivers_list []
 
fb_dos_t fb_dos
 
volatile int __fb_dos_junk
 
volatile int __fb_dos_update_ticks = 0
 
int __fb_dos_ticks_per_update
 
static __dpmi_regs fb_dos_mouse_regs
 
static __dpmi_raddr fb_dos_mouse_isr_rmcb
 
short fb_dos_mouse_x
 
short fb_dos_mouse_y
 
short fb_dos_mouse_z
 
char fb_dos_mouse_buttons
 
char fb_hSoftCursor_data_start
 
char fb_hSoftCursor_data_end
 
char fb_hBlitMMX_data_start
 
char fb_hBlitMMX_data_end
 
static const unsigned char kb_scan_to_ascii [128][3]
 
static const char kb_numpad_to_ascii [13]
 

Macro Definition Documentation

#define TIMER_HZ   1000

Definition at line 9 of file gfx_dos.c.

Function Documentation

static void end_fb_dos_timer_handler ( void  )
static

Definition at line 401 of file gfx_dos.c.

void fb_dos_detect ( void  )

Definition at line 470 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_dos_exit ( void  )

Definition at line 570 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_dos_get_mouse ( int *  x,
int *  y,
int *  z,
int *  buttons,
int *  clip 
)

Definition at line 266 of file gfx_dos.c.

int fb_dos_init ( char *  title,
int  w,
int  h,
int  depth,
int  refresh_rate,
int  flags 
)

Definition at line 494 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void fb_dos_kb_exit ( void  )
static

Definition at line 189 of file gfx_dos.c.

Here is the caller graph for this function:

static void fb_dos_kb_init ( void  )
static

Definition at line 175 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_dos_lock ( void  )

Definition at line 633 of file gfx_dos.c.

static void fb_dos_mouse_exit ( void  )
static

Definition at line 303 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int fb_dos_mouse_init ( void  )
static

Definition at line 230 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_dos_mouse_isr ( void  )

Here is the caller graph for this function:

void fb_dos_mouse_isr_end ( void  )

Here is the caller graph for this function:

void fb_dos_mouse_isr_start ( void  )

Here is the caller graph for this function:

static void fb_dos_multikey_hook ( int  scancode,
int  flags 
)
static

Definition at line 194 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void fb_dos_restore_video_mode ( void  )
static

Definition at line 657 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void fb_dos_save_video_mode ( void  )
static

Definition at line 650 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void fb_dos_set_mouse ( int  x,
int  y,
int  cursor,
int  clip 
)

Definition at line 279 of file gfx_dos.c.

Here is the caller graph for this function:

void fb_dos_set_palette ( int  idx,
int  r,
int  g,
int  b 
)

Definition at line 436 of file gfx_dos.c.

void fb_dos_set_window_title ( char *  title)

Definition at line 646 of file gfx_dos.c.

static void fb_dos_timer_exit ( void  )
static

Definition at line 428 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int fb_dos_timer_handler ( unsigned  irq)
static

Definition at line 315 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int fb_dos_timer_init ( int  freq)
static

Definition at line 421 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int fb_dos_timer_set_freq ( int  freq)
static

Definition at line 416 of file gfx_dos.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static int fb_dos_timer_set_rate ( int  rate)
static

Definition at line 403 of file gfx_dos.c.

Here is the caller graph for this function:

void fb_dos_unlock ( void  )

Definition at line 641 of file gfx_dos.c.

void fb_dos_vga_set_palette ( void  )

Definition at line 446 of file gfx_dos.c.

Here is the caller graph for this function:

void fb_dos_vga_wait_vsync ( void  )

Definition at line 464 of file gfx_dos.c.

void fb_hBlit_code_end ( void  )

Definition at line 862 of file gfx_blitter.c.

Here is the caller graph for this function:

void fb_hBlit_code_start ( void  )

Definition at line 29 of file gfx_blitter.c.

Here is the caller graph for this function:

void fb_hBlitMMX_code_end ( void  )

Here is the caller graph for this function:

void fb_hBlitMMX_code_start ( void  )

Here is the caller graph for this function:

ssize_t fb_hGetWindowHandle ( void  )

Definition at line 673 of file gfx_dos.c.

Here is the caller graph for this function:

void fb_hPostEvent_code_end ( void  )

Definition at line 36 of file gfx_core.c.

Here is the caller graph for this function:

void fb_hPostEvent_code_start ( void  )

Definition at line 19 of file gfx_core.c.

Here is the caller graph for this function:

void fb_hScreenInfo ( ssize_t *  width,
ssize_t *  height,
ssize_t *  depth,
ssize_t *  refresh 
)

Definition at line 665 of file gfx_dos.c.

Here is the caller graph for this function:

void fb_hSoftCursor_code_end ( void  )

Definition at line 181 of file gfx_softcursor.c.

Here is the caller graph for this function:

void fb_hSoftCursor_code_start ( void  )

Definition at line 43 of file gfx_softcursor.c.

Here is the caller graph for this function:

void fb_MMX_code_end ( void  )

Here is the caller graph for this function:

void fb_MMX_code_start ( void  )

Here is the caller graph for this function:

Variable Documentation

volatile int __fb_dos_junk

Definition at line 29 of file gfx_dos.c.

int __fb_dos_ticks_per_update

Definition at line 31 of file gfx_dos.c.

volatile int __fb_dos_update_ticks = 0

Definition at line 30 of file gfx_dos.c.

const GFXDRIVER* __fb_gfx_drivers_list[]
fb_dos_t fb_dos

Definition at line 27 of file gfx_dos.c.

char fb_dos_mouse_buttons
__dpmi_raddr fb_dos_mouse_isr_rmcb
static

Definition at line 37 of file gfx_dos.c.

__dpmi_regs fb_dos_mouse_regs
static

Definition at line 36 of file gfx_dos.c.

short fb_dos_mouse_x
short fb_dos_mouse_y
short fb_dos_mouse_z
GFXDRIVER fb_gfxDriverBIOS

Definition at line 17 of file gfx_driver_bios.c.

GFXDRIVER fb_gfxDriverModeX

Definition at line 18 of file gfx_driver_modex.c.

GFXDRIVER fb_gfxDriverVESA

Definition at line 15 of file gfx_driver_vesa_bnk.c.

GFXDRIVER fb_gfxDriverVESAlinear

Definition at line 14 of file gfx_driver_vesa_lin.c.

GFXDRIVER fb_gfxDriverVGA

Definition at line 13 of file gfx_driver_vga.c.

char fb_hBlitMMX_data_end
char fb_hBlitMMX_data_start
char fb_hSoftCursor_data_end

Definition at line 41 of file gfx_softcursor.c.

char fb_hSoftCursor_data_start

Definition at line 11 of file gfx_softcursor.c.

const char kb_numpad_to_ascii[13]
static
Initial value:
= {
'7', '8', '9', 0,
'4', '5', '6', '+',
'1', '2', '3',
'0', '.'
}

Definition at line 166 of file gfx_dos.c.

const unsigned char kb_scan_to_ascii[128][3]
static

Definition at line 72 of file gfx_dos.c.