| version 1.12, 2004/01/09 07:27:15 | version 1.18, 2004/08/16 08:33:02 | 
| Line 14  const INITBL *tblterm; | Line 14  const INITBL *tblterm; | 
 | UINT            count; | UINT            count; | 
 | } _INIARG, *INIARG; | } _INIARG, *INIARG; | 
 |  |  | 
 |  |  | 
 |  | static BOOL inigetbmp(const BYTE *ptr, UINT pos) { | 
 |  |  | 
 |  | return((ptr[pos >> 3] >> (pos & 7)) & 1); | 
 |  | } | 
 |  |  | 
 |  | static void inisetbmp(BYTE *ptr, UINT pos, BOOL set) { | 
 |  |  | 
 |  | UINT8   bit; | 
 |  |  | 
 |  | ptr += (pos >> 3); | 
 |  | bit = 1 << (pos & 7); | 
 |  | if (set) { | 
 |  | *ptr |= bit; | 
 |  | } | 
 |  | else { | 
 |  | *ptr &= ~bit; | 
 |  | } | 
 |  | } | 
 |  |  | 
 | static void inirdarg8(BYTE *dst, int dsize, const char *src) { | static void inirdarg8(BYTE *dst, int dsize, const char *src) { | 
 |  |  | 
 | int             i; | int             i; | 
| Line 77  const INITBL *p; | Line 97  const INITBL *p; | 
 | *((BYTE *)p->value) = (!milstr_cmp(data, str_true))?1:0; | *((BYTE *)p->value) = (!milstr_cmp(data, str_true))?1:0; | 
 | break; | break; | 
 |  |  | 
 |  | case INITYPE_BITMAP: | 
 |  | inisetbmp((BYTE *)p->value, p->size, | 
 |  | (milstr_cmp(data, str_true) == 0)); | 
 |  | break; | 
 |  |  | 
 | case INITYPE_BYTEARG: | case INITYPE_BYTEARG: | 
 | inirdarg8((BYTE *)p->value, p->size, data); | inirdarg8((BYTE *)p->value, p->size, data); | 
 | break; | break; | 
| Line 225  const INITBL *pterm; | Line 250  const INITBL *pterm; | 
 | sizeof(work)); | sizeof(work)); | 
 | break; | break; | 
 |  |  | 
 |  | case INITYPE_BITMAP: | 
 |  | milstr_ncpy(work, | 
 |  | (inigetbmp((BYTE *)p->value, p->size))?str_true:str_false, | 
 |  | sizeof(work)); | 
 |  | break; | 
 |  |  | 
 | case INITYPE_BYTEARG: | case INITYPE_BYTEARG: | 
 | iniwrsetarg8(work, sizeof(work), (BYTE *)p->value, p->size); | iniwrsetarg8(work, sizeof(work), (BYTE *)p->value, p->size); | 
 | break; | break; | 
| Line 283  const INITBL *pterm; | Line 314  const INITBL *pterm; | 
 |  |  | 
 | // ---- | // ---- | 
 |  |  | 
