home *** CD-ROM | disk | FTP | other *** search
- /*
- pchdecl.h
-
- % declarations for PC hardware/event stuff
-
- 2/28/89 by Ted.
-
- OWL 1.1
- Copyright (c) 1986, 1987, 1988 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 4/09/89 ted: pulled static hdata struct out of pcdata struct and made it
- static on its own. Included a ptr to it in pcdatastruc.
- 5/09/89 ted Renamed from pchard.h
- 8/24/89 ted Added curmouseshape pointer to pchdata.
- */
- /* -------------------------------------------------------------------------- */
- typedef struct {
- int ismouse;
- boolean eventchecked;
- opcoord xlastmou;
- opcoord ylastmou;
- unsigned blastmou;
- opcoord xmouscale;
- opcoord ymouscale;
- mouseshape_struct *curmouseshape; /* backup copy of current mouse shape */
-
- boolean soundon;
- } pchdata_struct;
-
- OEXTERN pchdata_struct pchdatastruc;
- #define pchdata (&(pchdatastruc))
-
- /* pchard.c */
- extern void pc_hOpen(_arg1(dig_struct *digp));
- extern dig_hTimer_func (pc_hTimer);
- /* -------------------------------------------------------------------------- */
- #ifdef OAK_DOS386
-
- /* Note: as a kluge for DOS Extender, dx and di are identical for buffer ptrs */
- typedef union {
- struct { unsigned short ax, bx, cx, dx, es, ds, si, di; } x;
- struct { byte al, ah, bl, bh, cl, ch, dl, dh; } h;
- struct { short duma, dumb, dumc; VOID *esdx; } a; /* NOTE: no 'far' esdx */
- } OREGS;
- extern unsigned DIGPRIV oakint86(_arg2(unsigned intno, OREGS *regs));
- extern unsigned DIGPRIV oakint86es(_arg3(unsigned intno, OREGS *regs, unsigned bufsize));
-
- #else
- /* NOTE ds for output only. es also, unless esin is TRUE. */
- typedef union {
- struct { unsigned short ax, bx, cx, dx, es, ds, si, di; } x;
- struct { byte al, ah, bl, bh, cl, ch, dl, dh; } h;
- struct { short duma, dumb, dumc; VOID far *esdx; } a;
- } OREGS;
- extern unsigned DIGPRIV _oakint86(_arg3(unsigned intno, OREGS *regs, boolean esin));
- #define oakint86(intno, regs) _oakint86(intno, regs, FALSE)
- #define oakint86es(intno, regs, bsiz) _oakint86(intno, regs, TRUE)
-
- #endif
- /* -------------------------------------------------------------------------- */
- /* BIOS & DOS interrupt definitions */
- /* -------------------------------------------------------------------------- */
- #define BIOS_KBINT 0x16
- #define KBINT_READ 0x00
- #define KBINT_STATUS 0x01
- #define KBINT_GETSHIFT 0x02
- #define PC_CFLAG 0x01
- #define PC_ZFLAG 0x40
-
- #define BIOS_MOUSEINT 0x33
- #define BMOU_INIT 0x00
- #define BMOU_SHOW 0x01
- #define BMOU_HIDE 0x02
- #define BMOU_GETPOS 0x03
- #define BMOU_XRANGE 0x07
- #define BMOU_YRANGE 0x08
- #define BMOU_MSHAPE 0x09
- #define BMOU_TMSHAPE 0x0A
-
- #define DOS_INT 0x21
- #define DOS_GETTIME 0x2c
- #define DOS_GETIVEC 0x35
-
- /* -------------------------------------------------------------------------- */
- /* addresses and counts */
- /* -------------------------------------------------------------------------- */
- #define DOS_PORTB 0x61 /* speaker control port */
- #define SPKR_TIMER2 0x42 /* timer channel 2 addresses */
- #define SPKR_CNTRL2 0x43
- #define SPKR_MODE3 0xB6 /* timer mode 3, square wave */
- /* -------------------------------------------------------------------------- */
-
-