#include "mfb.h"
#include "mfbP.h"
#include <dos.h>
Go to the source code of this file.
void MFBDrawCursor |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
void MFBEraseCursor |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
void mode_1_clear |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Definition at line 323 of file mfbmark.c.
329 unsigned char bitmask, mode, datarot, esetreset, planemask, rem, *px;
338 datarot = inp(0x3cf);
342 esetreset = inp(0x3cf);
346 bitmask = inp(0x3cf);
350 planemask = inp(0x3c5);
367 for (i = 0; i < stop; i++) {
379 outp(0x3c5,planemask);
380 outp(0x3ce,0x1); outp(0x3cf,esetreset);
381 outp(0x3ce,0x3); outp(0x3cf,datarot);
382 outp(0x3ce,0x5); outp(0x3cf,mode);
383 outp(0x3ce,0x8); outp(0x3cf,bitmask);
void mode_1_mark |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Definition at line 70 of file mfbmark.c.
76 unsigned short *amap, *xmap;
77 unsigned char bitmask, mode, datarot, esetreset, cdontcare;
78 unsigned char readplane, planemask, rem, *px;
80 union {
long l;
unsigned short i;
char s[4]; } afld, xfld;
88 readplane = inp(0x3cf);
109 for (j = 0; j < 4; j++) {
112 for (i = 0; i < stop; i++) {
123 planemask = inp(0x3c5);
126 esetreset = inp(0x3cf);
130 bitmask = inp(0x3cf);
134 cdontcare = inp(0x3cf);
141 datarot = inp(0x3cf);
145 for (i = 0; i < stop; i++) {
149 afld.s[0] |= 0xff >> rem;
156 if ((
unsigned) x+2 >= next) {
160 if ((
unsigned) x+1 >= next) {
164 if ((
unsigned) x >= next) {
187 outp(0x3c5,planemask);
188 outp(0x3ce,0x1); outp(0x3cf,esetreset);
189 outp(0x3ce,0x3); outp(0x3cf,datarot);
190 outp(0x3ce,0x4); outp(0x3cf,readplane);
191 outp(0x3ce,0x5); outp(0x3cf,mode);
192 outp(0x3ce,0x7); outp(0x3cf,cdontcare);
193 outp(0x3ce,0x8); outp(0x3cf,bitmask);
void mode_2_clear |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Definition at line 391 of file mfbmark.c.
397 unsigned char segsel, cbuf, *px;
398 union {
unsigned short o[2];
long l; } p1;
405 p1.l = x + (long) (
pc.
ysize-1-y)*next;
408 outp(0x3cd,cbuf = p1.o[1]);
410 for (i = 0; i < 16; i++) {
411 for (j = 0; j < 16; j++) {
413 outp(0x3cd,cbuf = p1.o[1]);
414 *(
pc.
base + p1.o[0]) = *px++;
void mode_2_mark |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Definition at line 201 of file mfbmark.c.
207 unsigned short xcnt, *amap, *xmap;
208 unsigned char cbuf, pix, color, segsel, *px;
209 union {
long l;
unsigned short i;
char s[4]; } afld, xfld;
210 union {
unsigned short o[2];
long l; } p1;
219 p1.l = x + (
long) (
pc.
ysize-1-y)*next;
222 outp(0x3cd,(cbuf << 4) | cbuf);
235 if (p1.o[1] != cbuf) {
237 outp(0x3cd,(cbuf << 4) | cbuf);
239 pix = *(
pc.
base + p1.o[0]);
241 if (j < 0 || j >= next)
243 if (afld.i & xfld.i & xcnt)
244 *(
pc.
base+p1.o[0]) = color ^ pix;
245 else if (~afld.i & xfld.i & xcnt)
246 *(
pc.
base+p1.o[0]) = color;
247 else if (~afld.i & ~xfld.i & xcnt)