| extern  int             winx; | #if !defined(SUPPORT_PC9821) | 
| extern  int             winy; |  | 
|  |  | 
 | static const char ini_title[] = "NekoProjectII"; | static const char ini_title[] = "NekoProjectII"; | 
 | static const char inifile[] = "np2.cfg"; | static const char inifile[] = "np2.cfg"; | 
 |  | #else | 
 |  | static const char ini_title[] = "NekoProject21"; | 
 |  | static const char inifile[] = "np21.cfg"; | 
 |  | #endif | 
 |  |  | 
 | static const INITBL iniitem[] = { | static const INITBL iniitem[] = { | 
 | {"windposx", INITYPE_SINT32,    &np2oscfg.posx,                 0}, | {"windposx", INITYPE_SINT32,    &np2oscfg.posx,                 0}, | 
| Line 303  static const INITBL iniitem[] = { | Line 336  static const INITBL iniitem[] = { | 
 | {"ExMemory", INITYPE_UINT8,             &np2cfg.EXTMEM,                 0}, | {"ExMemory", INITYPE_UINT8,             &np2cfg.EXTMEM,                 0}, | 
 | {"ITF_WORK", INITYPE_BOOL,              &np2cfg.ITF_WORK,               0}, | {"ITF_WORK", INITYPE_BOOL,              &np2cfg.ITF_WORK,               0}, | 
 |  |  | 
| {"HDD1FILE", INITYPE_STR,               np2cfg.hddfile[0],              MAX_PATH}, | {"HDD1FILE", INITYPE_STR,               np2cfg.sasihdd[0],              MAX_PATH}, | 
| {"HDD2FILE", INITYPE_STR,               np2cfg.hddfile[1],              MAX_PATH}, | {"HDD2FILE", INITYPE_STR,               np2cfg.sasihdd[1],              MAX_PATH}, | 
|  | #if defined(SUPPORT_SCSI) | 
|  | {"SCSIHDD0", INITYPE_STR,               np2cfg.scsihdd[0],              MAX_PATH}, | 
|  | {"SCSIHDD1", INITYPE_STR,               np2cfg.scsihdd[1],              MAX_PATH}, | 
|  | {"SCSIHDD2", INITYPE_STR,               np2cfg.scsihdd[2],              MAX_PATH}, | 
|  | {"SCSIHDD3", INITYPE_STR,               np2cfg.scsihdd[3],              MAX_PATH}, | 
|  | #endif | 
 | {"fontfile", INITYPE_STR,               np2cfg.fontfile,                MAX_PATH}, | {"fontfile", INITYPE_STR,               np2cfg.fontfile,                MAX_PATH}, | 
 | {"biospath", INITYPE_STR,               np2cfg.biospath,                MAX_PATH}, | {"biospath", INITYPE_STR,               np2cfg.biospath,                MAX_PATH}, | 
 | {"hdrvroot", INITYPE_STR,               np2cfg.hdrvroot,                MAX_PATH}, | {"hdrvroot", INITYPE_STR,               np2cfg.hdrvroot,                MAX_PATH}, | 
| Line 362  static const INITBL iniitem[] = { | Line 401  static const INITBL iniitem[] = { | 
 | {"pc9861_j", INITYPE_BYTEARG,   np2cfg.pc9861jmp,               6}, | {"pc9861_j", INITYPE_BYTEARG,   np2cfg.pc9861jmp,               6}, | 
 | {"calendar", INITYPE_BOOL,              &np2cfg.calendar,               0}, | {"calendar", INITYPE_BOOL,              &np2cfg.calendar,               0}, | 
 | {"USE144FD", INITYPE_BOOL,              &np2cfg.usefd144,               0}, | {"USE144FD", INITYPE_BOOL,              &np2cfg.usefd144,               0}, | 
 |  | {"FDDRIVE1", INITYPE_BITMAP,    &np2cfg.fddequip,               0}, | 
 |  | {"FDDRIVE2", INITYPE_BITMAP,    &np2cfg.fddequip,               1}, | 
 |  | {"FDDRIVE3", INITYPE_BITMAP,    &np2cfg.fddequip,               2}, | 
 |  | {"FDDRIVE4", INITYPE_BITMAP,    &np2cfg.fddequip,               3}, | 
 |  | #if defined(SUPPORT_RESUME) | 
 | {"e_resume", INITYPE_BOOL,              &np2oscfg.resume,               0}, | {"e_resume", INITYPE_BOOL,              &np2oscfg.resume,               0}, | 
 |  | #endif | 
 |  | #if defined(SUPPORT_STATSAVE) | 
 |  | {"statsave", INITYPE_BOOL,              &np2oscfg.statsave,             0}, | 
 |  | #endif | 
 | {"jast_snd", INITYPE_BOOL,              &np2oscfg.jastsnd,              0},             // ver0.73 | {"jast_snd", INITYPE_BOOL,              &np2oscfg.jastsnd,              0},             // ver0.73 | 
 | {"I286SAVE", INITYPE_BOOL,              &np2oscfg.I286SAVE,             0}}; | {"I286SAVE", INITYPE_BOOL,              &np2oscfg.I286SAVE,             0}}; | 
 |  |  |