DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
src/hardware/snd_pc98/generic/keydisp.h
00001 
00002 #if defined(SUPPORT_KEYDISP)
00003 
00004 #include        "cmndraw.h"
00005 
00006 struct _cmnpalfn {
00007         UINT8   (*get8)(struct _cmnpalfn *fn, UINT num);
00008         UINT32  (*get32)(struct _cmnpalfn *fn, UINT num);
00009         UINT16  (*cnv16)(struct _cmnpalfn *fn, RGB32 pal32);
00010         long    userdata;
00011 };
00012 typedef struct _cmnpalfn        CMNPALFN;
00013 
00014 typedef struct {
00015         UINT8   pal8;
00016         UINT8   padding;
00017         UINT16  pal16;
00018         RGB32   pal32;
00019 } CMNPALS;
00020 
00021 
00022 enum {
00023         KEYDISP_MODENONE                        = 0,
00024         KEYDISP_MODEFM,
00025         KEYDISP_MODEMIDI
00026 };
00027 
00028 #if defined(SUPPORT_PX)
00029 enum {
00030         KEYDISP_CHMAX           = 39,
00031         KEYDISP_FMCHMAX         = 30,
00032         KEYDISP_PSGMAX          = 3
00033 };
00034 #else   // defined(SUPPORT_PX)
00035 enum {
00036         KEYDISP_CHMAX           = 16,
00037         KEYDISP_FMCHMAX         = 12,
00038         KEYDISP_PSGMAX          = 3
00039 };
00040 #endif  // defined(SUPPORT_PX)
00041 
00042 enum {
00043         KEYDISP_NOTEMAX         = 16,
00044 
00045         KEYDISP_KEYCX           = 28,
00046         KEYDISP_KEYCY           = 14,
00047 
00048         KEYDISP_LEVEL           = (1 << 4),
00049 
00050         KEYDISP_WIDTH           = 301,
00051         KEYDISP_HEIGHT          = (KEYDISP_KEYCY * KEYDISP_CHMAX) + 1,
00052 
00053         KEYDISP_DELAYEVENTS     = 2048,
00054 };
00055 
00056 enum {
00057         KEYDISP_PALBG           = 0,
00058         KEYDISP_PALFG,
00059         KEYDISP_PALHIT,
00060 
00061         KEYDISP_PALS
00062 };
00063 
00064 enum {
00065         KEYDISP_FLAGDRAW                = 0x01,
00066         KEYDISP_FLAGREDRAW              = 0x02,
00067         KEYDISP_FLAGSIZING              = 0x04
00068 };
00069 
00070 
00071 #ifdef __cplusplus
00072 extern "C" {
00073 #endif
00074 
00075 void keydisp_initialize(void);
00076 void keydisp_setmode(UINT8 mode);
00077 void keydisp_setpal(CMNPALFN *palfn);
00078 void keydisp_setdelay(UINT8 frames);
00079 UINT8 keydisp_process(UINT8 framepast);
00080 void keydisp_getsize(int *width, int *height);
00081 BOOL keydisp_paint(CMNVRAM *vram, BOOL redraw);
00082 
00083 void keydisp_setfmboard(UINT board);
00084 void keydisp_fmkeyon(UINT8 ch, UINT8 value);
00085 void keydisp_psgmix(void *psg);
00086 void keydisp_psgvol(void *psg, UINT8 ch);
00087 void keydisp_midi(const UINT8 *msg);
00088 
00089 #ifdef __cplusplus
00090 }
00091 #endif
00092 
00093 #else
00094 
00095 #define keydisp_draw(a)
00096 #define keydisp_setfmboard(a)
00097 #define keydisp_fmkeyon(a, b)
00098 #define keydisp_psgmix(a)
00099 #define keydisp_psgvol(a, b)
00100 #define keydisp_midi(a)
00101 
00102 #endif
00103