Jspice3
mfbp.h File Reference
#include <math.h>
Include dependency graph for mfbp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mfbpc
 
struct  vga_cursor
 

Macros

#define KBRD   1 /* keyboard arrow keys */
 
#define MSMOUSE   2 /* Microsoft mouse */
 
#define MMTAB   4 /* Seiko DT-3503 tablet in Summagraphics MM mode */
 

Typedefs

typedef char * vidmptr
 

Functions

void ms_start ()
 
void ms_end ()
 
int ms_hreset ()
 
void ms_pointer_on ()
 
void ms_pointer_off ()
 
void ms_status ()
 
void ms_point ()
 
void dp_start ()
 
void dp_end ()
 
void dp_pointer_on ()
 
void dp_pointer_off ()
 
void dp_status ()
 
void dp_point ()
 
Bool makehpplot ()
 
Bool rasterize ()
 
void PrinterErrmsg ()
 
Bool PrinterPortStatus ()
 
void SetPrinterDevice ()
 
void vga_get_color ()
 
void vga_set_color ()
 
void vga_get_cblock ()
 
void vga_set_cblock ()
 
void vga_get_cpblock ()
 
void vga_set_cpblock ()
 
void mode_1_mark ()
 
void mode_2_mark ()
 
void mode_1_clear ()
 
void mode_2_clear ()
 

Variables

char * MFBRCD
 
char mfb_trash
 
unsigned short mfb_8X14font []
 
char dp_pointermap []
 
unsigned short mfb_chartab []
 
struct mfbpc pc
 
struct vga_cursor vgacur
 

Macro Definition Documentation

#define KBRD   1 /* keyboard arrow keys */

Definition at line 90 of file mfbp.h.

#define MMTAB   4 /* Seiko DT-3503 tablet in Summagraphics MM mode */

Definition at line 92 of file mfbp.h.

#define MSMOUSE   2 /* Microsoft mouse */

Definition at line 91 of file mfbp.h.

Typedef Documentation

typedef char* vidmptr

Definition at line 17 of file mfbp.h.

Function Documentation

void dp_end ( )

Definition at line 62 of file dpinterf.c.

65 {
66  union REGS r;
67 
68  r.x.ax = 6;
69  int86(0x62,&r,&r);
70 }
Definition: cddefs.h:162
void dp_point ( )
void dp_pointer_off ( )

Definition at line 87 of file dpinterf.c.

90 {
91  union REGS r;
92 
93  r.x.ax = 1;
94  int86(0x62,&r,&r);
95 }
Definition: cddefs.h:162
void dp_pointer_on ( )

Definition at line 74 of file dpinterf.c.

77 {
78  union REGS r;
79 
80  r.x.ax = 0;
81  r.x.bx = pc.cursor_color;
82  int86(0x62,&r,&r);
83 }
Definition: cddefs.h:162
int cursor_color
Definition: mfbp.h:50
struct mfbpc pc
Definition: mfbopen.c:14
void dp_start ( )
void dp_status ( )
Bool makehpplot ( )

Definition at line 26 of file mkhpplot.c.

29 {
30  FILE *fp;
31  struct stat b;
32  int er;
33 
34 
35  fp = fopen("hpplot","wb");
36 
37  if (!fp) {
38  PrinterErrmsg("Error: Can't open output file.",hmsg);
39  (void)MFBGetchar();
40  return (true);
41  }
42 
43  if (rasterize(fp)) {
44  PrinterErrmsg("Error: Rasterization failed.",hmsg);
45  (void)MFBGetchar();
46  return (true);
47  }
48  fclose(fp);
49 
50  if (hc_port >= 0) {
51  while (PrinterPortStatus(hc_port)) {
52  PrinterErrmsg("Error: Printer is not accessible.",
53  "Hit any key to continue, q to abort:");
54  if ((char)MFBGetchar() == 'q')
55  return (true);
56  }
57  }
58  if (stat("hpplot",&b)) {
59  PrinterErrmsg("Error: File \"hpplot\" not found.\n",hmsg);
60  (void)MFBGetchar();
61  return (true);
62  }
63 
64  fp = fopen("hpplot","rb");
65 
66  if (!fp) {
67  PrinterErrmsg("Error: File \"hpplot\" not found.\n",hmsg);
68  (void)MFBGetchar();
69  return (true);
70  }
71  er = dump((long) b.st_size,fp);
72  fclose(fp);
73  return (er);
74 }
void PrinterErrmsg(char *msg1, char *msg2)
Definition: mkhpplot.c:196
static int hc_port
Definition: mkhpplot.c:22
int MFBGetchar()
Definition: mfbopen.c:259
static Bool dump()
Bool rasterize(FILE *fp)
Definition: mkhpplot.c:78
static char * hmsg
Definition: mkhpplot.c:20
Bool PrinterPortStatus(int which)
Definition: mkhpplot.c:228
void mode_1_clear ( )
void mode_1_mark ( )
void mode_2_clear ( )
void mode_2_mark ( )
void ms_end ( )

