home *** CD-ROM | disk | FTP | other *** search
- /*
- * pc98.h: machine dependent parameters for PC9801/PC98XA
- *
- * Author: HIRANO Satoshi
- * (C) 1989 Halca Computer Science Laboratory TM
- * University of Tokyo
- *
- * Edition history:
- * 1.1 90/02/03 Halca.Hirano separate from config.h
- *
- * $Header: pc98.hv 1.2 90/06/24 00:11:02 hirano Exp $
- */
-
-
- #ifdef PC98
- /****************************************************
- * PC98 parameters
- */
- #define CRTBIOS 0x18 /* CRT BIOS interrupt vector */
- #define KEY_BIOS 0x18 /* keyboard BIOS interrupt vector */
- #define PRINTER_BIOS 0x1a /* printer BIOS interrupt vector */
- #define BIOS_DS 0x40 /* BIOS work; data segment */
- #define BIOS_KEY_TAB 0x12a /* BIOS work; key map */
- #define BIOS_KEY_WORK 0x502 /* BIOS work; key table */
- #define CPU_CLOCK 0x501 /* CPU clock flag at 0:501 */
- #define TIMER_INT 7 /* interval timer interrupt */
-
- #define IMR 0x02 /* intterrupt mask register */
- #define ICR 0x00 /* interrrupt control register */
- #define EOI 0x20 /* end of interrupt command for ICR */
- #define ADDR_KEY_DATA 0x41 /* keyboard 8251 data register */
- #define ADDR_KEY_STATUS 0x43 /* keyboard 8251 status register */
- #define TIMER_MODE 0x77 /* TIMER mode register address */
- #define TIMER_COUNTER2 0x75 /* timer counter2 register address */
- #define PORT_C 0x37 /* parallel port C register */
- #define RS_DATA 0x0 /* serial 8251 data register (offset) */
- #define RS_STATUS 0x2 /* serial 8251 cmd/status register (offset) */
- #define TX_READY 0x05 /* transmitter buffer empty */
- #define PRINTER_PORT 0x42 /* printer port */
-
- #define ADDR_PORT_COM1 0x30 /* serial port com1: address */
- #define ADDR_PORT_COM2 0xb0 /* ??? serial port com2: address */
- #define ADDR_PORT_COM3 0xff /* ??? serial port com3: address */
- #define ADDR_PORT_COM4 0xff /* ??? serial port com4: address */
- #define PORT_VECTOR_COM1 0x0c /* serial port com1: vector */
- #define PORT_VECTOR_COM2 0xff /* ??? serial port com2: vector */
- #define PORT_VECTOR_COM3 0xff /* ??? serial port com3: vector */
- #define PORT_VECTOR_COM4 0xff /* ??? serial port com4: vector */
-
- /*
- * interrupt mask register on master IMR
- * 1= mask, 0=non mask
- * bit 4 = serial port 1
- * if com1, 00010000
- */
- #define INT_MASK_COM1 0x10 /* enable com1 receive interrupt */
- #define INT_MASK_COM2 0x0 /* ??? enable com2 receive interrupt */
- #define INT_MASK_COM3 0x0 /* ??? enable com3 receive interrupt */
- #define INT_MASK_COM4 0x0 /* ??? enable com4 receive interrupt */
-
- #define PORT_BASE 1 /* portNo 0 is com1: */
- #define TX_TIMEOUT 5 /* transmit time out 100 * 5 = 500msec */
- #define BAUD_NUM_MAX 7 /* up to 38400 baud */
-
- #define MAX_FUNKEY 17 /* max length of key string (16+1) */
- #define NUM_FUNKEY 10 /* number of function keys */
- #define NUM_PADKEY 27 /* number of keypad/cursor keys */
- #define CS_KEY 0x0000 /* ctrl-space key */
-
- #ifdef PC98XA /* high resolution mode */
- /*
- * TEXT VRAM
- */
- #define VRAMSEG 0xe000 /* PC98XA VRAM segment */
- #define PAGE0 0x0000 /* PC98XA page 0 address */
- #define PAGE1 0x1000 /* PC98XA page 1 address */
- #define VRAM1SEG 0xe100 /* PC98XA VRAM page1 segment */
- #define ATTR_OFFSET 0x2000 /* PC98XA VRAM page 0 attribute area */
-
- /*
- * GRAPHIC VRAM for soft font
- */
- #define GVRAMSEG 0xc000 /* PC98XA GVRAM segment */
- #define MAX_X_DOT 1120 /* graphic mode x dots */
- #define MAX_Y_DOT 750 /* graphic mode y dots */
-
- #else /* NORMAL MODE */
- /*
- * TEXT VRAM
- */
- #define VRAMSEG 0xa000 /* PC9801 VRAM page0 segment */
- #define PAGE0 0x0000 /* PC9801 page 0 address */
- #define PAGE1 0x1000 /* PC9801 page 1 address */
- #define VRAM1SEG 0xa100 /* PC9801 VRAM page1 segment */
- #define ATTR_OFFSET 0x2000 /* PC9801 VRAM page0 attribute area */
-
- /*
- * GRAPHIC MODE for soft font
- */
- #define GVRAMSEG 0xa800 /* PC9801 GVRAM segment */
- #define MAX_X_DOT 640 /* graphic mode x dots */
- #define MAX_Y_DOT 400 /* graphic mode x dots */
- #endif /* PC98XA */
-
- #define CLICK_BEEP 400 /* click beep length */
- #define BELL_BEEP 2 /* bell beep length (100msec * 3 = 300msec) */
- #define TICK_SEC 10 /* timer tick is 10 per 1 sec */
- #define TICK_INTERVAL 100 /* 100 msec for 1 interval */
- #define BLINK_ON_INTERVAL 6 /* 6 tick soft cursor blink on */
- #define BLINK_OFF_INTERVAL 3 /* 3 tick soft cursor blink off */
-
- #define FBOX_CHAR 0x83 /* scroll bar SHOWING char */
- #define EBOX_CHAR 0x95 /* scroll bar HIDDING char */
-
- /*
- * screen attribute
- */
- #define _NORMAL 0xe1 /* white, normal */
- #define _UNDER 0x09 /* black, under, normal */
- #define _REVER 0x05 /* black, reverse, normal */
- #define _HIGH 0xc1 /* yellow, normal */
- #define _BLINK 0x03 /* blink, normal */
- #define B_UNDER 0x08 /* under bit */
- #define B_REVER 0x04 /* reverse bit */
- #define B_BLINK 0x02 /* blink bit */
- #define B_NORMAL 0x01 /* normal bit */
- #define A_WHITE 0xe0 /* white */
- #define A_BLACK 0x00 /* black */
- #define A_YELLOW 0xc0 /* yellow */
- #define MAX_BACK_COLOR 8
-
- #endif /* PC98 */
-
-