|
|
| version 1.2, 2003/10/18 10:00:29 | version 1.25, 2004/03/22 05:38:47 |
|---|---|
| Line 1 | Line 1 |
| #include "nevent.h" | #include "nevent.h" |
| #include "statsave.h" | |
| enum { | |
| PCBASECLOCK25 = 2457600, | |
| PCBASECLOCK20 = 1996800 | |
| }; | |
| enum { | |
| CPUMODE_8MHZ = 0x20, | |
| PCMODEL_VF = 0, | |
| PCMODEL_VM = 1, | |
| PCMODEL_VX = 2, | |
| PCMODELMASK = 0x3f, | |
| PCMODEL_PC9821 = 0x40, | |
| PCMODEL_EPSON = 0x80, | |
| PCHDD_SASI = 0x01, | |
| PCHDD_SCSI = 0x02, | |
| PCHDD_IDE = 0x04, | |
| PCSOUND_NONE = 0x00, | |
| PCCBUS_PC9861K = 0x0001, | |
| PCCBUS_MPU98 = 0x0002 | |
| }; | |
| typedef struct { | typedef struct { |
| // エミュレート中によく参照される奴 | |
| UINT8 uPD72020; | |
| UINT8 DISPSYNC; | |
| UINT8 RASTER; | |
| UINT8 realpal; | |
| UINT8 LCD_MODE; | |
| UINT8 skipline; | |
| UINT16 skiplight; | |
| UINT8 KEY_MODE; | |
| UINT8 XSHIFT; | |
| UINT8 BTN_RAPID; | |
| UINT8 BTN_MODE; | |
| BYTE dipsw[3]; | |
| UINT8 MOUSERAPID; | |
| UINT8 calendar; | |
| UINT8 usefd144; | |
| BYTE wait[6]; | |
| // リセット時とかあんまり参照されない奴 | |
| char model[8]; | |
| UINT baseclock; | UINT baseclock; |
| UINT multiple; | UINT multiple; |
| BYTE uPD72020; | |
| BYTE dipsw[3]; | |
| BYTE memsw[8]; | BYTE memsw[8]; |
| BYTE vol14[6]; | |
| BYTE wait[6]; | |
| BYTE KEY_MODE; | UINT8 ITF_WORK; |
| BYTE SOUND_SW; | UINT8 EXTMEM; |
| BYTE realpal; // ver0.28 | UINT8 grcg; |
| UINT8 color16; | |
| UINT32 BG_COLOR; | |
| UINT32 FG_COLOR; | |
| UINT16 samplingrate; | UINT16 samplingrate; |
| UINT16 delayms; | UINT16 delayms; |
| BYTE MIDIRESET; | UINT8 SOUND_SW; |
| BYTE DISPSYNC; | UINT8 snd_x; |
| BYTE EXTMEM; | |
| BYTE PROTECTMEM; // qn | |
| BYTE BTN_RAPID; | |
| BYTE BTN_MODE; | |
| BYTE snd_x; // ver0.30 | |
| BYTE snd14opt[3]; | BYTE snd14opt[3]; |
| BYTE snd26opt; | UINT8 snd26opt; |
| BYTE snd86opt; | UINT8 snd86opt; |
| BYTE spbopt; | UINT8 spbopt; |
| BYTE spb_vrc; // ver0.30 | UINT8 spb_vrc; // ver0.30 |
| BYTE spb_vrl; // ver0.30 | UINT8 spb_vrl; // ver0.30 |
| BYTE spb_x; // ver0.30 | UINT8 spb_x; // ver0.30 |
| BYTE mpuopt; | |
| BYTE MOTOR; | |
| BYTE MOTORVOL; | |
| BYTE BEEP_VOL; | |
| BYTE ITF_WORK; | |
| BYTE EMM_WORK; | |
| BYTE LCD_MODE; | |
| UINT32 BG_COLOR; | |
| UINT32 FG_COLOR; | |
| BYTE MOUSERAPID; | UINT8 BEEP_VOL; |
| BYTE XSHIFT; | BYTE vol14[6]; |
| BYTE skipline; | UINT8 vol_fm; |
| UINT16 skiplight; | UINT8 vol_ssg; |
| BYTE RASTER; | UINT8 vol_adpcm; |
| UINT8 vol_pcm; | |
| UINT8 vol_rhythm; | |
| BYTE vol_fm; // ver0.27 | UINT8 mpuenable; |
| BYTE vol_ssg; | UINT8 mpuopt; |
| BYTE vol_adpcm; | |
| BYTE vol_pcm; | |
| BYTE vol_rhythm; | |
| BYTE pc9861enable; // ver0.29 | UINT8 pc9861enable; |
| BYTE pc9861sw[3]; | BYTE pc9861sw[3]; |
| BYTE pc9861jmp[6]; | BYTE pc9861jmp[6]; |
| BYTE grcg; | UINT8 fddequip; |
| BYTE color16; | UINT8 MOTOR; |
| BYTE calendar; | UINT8 MOTORVOL; |
| BYTE usefd144; | UINT8 PROTECTMEM; |
| UINT8 hdrvacc; | |
| char hddfile[2][MAX_PATH]; // ver0.30 | |
| char sasihdd[2][MAX_PATH]; // ver0.74 | |
| #if defined(SUPPORT_SCSI) | |
| char scsihdd[4][MAX_PATH]; // ver0.74 | |
| #endif | |
| char fontfile[MAX_PATH]; | char fontfile[MAX_PATH]; |
| char biospath[MAX_PATH]; | |
| char hdrvroot[MAX_PATH]; | |
| } NP2CFG; | } NP2CFG; |
| typedef struct { | typedef struct { |
| UINT32 baseclock; | UINT32 baseclock; |
| UINT multiple; | UINT multiple; |
| UINT8 cpumode; | |
| UINT8 model; | |
| UINT8 hddif; | |
| UINT8 extmem; | |
| BYTE dipsw[3]; // リセット時のDIPSW | |
| UINT8 padding; | |
| UINT32 sound; | |
| UINT32 device; | |
| UINT32 realclock; | UINT32 realclock; |
| UINT32 dispclock; | |
| UINT32 vsyncclock; | |
| UINT32 mouseclock; | |
| UINT32 dsoundclock; | |
| UINT32 dsoundclock2; | |
| UINT32 keyboardclock; | |
| UINT32 midiclock; | |
| UINT32 sampleclock; | |
| UINT32 frame1000; | |
| UINT32 raster; | |
| UINT32 hsync; | |
| BYTE cpumode; | |
| } PCCORE; | } PCCORE; |
| enum { | enum { |
| PCBASECLOCK25 = 2457600, | COREEVENT_SHUT = 0, |
| PCBASECLOCK20 = 1996800 | COREEVENT_RESET = 1, |
| COREEVENT_EXIT = 2 | |
| }; | }; |
| #define CPUMODE_8MHz 0x20 | |
| #ifdef __cplusplus | #ifdef __cplusplus |
| extern "C" { | extern "C" { |
| Line 101 extern "C" { | Line 138 extern "C" { |
| extern const char np2version[]; | extern const char np2version[]; |
| extern NP2CFG np2cfg; | extern NP2CFG np2cfg; |
| extern PCCORE pc; | extern PCCORE pccore; |
| extern BYTE dip_default[3]; | |
| extern BYTE msw_default[8]; | |
| extern BYTE screenupdate; | extern BYTE screenupdate; |
| extern int soundrenewal; | extern int soundrenewal; |
| extern BOOL drawframe; | extern BOOL drawframe; |
| extern UINT drawcount; | extern UINT drawcount; |
| extern BOOL hardwarereset; | |
| void getbiospath(char *path, const char *fname, int maxlen); | |
| void screendisp(NEVENTITEM item); | void screendisp(NEVENTITEM item); |
| void screenvsync(NEVENTITEM item); | void screenvsync(NEVENTITEM item); |
| Line 121 void pccore_term(void); | Line 157 void pccore_term(void); |
| void pccore_reset(void); | void pccore_reset(void); |
| void pccore_exec(BOOL draw); | void pccore_exec(BOOL draw); |
| void pccore_postevent(UINT32 event); | |
| #ifdef __cplusplus | #ifdef __cplusplus |
| } | } |
| #endif | #endif |