Definition at line 62 of file msinterf.c.

65 {
66  (void)ms_hreset();
67 }
int ms_hreset()
Definition: msinterf.c:71
int ms_hreset ( )

Definition at line 71 of file msinterf.c.

73 {
74  union REGS r;
75 
76  r.x.ax = 0x0;
77  int86(0x33,&r,&r);
78  if (r.x.ax == 0xffff)
79  return (r.x.bx);
80  return (0);
81 }
Definition: cddefs.h:162
void ms_point ( )
void ms_pointer_off ( )

Definition at line 98 of file msinterf.c.

100 {
101  union REGS r;
102 
103  r.x.ax = 0x2;
104  int86(0x33,&r,&r);
105 }
Definition: cddefs.h:162
void ms_pointer_on ( )

Definition at line 85 of file msinterf.c.

87 {
88  union REGS r;
89 
90  /* don't use!
91  r.x.ax = 0x1;
92  int86(0x33,&r,&r);
93  */
94 }
Definition: cddefs.h:162
void ms_start ( )

Definition at line 15 of file msinterf.c.

18 {
19  union REGS r;
20 
21  if (!ms_hreset()) {
22  fprintf(stderr,"Error: Mouse driver not loaded.\n");
23  fprintf(stderr,"Using keyboard arrow keys. Hit any key to continue.\n");
24  (void)MFBGetchar();
26  MFBSetColor(0);
27  MFBFlood();
29  }
30  /* This driver is designed to work in "strange" super-VGA modes.
31  * The mouse driver thinks these are text mode, and quantizes the
32  * returned mouse position in units of 8. To avoid this, the logical
33  * screen size is multiplied by 8, and the return coordinates
34  * ( in ms_status() ) are divided by 8.
35  */
36 
37  /* set logical screen size */
38  r.x.ax = 7;
39  r.x.cx = 0;
40  r.x.dx = (pc.xsize-1) << 3;
41  int86(0x33,&r,&r);
42  r.x.ax = 8;
43  r.x.cx = 0;
44  r.x.dx = (pc.ysize-1) << 3;
45  int86(0x33,&r,&r);
46 
47  /* set mickeys/pixels ratio (1/8 default) */
48  r.x.ax = 0xf;
49  r.x.cx = 1;
50  r.x.dx = 2;
51 
52  /* move pointer to center of logical screen */
53  int86(0x33,&r,&r);
54  r.x.ax = 0x4;
55  r.x.cx = (pc.xsize-1) << 2;
56  r.x.dx = (pc.ysize-1) << 2;
57  int86(0x33,&r,&r);
58 }
int pointertype
Definition: mfbp.h:60
int ms_hreset()
Definition: msinterf.c:71
#define KBRD
Definition: mfbp.h:90
int ysize
Definition: mfbp.h:54
int MFBGetchar()
Definition: mfbopen.c:259
void MFBPointerInit()
Definition: mfbcursr.c:440
int MFBSetColor()
void MFBFlood()
Definition: mfbflood.c:21
int xsize
Definition: mfbp.h:53
Definition: cddefs.h:162
struct mfbpc pc
Definition: mfbopen.c:14
void ms_status ( )
void PrinterErrmsg ( )
Bool PrinterPortStatus ( )
Bool rasterize ( )
void SetPrinterDevice ( )
void vga_get_cblock ( )
void vga_get_color ( )
void vga_get_cpblock ( )
void vga_set_cblock ( )
void vga_set_color ( )
void vga_set_cpblock ( )

Variable Documentation

char dp_pointermap[]
unsigned short mfb_8X14font[]

Definition at line 11 of file 8x14font.c.

unsigned short mfb_chartab[]
char mfb_trash

Definition at line 15 of file mfbopen.c.

char* MFBRCD
struct mfbpc pc

Definition at line 14 of file mfbopen.c.

struct vga_cursor vgacur

Definition at line 10 of file pointrmp.c.