| version 1.3, 2004/08/08 15:14:08 | version 1.11, 2004/08/17 12:30:41 | 
| Line 3 | Line 3 | 
 | extern "C" { | extern "C" { | 
 | #endif | #endif | 
 |  |  | 
 |  | enum { | 
 |  | CRTC_PALB               = 0, | 
 |  | CRTC_PALR               = 1, | 
 |  | CRTC_PALG               = 2, | 
 |  | CRTC_PLY                = 3 | 
 |  | }; | 
 |  |  | 
 | #define PAL_NORMAL              0x00 | #define PAL_NORMAL              0x00 | 
 | #define PAL_HIGHRESO    0x01 | #define PAL_HIGHRESO    0x01 | 
 |  |  | 
| Line 57  enum { | Line 64  enum { | 
 | SCRN_DISPCHANGE = SCRN_24KHZ|SCRN_200LINE|SCRN_TEXTYx2|SCRN_UNDERLINE | SCRN_DISPCHANGE = SCRN_24KHZ|SCRN_200LINE|SCRN_TEXTYx2|SCRN_UNDERLINE | 
 | }; | }; | 
 |  |  | 
 |  | enum { | 
 |  | CRTCREG_HSIZE           = 0, | 
 |  | CRTCREG_HDISP           = 1, | 
 |  | CRTCREG_HSYNC           = 2, | 
 |  | CRTCREG_PULSE           = 3, | 
 |  | CRTCREG_VSIZE           = 4, | 
 |  | CRTCREG_VSIZEA          = 5, | 
 |  | CRTCREG_VDISP           = 6, | 
 |  | CRTCREG_VSYNC           = 7, | 
 |  | CRTCREG_CHRCY           = 9, | 
 |  | CRTCREG_POSH            = 12, | 
 |  | CRTCREG_POSL            = 13, | 
 |  |  | 
| typedef struct { | CRTCREG_MAX                     = 18 | 
| UINT8   PAL_B; | }; | 
| UINT8   PAL_R; |  | 
| UINT8   PAL_G; |  | 
| UINT8   PLY; |  | 
| //      UINT8   TEXT_PAL[8]; |  | 
| UINT8   SCRN_BITS; |  | 
| UINT8   CRTC_NUM; |  | 
|  |  | 
| WORD    DISP_PAGE; |  | 
| WORD    FNT_XL; |  | 
| WORD    FNT_YL; |  | 
| BYTE    TXT_XL; |  | 
| BYTE    TXT_YL; |  | 
| BYTE    TXT_YS; |  | 
| WORD    GRP_XL; |  | 
| WORD    GRP_YL; |  | 
| //      BYTE    CPU_BANK; |  | 
| //      BYTE    CRT_BANK; |  | 
|  |  | 
| WORD    CRT_YL; |  | 
| WORD    CRT_VS; |  | 
| WORD    CRT_VL; |  | 
|  |  | 
| BYTE    TXT_VL; |  | 
| BYTE    TXT_VLA; |  | 
 |  |  | 
 | WORD    TXT_TOP; |  | 
 | WORD    fnty; |  | 
 |  |  | 
 |  | typedef struct { | 
 |  | UINT8   SCRN_BITS; | 
 |  | UINT8   width40; | 
 |  | UINT8   regnum; | 
 | UINT8   BLACKPAL; | UINT8   BLACKPAL; | 
 |  | UINT8   rgbp[4]; | 
 |  | UINT8   reg[CRTCREG_MAX]; | 
 |  | #if defined(SUPPORT_TURBOZ) | 
 | UINT8   EXTPALMODE; | UINT8   EXTPALMODE; | 
 | UINT8   EXTGRPHPAL; | UINT8   EXTGRPHPAL; | 
 | UINT8   ZPRY; | UINT8   ZPRY; | 
 | UINT8   lastpal; | UINT8   lastpal; | 
 |  | #endif | 
 | } CRTCSTAT; | } CRTCSTAT; | 
 |  |  | 
 | typedef struct { | typedef struct { | 
 |  | SINT32  rasterclock8; | 
 |  | SINT32  rasterdisp8; | 
 |  | UINT    fonty; | 
 |  | UINT    yl; | 
 |  | SINT32  frameclock; | 
 |  |  | 
 | UINT8   *gram;                          // curvram | UINT8   *gram;                          // curvram | 
 | UINT    updatemask;                     // updatemsk | UINT    updatemask;                     // updatemsk | 
 | UINT8   updatebit;                      // curupdt | UINT8   updatebit;                      // curupdt | 
 |  | UINT8   dispmode; | 
 |  | #if defined(SUPPORT_TURBOZ) | 
 |  | UINT8   pal_bank; | 
 |  | UINT8   pal_disp; | 
 |  | #endif | 
 |  |  | 
 |  | UINT    pos; | 
 |  |  | 
 |  | SINT32  dispclock; | 
 |  | SINT32  vsyncstart; | 
 |  | SINT32  vpulseclock; | 
 | } CRTCEXT; | } CRTCEXT; | 
 |  |  | 
 |  | #if defined(SUPPORT_TURBOZ) | 
 | typedef struct { | typedef struct { | 
 | UINT8   text[8]; | UINT8   text[8]; | 
 | UINT16  grph[2][64]; | UINT16  grph[2][64]; | 
 | UINT16  grph4096[4096]; | UINT16  grph4096[4096]; | 
 | } CRTCPAL; | } CRTCPAL; | 
 |  | #endif | 
 |  |  | 
 | typedef struct { | typedef struct { | 
 | CRTCSTAT        s; | CRTCSTAT        s; | 
 | CRTCEXT         e; | CRTCEXT         e; | 
 |  | #if defined(SUPPORT_TURBOZ) | 
 | CRTCPAL         p; | CRTCPAL         p; | 
 |  | #endif | 
 | } CRTC; | } CRTC; | 
 |  |  | 
 |  |  | 
 | // ---- | // ---- | 
 |  |  | 
| void vrambank_patch(void); | void crtc_setwidth(REG8 width40); | 
|  | void crtc_update(void); | 
 |  |  | 
 | void IOOUTCALL crtc_o(UINT port, REG8 value);                   // x1_crtc_w | void IOOUTCALL crtc_o(UINT port, REG8 value);                   // x1_crtc_w | 
 |  |  | 
| Line 124  void IOOUTCALL scrn_o(UINT port, REG8 va | Line 147  void IOOUTCALL scrn_o(UINT port, REG8 va | 
 | REG8 IOINPCALL scrn_i(UINT port);                                               // x1_scrn_r | REG8 IOINPCALL scrn_i(UINT port);                                               // x1_scrn_r | 
 |  |  | 
 | void IOOUTCALL ply_o(UINT port, REG8 value);                    // x1_ply_w | void IOOUTCALL ply_o(UINT port, REG8 value);                    // x1_ply_w | 
 | REG8 IOINPCALL ply_i(UINT port);                                                // x1_ply_r |  | 
 |  |  | 
 | void IOOUTCALL palette_o(UINT port, REG8 value);                // x1_palet_w | void IOOUTCALL palette_o(UINT port, REG8 value);                // x1_palet_w | 
 |  |  | 
 |  | void IOOUTCALL blackctrl_o(UINT port, REG8 value);              // x1_blackctrl_w | 
 |  | REG8 IOINPCALL blackctrl_i(UINT port);                                  // x1_blackctrl_r | 
 |  |  | 
 |  |  | 
 |  | #if defined(SUPPORT_TURBOZ) | 
 |  | REG8 IOINPCALL ply_i(UINT port);                                                // x1_ply_r | 
 | REG8 IOINPCALL palette_i(UINT port);                                    // x1_palet_r | REG8 IOINPCALL palette_i(UINT port);                                    // x1_palet_r | 
 |  |  | 
 | void IOOUTCALL extpal_o(UINT port, REG8 value);                 // x1_extpal_w | void IOOUTCALL extpal_o(UINT port, REG8 value);                 // x1_extpal_w | 
 | REG8 IOINPCALL extpal_i(UINT port);                                             // x1_extpal_r | REG8 IOINPCALL extpal_i(UINT port);                                             // x1_extpal_r | 
 |  |  | 
 | void IOOUTCALL extgrphpal_o(UINT port, REG8 value);             // x1_extgrphpal_w | void IOOUTCALL extgrphpal_o(UINT port, REG8 value);             // x1_extgrphpal_w | 
 | REG8 IOINPCALL extgrphpal_i(UINT port);                                 // x1_extgrphpal_r | REG8 IOINPCALL extgrphpal_i(UINT port);                                 // x1_extgrphpal_r | 
 |  |  | 
 | void IOOUTCALL exttextpal_o(UINT port, REG8 value);             // x1_exttextpal_w | void IOOUTCALL exttextpal_o(UINT port, REG8 value);             // x1_exttextpal_w | 
 | REG8 IOINPCALL exttextpal_i(UINT port);                                 // x1_exttextpal_r | REG8 IOINPCALL exttextpal_i(UINT port);                                 // x1_exttextpal_r | 
 |  |  | 
 | void IOOUTCALL exttextdisp_o(UINT port, REG8 value);    // x1_exttextdisp_w | void IOOUTCALL exttextdisp_o(UINT port, REG8 value);    // x1_exttextdisp_w | 
 | REG8 IOINPCALL exttextdisp_i(UINT port);                                // x1_exttextdisp_r | REG8 IOINPCALL exttextdisp_i(UINT port);                                // x1_exttextdisp_r | 
 |  | #endif | 
 |  |  | 
 | void IOOUTCALL blackctrl_o(UINT port, REG8 value);              // x1_blackctrl_w |  | 
 | REG8 IOINPCALL blackctrl_i(UINT port);                                  // x1_blackctrl_r |  | 
 |  |  | 
 |  | #if defined(SUPPORT_TURBOZ) | 
 | void crtc_initialize(void); | void crtc_initialize(void); | 
 |  | #else | 
 |  | #define crtc_initialize() | 
 |  | #endif | 
 | void crtc_reset(void); | void crtc_reset(void); | 
 |  | void crtc_forcesetwidth(REG8 width); | 
 |  |  | 
 | #ifdef __cplusplus | #ifdef __cplusplus | 
 | } | } |