rtoss

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/ @ 336  →  / @ 335
/np21/calendar.c
@@ -7,6 +7,7 @@
 
_CALENDAR cal;
 
 
static const UINT8 days[12] = { 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31};
 
/np21/bios/bios1b.c
@@ -957,15 +957,6 @@
ret_ah = scsibios_operate();
break;
#endif
case 0xd0:
ret_ah = 0x40;
TRACEOUT(("IDE BIOS!!!"));
break;
case 0xe0:
ret_ah = 0x40;
TRACEOUT(("IDE BIOS!!!"));
break;
 
default:
ret_ah = 0x40;
/np21/bios/bios.c
@@ -260,33 +260,16 @@
}
 
#if defined(SUPPORT_PC9821)
//getbiospath(path, OEMTEXT("bios9821.rom"), sizeof(path));
//fh = file_open_rb(path);
//if (fh != FILEH_INVALID) {
// if (file_read(fh, mem + 0x0d8000, 0x10000) == 0x10000) {
// // IDE BIOS‚ð’ׂ·
// TRACEOUT(("load bios9821.rom"));
// STOREINTELWORD(mem + 0x0d8009, 0);
// }
// file_close(fh);
//}
getbiospath(path, OEMTEXT("pc98bank3.bin"), sizeof(path));
getbiospath(path, OEMTEXT("bios9821.rom"), sizeof(path));
fh = file_open_rb(path);
if (fh != FILEH_INVALID) {
if (file_read(fh, mem + 0x0d8000, 0x8000) == 0x8000) {
if (file_read(fh, mem + 0x0d8000, 0x2000) == 0x2000) {
// IDE BIOS‚ð’ׂ·
TRACEOUT(("load pc98bank3.bin"));
TRACEOUT(("load bios9821.rom"));
STOREINTELWORD(mem + 0x0d8009, 0);
}
file_close(fh);
}
/*getbiospath(path, OEMTEXT("b0.rom"), sizeof(path));
fh = file_open_rb(path);
if (fh != FILEH_INVALID) {
if (file_read(fh, mem + 0x0c0000, 0x18000) == 0x18000) {
}
file_close(fh);
}*/
#if defined(BIOS_SIMULATE)
mem[0xf8e80] = 0x98;
mem[0xf8e81] = 0x21;
@@ -295,22 +278,16 @@
mem[0xf8e84] = 0x2c;
mem[0xf8e85] = 0xb0;
 
//mem[0xf8eaf] = 0x21; // <- ‚±‚ê‚Á‚ĉ½‚¾‚Á‚¯H
// mem[0xf8eaf] = 0x21; // <- ‚±‚ê‚Á‚ĉ½‚¾‚Á‚¯H
#endif
#endif
//fh = file_open_c("itf.rom");
//if (fh != FILEH_INVALID) {
// file_read(fh, mem + ITF_ADRS, 0x8000);
// file_close(fh);
// TRACEOUT(("load itf.rom"));
//}
 
#if defined(BIOS_SIMULATE)
CopyMemory(mem + BIOS_BASE, biosfd80, sizeof(biosfd80));
if (!biosrom) {
lio_initialize();
}
 
for (i=0; i<8; i+=2) {
STOREINTELWORD(mem + 0xfd800 + 0x1aaf + i, 0x1ab7);
STOREINTELWORD(mem + 0xfd800 + 0x1ad7 + i, 0x1adf);
@@ -326,7 +303,7 @@
STOREINTELDWORD(mem + 0xffff1, 0xfd800000);
 
CopyMemory(mem + 0x0fd800 + 0x0e00, keytable[0], 0x300);
 
CopyMemory(mem + ITF_ADRS, itfrom, sizeof(itfrom));
mem[ITF_ADRS + 0x7ff0] = 0xea;
STOREINTELDWORD(mem + ITF_ADRS + 0x7ff1, 0xf8000000);
@@ -389,7 +366,7 @@
return(0);
}
 
//TRACEOUT(("biosfunc(%x, %x)", adrs, adrs-BIOS_BASE));
// TRACEOUT(("biosfunc(%x)", adrs));
#if defined(CPUCORE_IA32) && defined(TRACE)
if (CPU_STAT_PAGING) {
UINT32 pde = MEMP_READ32(CPU_STAT_PDE_BASE);
/np21/bios/sxsibios.c
@@ -15,10 +15,10 @@
 
typedef REG8 (*SXSIFUNC)(UINT type, SXSIDEV sxsi);
 
static REG8 sxsi_pos(UINT type, SXSIDEV sxsi, FILEPOS *ppos) {
static REG8 sxsi_pos(UINT type, SXSIDEV sxsi, long *ppos) {
 
REG8 ret;
FILEPOS pos;
long pos;
 
ret = 0;
pos = 0;
@@ -52,7 +52,7 @@
 
REG8 ret;
UINT size;
FILEPOS pos;
long pos;
UINT32 addr;
UINT r;
UINT8 work[1024];
@@ -83,7 +83,7 @@
 
REG8 ret;
UINT size;
FILEPOS pos;
long pos;
UINT32 addr;
UINT r;
UINT8 work[1024];
@@ -113,16 +113,16 @@
static REG8 sxsibios_format(UINT type, SXSIDEV sxsi) {
 
REG8 ret;
FILEPOS pos;
long pos;
 
if (CPU_AH & 0x80) {
if (type == SXSIBIOS_SCSI) { // ‚Æ‚è‚ ‚¦‚¸SCSI‚Ì‚Ý
UINT count;
FILEPOS posmax;
long posmax;
count = timing_getcount(); // ŽžŠÔ‚ðŽ~‚ß‚é
ret = 0;
pos = 0;
posmax = (FILEPOS)sxsi->surfaces * sxsi->cylinders;
posmax = sxsi->surfaces * sxsi->cylinders;
while(pos < posmax) {
ret = sxsi_format(CPU_AL, pos * sxsi->sectors);
if (ret) {
/np21/bios/bios18.c
@@ -785,7 +785,6 @@
CPU_REMCLOCK = -1;
break;
}
//TRACEOUT(("int18 KEYREAD"));
break;
 
case 0x01: // ƒL[Eƒoƒbƒtƒ@ó‘Ԃ̃Zƒ“ƒX
@@ -797,26 +796,21 @@
else {
CPU_BH = 0;
}
//TRACEOUT(("int18 KEYBUF"));
break;
 
case 0x02: // ƒVƒtƒgEƒL[ó‘Ԃ̃Zƒ“ƒX
//TRACEOUT(("int18 KEY"));
CPU_AL = mem[MEMB_SHIFT_STS];
break;
 
case 0x03: // ƒL[ƒ{[ƒhEƒCƒ“ƒ^ƒtƒFƒCƒX‚̏‰Šú‰»
//TRACEOUT(("int18 KEYINIT"));
bios0x09_init();
break;
 
case 0x04: // ƒL[“ü—͏ó‘Ԃ̃Zƒ“ƒX
//TRACEOUT(("int18 KEY"));
CPU_AH = mem[MEMX_KB_KY_STS + (CPU_AL & 0x0f)];
break;
 
case 0x05: // ƒL[“ü—̓Zƒ“ƒX
//TRACEOUT(("int18 KEY"));
if (mem[MEMB_KB_COUNT]) {
CPU_AX = keyget();
CPU_BH = 1;
/np21/fdd/sxsi.h
@@ -42,14 +42,14 @@
UINT8 __caps;
 
BRESULT (*reopen)(SXSIDEV sxsi);
REG8 (*read)(SXSIDEV sxsi, FILEPOS pos, UINT8 *buf, UINT size);
REG8 (*write)(SXSIDEV sxsi, FILEPOS pos, const UINT8 *buf, UINT size);
REG8 (*format)(SXSIDEV sxsi, FILEPOS pos);
REG8 (*read)(SXSIDEV sxsi, long pos, UINT8 *buf, UINT size);
REG8 (*write)(SXSIDEV sxsi, long pos, const UINT8 *buf, UINT size);
REG8 (*format)(SXSIDEV sxsi, long pos);
void (*close)(SXSIDEV sxsi);
void (*destroy)(SXSIDEV sxsi);
 
INTPTR hdl;
FILELEN totals;
long totals;
UINT16 cylinders;
UINT16 size;
UINT8 sectors;
@@ -79,9 +79,9 @@
UINT8 sxsi_getdevtype(REG8 drv);
BRESULT sxsi_devopen(REG8 drv, const OEMCHAR *fname);
void sxsi_devclose(REG8 drv);
REG8 sxsi_read(REG8 drv, FILEPOS pos, UINT8 *buf, UINT size);
REG8 sxsi_write(REG8 drv, FILEPOS pos, const UINT8 *buf, UINT size);
REG8 sxsi_format(REG8 drv, FILEPOS pos);
REG8 sxsi_read(REG8 drv, long pos, UINT8 *buf, UINT size);
REG8 sxsi_write(REG8 drv, long pos, const UINT8 *buf, UINT size);
REG8 sxsi_format(REG8 drv, long pos);
 
BOOL sxsi_issasi(void);
BOOL sxsi_isscsi(void);
/np21/fdd/sxsicd.c
@@ -6,7 +6,6 @@
#include "cpucore.h"
#include "pccore.h"
#include "sxsi.h"
#include "ideio.h"
 
 
static const UINT8 cd001[7] = {0x01,'C','D','0','0','1',0x01};
@@ -24,7 +23,7 @@
 
static int issec2048(FILEH fh) {
 
FILEPOS fpos;
long fpos;
UINT8 buf[2048];
UINT secsize;
UINT fsize;
@@ -53,11 +52,11 @@
return(-1);
}
 
static REG8 sec2048_read(SXSIDEV sxsi, FILEPOS pos, UINT8 *buf, UINT size) {
static REG8 sec2048_read(SXSIDEV sxsi, long pos, UINT8 *buf, UINT size) {
 
FILEH fh;
UINT rsize;
 
if (sxsi_prepare(sxsi) != SUCCESS) {
return(0x60);
}
@@ -86,7 +85,7 @@
 
static int issec2352(FILEH fh) {
 
FILEPOS fpos;
long fpos;
UINT8 buf[2048];
UINT secsize;
UINT fsize;
@@ -115,10 +114,10 @@
return(-1);
}
 
static REG8 sec2352_read(SXSIDEV sxsi, FILEPOS pos, UINT8 *buf, UINT size) {
static REG8 sec2352_read(SXSIDEV sxsi, long pos, UINT8 *buf, UINT size) {
 
FILEH fh;
FILEPOS fpos;
long fpos;
UINT rsize;
 
if (sxsi_prepare(sxsi) != SUCCESS) {
@@ -193,7 +192,7 @@
 
FILEH fh;
UINT type;
FILEPOS totals;
int totals;
CDINFO cdinfo;
UINT mediatype;
UINT i;
@@ -260,11 +259,6 @@
sxsi->surfaces = 1;
sxsi->headersize = 0;
sxsi->mediatype = mediatype;
 
#if defined(SUPPORT_IDEIO)
ideio_notify(sxsi->drv, 1);
#endif
 
return(SUCCESS);
 
sxsiope_err2:
@@ -372,11 +366,11 @@
return(cdinfo->trk);
}
 
BRESULT sxsicd_readraw(SXSIDEV sxsi, FILEPOS pos, void *buf) {
BRESULT sxsicd_readraw(SXSIDEV sxsi, long pos, void *buf) {
 
CDINFO cdinfo;
FILEH fh;
FILEPOS fpos;
long fpos;
 
cdinfo = (CDINFO)sxsi->hdl;
if (cdinfo->type != 2352) {
/np21/fdd/sxsicd.h
@@ -11,13 +11,13 @@
typedef struct {
UINT8 type;
UINT8 track;
FILEPOS pos;
UINT32 pos;
} _CDTRK, *CDTRK;
 
BRESULT sxsicd_open(SXSIDEV sxsi, const OEMCHAR *fname);
 
CDTRK sxsicd_gettrk(SXSIDEV sxsi, UINT *tracks);
BRESULT sxsicd_readraw(SXSIDEV sxsi, FILEPOS pos, void *buf);
BRESULT sxsicd_readraw(SXSIDEV sxsi, long pos, void *buf);
 
#ifdef __cplusplus
}
/np21/fdd/newdisk.c
@@ -35,10 +35,10 @@
 
// ---- hdd
 
static BRESULT writezero(FILEH fh, FILELEN size) {
static BRESULT writezero(FILEH fh, UINT size) {
 
UINT8 work[256];
FILELEN wsize;
UINT wsize;
 
ZeroMemory(work, sizeof(work));
while(size) {
@@ -51,10 +51,10 @@
return(SUCCESS);
}
 
static BRESULT writehddipl(FILEH fh, UINT ssize, FILELEN tsize) {
static BRESULT writehddipl(FILEH fh, UINT ssize, UINT32 tsize) {
 
UINT8 work[16384];
FILELEN size;
UINT8 work[1024];
UINT size;
 
ZeroMemory(work, sizeof(work));
CopyMemory(work, hdddiskboot, sizeof(hdddiskboot));
@@ -106,48 +106,15 @@
ndthd_err:
return;
}
//
//void newdisk_nhd(const OEMCHAR *fname, UINT hddsize) {
//
// FILEH fh;
// NHDHDR nhd;
// UINT size;
// BRESULT r;
//
// if ((fname == NULL) || (hddsize < 5) || (hddsize > 4000)) {
// goto ndnhd_err;
// }
// fh = file_create(fname);
// if (fh == FILEH_INVALID) {
// goto ndnhd_err;
// }
// ZeroMemory(&nhd, sizeof(nhd));
// CopyMemory(&nhd.sig, sig_nhd, 15);
// STOREINTELDWORD(nhd.headersize, sizeof(nhd));
// size = hddsize * 15;
// STOREINTELDWORD(nhd.cylinders, size);
// STOREINTELWORD(nhd.surfaces, 8);
// STOREINTELWORD(nhd.sectors, 17);
// STOREINTELWORD(nhd.sectorsize, 512);
// r = (file_write(fh, &nhd, sizeof(nhd)) == sizeof(nhd)) ? SUCCESS : FAILURE;
// r |= writehddipl(fh, 512, size * 8 * 17 * 512);
// file_close(fh);
// if (r != SUCCESS) {
// file_delete(fname);
// }
//
//ndnhd_err:
// return;
//}
 
void newdisk_nhd(const OEMCHAR *fname, UINT hddsize) {
 
FILEH fh;
NHDHDR nhd;
FILELEN size;
UINT size;
BRESULT r;
if ((fname == NULL) || (hddsize < 5) || (hddsize > NHD_MAXSIZE)) {
 
if ((fname == NULL) || (hddsize < 5) || (hddsize > 512)) {
goto ndnhd_err;
}
fh = file_create(fname);
@@ -157,32 +124,13 @@
ZeroMemory(&nhd, sizeof(nhd));
CopyMemory(&nhd.sig, sig_nhd, 15);
STOREINTELDWORD(nhd.headersize, sizeof(nhd));
#ifdef SUPPORT_LARGE_HDD
if(hddsize <= 4096){
size = hddsize * 15;
STOREINTELDWORD(nhd.cylinders, size);
STOREINTELWORD(nhd.surfaces, 8);
STOREINTELWORD(nhd.sectors, 17);
STOREINTELWORD(nhd.sectorsize, 512);
r = (file_write(fh, &nhd, sizeof(nhd)) == sizeof(nhd)) ? SUCCESS : FAILURE;
r |= writehddipl(fh, 512, size * 8 * 17 * 512);
}else{
size = hddsize * 15 * 17 / 2 / 63;
STOREINTELDWORD(nhd.cylinders, size);
STOREINTELWORD(nhd.surfaces, 16);
STOREINTELWORD(nhd.sectors, 63);
STOREINTELWORD(nhd.sectorsize, 512);
r = (file_write(fh, &nhd, sizeof(nhd)) == sizeof(nhd)) ? SUCCESS : FAILURE;
r |= writehddipl(fh, 512, (UINT64)size * 16 * 63 * 512);
}
#else
size = hddsize * 15;
STOREINTELDWORD(nhd.cylinders, size);
STOREINTELWORD(nhd.surfaces, 8);
STOREINTELWORD(nhd.sectors, 17);
STOREINTELWORD(nhd.sectorsize, 512);
r = (file_write(fh, &nhd, sizeof(nhd)) == sizeof(nhd)) ? SUCCESS : FAILURE;
r |= writehddipl(fh, 512, size * 8 * 17 * 512);
#endif
file_close(fh);
if (r != SUCCESS) {
file_delete(fname);
/np21/fdd/diskdrv.c
@@ -90,10 +90,7 @@
if (sxsi_devopen(drv, np2cfg.sasihdd[i]) == SUCCESS) {
drv++;
}
else if(np2cfg.sasihdd[i]!=NULL && np2cfg.sasihdd[i][0]!='\0'){
char buf[2048];
vsnprintf(buf, sizeof(buf), "Cannot open file %s", np2cfg.sasihdd[i]);
msgbox("HDD file open error", buf);
else {
sxsi_setdevtype(drv, SXSIDEV_NC);
}
}
/np21/fdd/sxsihdd.c
@@ -35,10 +35,10 @@
}
}
 
static REG8 hdd_read(SXSIDEV sxsi, FILEPOS pos, UINT8 *buf, UINT size) {
static REG8 hdd_read(SXSIDEV sxsi, long pos, UINT8 *buf, UINT size) {
 
FILEH fh;
FILEPOS r;
long r;
UINT rsize;
 
if (sxsi_prepare(sxsi) != SUCCESS) {
@@ -65,10 +65,10 @@
return(0x00);
}
 
static REG8 hdd_write(SXSIDEV sxsi, FILEPOS pos, const UINT8 *buf, UINT size) {
static REG8 hdd_write(SXSIDEV sxsi, long pos, const UINT8 *buf, UINT size) {
 
FILEH fh;
FILEPOS r;
long r;
UINT wsize;
 
if (sxsi_prepare(sxsi) != SUCCESS) {
@@ -95,10 +95,10 @@
return(0x00);
}
 
static REG8 hdd_format(SXSIDEV sxsi, FILEPOS pos) {
static REG8 hdd_format(SXSIDEV sxsi, long pos) {
 
FILEH fh;
FILEPOS r;
long r;
UINT16 i;
UINT8 work[256];
UINT size;
@@ -163,7 +163,7 @@
FILEH fh;
const OEMCHAR *ext;
REG8 iftype;
FILEPOS totals;
long totals;
UINT32 headersize;
UINT32 surfaces;
UINT32 cylinders;
@@ -199,7 +199,7 @@
cylinders = LOADINTELDWORD(nhd.cylinders);
sectors = LOADINTELWORD(nhd.sectors);
size = LOADINTELWORD(nhd.sectorsize);
totals = (FILEPOS)cylinders * sectors * surfaces;
totals = cylinders * sectors * surfaces;
}
else if ((iftype == SXSIDRV_SASI) && (!file_cmpname(ext, str_hdi))) {
HDIHDR hdi; // ANEX86 HDD (SASI) thanx Mamiya
/np21/fdd/sxsi.c
@@ -21,7 +21,7 @@
return(FAILURE);
}
 
static REG8 nc_read(SXSIDEV sxsi, FILEPOS pos, UINT8 *buf, UINT size) {
static REG8 nc_read(SXSIDEV sxsi, long pos, UINT8 *buf, UINT size) {
 
(void)sxsi;
(void)pos;
@@ -30,7 +30,7 @@
return(0x60);
}
 
static REG8 nc_write(SXSIDEV sxsi, FILEPOS pos, const UINT8 *buf, UINT size) {
static REG8 nc_write(SXSIDEV sxsi, long pos, const UINT8 *buf, UINT size) {
 
(void)sxsi;
(void)pos;
@@ -39,7 +39,7 @@
return(0x60);
}
 
static REG8 nc_format(SXSIDEV sxsi, FILEPOS pos) {
static REG8 nc_format(SXSIDEV sxsi, long pos) {
 
(void)sxsi;
(void)pos;
@@ -227,75 +227,25 @@
}
}
 
// CD“ü‚ê‘Ö‚¦‚̃^ƒCƒ€ƒAƒEƒgi“Š‚°‚â‚èj
char cdchange_flag = 0;
REG8 cdchange_drv;
OEMCHAR cdchange_fname[MAX_PATH];
void cdchange_timeoutproc(NEVENTITEM item) {
cdchange_flag = 0;
sxsi_devopen(cdchange_drv, cdchange_fname);
}
static void cdchange_timeoutset(void) {
 
nevent_setbyms(NEVENT_CDWAIT, 5000, cdchange_timeoutproc, NEVENT_ABSOLUTE);
}
 
 
BRESULT sxsi_devopen(REG8 drv, const OEMCHAR *fname) {
 
SXSIDEV sxsi;
BRESULT r;
 
if ((fname == NULL) || (fname[0] == '\0')) {
goto sxsiope_err;
}
sxsi = sxsi_getptr(drv);
if (sxsi == NULL) {
goto sxsiope_err;
}
switch(sxsi->devtype) {
case SXSIDEV_HDD:
if ((fname == NULL) || (fname[0] == '\0')) {
goto sxsiope_err;
}
r = sxsihdd_open(sxsi, fname);
break;
 
case SXSIDEV_CDROM:
if (cdchange_flag) {
// CDŒðŠ·’†
return(FAILURE);
}
if ((fname == NULL) || (fname[0] == '\0')) {
int num = drv & 0x0f;
ideio_notify(sxsi->drv, 0);
file_cpyname(sxsi->fname, "\0\0\0\0", 1);
sxsi->flag = 0;
file_cpyname(np2cfg.idecd[num-2], "\0\0\0\0", 1);
sysmng_updatecaption(1);
return(SUCCESS);
}
else {
if(sxsi->flag & SXSIFLAG_READY){
// ‚¢‚Á‚½‚ñŽæ‚èo‚·
ideio_notify(sxsi->drv, 0);
sxsi->flag = 0;
cdchange_drv = drv;
file_cpyname(cdchange_fname, fname, NELEMENTS(cdchange_fname));
cdchange_flag = 1;
cdchange_timeoutset();
return(FAILURE); // XXX: ‚±‚±‚ÅŽ¸”s•Ô‚µ‚Ä‚¦‚¦‚́H
}
r = sxsicd_open(sxsi, fname);
#if defined(SUPPORT_IDEIO)
if (r == SUCCESS) {
int num = drv & 0x0f;
file_cpyname(np2cfg.idecd[num-2], fname, NELEMENTS(cdchange_fname));
sysmng_updatecaption(1);
}else{
int num = drv & 0x0f;
file_cpyname(np2cfg.idecd[num-2], "\0\0\0\0", 1);
sysmng_updatecaption(1);
}
#endif
}
r = sxsicd_open(sxsi, fname);
break;
 
default:
@@ -380,7 +330,7 @@
 
 
 
REG8 sxsi_read(REG8 drv, FILEPOS pos, UINT8 *buf, UINT size) {
REG8 sxsi_read(REG8 drv, long pos, UINT8 *buf, UINT size) {
 
SXSIDEV sxsi;
 
@@ -393,7 +343,7 @@
}
}
 
REG8 sxsi_write(REG8 drv, FILEPOS pos, const UINT8 *buf, UINT size) {
REG8 sxsi_write(REG8 drv, long pos, const UINT8 *buf, UINT size) {
 
SXSIDEV sxsi;
 
@@ -406,7 +356,7 @@
}
}
 
REG8 sxsi_format(REG8 drv, FILEPOS pos) {
REG8 sxsi_format(REG8 drv, long pos) {
 
SXSIDEV sxsi;
 
/np21/keystat.c
@@ -199,7 +199,6 @@
 
if (!keyctrl.reqparam) {
keyctrl.mode = dat;
//TRACEOUT(("kbdat %02X", dat));
switch(dat) {
#if defined(SUPPORT_PC9801_119)
case 0x95:
@@ -214,13 +213,10 @@
case 0x96:
keyboard_ctrl(0xfa);
keyboard_ctrl(0xa0);
keyboard_ctrl(0x85);
keyboard_ctrl(0x83);
break;
#endif
case 0x99:
keyboard_ctrl(0xfa);
keyboard_ctrl(0xfb);
break;
 
case 0x9f:
keyboard_ctrl(0xfa);
keyboard_ctrl(0xa0);
@@ -228,7 +224,6 @@
break;
 
default:
//TRACEOUT(("kbdat %02X", dat));
keyboard_ctrl(0xfc);
break;
}
/np21/trap/steptrap.c
@@ -34,7 +34,6 @@
 
 
// ---- ‚±‚±‚Ƀgƒ‰ƒbƒvðŒƒR[ƒh‚ð‘‚«‚Ü‚·
#if 0
{
static UINT32 x;
UINT32 tmp;
@@ -62,8 +61,7 @@
if (cs == 0x0d77) TRACEOUT(("%.4x:%.4x", cs, eip));
if (cs == 0x0f5d) TRACEOUT(("%.4x:%.4x", cs, eip));
if (cs == 0x0e91) TRACEOUT(("%.4x:%.4x", cs, eip));
#endif
 
#if 0
{
static UINT tmp = 0;
@@ -85,7 +83,7 @@
}
if (cs == 0xdf6) TRACEOUT(("%.4x:%.4x", CPU_CS, CPU_IP));
#endif
#if 0
#if 1
if ((cs == 0x0620) && (eip == 0x1E97)) {
TRACEOUT(("-------- NECCD: function: %.2x", CPU_AL));
}
/np21/trap/inttrap.c
@@ -12,13 +12,6 @@
void CPUCALL softinttrap(UINT cs, UINT32 eip, UINT vect) {
 
// ---- ‚±‚±‚Ƀgƒ‰ƒbƒvðŒƒR[ƒh‚ð‘‚«‚Ü‚·
#if 0
if (vect == 0x10) {
TRACEOUT(("%.4x:%.4x INT-10 PM=%02X AH=%.2x STACK=%.4x", CPU_STAT_PM, cs, eip,
CPU_AH, MEMR_READ16(CPU_SS, CPU_SP + 2)));
}
#endif
#if 0
if (vect == 0x7f) {
switch(CPU_AH) {
case 0:
@@ -52,7 +45,6 @@
TRACEOUT(("%.4x:%.4x INT-51 AX=%.4x BX=%.4x DX=%.4x", cs, eip, CPU_AX, CPU_BX, CPU_DX));
}
return;
#endif
 
#if 0
// if (vect == 0x2f) {
@@ -177,7 +169,7 @@
TRACEOUT(("INT 40H - AL=%.2x", CPU_AL));
}
#endif
#if 0
#if 1
if (vect == 0x21) {
char f[128];
UINT i;
@@ -244,7 +236,7 @@
}
}
#endif
#if 0
#if defined(TRACE)
if (vect == 0x7f) {
UINT i, j;
switch(CPU_AH) {
File deleted
/np21/x11/compile
File deleted
/np21/x11/config.guess
File deleted
/np21/x11/config.sub
File deleted
/np21/x11/missing
File deleted
/np21/x11/aclocal.m4
File deleted
/np21/x11/install-sh
File deleted
/np21/x11/Makefile.in
File deleted
/np21/x11/config.h.in
File deleted
/np21/x11/configure
File deleted
/np21/win9x/lgy98dev.h
File deleted
/np21/win9x/memtool.h
File deleted
/np21/win9x/d_network.cpp
File deleted
\ No newline at end of file
/np21/win9x/video.c
File deleted
/np21/win9x/iocore.inc
File deleted
/np21/win9x/video.h
File deleted
\ No newline at end of file
/np21/win9x/np21vs2008.vcxproj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/np21/win9x/np21vs2010.suo
File deleted
\ No newline at end of file
/np21/win9x/cirrus_func.h
File deleted
/np21/win9x/cirrus_vga.h
File deleted
/np21/win9x/np2asm.inc
File deleted
/np21/win9x/cpucore.inc
File deleted
/np21/win9x/vram.inc
File deleted
/np21/win9x/pccore.inc
File deleted
/np21/win9x/np21vs2010.sln
/np21/win9x/sysmng.cpp
@@ -61,16 +61,6 @@
milstr_ncat(title, file_getname(fdd_diskname(1)),
NELEMENTS(title));
}
if (strlen(np2cfg.idecd[0])) {
milstr_ncat(title, OEMTEXT(" CD1:"), NELEMENTS(title));
milstr_ncat(title, file_getname(np2cfg.idecd[0]),
NELEMENTS(title));
}
if (strlen(np2cfg.idecd[1])){//sxsi_getdevtype(3)!=SXSIDEV_NC) {
milstr_ncat(title, OEMTEXT(" CD2:"), NELEMENTS(title));
milstr_ncat(title, file_getname(np2cfg.idecd[1]),
NELEMENTS(title));
}
}
if (flag & 2) {
clock[0] = '\0';
File deleted
\ No newline at end of file
/np21/win9x/x86/x86.targets
File deleted
\ No newline at end of file
/np21/win9x/x86/x86.xml
File deleted
\ No newline at end of file
/np21/win9x/x86/x86.props
/np21/win9x/misc/trace.h
@@ -33,7 +33,7 @@
#define TRACEINIT() trace_init()
#define TRACETERM() trace_term()
#define TRACEOUT(arg) trace_fmt arg
#define VERBOSE(arg) (void)arg /*trace_fmt2 arg*/
#define VERBOSE(arg) trace_fmt2 arg
#define APPDEVOUT(arg) trace_char(arg)
 
#endif
/np21/win9x/misc/trace.cpp
@@ -15,8 +15,6 @@
#include "ini.h"
#include "menu.h"
 
#include "cpucore.h"
 
#ifdef TRACE
 
#define VIEW_FGCOLOR 0x000000
@@ -126,8 +124,7 @@
}
 
#if 1
m_nFlags = 5;
//m_tfh = textfile_create(OEMTEXT("traceout.txt"), 0x800);
m_nFlags = 4;
#else
m_nFlags = 1;
m_tfh = textfile_create(OEMTEXT("traceout.txt"), 0x800);
@@ -222,7 +219,7 @@
{
USES_CONVERSION;
 
TCHAR szBuf[20192];
TCHAR szBuf[4096];
_vstprintf(szBuf, A2CT(lpFormat), argptr);
AddString(szBuf);
}
@@ -244,22 +241,11 @@
 
m_wndView.SendMessage(EM_REPLACESEL, FALSE, reinterpret_cast<LPARAM>(lpString));
m_wndView.SendMessage(EM_REPLACESEL, FALSE, reinterpret_cast<LPARAM>(crlf));
 
if(nLength>20000){
TCHAR temp[1] = {0};
int llength = m_wndView.SendMessage(EM_LINELENGTH, static_cast<WPARAM>(1), NULL);
m_wndView.SendMessage(EM_SETSEL, static_cast<WPARAM>(0), static_cast<LPARAM>(nLength));
m_wndView.SendMessage(EM_REPLACESEL, FALSE, reinterpret_cast<LPARAM>(temp));
}
 
m_wndView.SendMessage(EM_SETSEL, static_cast<WPARAM>(nStart), static_cast<LPARAM>(nEnd));
}
if (m_tfh != NULL)
{
TCHAR strtmp[50];
_stprintf(strtmp, _T(" PM=%d"), CPU_STAT_PM);
textfile_write(m_tfh, lpString);
textfile_write(m_tfh, strtmp);
textfile_write(m_tfh, crlf);
}
}
/np21/win9x/dialog/dialog.h
@@ -6,9 +6,6 @@
 
void dialog_scropt(HWND hWnd);
void dialog_sndopt(HWND hWnd);
#if defined(SUPPORT_LGY98)
void dialog_netopt(HWND hWnd);
#endif
void dialog_s98(HWND hWnd);
#if defined(SUPPORT_WAVEREC)
void dialog_waverec(HWND hWnd);
/np21/win9x/dialog/d_config.cpp
@@ -31,7 +31,7 @@
uMultiple = (UINT)milstr_solveINT(szWork);
}
uMultiple = max(uMultiple, 1);
uMultiple = min(uMultiple, 256);
uMultiple = min(uMultiple, 32);
 
uClock = (uClock / 100) * uMultiple;
wsprintf(szWork, str_clockfmt, uClock / 10000, uClock % 10000);
@@ -127,8 +127,8 @@
if (val < 1) {
val = 1;
}
else if (val > 128) {
val = 128;
else if (val > 32) {
val = 32;
}
if (np2cfg.multiple != val) {
np2cfg.multiple = val;
/np21/win9x/dialog/d_sound.cpp
@@ -984,7 +984,6 @@
}
 
 
 
// ----
 
#if defined(SUPPORT_S98)
/np21/win9x/dialog/d_disk.cpp
@@ -118,7 +118,7 @@
pfp = &fpSASI;
}
#if defined(SUPPORT_IDEIO)
else if (num >= 2)
else if (num == 2)
{
pfp = &fpISO;
}
@@ -351,7 +351,7 @@
else if (!file_cmpname(ext, str_nhd)) {
hddsize = 0;
hddminsize = 5;
hddmaxsize = NHD_MAXSIZE;
hddmaxsize = 512;
if (DialogBox(hinst, MAKEINTRESOURCE(IDD_NEWHDDDISK),
hWnd, (DLGPROC)NewHddDlgProc) == IDOK) {
newdisk_nhd(path, hddsize);
/np21/win9x/dosio.h
@@ -98,7 +98,7 @@
FILEH DOSIOCALL file_open(const OEMCHAR* lpPathName);
FILEH DOSIOCALL file_open_rb(const OEMCHAR* lpPathName);
FILEH DOSIOCALL file_create(const OEMCHAR* lpPathName);
FILEPOS DOSIOCALL file_seek(FILEH hFile, FILEPOS pointer, int method);
long DOSIOCALL file_seek(FILEH hFile, long pointer, int method);
UINT DOSIOCALL file_read(FILEH hFile, void *data, UINT length);
UINT DOSIOCALL file_write(FILEH hFile, const void *data, UINT length);
short DOSIOCALL file_close(FILEH hFile);
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/np21/win9x/resources/932/np2.aps
/np21/win9x/resources/932/np2.rc
@@ -1,4 +1,4 @@
// Microsoft Visual C++ generated resource script.
//Microsoft Developer Studio generated resource script.
//
#include "..\..\resource.h"
 
@@ -13,82 +13,107 @@
#undef APSTUDIO_READONLY_SYMBOLS
 
/////////////////////////////////////////////////////////////////////////////
// “ú–{Œê (“ú–{) resources
// “ú–{Œê resources
 
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
#ifdef _WIN32
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
#pragma code_page(932)
#endif //_WIN32
 
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
 
IDD_CONFIG DIALOG 0, 0, 182, 200
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_CONFIG DIALOG DISCARDABLE 0, 0, 182, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configure"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
GROUPBOX "CPU",IDC_STATIC,8,8,110,44
COMBOBOX IDC_BASECLOCK,14,22,54,43,CBS_DROPDOWNLIST | WS_VSCROLL | WS_GROUP | WS_TABSTOP
COMBOBOX IDC_BASECLOCK,14,22,54,43,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_GROUP | WS_TABSTOP
LTEXT "x",IDC_STATIC,72,26,8,8
COMBOBOX IDC_MULTIPLE,80,22,32,80,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP
COMBOBOX IDC_MULTIPLE,80,22,32,80,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_GROUP | WS_TABSTOP
RTEXT "",IDC_CLOCKMSG,14,41,80,8
LTEXT "MHz",IDC_STATIC,96,41,16,8
GROUPBOX "Architecture",IDC_STATIC,8,56,166,28
CONTROL "PC-9801VM",IDC_MODELVM,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,68,54,10
CONTROL "PC-9801VX",IDC_MODELVX,"Button",BS_AUTORADIOBUTTON,72,68,54,10
CONTROL "PC-286",IDC_MODELEPSON,"Button",BS_AUTORADIOBUTTON,128,68,44,10
CONTROL "PC-9801VM",IDC_MODELVM,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,16,68,54,10
CONTROL "PC-9801VX",IDC_MODELVX,"Button",BS_AUTORADIOBUTTON,72,
68,54,10
CONTROL "PC-286",IDC_MODELEPSON,"Button",BS_AUTORADIOBUTTON,128,
68,44,10
GROUPBOX "Sound",IDC_STATIC,8,88,166,46
LTEXT "Sampling rate",IDC_STATIC,14,101,50,8
CONTROL "11KHz",IDC_RATE11,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,66,100,34,10
CONTROL "22KHz",IDC_RATE22,"Button",BS_AUTORADIOBUTTON,102,100,34,10
CONTROL "44KHz",IDC_RATE44,"Button",BS_AUTORADIOBUTTON,138,100,34,10
CONTROL "11KHz",IDC_RATE11,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,66,100,34,10
CONTROL "22KHz",IDC_RATE22,"Button",BS_AUTORADIOBUTTON,102,100,
34,10
CONTROL "44KHz",IDC_RATE44,"Button",BS_AUTORADIOBUTTON,138,100,
34,10
LTEXT "Buffer",IDC_STATIC,14,118,50,8
EDITTEXT IDC_SOUNDBUF,66,116,30,12,WS_GROUP
LTEXT "ms",IDC_STATIC,102,118,16,8
CONTROL "Allow resize",IDC_ALLOWRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,142,162,10
CONTROL "Disable MMX",IDC_DISABLEMMX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,156,162,10
CONTROL "Confirm dialog (on reset/exit)",IDC_COMFIRM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,170,162,10
CONTROL "Resume",IDC_RESUME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,184,162,10
CONTROL "Allow resize",IDC_ALLOWRESIZE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,8,142,162,10
CONTROL "Disable MMX",IDC_DISABLEMMX,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,8,156,162,10
CONTROL "Confirm dialog (on reset/exit)",IDC_COMFIRM,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8,170,162,10
CONTROL "Resume",IDC_RESUME,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,8,184,162,10
DEFPUSHBUTTON "&OK",IDOK,130,8,44,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,130,26,44,14
END
 
IDD_CONFIGNOMMX DIALOG 0, 0, 182, 186
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_CONFIGNOMMX DIALOG DISCARDABLE 0, 0, 182, 186
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Configure"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
GROUPBOX "CPU",IDC_STATIC,8,8,110,44
COMBOBOX IDC_BASECLOCK,14,22,54,43,CBS_DROPDOWNLIST | WS_VSCROLL | WS_GROUP | WS_TABSTOP
COMBOBOX IDC_BASECLOCK,14,22,54,43,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_GROUP | WS_TABSTOP
LTEXT "x",IDC_STATIC,72,26,8,8
COMBOBOX IDC_MULTIPLE,80,22,32,80,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP
COMBOBOX IDC_MULTIPLE,80,22,32,80,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_GROUP | WS_TABSTOP
RTEXT "",IDC_CLOCKMSG,14,41,80,8
LTEXT "MHz",IDC_STATIC,96,41,16,8
GROUPBOX "Architecture",IDC_STATIC,8,56,166,28
CONTROL "PC-9801VM",IDC_MODELVM,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,68,54,10
CONTROL "PC-9801VX",IDC_MODELVX,"Button",BS_AUTORADIOBUTTON,72,68,54,10
CONTROL "PC-286",IDC_MODELEPSON,"Button",BS_AUTORADIOBUTTON,128,68,44,10
CONTROL "PC-9801VM",IDC_MODELVM,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,16,68,54,10
CONTROL "PC-9801VX",IDC_MODELVX,"Button",BS_AUTORADIOBUTTON,72,
68,54,10
CONTROL "PC-286",IDC_MODELEPSON,"Button",BS_AUTORADIOBUTTON,128,
68,44,10
GROUPBOX "Sound",IDC_STATIC,8,88,166,46
LTEXT "Sampling rate",IDC_STATIC,14,101,50,8
CONTROL "11KHz",IDC_RATE11,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,66,100,34,10
CONTROL "22KHz",IDC_RATE22,"Button",BS_AUTORADIOBUTTON,102,100,34,10
CONTROL "44KHz",IDC_RATE44,"Button",BS_AUTORADIOBUTTON,138,100,34,10
CONTROL "11KHz",IDC_RATE11,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,66,100,34,10
CONTROL "22KHz",IDC_RATE22,"Button",BS_AUTORADIOBUTTON,102,100,
34,10
CONTROL "44KHz",IDC_RATE44,"Button",BS_AUTORADIOBUTTON,138,100,
34,10
LTEXT "Buffer",IDC_STATIC,14,118,50,8
EDITTEXT IDC_SOUNDBUF,66,116,30,12,WS_GROUP
LTEXT "ms",IDC_STATIC,102,118,16,8
CONTROL "Allow resize",IDC_ALLOWRESIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,142,162,10
CONTROL "Confirm dialog (on reset/exit)",IDC_COMFIRM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,156,162,10
CONTROL "Resume",IDC_RESUME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,170,162,10
CONTROL "Allow resize",IDC_ALLOWRESIZE,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,8,142,162,10
CONTROL "Confirm dialog (on reset/exit)",IDC_COMFIRM,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8,156,162,10
CONTROL "Resume",IDC_RESUME,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,8,170,162,10
DEFPUSHBUTTON "&OK",IDOK,130,8,44,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,130,26,44,14
END
 
IDD_NEWDISK DIALOG 0, 0, 180, 48
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_NEWDISK DIALOG DISCARDABLE 0, 0, 180, 48
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Create new FD image"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
@@ -96,14 +121,16 @@
LTEXT "Disk label",IDC_STATIC,8,10,38,8
EDITTEXT IDC_DISKLABEL,48,8,64,12,ES_AUTOHSCROLL | WS_GROUP
LTEXT "Disk type",IDC_STATIC,8,28,38,8
CONTROL "2DD",IDC_MAKE2DD,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,48,27,30,10
CONTROL "2HD",IDC_MAKE2HD,"Button",BS_AUTORADIOBUTTON,80,27,30,10
CONTROL "2DD",IDC_MAKE2DD,"Button",BS_AUTORADIOBUTTON | WS_GROUP |
WS_TABSTOP,48,27,30,10
CONTROL "2HD",IDC_MAKE2HD,"Button",BS_AUTORADIOBUTTON,80,27,30,
10
DEFPUSHBUTTON "&OK",IDOK,128,8,44,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,128,26,44,14
END
 
IDD_NEWDISK2 DIALOG 0, 0, 196, 48
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_NEWDISK2 DIALOG DISCARDABLE 0, 0, 196, 48
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Create new FD image"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
@@ -111,239 +138,300 @@
LTEXT "Disk label",IDC_STATIC,8,10,38,8
EDITTEXT IDC_DISKLABEL,48,8,64,12,ES_AUTOHSCROLL | WS_GROUP
LTEXT "Disk type",IDC_STATIC,8,28,38,8
CONTROL "2DD",IDC_MAKE2DD,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,48,27,30,10
CONTROL "2HD",IDC_MAKE2HD,"Button",BS_AUTORADIOBUTTON,78,27,30,10
CONTROL "1.44",IDC_MAKE144,"Button",BS_AUTORADIOBUTTON,108,27,30,10
CONTROL "2DD",IDC_MAKE2DD,"Button",BS_AUTORADIOBUTTON | WS_GROUP |
WS_TABSTOP,48,27,30,10
CONTROL "2HD",IDC_MAKE2HD,"Button",BS_AUTORADIOBUTTON,78,27,30,
10
CONTROL "1.44",IDC_MAKE144,"Button",BS_AUTORADIOBUTTON,108,27,30,
10
DEFPUSHBUTTON "&OK",IDOK,144,8,44,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,144,26,44,14
END
 
IDD_NEWHDDDISK DIALOG 0, 0, 160, 48
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_NEWHDDDISK DIALOG DISCARDABLE 0, 0, 160, 48
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Create new HD image"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "HDD size",IDC_STATIC,8,10,38,8
COMBOBOX IDC_HDDSIZE,48,8,32,46,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_HDDSIZE,48,8,32,46,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "MB",IDC_STATIC,86,10,16,8
RTEXT "",IDC_HDDLIMIT,48,30,54,8
DEFPUSHBUTTON "&OK",IDOK,108,8,44,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,108,26,44,14
END
 
IDD_NEWSASI DIALOG 0, 0, 144, 54
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_NEWSASI DIALOG DISCARDABLE 0, 0, 144, 54
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Create new SASI image"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
CONTROL "5MB",IDC_NEWSASI5MB,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,8,38,10
CONTROL "10MB",IDC_NEWSASI10MB,"Button",BS_AUTORADIOBUTTON,48,8,38,10
CONTROL "15MB",IDC_NEWSASI15MB,"Button",BS_AUTORADIOBUTTON,8,22,38,10
CONTROL "20MB",IDC_NEWSASI20MB,"Button",BS_AUTORADIOBUTTON,48,22,38,10
CONTROL "30MB",IDC_NEWSASI30MB,"Button",BS_AUTORADIOBUTTON,8,36,38,10
CONTROL "40MB",IDC_NEWSASI40MB,"Button",BS_AUTORADIOBUTTON,48,36,38,10
CONTROL "5MB",IDC_NEWSASI5MB,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,8,8,38,10
CONTROL "10MB",IDC_NEWSASI10MB,"Button",BS_AUTORADIOBUTTON,48,8,
38,10
CONTROL "15MB",IDC_NEWSASI15MB,"Button",BS_AUTORADIOBUTTON,8,22,
38,10
CONTROL "20MB",IDC_NEWSASI20MB,"Button",BS_AUTORADIOBUTTON,48,22,
38,10
CONTROL "30MB",IDC_NEWSASI30MB,"Button",BS_AUTORADIOBUTTON,8,36,
38,10
CONTROL "40MB",IDC_NEWSASI40MB,"Button",BS_AUTORADIOBUTTON,48,36,
38,10
DEFPUSHBUTTON "&OK",IDOK,92,8,44,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,92,26,44,14
END
 
IDD_SCROPT1 DIALOG 0, 0, 172, 96
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SCROPT1 DIALOG DISCARDABLE 0, 0, 172, 96
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Video"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
CONTROL "Liquid Crystal Display",IDC_LCD,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,8,156,10
CONTROL "Reverse",IDC_LCDX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,24,144,10
CONTROL "Use skipline revisions",IDC_SKIPLINE,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,40,156,10
CONTROL "Liquid Crystal Display",IDC_LCD,"Button",
BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,8,156,10
CONTROL "Reverse",IDC_LCDX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
20,24,144,10
CONTROL "Use skipline revisions",IDC_SKIPLINE,"Button",
BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,40,156,10
LTEXT "Ratio",IDC_STATIC,20,55,22,8
CONTROL "Slider1",IDC_SKIPLIGHT,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,44,55,96,10
CONTROL "Slider1",IDC_SKIPLIGHT,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,44,55,96,10
RTEXT "",IDC_LIGHTSTR,144,54,20,10,SS_SUNKEN
END
 
IDD_SCROPT_FULLSCREEN DIALOG 0, 0, 172, 96
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SCROPT_FULLSCREEN DIALOG DISCARDABLE 0, 0, 172, 96
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "FullScreen"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
CONTROL "No change screen colors",IDC_FULLSCREEN_SAMEBPP,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,8,156,10
CONTROL "No change screen colors",IDC_FULLSCREEN_SAMEBPP,"Button",
BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,8,156,10
CONTROL "No change screen resolution",IDC_FULLSCREEN_SAMERES,
"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,24,156,10
"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,8,24,
156,10
LTEXT "Zoom",IDC_STATIC,8,45,22,8
COMBOBOX IDC_FULLSCREEN_ZOOM,40,42,96,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_GROUP | WS_TABSTOP
COMBOBOX IDC_FULLSCREEN_ZOOM,40,42,96,80,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_GROUP | WS_TABSTOP
END
 
IDD_SCROPT2 DIALOG 0, 0, 172, 96
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SCROPT2 DIALOG DISCARDABLE 0, 0, 172, 96
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Chip"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
GROUPBOX "Graphic Display Controller",IDC_STATIC,8,8,120,28
CONTROL "uPD7220",IDC_GDC7220,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,20,20,50,10
CONTROL "uPD72020",IDC_GDC72020,"Button",BS_AUTORADIOBUTTON,72,20,50,10
CONTROL "uPD7220",IDC_GDC7220,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,20,20,50,10
CONTROL "uPD72020",IDC_GDC72020,"Button",BS_AUTORADIOBUTTON,72,
20,50,10
GROUPBOX "Graphic Charger",IDC_GCBOX,8,42,156,28
CONTROL "None",IDC_GRCGNON,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,20,54,34,10
CONTROL "None",IDC_GRCGNON,"Button",BS_AUTORADIOBUTTON |
WS_GROUP | WS_TABSTOP,20,54,34,10
CONTROL "GRCG",IDC_GRCG,"Button",BS_AUTORADIOBUTTON,54,54,34,10
CONTROL "GRCG+",IDC_GRCG2,"Button",BS_AUTORADIOBUTTON,88,54,40,10
CONTROL "GRCG+",IDC_GRCG2,"Button",BS_AUTORADIOBUTTON,88,54,40,
10
CONTROL "EGC",IDC_EGC,"Button",BS_AUTORADIOBUTTON,128,54,34,10
CONTROL "&Enable 16color-board (PC-9801-24)",IDC_PC980124,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,80,148,10
CONTROL "&Enable 16color-board (PC-9801-24)",IDC_PC980124,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,16,80,148,10
END
 
IDD_SCROPT3 DIALOG 0, 0, 172, 96
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SCROPT3 DIALOG DISCARDABLE 0, 0, 172, 96
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Timing"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "T-RAM",IDC_STATIC,8,9,30,8
CONTROL "Slider1",IDC_TRAMWAIT,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,9,80,10
CONTROL "Slider1",IDC_TRAMWAIT,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,9,80,10
RTEXT "",IDC_TRAMSTR,124,8,20,10,SS_SUNKEN
LTEXT "V-RAM",IDC_STATIC,8,25,30,8
CONTROL "Slider2",IDC_VRAMWAIT,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,25,80,10
CONTROL "Slider2",IDC_VRAMWAIT,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,25,80,10
RTEXT "",IDC_VRAMSTR,124,24,20,10,SS_SUNKEN
LTEXT "GRCG",IDC_STATIC,8,41,30,8
CONTROL "Slider3",IDC_GRCGWAIT,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,41,80,10
CONTROL "Slider3",IDC_GRCGWAIT,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,41,80,10
RTEXT "",IDC_GRCGSTR,124,40,20,10,SS_SUNKEN
LTEXT "clock",IDC_STATIC,148,9,22,8
LTEXT "clock",IDC_STATIC,148,25,22,8
LTEXT "clock",IDC_STATIC,148,41,22,8
LTEXT "Real palettes adjust",IDC_STATIC,8,60,156,8
CONTROL "Slider3",IDC_REALPAL,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,73,80,10
CONTROL "Slider3",IDC_REALPAL,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,73,80,10
RTEXT "",IDC_REALPALSTR,124,72,20,10,SS_SUNKEN
END
 
IDD_SERIAL1 DIALOG 0, 0, 224, 140
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SERIAL1 DIALOG DISCARDABLE 0, 0, 224, 140
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "COM1"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "Port",IDC_STATIC,8,10,30,8
COMBOBOX IDC_COM1PORT,40,8,48,96,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM1PORT,40,8,48,96,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
GROUPBOX "Assign",IDC_COM1STR00,8,28,132,84
LTEXT "Speed",IDC_COM1STR01,16,45,40,8
COMBOBOX IDC_COM1SPEED,60,42,48,128,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM1SPEED,60,42,48,128,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bps",IDC_COM1STR02,112,45,26,8
LTEXT "Data bits",IDC_COM1STR03,16,61,40,8
COMBOBOX IDC_COM1CHARSIZE,60,58,48,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM1CHARSIZE,60,58,48,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bits",IDC_COM1STR04,112,61,26,8
LTEXT "Parity",IDC_COM1STR05,16,77,40,8
COMBOBOX IDC_COM1PARITY,60,74,48,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM1PARITY,60,74,48,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Stop bits",IDC_COM1STR06,16,93,40,8
COMBOBOX IDC_COM1STOPBIT,60,90,48,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM1STOPBIT,60,90,48,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bit(s)",IDC_COM1STR07,112,93,26,8
GROUPBOX "Assign",IDC_COM1STR10,8,28,186,84
LTEXT "Device",IDC_COM1STR11,16,45,30,8
COMBOBOX IDC_COM1MMAP,50,42,136,96,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM1MMAP,50,42,136,96,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Module",IDC_COM1STR12,16,61,30,8
COMBOBOX IDC_COM1MMDL,50,58,136,96,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM1MMDL,50,58,136,96,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "Use program define file (MIMPI define)",IDC_COM1DEFE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,82,170,10
LTEXT "",IDC_COM1DEFF,26,94,148,10,SS_SUNKEN
PUSHBUTTON "...",IDC_COM1DEFB,176,94,10,10
END
 
IDD_PC9861A DIALOG 0, 0, 224, 140
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_PC9861A DIALOG DISCARDABLE 0, 0, 224, 140
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "PC-9861K"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
CONTROL "Enable",IDC_PC9861E,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,208,10
CONTROL "Enable",IDC_PC9861E,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,8,8,208,10
LTEXT "CH.1",IDC_STATIC,8,27,20,8
RTEXT "Speed",IDC_STATIC,30,27,22,8
COMBOBOX IDC_CH1SPEED,54,24,40,128,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_CH1SPEED,54,24,40,128,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
RTEXT "INT",IDC_STATIC,100,27,12,8
COMBOBOX IDC_CH1INT,114,24,24,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_CH1INT,114,24,24,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
RTEXT "Mode",IDC_STATIC,144,27,20,8
COMBOBOX IDC_CH1MODE,166,24,52,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_CH1MODE,166,24,52,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "CH.2",IDC_STATIC,8,45,18,8
RTEXT "Speed",IDC_STATIC,30,45,22,8
COMBOBOX IDC_CH2SPEED,54,42,40,128,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_CH2SPEED,54,42,40,128,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
RTEXT "INT",IDC_STATIC,100,45,12,8
COMBOBOX IDC_CH2INT,114,42,24,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_CH2INT,114,42,24,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
RTEXT "Mode",IDC_STATIC,144,45,20,8
COMBOBOX IDC_CH2MODE,166,42,52,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_CH2MODE,166,42,52,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "DIP-SW",IDC_STATIC,8,64,34,8
CONTROL "",IDC_PC9861DIP,"Static",SS_ENHMETAFILE | SS_NOTIFY,44,64,172,68
CONTROL "",IDC_PC9861DIP,"Static",SS_ENHMETAFILE | SS_NOTIFY,44,
64,172,68
END
 
IDD_PC9861B DIALOG 0, 0, 224, 140
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_PC9861B DIALOG DISCARDABLE 0, 0, 224, 140
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CH.1"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "Port",IDC_STATIC,8,10,30,8
COMBOBOX IDC_COM2PORT,40,8,48,96,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM2PORT,40,8,48,96,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
GROUPBOX "Assign",IDC_COM2STR00,8,28,132,84
LTEXT "Speed",IDC_COM2STR01,16,45,40,8
COMBOBOX IDC_COM2SPEED,60,42,48,128,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM2SPEED,60,42,48,128,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bps",IDC_COM2STR02,112,45,26,8
LTEXT "Data bits",IDC_COM2STR03,16,61,38,8
COMBOBOX IDC_COM2CHARSIZE,60,58,48,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM2CHARSIZE,60,58,48,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bits",IDC_COM2STR04,112,61,26,8
LTEXT "Parity",IDC_COM2STR05,16,77,40,8
COMBOBOX IDC_COM2PARITY,60,74,48,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM2PARITY,60,74,48,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Stop bits",IDC_COM2STR06,16,93,40,8
COMBOBOX IDC_COM2STOPBIT,60,90,48,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM2STOPBIT,60,90,48,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bit(s)",IDC_COM2STR07,112,93,26,8
GROUPBOX "Assign",IDC_COM2STR10,8,28,186,84
LTEXT "Device",IDC_COM2STR11,16,45,30,8
COMBOBOX IDC_COM2MMAP,50,42,136,96,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM2MMAP,50,42,136,96,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Module",IDC_COM2STR12,16,61,30,8
COMBOBOX IDC_COM2MMDL,50,58,136,96,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM2MMDL,50,58,136,96,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "Use program define file (MIMPI define)",IDC_COM2DEFE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,82,170,10
LTEXT "",IDC_COM2DEFF,26,94,148,10,SS_SUNKEN
PUSHBUTTON "...",IDC_COM2DEFB,176,94,10,10
END
 
IDD_PC9861C DIALOG 0, 0, 224, 140
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_PC9861C DIALOG DISCARDABLE 0, 0, 224, 140
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CH.2"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "Port",IDC_STATIC,8,10,30,8
COMBOBOX IDC_COM3PORT,40,8,48,96,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM3PORT,40,8,48,96,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
GROUPBOX "Assign",IDC_COM3STR00,8,28,132,84
LTEXT "Speed",IDC_COM3STR01,16,45,40,8
COMBOBOX IDC_COM3SPEED,60,42,48,128,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM3SPEED,60,42,48,128,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bps",IDC_COM3STR02,112,45,26,8
LTEXT "Data bits",IDC_COM3STR03,16,61,40,8
COMBOBOX IDC_COM3CHARSIZE,60,58,48,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM3CHARSIZE,60,58,48,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bits",IDC_COM3STR04,112,61,26,8
LTEXT "Parity",IDC_COM3STR05,16,77,38,8
COMBOBOX IDC_COM3PARITY,60,74,48,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM3PARITY,60,74,48,64,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Stop bits",IDC_COM3STR06,16,93,40,8
COMBOBOX IDC_COM3STOPBIT,60,90,48,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM3STOPBIT,60,90,48,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "bit(s)",IDC_COM3STR07,112,93,26,8
GROUPBOX "Assign",IDC_COM3STR10,8,28,186,84
LTEXT "Device",IDC_COM3STR11,16,45,30,8
COMBOBOX IDC_COM3MMAP,50,42,132,96,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM3MMAP,50,42,132,96,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Module",IDC_COM3STR12,16,61,30,8
COMBOBOX IDC_COM3MMDL,50,58,132,96,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_COM3MMDL,50,58,132,96,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "Use program define file (MIMPI define)",IDC_COM3DEFE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,82,170,10
LTEXT "",IDC_COM3DEFF,26,94,148,10,SS_SUNKEN
PUSHBUTTON "...",IDC_COM3DEFB,176,94,10,10
END
 
IDD_MPUPC98 DIALOG 0, 0, 192, 178
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_MPUPC98 DIALOG DISCARDABLE 0, 0, 192, 178
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "MPU-PC98II"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "I/O port",IDC_STATIC,8,10,32,8
COMBOBOX IDC_MPUIO,44,8,48,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_MPUIO,44,8,48,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Interrupt",IDC_STATIC,8,26,32,8
COMBOBOX IDC_MPUINT,44,24,48,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_MPUINT,44,24,48,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "DIP-SW",IDC_STATIC,8,46,32,8
CONTROL "",IDC_MPUDIP,"Static",SS_ENHMETAFILE | SS_NOTIFY,44,46,94,26
CONTROL "",IDC_MPUDIP,"Static",SS_ENHMETAFILE | SS_NOTIFY,44,46,
94,26
GROUPBOX "Assign",IDC_STATIC,8,72,176,98
LTEXT "MIDI-OUT",IDC_STATIC,16,87,40,8
COMBOBOX IDC_MPU98MMAP,60,84,116,96,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_MPU98MMAP,60,84,116,96,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "MIDI-IN",IDC_STATIC,16,103,40,8
COMBOBOX IDC_MPU98MDIN,60,100,116,96,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_MPU98MDIN,60,100,116,96,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Module",IDC_STATIC,16,119,40,8
COMBOBOX IDC_MPU98MMDL,60,116,116,96,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_MPU98MMDL,60,116,116,96,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "Use program define file (MIMPI define)",IDC_MPU98DEFE,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,140,160,10
LTEXT "",IDC_MPU98DEFF,26,152,138,10,SS_SUNKEN
@@ -354,139 +442,174 @@
END
 
IDD_SNDMIX DIALOGEX 0, 0, 184, 124
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Mixer"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN", 0, 0, 0x1
BEGIN
LTEXT "FM",IDC_STATIC,8,9,30,8
CONTROL "Slider1",IDC_VOLFM,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_GROUP | WS_TABSTOP,40,9,88,10
CONTROL "Slider1",IDC_VOLFM,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_GROUP | WS_TABSTOP,40,9,88,10
LTEXT "",IDC_VOLFMSTR,134,8,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "PSG",IDC_STATIC,8,23,30,8
CONTROL "Slider16",IDC_VOLPSG,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,23,88,10
CONTROL "Slider16",IDC_VOLPSG,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,23,88,10
LTEXT "",IDC_VOLPSGSTR,134,22,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "ADPCM",IDC_STATIC,8,37,30,8
CONTROL "Slider2",IDC_VOLADPCM,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,37,88,10
CONTROL "Slider2",IDC_VOLADPCM,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,37,88,10
LTEXT "",IDC_VOLADPCMSTR,134,36,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "PCM",IDC_STATIC,8,51,30,8
CONTROL "Slider4",IDC_VOLPCM,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,51,88,10
CONTROL "Slider4",IDC_VOLPCM,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,51,88,10
LTEXT "",IDC_VOLPCMSTR,134,50,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "Rhythm",IDC_STATIC,8,65,30,8
CONTROL "Slider8",IDC_VOLRHYTHM,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,65,88,10
CONTROL "Slider8",IDC_VOLRHYTHM,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,65,88,10
LTEXT "",IDC_VOLRHYTHMSTR,134,64,16,10,SS_SUNKEN,WS_EX_RIGHT
PUSHBUTTON "Defaults",IDC_SNDMIXDEF,136,102,40,14
END
 
IDD_SND14 DIALOGEX 0, 0, 184, 124
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "PC-9801-14"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN", 0, 0, 0x1
BEGIN
LTEXT "Left",IDC_STATIC,8,9,30,8
CONTROL "Slider1",IDC_VOL14L,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_GROUP | WS_TABSTOP,40,9,48,10
CONTROL "Slider1",IDC_VOL14L,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_GROUP | WS_TABSTOP,40,9,48,10
LTEXT "",IDC_VOL14LSTR,94,8,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "Right",IDC_STATIC,8,23,30,8
CONTROL "Slider16",IDC_VOL14R,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,23,48,10
CONTROL "Slider16",IDC_VOL14R,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,23,48,10
LTEXT "",IDC_VOL14RSTR,94,22,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "f2",IDC_STATIC,10,37,30,8
CONTROL "Slider2",IDC_VOLF2,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,37,48,10
CONTROL "Slider2",IDC_VOLF2,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,37,48,10
LTEXT "",IDC_VOLF2STR,94,36,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "f4",IDC_STATIC,10,51,30,8
CONTROL "Slider4",IDC_VOLF4,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,51,48,10
CONTROL "Slider4",IDC_VOLF4,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,51,48,10
LTEXT "",IDC_VOLF4STR,94,50,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "f8",IDC_STATIC,10,65,30,8
CONTROL "Slider8",IDC_VOLF8,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,65,48,10
CONTROL "Slider8",IDC_VOLF8,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,65,48,10
LTEXT "",IDC_VOLF8STR,94,64,16,10,SS_SUNKEN,WS_EX_RIGHT
LTEXT "f16",IDC_STATIC,10,79,30,8
CONTROL "Slider16",IDC_VOLF16,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,40,79,48,10
CONTROL "Slider16",IDC_VOLF16,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,40,79,48,10
LTEXT "",IDC_VOLF16STR,94,78,16,10,SS_SUNKEN,WS_EX_RIGHT
END
 
IDD_SND26 DIALOG 0, 0, 184, 124
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SND26 DIALOG DISCARDABLE 0, 0, 184, 124
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "26"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "I/O port",IDC_STATIC,8,10,30,8
COMBOBOX IDC_SND26IO,40,8,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SND26IO,40,8,40,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Interrupt",IDC_STATIC,104,10,30,8
COMBOBOX IDC_SND26INT,136,8,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SND26INT,136,8,40,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "ROM",IDC_STATIC,8,28,30,8
COMBOBOX IDC_SND26ROM,40,26,40,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SND26ROM,40,26,40,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Jumper",IDC_STATIC,8,66,30,8
CONTROL "",IDC_SND26JMP,"Static",SS_ENHMETAFILE | SS_NOTIFY,40,66,136,34
CONTROL "",IDC_SND26JMP,"Static",SS_ENHMETAFILE | SS_NOTIFY,40,
66,136,34
PUSHBUTTON "Defaults",IDC_SND26DEF,136,102,40,14
END
 
IDD_SND86 DIALOG 0, 0, 184, 124
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SND86 DIALOG DISCARDABLE 0, 0, 184, 124
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "86"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "I/O port",IDC_STATIC,8,10,30,8
COMBOBOX IDC_SND86IO,40,8,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "Interrupt",IDC_SND86INT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,9,40,10
COMBOBOX IDC_SND86INTA,136,8,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SND86IO,40,8,40,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "Interrupt",IDC_SND86INT,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,94,9,40,10
COMBOBOX IDC_SND86INTA,136,8,40,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Sound ID",IDC_STATIC,8,28,30,8
COMBOBOX IDC_SND86ID,40,26,40,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "ROM",IDC_SND86ROM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,27,40,10
COMBOBOX IDC_SND86ID,40,26,40,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "ROM",IDC_SND86ROM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
94,27,40,10
LTEXT "DIP-SW",IDC_STATIC,8,66,30,8
CONTROL "",IDC_SND86DIP,"Static",SS_ENHMETAFILE | SS_NOTIFY,40,66,136,34
CONTROL "",IDC_SND86DIP,"Static",SS_ENHMETAFILE | SS_NOTIFY,40,
66,136,34
PUSHBUTTON "Defaults",IDC_SND86DEF,136,102,40,14
END
 
IDD_SNDSPB DIALOG 0, 0, 184, 124
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SNDSPB DIALOG DISCARDABLE 0, 0, 184, 124
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "SPB"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
LTEXT "I/O port",IDC_STATIC,8,10,30,8
COMBOBOX IDC_SPBIO,40,8,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SPBIO,40,8,40,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Interrupt",IDC_STATIC,104,10,30,8
COMBOBOX IDC_SPBINT,136,8,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
COMBOBOX IDC_SPBINT,136,8,40,52,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
LTEXT "ROM",IDC_STATIC,8,28,30,8
COMBOBOX IDC_SPBROM,40,26,40,64,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
CONTROL "Reversed channel",IDC_SPBREVERSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,27,82,10
COMBOBOX IDC_SPBROM,40,26,40,64,CBS_DROPDOWNLIST | CBS_SORT |
WS_VSCROLL | WS_TABSTOP
CONTROL "Reversed channel",IDC_SPBREVERSE,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,94,27,82,10
LTEXT "VR",IDC_STATIC,8,46,30,8
CONTROL "L",IDC_SPBVRL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,45,22,10
CONTROL "R",IDC_SPBVRR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,64,45,22,10
CONTROL "L",IDC_SPBVRL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,
45,22,10
CONTROL "R",IDC_SPBVRR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,64,
45,22,10
RTEXT "Level",IDC_STATIC,88,46,22,8
CONTROL "Slider16",IDC_SPBVRLEVEL,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,112,46,64,10
CONTROL "Slider16",IDC_SPBVRLEVEL,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,112,46,64,10
LTEXT "Jumper",IDC_STATIC,8,66,30,8
CONTROL "",IDC_SPBJMP,"Static",SS_ENHMETAFILE | SS_NOTIFY,40,66,136,34
CONTROL "",IDC_SPBJMP,"Static",SS_ENHMETAFILE | SS_NOTIFY,40,66,
136,34
PUSHBUTTON "Defaults",IDC_SPBDEF,136,102,40,14
END
 
IDD_SNDPAD1 DIALOG 0, 0, 184, 124
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_SNDPAD1 DIALOG DISCARDABLE 0, 0, 184, 124
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "JoyPad"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
CONTROL "Use JoyPad-1",IDC_JOYPAD1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,58,10
CONTROL "Use JoyPad-1",IDC_JOYPAD1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,8,8,58,10
LTEXT "Trigger-1",IDC_STATIC,24,27,40,8
CONTROL "A",IDC_PAD1_1A,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,64,26,21,10
CONTROL "A",IDC_PAD1_1A,"Button",BS_AUTOCHECKBOX | WS_GROUP |
WS_TABSTOP,64,26,21,10
CONTROL "B",IDC_PAD1_1B,"Button",BS_AUTOCHECKBOX,86,26,21,10
CONTROL "C",IDC_PAD1_1C,"Button",BS_AUTOCHECKBOX,108,26,21,10
CONTROL "D",IDC_PAD1_1D,"Button",BS_AUTOCHECKBOX,130,26,21,10
LTEXT "Trigger-2",IDC_STATIC,24,43,40,8
CONTROL "A",IDC_PAD1_2A,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,64,42,21,10
CONTROL "A",IDC_PAD1_2A,"Button",BS_AUTOCHECKBOX | WS_GROUP |
WS_TABSTOP,64,42,21,10
CONTROL "B",IDC_PAD1_2B,"Button",BS_AUTOCHECKBOX,86,42,21,10
CONTROL "C",IDC_PAD1_2C,"Button",BS_AUTOCHECKBOX,108,42,21,10
CONTROL "D",IDC_PAD1_2D,"Button",BS_AUTOCHECKBOX,130,42,21,10
LTEXT "Rapid",IDC_STATIC,24,61,40,8
CONTROL "A",IDC_PAD1_RA,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,64,60,21,10
CONTROL "A",IDC_PAD1_RA,"Button",BS_AUTOCHECKBOX | WS_GROUP |
WS_TABSTOP,64,60,21,10
CONTROL "B",IDC_PAD1_RB,"Button",BS_AUTOCHECKBOX,86,60,21,10
CONTROL "C",IDC_PAD1_RC,"Button",BS_AUTOCHECKBOX,108,60,21,10
CONTROL "D",IDC_PAD1_RD,"Button",BS_AUTOCHECKBOX,130,60,21,10
END
 
IDD_CALENDAR DIALOG 0, 0, 164, 80
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_CALENDAR DIALOG DISCARDABLE 0, 0, 164, 80
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Calendar"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
BEGIN
CONTROL "Real (localtime)",IDC_CLNDREAL,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,8,96,10
CONTROL "Virtual calendar",IDC_CLNDVIR,"Button",BS_AUTORADIOBUTTON,8,24,96,10
CONTROL "Real (localtime)",IDC_CLNDREAL,"Button",
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,8,96,10
CONTROL "Virtual calendar",IDC_CLNDVIR,"Button",
BS_AUTORADIOBUTTON,8,24,96,10
EDITTEXT IDC_VIRYEAR,20,40,14,12,WS_GROUP
CTEXT "/",IDC_STATIC,34,42,8,8
EDITTEXT IDC_VIRMONTH,42,40,14,12
@@ -502,8 +625,8 @@
PUSHBUTTON "Cancel",IDCANCEL,112,26,44,14
END
 
IDD_ABOUT DIALOG 0, 0, 196, 108
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 196, 108
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About"
CLASS "np2dialog"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN"
@@ -512,30 +635,18 @@
LTEXT "",IDC_NP2VER,36,16,102,8
DEFPUSHBUTTON "&OK",IDOK,148,8,40,14,WS_GROUP
PUSHBUTTON "More >>",IDC_MORE,148,26,40,14
EDITTEXT IDC_NP2INFO,8,52,180,48,ES_MULTILINE | ES_READONLY | ES_WANTRETURN | WS_VSCROLL
EDITTEXT IDC_NP2INFO,8,52,180,48,ES_MULTILINE | ES_READONLY |
ES_WANTRETURN | WS_VSCROLL
END
 
IDD_LGY98 DIALOGEX 0, 0, 184, 124
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "LGY-98"
FONT 9, "‚l‚r ‚oƒSƒVƒbƒN", 0, 0, 0x0
BEGIN
CONTROL "Enabled",IDC_LGY98ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,8,40,10
LTEXT "I/O port",IDC_STATIC,8,26,30,8
COMBOBOX IDC_LGY98IO,40,24,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
LTEXT "Interrupt",IDC_STATIC,104,26,30,8
COMBOBOX IDC_LGY98INT,136,24,40,52,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Defaults",IDC_LGY98DEF,136,102,40,14
END
 
 
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
 
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_CONFIG, DIALOG
BEGIN
@@ -720,14 +831,6 @@
TOPMARGIN, 8
BOTTOMMARGIN, 100
END
 
IDD_LGY98, DIALOG
BEGIN
LEFTMARGIN, 8
RIGHTMARGIN, 176
TOPMARGIN, 8
BOTTOMMARGIN, 112
END
END
#endif // APSTUDIO_INVOKED
 
@@ -738,18 +841,18 @@
// TEXTINCLUDE
//
 
1 TEXTINCLUDE
1 TEXTINCLUDE DISCARDABLE
BEGIN
"..\\..\\resource.h\0"
END
 
2 TEXTINCLUDE
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
 
3 TEXTINCLUDE
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""np2.rc2""\r\n"
"\0"
@@ -763,7 +866,7 @@
// Menu
//
 
IDR_SYS MENU
IDR_SYS MENU DISCARDABLE
BEGIN
MENUITEM "&Tool window", IDM_TOOLWIN
MENUITEM SEPARATOR
@@ -781,29 +884,29 @@
MENUITEM SEPARATOR
END
 
IDR_SYSKEYDISP MENU
IDR_SYSKEYDISP MENU DISCARDABLE
BEGIN
MENUITEM "&Key display", IDM_KEYDISP
END
 
IDR_SYSSOFTKBD MENU
IDR_SYSSOFTKBD MENU DISCARDABLE
BEGIN
MENUITEM "&Soft keyboard", IDM_SOFTKBD
END
 
IDR_SYSDEBUG32 MENU
IDR_SYSDEBUG32 MENU DISCARDABLE
BEGIN
MENUITEM "Memory debug", IDM_MEMDBG32
END
 
IDR_SYSDEBUG MENU
IDR_SYSDEBUG MENU DISCARDABLE
BEGIN
MENUITEM "Memory dump", IDM_MEMORYDUMP
MENUITEM "Debug utility", IDM_DEBUGUTY
MENUITEM SEPARATOR
END
 
IDR_MAIN MENU
IDR_MAIN MENU DISCARDABLE
BEGIN
POPUP "&Emulate"
BEGIN
@@ -893,8 +996,6 @@
MENUITEM "MIDI &panic", IDM_MIDIPANIC
MENUITEM SEPARATOR
MENUITEM "So&und option...", IDM_SNDOPT
MENUITEM SEPARATOR
MENUITEM "&Network option...", IDM_NETOPT
END
POPUP "&Other"
BEGIN
@@ -917,7 +1018,7 @@
END
END
 
IDR_STAT MENU
IDR_STAT MENU DISCARDABLE
BEGIN
POPUP "S&tat"
BEGIN
@@ -945,7 +1046,7 @@
END
END
 
IDR_FDD1MENU MENU
IDR_FDD1MENU MENU DISCARDABLE
BEGIN
POPUP "FDD&1"
BEGIN
@@ -955,7 +1056,7 @@
END
END
 
IDR_FDD2MENU MENU
IDR_FDD2MENU MENU DISCARDABLE
BEGIN
POPUP "FDD&2"
BEGIN
@@ -965,7 +1066,7 @@
END
END
 
IDR_FDD3MENU MENU
IDR_FDD3MENU MENU DISCARDABLE
BEGIN
POPUP "FDD&3"
BEGIN
@@ -975,7 +1076,7 @@
END
END
 
IDR_FDD4MENU MENU
IDR_FDD4MENU MENU DISCARDABLE
BEGIN
POPUP "FDD&4"
BEGIN
@@ -985,7 +1086,7 @@
END
END
 
IDR_IDEMENU MENU
IDR_IDEMENU MENU DISCARDABLE
BEGIN
POPUP "IDE #0"
BEGIN
@@ -1005,15 +1106,9 @@
MENUITEM SEPARATOR
MENUITEM "&Eject", IDM_IDE2EJECT
END
POPUP "IDE #3"
BEGIN
MENUITEM "&Open...", IDM_IDE3OPEN
MENUITEM SEPARATOR
MENUITEM "&Eject", IDM_IDE3EJECT
END
END
 
IDR_SASIMENU MENU
IDR_SASIMENU MENU DISCARDABLE
BEGIN
POPUP "SASI #0"
BEGIN
@@ -1029,7 +1124,7 @@
END
END
 
IDR_SCSIMENU MENU
IDR_SCSIMENU MENU DISCARDABLE
BEGIN
POPUP "SCSI #0"
BEGIN
@@ -1057,33 +1152,33 @@
END
END
 
IDR_PXMENU MENU
IDR_PXMENU MENU DISCARDABLE
BEGIN
MENUITEM "Otomi x2", IDM_PX1
MENUITEM "Otomi x2 + 86", IDM_PX2
END
 
IDR_WAVEREC MENU
IDR_WAVEREC MENU DISCARDABLE
BEGIN
MENUITEM "&Wave record", IDM_WAVEREC
END
 
IDR_CPUSAVE16 MENU
IDR_CPUSAVE16 MENU DISCARDABLE
BEGIN
MENUITEM "&i286 save", IDM_CPUSAVE
END
 
IDR_CPUSAVE32 MENU
IDR_CPUSAVE32 MENU DISCARDABLE
BEGIN
MENUITEM "&i386 save", IDM_CPUSAVE
END
 
IDR_CLOSE MENU
IDR_CLOSE MENU DISCARDABLE
BEGIN
MENUITEM "&Close", IDM_CLOSE
END
 
IDR_TOOLWIN MENU
IDR_TOOLWIN MENU DISCARDABLE
BEGIN
POPUP "&Skins"
BEGIN
@@ -1093,7 +1188,7 @@
END
END
 
IDR_KEYDISP MENU
IDR_KEYDISP MENU DISCARDABLE
BEGIN
POPUP "&Module"
BEGIN
@@ -1102,7 +1197,7 @@
END
END
 
IDR_VIEW MENU
IDR_VIEW MENU DISCARDABLE
BEGIN
POPUP "&System"
BEGIN
@@ -1142,7 +1237,7 @@
END
END
 
IDR_TRACE MENU
IDR_TRACE MENU DISCARDABLE
BEGIN
MENUITEM "TRACE", IDM_TRACE_TRACE
MENUITEM "VERBOSE", IDM_TRACE_VERBOSE
@@ -1153,68 +1248,68 @@
MENUITEM SEPARATOR
END
 
 
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
 
NP2BMP BITMAP "..\\nekop2.bmp"
NP2TOOL BITMAP "..\\np2tool.bmp"
NP2BMP BITMAP DISCARDABLE "..\\nekop2.bmp"
NP2TOOL BITMAP DISCARDABLE "..\\np2tool.bmp"
 
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
 
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "..\\np2.ico"
IDI_ICON2 ICON "..\\np2debug.ico"
IDI_ICON1 ICON DISCARDABLE "..\\np2.ico"
IDI_ICON2 ICON DISCARDABLE "..\\np2debug.ico"
 
/////////////////////////////////////////////////////////////////////////////
//
// EXTROM
//
 
SEEKWAV EXTROM "..\\fddseek.wav"
SEEK1WAV EXTROM "..\\fddseek1.wav"
SEEKWAV EXTROM DISCARDABLE "..\\fddseek.wav"
SEEK1WAV EXTROM DISCARDABLE "..\\fddseek1.wav"
 
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_APP_NAME2 "Neko Project II"
IDS_APP_NAME21 "Neko Project 21"
IDS_FILENAME_HELP "np2.chm"
END
 
STRINGTABLE DISCARDABLE
BEGIN
IDS_FONTFACE "‚l‚r ƒSƒVƒbƒN"
IDS_PFONTFACE "‚l‚r ‚oƒSƒVƒbƒN"
IDS_FONTFACE_PRIMARY "‚l‚r ƒSƒVƒbƒN"
IDS_PFONTFACE_PRIMARY "‚l‚r ‚oƒSƒVƒbƒN"
IDS_FONTFACE_SECONDARY "MS Gothic"
IDS_PFONTFACE_SECONDARY "MS PGothic"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_PFONTFACE_SECONDARY "MS PGothic"
IDS_CAPTION_TOOL "NP2 tool"
IDS_CAPTION_KEYDISP "Key display"
IDS_CAPTION_SOFTKEY "Soft keyboard"
IDS_HDD "&Harddisk"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_HDD "&Harddisk"
IDS_SCREENOPTION "Screen option"
IDS_SOUNDOPTION "Sound board option"
IDS_SERIALOPTION "Serial option"
IDS_NETWORKOPTION "Network option"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_CAPTION_FDD1 " FDD1:%s"
IDS_CAPTION_FDD2 " FDD2:%s"
@@ -1223,37 +1318,37 @@
IDS_CAPTION_SEPALATOR " - "
IDS_CAPTION_FRAME "%sFPS"
IDS_CAPTION_CLOCK "%sMHz"
END
 
STRINGTABLE DISCARDABLE
BEGIN
IDS_ERROR_DIRECTDRAW "Couldn't create DirectDraw objects"
IDS_CONFIRM_RESET "Reset?"
IDS_CONFIRM_EXIT "Exit?"
END
 
STRINGTABLE
BEGIN
IDS_CONFIRM_RESUME "Conflict!\n\n%s\nContinue?"
IDS_ERROR_RESUME "Couldn't restart"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_NONCONNECT "N/C"
IDS_1 "1"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_1HALF "1.5"
IDS_2 "2"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_INT0 "INT0"
IDS_INT1 "INT1"
IDS_INT2 "INT2"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_INT41 "INT41"
IDS_INT42 "INT42"
@@ -1262,19 +1357,19 @@
IDS_C8000 "C8000"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_CC000 "CC000"
IDS_D0000 "D0000"
IDS_D4000 "D4000"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_COM1 "COM1"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_COM2 "COM2"
IDS_COM3 "COM3"
@@ -1284,19 +1379,15 @@
IDS_2_5MHZ "2.4576MHz"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_ZOOM_NONE "None"
IDS_ZOOM_FIXEDASPECT "Fixed aspect"
IDS_ZOOM_ADJUSTASPECT "Adjust aspect"
END
 
STRINGTABLE
BEGIN
IDS_ZOOM_FULL "Full"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_0088 "0088"
IDS_0188 "0188"
@@ -1309,22 +1400,14 @@
IDS_4X "4x"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_5X "5x"
IDS_6X "6x"
IDS_7X "7x"
IDS_00D0 "00D0"
IDS_10D0 "10D0"
IDS_20D0 "20D0"
IDS_30D0 "30D0"
IDS_40D0 "40D0"
IDS_50D0 "50D0"
IDS_60D0 "60D0"
IDS_70D0 "70D0"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_PARITY_NONE "None"
IDS_PARITY_ODD "Odd"
@@ -1332,21 +1415,21 @@
IDS_SYNC "Sync"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_ASYNC "Async"
IDS_ASYNC16X "Async 16x"
IDS_ASYNC64X "Async 64x"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_FONTTITLE "Select font file"
IDS_FONTEXT "bmp"
IDS_FONTFILTER "PC-98 BMP font (*.bmp)|*.bmp|Virtual98 font|font.rom|All supported files|*.bmp;pc88.fnt;kanji1.rom;kanji2.rom;font.rom;subsys_c.rom;kanji.rom;fnt0808.x1;fnt0816.x1;fnt1616.x1;cgrom.dat|"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_BMPTITLE "Save as bitmap file"
IDS_BMPEXT "bmp"
@@ -1359,14 +1442,14 @@
IDS_MIMPIFILTER "MIMPI define file(*.def)|*.def|"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_FDDTITLE "Select floppy image"
IDS_FDDEXT "d88"
IDS_FDDFILTER "D88 image files (*.d88;*.d98)|*.d88;*.88d;*.d98;*.98d|Floppy disk images (*.xdf;*.hdm;*.hd4;*.dup;*.2hd;*.img)|*.xdf;*.hdm;*.hd4;*.dup;*.2hd;*.tfd;*.img|All supported files|*.d88;*.88d;*.d98;*.98d;*.fdi;*.xdf;*.hdm;*.hd4;*.dup;*.2hd;*.tfd;*.img|All files (*.*)|*.*|"
IDS_FDDFILTER "D88 image files (*.d88;*.d98)|*.d88;*.88d;*.d98;*.98d|Floppy disk images (*.xdf;*.hdm;*.dup;*.2hd)|*.xdf;*.hdm;*.dup;*.2hd;*.tfd|All supported files|*.d88;*.88d;*.d98;*.98d;*.fdi;*.xdf;*.hdm;*.dup;*.2hd;*.tfd|All files (*.*)|*.*|"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_HDDTITLE "Select HD image"
IDS_HDDEXT "thd"
@@ -1378,7 +1461,7 @@
IDS_ISOFILTER "Cue sheets (*.cue)|*.cue|ISO-9660 image files (*.iso)|*.iso;*.img|All supported files|*.cue;*.iso;*.img|All files (*.*)|*.*|"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_SCSITITLE "Select SCSI image"
IDS_SCSIEXT "hdd"
@@ -1386,7 +1469,7 @@
IDS_NEWDISKTITLE "Create disk image"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_NEWDISKEXT "d88"
IDS_NEWDISKFILTER "D88 image files (*.d88;*.d98)|*.d88;*.88d;*.d98;*.98d|Anex86 harddisk image files (*.hdi)|*.hdi|T98 harddisk image files (*.thd)|*.thd|T98-Next harddisk image files (*.nhd)|*.nhd|Virtual98 harddisk image files (*.hdd)|*.hdd|"
@@ -1396,17 +1479,21 @@
IDS_S98FILTER "S98 log (*.s98)|*.s98|"
END
 
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_WAVETITLE "Save as sound"
IDS_WAVEEXT "wav"
IDS_WAVEFILTER "Wave files (*.wav)|*.wav|"
END
 
STRINGTABLE DISCARDABLE
BEGIN
IDS_SKINTITLE "Select skin file"
IDS_SKINEXT "ini"
IDS_SKINFILTER "ini files (*.ini)|*.ini|text files (*.txt)|*.txt|All files (*.*)|*.*|"
END
 
#endif // “ú–{Œê (“ú–{) resources
#endif // “ú–{Œê resources
/////////////////////////////////////////////////////////////////////////////
 
 
/np21/win9x/np2.cpp
@@ -8,6 +8,7 @@
 
#include "compiler.h"
#include <time.h>
#include <winsock.h>
#ifndef __GNUC__
#include <winnls32.h>
#endif
@@ -56,16 +57,6 @@
#include "dclock.h"
#endif
#include "recvideo.h"
#if defined(SUPPORT_IDEIO)
#include "ideio.h"
#endif
#if defined(SUPPORT_LGY98)
#include "network/net.h"
#include "network/lgy98.h"
#endif
#if defined(SUPPORT_CL_GD5430)
#include "video.h"
#endif
 
#ifdef BETA_RELEASE
#define OPENING_WAIT 1500
@@ -557,16 +548,6 @@
case IDM_IDE2EJECT:
diskdrv_sethdd(0x02, NULL);
break;
case IDM_IDE3OPEN:
winuienter();
dialog_changehdd(hWnd, 0x03);
winuileave();
break;
 
case IDM_IDE3EJECT:
diskdrv_sethdd(0x03, NULL);
break;
#endif
 
#if defined(SUPPORT_SCSI)
@@ -936,12 +917,6 @@
dialog_sndopt(hWnd);
winuileave();
break;
case IDM_NETOPT:
winuienter();
dialog_netopt(hWnd);
winuileave();
break;
 
case IDM_BMPSAVE:
winuienter();
@@ -1416,7 +1391,6 @@
 
case WM_CLOSE:
b = FALSE;
//pccore_shutdown();
if (!np2oscfg.comfirm) {
b = TRUE;
}
@@ -1492,9 +1466,6 @@
#if defined(SUPPORT_DCLOCK)
DispClock::GetInstance()->Update();
#endif
#if defined(SUPPORT_CL_GD5430)
np2vga_drawframe();
#endif
}
 
static void framereset(UINT cnt) {
@@ -1558,12 +1529,12 @@
szClassName[1] = (TCHAR)np2oscfg.winid[1];
szClassName[2] = (TCHAR)np2oscfg.winid[2];
 
/*if ((hWnd = FindWindow(szClassName, NULL)) != NULL) {
if ((hWnd = FindWindow(szClassName, NULL)) != NULL) {
ShowWindow(hWnd, SW_RESTORE);
SetForegroundWindow(hWnd);
dosio_term();
return(FALSE);
}*/
}
 
g_hInstance = loadextinst(hInstance);
g_hPrevInst = hPrevInst;
@@ -1690,15 +1661,6 @@
 
scrndraw_redraw();
 
ideio_init();
#ifdef SUPPORT_LGY98
lgy98_init();
#endif
#ifdef SUPPORT_CL_GD5430
np2vga_init(g_hInstance);
pc98_cirrus_vga_init();
#endif
 
pccore_reset();
 
np2opening = 0;
@@ -1746,7 +1708,7 @@
kdispwin_create(g_hInstance);
}
}
 
sysmng_workclockreset();
sysmng_updatecaption(3);
 
@@ -1829,16 +1791,6 @@
DispatchMessage(&msg);
}
}
#ifdef SUPPORT_CL_GD5430
pc98_cirrus_vga_shutdown();
np2vga_shutdown();
#endif
#ifdef SUPPORT_LGY98
lgy98_shutdown();
#endif
ideio_shutdown();
 
toolwin_destroy();
kdispwin_destroy();
skbdwin_destroy();
/np21/win9x/targetver.h
@@ -9,15 +9,15 @@
// Refer to MSDN for the latest info on corresponding values for different platforms.
 
#ifndef WINVER // Specifies that the minimum required platform is Windows 95.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define WINVER 0x0400 // Change this to the appropriate value to target other versions of Windows.
#endif
 
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows NT 4.0.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target other versions of Windows.
#endif
 
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 95.
#define _WIN32_WINDOWS 0x0501 // Change this to the appropriate value to target Windows 98 or later.
#define _WIN32_WINDOWS 0x0400 // Change this to the appropriate value to target Windows 98 or later.
#endif
 
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 2.0.
/np21/win9x/dosio.cpp
@@ -68,16 +68,9 @@
* @param[in] method ŠJŽn“_
* @return ƒtƒ@ƒCƒ‹‚̈ʒu
*/
FILEPOS DOSIOCALL file_seek(FILEH hFile, FILEPOS pointer, int method)
long DOSIOCALL file_seek(FILEH hFile, long pointer, int method)
{
#ifdef SUPPORT_LARGE_HDD
LARGE_INTEGER li, lires;
li.QuadPart = pointer;
::SetFilePointerEx(hFile, li, &lires, method);
return lires.QuadPart;
#else
return static_cast<long>(::SetFilePointer(hFile, pointer, 0, method));
#endif
}
 
/**
/np21/win9x/resource.h
@@ -1,7 +1,8 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by H:\projects\vcp\xnp2-0.85-new1\win9x\resources\932\np2.rc
// Microsoft Developer Studio generated include file.
// Used by np2.RC
//
#define RESOURCE_VERSION 830
#define IDR_MANIFEST 1
#define IRT_MANIFEST 24
#define IDI_ICON1 101
@@ -29,7 +30,6 @@
#define IDD_SNDPAD1 157
#define IDD_CALENDAR 161
#define IDD_ABOUT 171
#define IDD_LGY98 190
#define IDR_SYS 201
#define IDR_SYSKEYDISP 202
#define IDR_SYSSOFTKBD 203
@@ -53,8 +53,6 @@
#define IDR_KEYDISP 321
#define IDR_VIEW 331
#define IDR_TRACE 341
#define RESOURCE_VERSION 830
#define IDC_EDIT1 1001
#define IDC_BASECLOCK 11101
#define IDC_MULTIPLE 11102
#define IDC_CLOCKMSG 11103
@@ -268,10 +266,6 @@
#define IDC_TOOL_FDD2EJECT 18009
#define IDC_TOOL_RESET 18010
#define IDC_TOOL_POWER 18011
#define IDC_LGY98ENABLED 19001
#define IDC_LGY98IO 19002
#define IDC_LGY98INT 19003
#define IDC_LGY98DEF 19004
#define IDS_APP_NAME2 30001
#define IDS_APP_NAME21 30002
#define IDS_FILENAME_HELP 30003
@@ -288,7 +282,6 @@
#define IDS_SCREENOPTION 30041
#define IDS_SOUNDOPTION 30042
#define IDS_SERIALOPTION 30043
#define IDS_NETWORKOPTION 30044
#define IDS_CAPTION_FDD1 30051
#define IDS_CAPTION_FDD2 30052
#define IDS_CAPTION_FDD3 30053
@@ -342,14 +335,6 @@
#define IDS_5X 30416
#define IDS_6X 30417
#define IDS_7X 30418
#define IDS_00D0 30421
#define IDS_10D0 30422
#define IDS_20D0 30423
#define IDS_30D0 30424
#define IDS_40D0 30425
#define IDS_50D0 30426
#define IDS_60D0 30427
#define IDS_70D0 30428
#define IDS_PARITY_NONE 30501
#define IDS_PARITY_ODD 30502
#define IDS_PARITY_EVEN 30503
@@ -534,7 +519,6 @@
#define IDM_MPUPC98 40673
#define IDM_MIDIPANIC 40674
#define IDM_SNDOPT 40675
#define IDM_NETOPT 40676
#define IDM_BMPSAVE 40701
#define IDM_S98LOGGING 40702
#define IDM_WAVEREC 40703
@@ -593,7 +577,7 @@
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40135
#define _APS_NEXT_CONTROL_VALUE 1002
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
File deleted
\ No newline at end of file
/np21/win9x/x64/x64.props
File deleted
/np21/win9x/x64/cpucore.inc
File deleted
/np21/win9x/x64/iocore.inc
File deleted
/np21/win9x/x64/np2asm.inc
File deleted
\ No newline at end of file
/np21/win9x/x64/x64.targets
File deleted
\ No newline at end of file
/np21/win9x/x64/x64.xml
/np21/win9x/ini.cpp
@@ -467,15 +467,11 @@
 
PFEXT("DIPswtch", PFTYPE_BIN, np2cfg.dipsw, 3),
PFEXT("MEMswtch", PFTYPE_BIN, np2cfg.memsw, 8),
PFMAX("ExMemory", PFTYPE_UINT8, &np2cfg.EXTMEM, 255),
PFMAX("ExMemory", PFTYPE_UINT8, &np2cfg.EXTMEM, 63),
PFVAL("ITF_WORK", PFRO_BOOL, &np2cfg.ITF_WORK),
 
PFSTR("HDD1FILE", PFTYPE_STR, np2cfg.sasihdd[0]),
PFSTR("HDD2FILE", PFTYPE_STR, np2cfg.sasihdd[1]),
#if defined(SUPPORT_IDEIO)
//PFSTR("IDE3FILE", PFTYPE_STR, np2cfg.idecd[0]),
//PFSTR("IDE4FILE", PFTYPE_STR, np2cfg.idecd[1]),
#endif
#if defined(SUPPORT_SCSI)
PFSTR("SCSIHDD0", PFTYPE_STR, np2cfg.scsihdd[0]),
PFSTR("SCSIHDD1", PFTYPE_STR, np2cfg.scsihdd[1]),
@@ -540,13 +536,6 @@
PFEXT("FDDRIVE2", PFRO_BITMAP, &np2cfg.fddequip, 1),
PFEXT("FDDRIVE3", PFRO_BITMAP, &np2cfg.fddequip, 2),
PFEXT("FDDRIVE4", PFRO_BITMAP, &np2cfg.fddequip, 3),
#if defined(SUPPORT_LGY98)
PFVAL("USELGY98", PFTYPE_BOOL, &np2cfg.uselgy98),
PFMAX("LGY98_IO", PFTYPE_UINT16, &np2cfg.lgy98io, 0x10D0),
PFMAX("LGY98IRQ", PFTYPE_UINT8, &np2cfg.lgy98irq, 5),
PFSTR("LGY98TAP", PFTYPE_STR, np2cfg.lgy98tap),
#endif
 
// OSˆË‘¶H
PFVAL("keyboard", PFRO_KB, &np2oscfg.KEYBOARD),
/np21/win9x/compiler.h
@@ -8,12 +8,8 @@
* @date $Date: 2011/03/09 00:22:18 $
*/
 
#pragma once
 
#include "targetver.h"
#define _USE_MATH_DEFINES
#include <winsock2.h>
#pragma comment(lib, "Ws2_32.lib")
#include <windows.h>
#if !defined(__GNUC__)
#include <tchar.h>
@@ -76,8 +72,7 @@
#define sigsetjmp(env, mask) setjmp(env)
#define siglongjmp(env, val) longjmp(env, val)
#endif // !defined(__GNUC__)
//#define msgbox(title, msg) MessageBox(NULL, msg, title, MB_OK)
#define msgbox(title, msg) MessageBoxA(NULL, msg, title, MB_OK)
#define msgbox(title, msg) MessageBox(NULL, msg, title, MB_OK)
 
#define STRCALL __stdcall
 
@@ -90,7 +85,6 @@
#define OEMSTRLEN lstrlen
 
#include "common.h"
#include "memtool.h"
#include "milstr.h"
#include "_memory.h"
#include "rect.h"
@@ -101,8 +95,7 @@
 
#define GETTICK() GetTickCounter()
#if defined(TRACE)
//#define __ASSERT(s) assert(s)
#define __ASSERT(s)
#define __ASSERT(s) assert(s)
#else
#define __ASSERT(s)
#endif
@@ -170,8 +163,8 @@
#define SUPPORT_DCLOCK
#endif
 
//#define SUPPORT_RESUME
//#define SUPPORT_STATSAVE 10
#define SUPPORT_RESUME
#define SUPPORT_STATSAVE 10
#define SUPPORT_ROMEO
 
#define SOUNDRESERVE 20
@@ -181,13 +174,3 @@
#if defined(CPUCORE_IA32)
#pragma warning(disable: 4819)
#endif
 
#if defined(SUPPORT_LARGE_HDD)
typedef INT64 FILEPOS;
typedef INT64 FILELEN;
#define NHD_MAXSIZE 8000
#else
typedef long FILEPOS;
typedef long FILELEN;
#define NHD_MAXSIZE 2000
#endif
/np21/nevent.h
@@ -43,9 +43,8 @@
NEVENT_86PCM = 25,
NEVENT_SASIIO = 26,
NEVENT_SCSIIO = 27,
NEVENT_CDWAIT = 28, // XXX: ŸŽè‚ÉŽg‚Á‚ÄOK?
/* ---- */
NEVENT_MAXEVENTS = 32,
NEVENT_MAXEVENTS = 32
};
typedef enum tagNEventId NEVENTID;
 
/np21/common/arc.c
@@ -24,7 +24,7 @@
return(file_write(((PLAINFILE *)arcfh)->fh, buffer, size));
}
 
static FILEPOS plainfile_seek(ARCFH arcfh, FILEPOS pos, UINT method) {
static long plainfile_seek(ARCFH arcfh, long pos, UINT method) {
 
return(file_seek(((PLAINFILE *)arcfh)->fh, pos, method));
}
@@ -178,7 +178,7 @@
return(0);
}
 
FILEPOS arc_fileseek(ARCFH arcfh, FILEPOS pos, UINT method) {
long arc_fileseek(ARCFH arcfh, long pos, UINT method) {
 
if ((arcfh != NULL) && (arcfh->fileseek != NULL)) {
return((*arcfh->fileseek)(arcfh, pos, method));
/np21/common/arc.h
@@ -42,7 +42,7 @@
ARCH arch;
UINT (*fileread)(ARCFH arcfh, void *buffer, UINT size);
UINT (*filewrite)(ARCFH arcfh, const void *buffer, UINT size);
FILEPOS (*fileseek)(ARCFH arcfh, FILEPOS pos, UINT method);
long (*fileseek)(ARCFH arcfh, long pos, UINT method);
void (*fileclose)(ARCFH arcfh);
};
 
@@ -73,7 +73,7 @@
ARCFH arc_fileopen(ARCH arch, const OEMCHAR *fname);
UINT arc_fileread(ARCFH arcfh, void *buffer, UINT size);
UINT arc_filewrite(ARCFH arcfh, const void *buffer, UINT size);
FILEPOS arc_fileseek(ARCFH arcfh, FILEPOS pos, UINT method);
long arc_fileseek(ARCFH arcfh, long pos, UINT method);
void arc_fileclose(ARCFH arcfh);
 
SINT16 arcex_attr(const OEMCHAR *fname);
/np21/common/textfile.c
@@ -54,7 +54,7 @@
UINT8 xendian;
#endif
_FILEH fh;
FILEPOS fpos;
long fpos;
UINT8 *buf;
UINT bufsize;
UINT bufpos;
@@ -343,7 +343,7 @@
#if defined(SUPPORT_TEXTCNV)
TCINF inf;
#endif
FILEPOS fpos;
long fpos;
UINT8 width;
READFN readfn;
TEXTFILE ret;
@@ -430,7 +430,7 @@
static BRESULT flushfile(TEXTFILE tf) {
 
BRESULT ret;
FILEPOS fpos;
long fpos;
UINT size;
UINT wsize;
 
/np21/common/arcunzip.c
@@ -144,7 +144,7 @@
typedef struct {
_ARCFH arcfh;
FILEH fh;
FILEPOS fposbase;
long fposbase;
UINT pos;
UINT size;
} METHOD0;
@@ -153,7 +153,7 @@
 
METHOD0 *m0;
UINT rsize;
FILEPOS fpos;
long fpos;
 
m0 = (METHOD0 *)arcfh;
rsize = m0->size - m0->pos;
@@ -170,7 +170,7 @@
return(rsize);
}
 
static FILEPOS method0_seek(ARCFH arcfh, FILEPOS pos, UINT method) {
static long method0_seek(ARCFH arcfh, long pos, UINT method) {
 
METHOD0 *m0;
 
@@ -191,7 +191,7 @@
if (pos < 0) {
pos = 0;
}
else if (pos > (FILEPOS)m0->size) {
else if (pos > (long)m0->size) {
pos = m0->size;
}
m0->pos = (UINT)pos;
@@ -204,7 +204,7 @@
_MFREE(arcfh);
}
 
static ARCFH method0_open(ARCH arch, FILEH fh, FILEPOS fpos, const ZIPDAT *zd) {
static ARCFH method0_open(ARCH arch, FILEH fh, long fpos, const ZIPDAT *zd) {
 
UINT size;
METHOD0 *ret;
@@ -237,7 +237,7 @@
typedef struct {
_ARCFH arcfh;
FILEH fh;
FILEPOS fposbase;
long fposbase;
UINT srcsize;
UINT srcpos;
UINT dstsize;
@@ -268,7 +268,7 @@
UINT r;
UINT8 *ptr;
UINT dstrem;
FILEPOS fpos;
long fpos;
 
r = m8->dstsize - m8->dstpos;
size = min(size, r);
@@ -339,7 +339,7 @@
return(method8read(m8, buffer, size));
}
 
static FILEPOS method8_seek(ARCFH arcfh, FILEPOS pos, UINT method) {
static long method8_seek(ARCFH arcfh, long pos, UINT method) {
 
METHOD8 *m8;
 
@@ -377,7 +377,7 @@
_MFREE(arcfh);
}
 
static ARCFH method8_open(ARCH arch, FILEH fh, FILEPOS fpos, const ZIPDAT *zd) {
static ARCFH method8_open(ARCH arch, FILEH fh, long fpos, const ZIPDAT *zd) {
 
METHOD8 *ret;
 
@@ -405,7 +405,7 @@
 
ZIPHDL *hdl;
UINT method;
FILEPOS fpos;
long fpos;
UINT size;
FILEH fh;
ZIPDAT zd;
@@ -563,9 +563,9 @@
 
// ---- unzip open
 
static BRESULT getziphdrpos(FILEH fh, FILEPOS *hdrpos) {
static BRESULT getziphdrpos(FILEH fh, long *hdrpos) {
 
FILEPOS fpos;
long fpos;
UINT bufrem;
UINT8 buf[0x400];
UINT rsize;
@@ -575,7 +575,7 @@
bufrem = 0;
while(fpos > 0) {
rsize = NELEMENTS(buf) - bufrem;
rsize = (UINT)(min(fpos, (FILEPOS)rsize));
rsize = (UINT)(min(fpos, (long)rsize));
fpos -= rsize;
r = bufrem;
while(r) {
@@ -612,10 +612,10 @@
ARCH arcunzip_open(const OEMCHAR *path) {
 
FILEH fh;
FILEPOS fpos;
long fpos;
ZIPHDR hdr;
UINT catsize;
FILEPOS catfpos;
long catfpos;
ZIPHDL *ret;
 
// TRACEOUT(("open file: %s", path));
/np21/pccore.c
@@ -75,15 +75,10 @@
0, {0x17, 0x04, 0x1f}, {0x0c, 0x0c, 0x02, 0x10, 0x3f, 0x3f},
3, 1, 80, 0, 0,
{OEMTEXT(""), OEMTEXT("")},
#if defined(SUPPORT_IDEIO)
{OEMTEXT(""), OEMTEXT("")},
#endif
#if defined(SUPPORT_SCSI)
{OEMTEXT(""), OEMTEXT(""), OEMTEXT(""), OEMTEXT("")},
#endif
OEMTEXT(""), OEMTEXT(""), OEMTEXT(""),
0, 0x10D0, 5, OEMTEXT("TAP1")
};
OEMTEXT(""), OEMTEXT(""), OEMTEXT("")};
 
PCCORE pccore = { PCBASECLOCK25, PCBASEMULTIPLE,
0, PCMODEL_VX, 0, 0, {0x3e, 0x73, 0x7b}, 0,
@@ -150,9 +145,9 @@
{
multiple = 1;
}
else if (multiple > 256)
else if (multiple > 32)
{
multiple = 256;
multiple = 32;
}
pccore.multiple = multiple;
pccore.realclock = pccore.baseclock * multiple;
@@ -163,13 +158,11 @@
pccore.hddif |= PCHDD_IDE;
#if defined(SUPPORT_IDEIO)
sxsi_setdevtype(0x02, SXSIDEV_CDROM);
sxsi_setdevtype(0x03, SXSIDEV_CDROM);
#endif
}
else
{
sxsi_setdevtype(0x02, SXSIDEV_NC);
sxsi_setdevtype(0x03, SXSIDEV_NC);
}
 
// Šg’£ƒƒ‚ƒŠ
@@ -178,7 +171,7 @@
{
extsize = np2cfg.EXTMEM;
#if defined(CPUCORE_IA32)
extsize = min(extsize, 255);
extsize = min(extsize, 63);
#else
extsize = min(extsize, 13);
#endif
@@ -278,7 +271,6 @@
#if defined(SUPPORT_HOSTDRV)
hostdrv_initialize();
#endif
 
}
 
void pccore_term(void) {
@@ -441,7 +433,6 @@
#if 0 && defined(SUPPORT_IDEIO) // Test!
sxsi_devopen(0x02, OEMTEXT("e:\\pn\\pn.iso"));
#endif
}
 
static void drawscreen(void) {
@@ -465,7 +456,7 @@
if (gdcs.textdisp & GDCSCRN_EXT) {
gdc_updateclock();
}
 
if (!pcstat.drawframe) {
return;
}
@@ -646,53 +637,31 @@
nevent_set(NEVENT_FLAMES, gdc.dispclock, screenvsync, NEVENT_RELATIVE);
 
// nevent_get1stevent();
if (!(CPU_TYPE & CPUTYPE_V30)) {
while(pcstat.screendispflag) {
 
while(pcstat.screendispflag) {
#if defined(TRACE)
resetcnt++;
resetcnt++;
#endif
pic_irq();
if (CPU_RESETREQ) {
CPU_RESETREQ = 0;
CPU_SHUT();
}
pic_irq();
if (CPU_RESETREQ) {
CPU_RESETREQ = 0;
CPU_SHUT();
}
#if !defined(SINGLESTEPONLY)
if (CPU_REMCLOCK > 0) {
if (CPU_REMCLOCK > 0) {
if (!(CPU_TYPE & CPUTYPE_V30)) {
CPU_EXEC();
}
#else
while(CPU_REMCLOCK > 0) {
CPU_STEPEXEC();
}
#endif
 
nevent_progress();
}
}
else {
while(pcstat.screendispflag) {
#if defined(TRACE)
resetcnt++;
#endif
pic_irq();
if (CPU_RESETREQ) {
CPU_RESETREQ = 0;
CPU_SHUT();
}
#if !defined(SINGLESTEPONLY)
if (CPU_REMCLOCK > 0) {
else {
CPU_EXECV30();
}
}
#else
while(CPU_REMCLOCK > 0) {
CPU_STEPEXEC();
}
#endif
 
nevent_progress();
while(CPU_REMCLOCK > 0) {
CPU_STEPEXEC();
}
#endif
nevent_progress();
}
artic_callback();
mpu98ii_callback();
/np21/cbus/mpu98ii.c
@@ -939,7 +939,7 @@
 
UINT sent;
 
//TRACEOUT(("mpu98ii out %.4x %.2x", port, dat));
TRACEOUT(("mpu98ii out %.4x %.2x", port, dat));
if (cm_mpu98 == NULL) {
cm_mpu98 = commng_create(COMCREATE_MPU98II);
}
@@ -961,7 +961,7 @@
 
static void IOOUTCALL mpu98ii_o2(UINT port, REG8 dat) {
 
//TRACEOUT(("mpu98ii out %.4x %.2x", port, dat));
TRACEOUT(("mpu98ii out %.4x %.2x", port, dat));
if (cm_mpu98 == NULL) {
cm_mpu98 = commng_create(COMCREATE_MPU98II);
}
@@ -1021,7 +1021,7 @@
}
 
// TRACEOUT(("recv data->%.2x", mpu98.data));
//TRACEOUT(("mpu98ii inp %.4x %.2x", port, mpu98.data));
TRACEOUT(("mpu98ii inp %.4x %.2x", port, mpu98.data));
return(mpu98.data);
}
(void)port;
/np21/cbus/cbuscore.c
@@ -3,21 +3,16 @@
#include "iocore.h"
#include "cbuscore.h"
#include "ideio.h"
#include "network/lgy98.h"
#include "sasiio.h"
#include "scsiio.h"
#include "pc9861k.h"
#include "mpu98ii.h"
#include "video.h"
 
 
static const FNIORESET resetfn[] = {
#if defined(SUPPORT_IDEIO)
ideio_reset,
#endif
#if defined(SUPPORT_LGY98)
lgy98_reset,
#endif
#if defined(SUPPORT_SASI)
sasiio_reset,
#endif
@@ -34,12 +29,6 @@
#if defined(SUPPORT_IDEIO)
ideio_bind,
#endif
#if defined(SUPPORT_LGY98)
lgy98_bind,
#endif
#if defined(SUPPORT_CL_GD5430)
pc98_cirrus_vga_bind,
#endif
#if defined(SUPPORT_SASI)
sasiio_bind,
#endif
/np21/cbus/atapicmd.c
@@ -1,6 +1,10 @@
#include "compiler.h"
#include "win9x/misc/trace.h"
 
#ifdef TRACEOUT
#undef TRACEOUT
#endif
#define TRACEOUT(s) trace_fmt s
 
// ‚±‚êAscsicmd‚Æ‚Ç‚¤“‡‚·‚é‚Ì‚æH
 
#if defined(SUPPORT_IDEIO)
@@ -28,8 +32,8 @@
0x00,0x00,0x00, // Reserved
'N', 'E', 'C', ' ', ' ', ' ', ' ', ' ', // Vendor ID
'C', 'D', '-', 'R', 'O', 'M', ' ', 'D', // Product ID
'R', 'I', 'V', 'E', ':', '9', '8', ' ', // Product ID
'1', '.', '0', ' ' // Product Revision Level
'R', 'I', 'V', 'E', ':', '2', '5', '1', // Product ID
'4', '.', '0', '9' // Product Revision Level
#else
0x05, // CD-ROM
0x80, // bit7: Removable Medium Bit, other: Reserved
@@ -60,7 +64,7 @@
drv->bufsize = size;
 
if (!(drv->ctrl & IDECTRL_NIEN)) {
//TRACEOUT(("atapicmd: senddata()"));
TRACEOUT(("atapicmd: senddata()"));
ideio.bank[0] = ideio.bank[1] | 0x80; // ????
pic_setirq(IDE_IRQ);
}
@@ -76,7 +80,7 @@
drv->asc = ATAPI_ASC_NO_ADDITIONAL_SENSE_INFORMATION;
 
if (!(drv->ctrl & IDECTRL_NIEN)) {
//TRACEOUT(("atapicmd: cmddone()"));
TRACEOUT(("atapicmd: cmddone()"));
ideio.bank[0] = ideio.bank[1] | 0x80; // ????
pic_setirq(IDE_IRQ);
}
@@ -89,7 +93,7 @@
drv->status |= IDESTAT_CHK;
 
if (!(drv->ctrl & IDECTRL_NIEN)) {
//TRACEOUT(("atapicmd: senderror()"));
TRACEOUT(("atapicmd: senderror()"));
ideio.bank[0] = ideio.bank[1] | 0x80; // ????
pic_setirq(IDE_IRQ);
}
@@ -115,7 +119,6 @@
static void atapi_cmd_readtoc(IDEDRV drv);
static void atapi_cmd_playaudiomsf(IDEDRV drv);
static void atapi_cmd_pauseresume(IDEDRV drv);
static void atapi_cmd_mechanismstatus(IDEDRV drv);
 
void atapicmd_a0(IDEDRV drv) {
 
@@ -125,7 +128,7 @@
cmd = drv->buf[0];
switch (cmd) {
case 0x00: // test unit ready
//TRACEOUT(("atapicmd: test unit ready"));
TRACEOUT(("atapicmd: test unit ready"));
if (!(drv->media & IDEIO_MEDIA_LOADED)) {
/* medium not present */
ATAPI_SET_SENSE_KEY(drv, ATAPI_SK_NOT_READY);
@@ -145,7 +148,7 @@
break;
 
case 0x03: // request sense
//TRACEOUT(("atapicmd: request sense"));
TRACEOUT(("atapicmd: request sense"));
leng = drv->buf[4];
ZeroMemory(drv->buf, 18);
drv->buf[0] = 0x70;
@@ -173,12 +176,12 @@
break;
 
case 0x25: // read capacity
//TRACEOUT(("atapicmd: read capacity"));
TRACEOUT(("atapicmd: read capacity"));
atapi_cmd_read_capacity(drv);
break;
 
case 0x28: // read(10)
//TRACEOUT(("atapicmd: read(10)"));
TRACEOUT(("atapicmd: read(10)"));
lba = (drv->buf[2] << 24) + (drv->buf[3] << 16) + (drv->buf[4] << 8) + drv->buf[5];
leng = (drv->buf[7] << 8) + drv->buf[8];
atapi_cmd_read(drv, lba, leng);
@@ -213,20 +216,6 @@
TRACEOUT(("atapicmd: pause resume"));
atapi_cmd_pauseresume(drv);
break;
case 0xbe:
// //ATAPI_SET_SENSE_KEY(drv, ATAPI_SK_ILLEGAL_REQUEST);
// //drv->asc = ATAPI_ASC_INVALID_COMMAND_OPERATION_CODE;
// //senderror(drv);
TRACEOUT(("atapicmd: read cd"));
sendabort(drv);
break;
//
case 0xbd:
TRACEOUT(("atapicmd: mechanism status"));
//atapi_cmd_mechanismstatus(drv);
sendabort(drv);
break;
 
default:
TRACEOUT(("atapicmd: unknown command = %.2x", cmd));
@@ -316,7 +305,7 @@
drv->bufsize = 2048;
 
if (!(drv->ctrl & IDECTRL_NIEN)) {
//TRACEOUT(("atapicmd: senddata()"));
TRACEOUT(("atapicmd: senddata()"));
ideio.bank[0] = ideio.bank[1] | 0x80; // ????
pic_setirq(IDE_IRQ);
}
@@ -721,53 +710,5 @@
cmddone(drv);
}
 
// 0xBD: MECHANISM STATUS
static void atapi_cmd_mechanismstatus(IDEDRV drv) {
 
//const UINT8 *ptr;
//UINT alloclen;
//UINT32 size;
//UINT32 pos = 0;
 
//alloclen = (drv->buf[8] << 8) | (drv->buf[9]);
 
///* Mechanism Status Header */
//ZeroMemory(drv->buf, 8);
//drv->buf[0] = 0;
//drv->buf[1] = (0x0)<<5;
//pos = drv->sn;
//pos |= (drv->cy << 8);
//pos |= (drv->hd << 24);
//drv->buf[2] = (pos >> 16) & 0xff;
//drv->buf[3] = (pos >> 8) & 0xff;
//drv->buf[4] = (pos ) & 0xff;
//drv->buf[5] = 0;
//drv->buf[6] = 0;
//drv->buf[7] = 0;
ATAPI_SET_SENSE_KEY(drv, ATAPI_SK_ILLEGAL_REQUEST);
drv->asc = ATAPI_ASC_INVALID_COMMAND_OPERATION_CODE;
senderror(drv);
//size = min(8, alloclen);
//drv->sc = IDEINTR_IO;
//drv->cy = size;
//drv->status &= ~(IDESTAT_BSY|IDESTAT_DMRD|IDESTAT_SERV|IDESTAT_CHK);
//drv->status |= IDESTAT_DRQ;
//drv->error = 0;
//ATAPI_SET_SENSE_KEY(drv, ATAPI_SK_ILLEGAL_REQUEST);
//drv->asc = ATAPI_ASC_NO_ADDITIONAL_SENSE_INFORMATION;
//drv->bufdir = IDEDIR_IN;
//drv->buftc = IDETC_TRANSFEREND;
//drv->bufpos = 0;
//drv->bufsize = size;
 
//if (!(drv->ctrl & IDECTRL_NIEN)) {
// //TRACEOUT(("atapicmd: senddata()"));
// ideio.bank[0] = ideio.bank[1] | 0x80; // ????
// pic_setirq(IDE_IRQ);
//}
}
 
#endif /* SUPPORT_IDEIO */
 
/np21/cbus/ideio.c
@@ -14,20 +14,10 @@
#include "sound.h"
#include "idebios.res"
 
 
IDEIO ideio;
//#define IDEIO_ASYNC
#ifdef IDEIO_ASYNC
HANDLE hIDEThread[4] = {NULL};
int shutdownflg = 0;
int dataReq[4] = {0};
//int dataWrite[4] = {0};
int dataReady[4] = {0};
//int dataError[4] = {0};
IDEDRV dataDrv[4] = {0};
FILEPOS dataSec[4] = {0};
#endif
 
 
static IDEDEV getidedev(void) {
 
UINT bank;
@@ -56,33 +46,30 @@
return(NULL);
}
 
static const char serial[] = "1.0 ";
static const char firm[] = " ";
static const char model[] = "NEKO IDE HD DRIVE ";
static const char serial[] = "824919341192 ";
static const char firm[] = "A5U.1200";
static const char model[] = "QUANTUM FIREBALL CR ";
 
static const char cdrom_serial[] = "1.0 ";
static const char cdrom_firm[] = " ";
static const char cdrom_model[] = "NEC CD-ROM DRIVE ";
 
static BRESULT setidentify(IDEDRV drv) {
 
SXSIDEV sxsi;
UINT16 tmp[256];
UINT8 *p;
UINT i;
UINT32 size;
IDEDEV dev;
 
sxsi = sxsi_getptr(drv->sxsidrv);
if ((sxsi == NULL) || (!(sxsi->flag & SXSIFLAG_READY) && drv->device != IDETYPE_CDROM)) {
if ((sxsi == NULL) || (!(sxsi->flag & SXSIFLAG_READY))) {
return(FAILURE);
}
 
dev = getidedev();
ZeroMemory(tmp, sizeof(tmp));
// ‚Æ‚è‚ ‚¦‚¸Žg‚Á‚Ä‚é•”•ª‚¾‚¯
if (drv->device == IDETYPE_HDD) {
TRACEOUT(("ideio: setidentify(IDETYPE_HDD) bank=%d drv=%d", (ideio.bank[1] & 0x7f), dev->drivesel));
tmp[0] = 0x0040; // non removable device
tmp[1] = sxsi->cylinders;
tmp[3] = sxsi->surfaces;
@@ -91,10 +78,7 @@
for (i=0; i<10; i++) {
tmp[10+i] = (serial[i*2] << 8) + serial[i*2+1];
}
if((drv->sxsidrv & 0x0f) == 1){
tmp[11]++;
}
tmp[22] = 0;
tmp[22] = 4;
for (i=0; i<4; i++) {
tmp[23+i] = (firm[i*2] << 8) + firm[i*2+1];
}
@@ -103,8 +87,6 @@
}
#if IDEIO_MULTIPLE_MAX > 0
tmp[47] = 0x8000 | IDEIO_MULTIPLE_MAX; // multiple
#else
tmp[47] = 0x8001;
#endif
tmp[49] = 0x0200; // support LBA
tmp[51] = 0x0200;
@@ -117,30 +99,20 @@
tmp[58] = (UINT16)(size >> 16);
#if IDEIO_MULTIPLE_MAX > 0
tmp[59] = 0x0100 | drv->mulmode; // current multiple mode
#else
tmp[59] = 0x0101;
#endif
tmp[60] = (UINT16)size;
tmp[61] = (UINT16)(size >> 16);
tmp[63] = 0x0000; // no support multiword DMA
tmp[63] = 0x0000; // PIOƒ‚[ƒh 3
tmp[65] = 0x0120; // Minimum Multiword DMA transfer cycle time per word
tmp[66] = 0x0120; // Manufacturerfs recommended Multiword DMA transfer cycle time
tmp[67] = 0x0120; // Minimum PIO transfer cycle time without flow control
tmp[68] = 0x0120; // Minimum PIO transfer cycle time with IORDY flow control
 
tmp[80] = 0x0006; // only support ATA-1/2
tmp[81] = 0;
tmp[82] = 0x0200; // support DEVICE RESET
}
else if (drv->device == IDETYPE_CDROM) {
TRACEOUT(("ideio: setidentify(IDETYPE_CDROM) bank=%d drv=%d", (ideio.bank[1] & 0x7f), dev->drivesel));
tmp[0] = 0x8580; // ATAPI,CD-ROM,removable,12bytes PACKET
for (i=0; i<10; i++) {
tmp[10+i] = (cdrom_serial[i*2] << 8) + cdrom_serial[i*2+1];
}
if((drv->sxsidrv & 0x0f) == 1){
tmp[12]++;
}
for (i=0; i<4; i++) {
tmp[23+i] = (cdrom_firm[i*2] << 8) + cdrom_firm[i*2+1];
}
@@ -150,10 +122,6 @@
tmp[49] = 0x0200; // support LBA
tmp[53] = 0x0001;
tmp[63] = 0x0000; // no support multiword DMA
tmp[65] = 0x0120; // Minimum Multiword DMA transfer cycle time per word
tmp[66] = 0x0120; // Manufacturerfs recommended Multiword DMA transfer cycle time
tmp[67] = 0x0120; // Minimum PIO transfer cycle time without flow control
tmp[68] = 0x0120; // Minimum PIO transfer cycle time with IORDY flow control
tmp[80] = 0x000e; // only support ATA-1/2
tmp[82] = 0x0210; // support PACKET/DEVICE RESET
tmp[126] = 0x0000; // ATAPI byte count
@@ -175,7 +143,7 @@
static void setintr(IDEDRV drv) {
 
if (!(drv->ctrl & IDECTRL_NIEN)) {
//TRACEOUT(("ideio: setintr()"));
TRACEOUT(("ideio: setintr()"));
ideio.bank[0] = ideio.bank[1] | 0x80; // ????
pic_setirq(IDE_IRQ);
}
@@ -183,7 +151,7 @@
 
static void cmdabort(IDEDRV drv) {
 
//TRACEOUT(("ideio: cmdabort()"));
TRACEOUT(("ideio: cmdabort()"));
drv->status = IDESTAT_DRDY | IDESTAT_ERR;
drv->error = IDEERR_ABRT;
setintr(drv);
@@ -251,9 +219,9 @@
}
}
 
static FILEPOS getcursec(const IDEDRV drv) {
static long getcursec(const IDEDRV drv) {
 
FILEPOS ret;
long ret;
 
if (!(drv->dr & IDEDEV_LBA)) {
ret = drv->cy;
@@ -270,75 +238,16 @@
return(ret);
}
 
#ifdef IDEIO_ASYNC
static int readsecex(IDEDRV drv) {
DWORD index;
IDEDEV dev;
dev = getidedev();
index = ((ideio.bank[1] & 0x7f)<<1) | dev->drivesel;
if(!dataReq[index]){
incsec(drv);
drv->sc--;
if (drv->sc) {
//dataWrite[index] = 0;
dataDrv[index] = drv;
dataSec[index] = getcursec(drv);
//readsec(drv);
drv->status = IDESTAT_BSY | IDESTAT_DSC | IDESTAT_DRQ;
dataReq[index] = 1;
ResumeThread(hIDEThread[index]);
return 0;
}else{
return 1;
}
/*}else if(dataReady && dataDrv->sxsidrv==drv->sxsidrv){
FILEPOS sec;
 
if (drv->device != IDETYPE_HDD) {
goto read_err;
}
sec = getcursec(drv);
//TRACEOUT(("readsec->drv %d sec %x cnt %d thr %d",
// drv->sxsidrv, sec, drv->mulcnt, drv->multhr));
//if (sxsi_read(drv->sxsidrv, sec, drv->buf, 512)) {
if (dataError) {
TRACEOUT(("read error!"));
goto read_err;
}
dataReq = 0;
dataReady = 0;
drv->bufdir = IDEDIR_IN;
drv->buftc = IDETC_TRANSFEREND;
drv->bufpos = 0;
drv->bufsize = 512;
 
if ((drv->mulcnt & (drv->multhr - 1)) == 0) {
drv->status = IDESTAT_DRDY | IDESTAT_DSC | IDESTAT_DRQ;
drv->error = 0;
setintr(drv);
}
drv->mulcnt++;
return 1;
 
read_err:
cmdabort(drv);*/
}else{
drv->status = IDESTAT_BSY | IDESTAT_DSC | IDESTAT_DRQ;
return 0;
}
}
#endif
 
static void readsec(IDEDRV drv) {
 
FILEPOS sec;
long sec;
 
if (drv->device != IDETYPE_HDD) {
goto read_err;
}
sec = getcursec(drv);
//TRACEOUT(("readsec->drv %d sec %x cnt %d thr %d",
// drv->sxsidrv, sec, drv->mulcnt, drv->multhr));
TRACEOUT(("readsec->drv %d sec %x cnt %d thr %d",
drv->sxsidrv, sec, drv->mulcnt, drv->multhr));
if (sxsi_read(drv->sxsidrv, sec, drv->buf, 512)) {
TRACEOUT(("read error!"));
goto read_err;
@@ -361,24 +270,10 @@
}
 
static void writesec(IDEDRV drv) {
#ifdef IDEIO_ASYNC
DWORD index;
IDEDEV dev;
#endif
 
if (drv->device == IDETYPE_NONE) {
TRACEOUT(("write error!"));
goto write_err;
}
#ifdef IDEIO_ASYNC
dev = getidedev();
index = ((ideio.bank[1] & 0x7f)<<1) | dev->drivesel;
if(dataDrv[index] && dataReq[index]){
drv->status = IDESTAT_BSY | IDESTAT_DSC | IDESTAT_DRQ;
setintr(drv);
return;
}
#endif
 
drv->bufdir = IDEDIR_OUT;
drv->buftc = IDETC_TRANSFEREND;
@@ -400,19 +295,11 @@
// ----
 
static void IOOUTCALL ideio_o430(UINT port, REG8 dat) {
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio setbank%d %.2x [%.4x:%.8x]", (port >> 1) & 1, dat, CPU_CS, CPU_EIP));
}
}
 
TRACEOUT(("ideio setbank%d %.2x [%.4x:%.8x]",
(port >> 1) & 1, dat, CPU_CS, CPU_EIP));
if (!(dat & 0x80)) {
//ideio.bank[(port >> 1) & 1] = dat;
if(!(dat&0xe))ideio.bank[1] = dat;
}else{
TRACEOUT(("ideio dummy%d %.2x [%.4x:%.8x]", (port >> 1) & 1, dat, CPU_CS, CPU_EIP));
ideio.bank[(port >> 1) & 1] = dat;
}
}
 
@@ -423,56 +310,13 @@
 
bank = (port >> 1) & 1;
ret = ideio.bank[bank];
//ideio.bank[bank] = ret & (~0x80);
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio getbank%d %.2x [%.4x:%.8x]", (port >> 1) & 1, (ideio.bank[1] & 0x1), CPU_CS, CPU_EIP));
}
}
//return(ret & 0x81);
return(ideio.bank[1] & 0x1);
ideio.bank[bank] = ret & (~0x80);
TRACEOUT(("ideio getbank%d %.2x [%.4x:%.8x]",
(port >> 1) & 1, ret, CPU_CS, CPU_EIP));
return(ret & 0x81);
}
 
static void IOOUTCALL ideio_o432(UINT port, REG8 dat) {
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio setbank%d %.2x [%.4x:%.8x]", (port >> 1) & 1, dat, CPU_CS, CPU_EIP));
}
}
if (!(dat & 0x80)) {
//ideio.bank[(port >> 1) & 1] = dat;
if(!(dat&0xe))ideio.bank[1] = dat;
}else{
TRACEOUT(("ideio dummy%d %.2x [%.4x:%.8x]", (port >> 1) & 1, dat, CPU_CS, CPU_EIP));
}
}
 
static REG8 IOINPCALL ideio_i432(UINT port) {
 
UINT bank;
REG8 ret;
 
bank = (port >> 1) & 1;
ret = ideio.bank[bank];
//ideio.bank[bank] = ret & (~0x80);
////TRACEOUT(("ideio getbank%d %.2x [%.4x:%.8x]", (port >> 1) & 1, ret, CPU_CS, CPU_EIP));
//return(ret & 0x81);
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio getbank%d %.2x [%.4x:%.8x]", (port >> 1) & 1, ret, CPU_CS, CPU_EIP));
}
}
return(ideio.bank[1] & 0x1);
}
 
 
// ----
 
static void IOOUTCALL ideio_o642(UINT port, REG8 dat) {
@@ -482,13 +326,7 @@
drv = getidedrv();
if (drv) {
drv->wp = dat;
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio set WP %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio set WP %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
(void)port;
}
@@ -501,13 +339,7 @@
drv = getidedrv();
if (drv) {
drv->sc = dat;
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio set SC %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio set SC %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
(void)port;
}
@@ -519,13 +351,7 @@
drv = getidedrv();
if (drv) {
drv->sn = dat;
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio set SN %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio set SN %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
(void)port;
}
@@ -538,14 +364,7 @@
if (drv) {
drv->cy &= 0xff00;
drv->cy |= dat;
//TRACEOUT(("ideio set CYL %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio set CYH %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio set CYL %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
(void)port;
}
@@ -558,13 +377,7 @@
if (drv) {
drv->cy &= 0x00ff;
drv->cy |= dat << 8;
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio set CYH %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio set CYH %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
(void)port;
}
@@ -580,26 +393,14 @@
}
#if defined(TRACE)
if ((dat & 0xf0) != 0xa0) {
//TRACEOUT(("ideio set SDH illegal param? (%.2x)", dat));
TRACEOUT(("ideio set SDH illegal param? (%.2x)", dat));
}
#endif
drvnum = (dat >> 4) & 1; // ??? 98‚Å‚ÍŽg‚í‚È‚¢H
if(dev->drivesel!=drvnum){
if(drvnum==1 && (ideio.bank[1] & 0x7f)==0) TRACEOUT(("ideio set DRVNUM %d [%.4x:%.8x]", drvnum, CPU_CS, CPU_EIP));
dev->drivesel = drvnum;
dev->drv[drvnum].error = 0x01;
//setintr(&(dev->drv[0]));
//setintr(&(dev->drv[1]));
dev->drv[drvnum].status = IDESTAT_DRDY | IDESTAT_DSC;
dev->drv[drvnum].error = 0;
dev->drv[drvnum].dr = dat & 0xf0;//(drvnum==1 ? 0x90 : dat & 0xf0);
dev->drv[drvnum].hd = dat & 0x0f;//(drvnum==1 ? 0x01 : dat & 0x0f);
//pic_setirq(IDE_IRQ);
}else{
dev->drv[drvnum].dr = dat & 0xf0;
dev->drv[drvnum].hd = dat & 0x0f;
}
//TRACEOUT(("ideio set DRHD %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
drvnum = (dat >> 4) & 1;
dev->drivesel = drvnum;
dev->drv[drvnum].dr = dat & 0xf0;
dev->drv[drvnum].hd = dat & 0x0f;
TRACEOUT(("ideio set DRHD %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
(void)port;
}
 
@@ -608,21 +409,11 @@
IDEDRV drv, d;
IDEDEV dev;
int i;
#ifdef IDEIO_ASYNC
DWORD index;
#endif
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio set cmd %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
}
}
 
// execute device diagnostic
if (dat == 0x90) {
TRACEOUT(("ideio set cmd %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
//TRACEOUT(("ideio: execute device diagnostic"));
TRACEOUT(("ideio: execute device diagnostic"));
dev = getidedev();
if (dev) {
for (i = 0; i < 2; i++) {
@@ -647,37 +438,26 @@
return;
}
drv->cmd = dat;
//TRACEOUT(("ideio set cmd %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
TRACEOUT(("ideio set cmd %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
switch(dat) {
case 0x08: // device reset
if (drv->device == IDETYPE_HDD) {
cmdabort(drv);
}else{
TRACEOUT(("ideio: device reset dev=%d", drv->device));
drvreset(drv);
drv->error = 0x01;
dev = getidedev();
if (dev) {
if (dev->drv[dev->drivesel].device == IDETYPE_NONE) {
drv->error = 0x00;
TRACEOUT(("ideio: device reset"));
drvreset(drv);
drv->error = 0x01;
dev = getidedev();
if (dev) {
if (dev->drv[dev->drivesel].device == IDETYPE_NONE) {
drv->error = 0x00;
}
if (dev->drivesel == 0) {
if (dev->drv[1].device == IDETYPE_NONE) {
drv->error |= 0x80;
}
if (dev->drivesel == 0) {
if (dev->drv[1].device == IDETYPE_NONE) {
drv->error |= 0x80;
}
}
}
#ifdef IDEIO_ASYNC
//if(dataDrv[index] && drv->sxsidrv==dataDrv[index]->sxsidrv){
index = ((ideio.bank[1] & 0x7f)<<1) | dev->drivesel;
dataReady[index] = 0;
dataReq[index] = 0;
//}
#endif
 
}
setintr(drv);
break;
 
case 0x10: case 0x11: case 0x12: case 0x13: // recalibrate
case 0x14: case 0x15: case 0x16: case 0x17:
case 0x18: case 0x19: case 0x1a: case 0x1b:
@@ -704,28 +484,26 @@
 
case 0x20: // read (with retry)
case 0x21: // read
//TRACEOUT(("ideio: read sector dr = %.2x", drv->dr));
TRACEOUT(("ideio: read sector"));
if (drv->device == IDETYPE_HDD) {
drv->mulcnt = 0;
drv->multhr = 1;
readsec(drv);
}
else {
TRACEOUT((" --> CDROM"));
cmdabort(drv);
}
break;
 
case 0x30: // write (with retry)
case 0x31: // write
//TRACEOUT(("ideio: write sector dr = %.2x", drv->dr));
TRACEOUT(("ideio: write sector"));
if (drv->device == IDETYPE_HDD) {
drv->mulcnt = 0;
drv->multhr = 1;
writesec(drv);
}
else {
TRACEOUT((" --> CDROM"));
cmdabort(drv);
}
break;
@@ -746,7 +524,7 @@
break;
 
case 0xa0: // send packet
//TRACEOUT(("ideio: packet"));
TRACEOUT(("ideio: packet"));
if (drv->device == IDETYPE_CDROM) {
drv->sc &= ~(IDEINTR_REL | IDEINTR_IO);
drv->sc |= IDEINTR_CD;
@@ -761,21 +539,9 @@
}
cmdabort(drv);
break;
case 0xec: // identify device
TRACEOUT(("ideio: identify device"));
if (drv->device == IDETYPE_HDD && setidentify(drv) == SUCCESS) {
drv->status = IDESTAT_DRDY | IDESTAT_DSC | IDESTAT_DRQ;
drv->error = 0;
setintr(drv);
}
else {
cmdabort(drv);
}
break;
 
case 0xa1: // identify packet device
TRACEOUT(("ideio: identify packet device dev=%d", drv->device));
TRACEOUT(("ideio: identify packet device"));
if (drv->device == IDETYPE_CDROM && setidentify(drv) == SUCCESS) {
drv->status = IDESTAT_DRDY | IDESTAT_DSC | IDESTAT_DRQ;
drv->error = 0;
@@ -837,37 +603,29 @@
break;
 
case 0xe7: // flush cache
//TRACEOUT(("ideio: flush cache dev=%d", drv->device));
TRACEOUT(("ideio: flush cache"));
drv->status = IDESTAT_DRDY;
drv->error = 0;
setintr(drv);
break;
 
case 0xe0: // STANDBY IMMEDIATE
TRACEOUT(("ideio: STANDBY IMMEDIATE dr = %.2x", drv->dr));
//cmdabort(drv);
case 0xec: // identify device
TRACEOUT(("ideio: identify device"));
if (drv->device == IDETYPE_HDD && setidentify(drv) == SUCCESS) {
drv->status = IDESTAT_DRDY | IDESTAT_DSC | IDESTAT_DRQ;
drv->error = 0;
setintr(drv);
}
else {
cmdabort(drv);
}
break;
case 0xe1: // idle immediate
TRACEOUT(("ideio: idle immediate dr = %.2x", drv->dr));
//cmdabort(drv);
break;
case 0xde: // media lock
TRACEOUT(("ideio: media lock dev=%d", drv->device));
//cmdabort(drv);
break;
 
case 0xdf: // media unlock
TRACEOUT(("ideio: media unlock dev=%d", drv->device));
//cmdabort(drv);
break;
 
case 0xef: // set features
TRACEOUT(("ideio: set features reg = %.2x", drv->wp));
cmdabort(drv);
break;
 
default:
panic("ideio: unknown command %.2x", dat);
break;
@@ -907,77 +665,36 @@
}
}
}
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio interrupt %sable", (dat & IDECTRL_NIEN) ? "dis" : "en"));
}
}
//TRACEOUT(("ideio interrupt %sable", (dat & IDECTRL_NIEN) ? "dis" : "en"));
//TRACEOUT(("ideio devctrl %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
TRACEOUT(("ideio interrupt %sable", (dat & IDECTRL_NIEN) ? "dis" : "en"));
TRACEOUT(("ideio devctrl %.2x [%.4x:%.8x]", dat, CPU_CS, CPU_EIP));
(void)port;
}
 
static void IOOUTCALL ideio_o74e(UINT port, REG8 dat) {
IDEDEV dev;
REG8 ret = 0;
int drvnum;
dev = getidedev();
if (dev == NULL) {
return;
}
drvnum = (dev->drivesel & 0x1);
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio %.4x,%.2x [%.4x:%.8x]", port, dat, CPU_CS, CPU_EIP));
}
}
 
TRACEOUT(("ideio %.4x,%.2x [%.4x:%.8x]", port, dat, CPU_CS, CPU_EIP));
(void)port;
(void)dat;
}
static REG8 IOINPCALL ideio_i74e(UINT port) {
IDEDEV dev;
REG8 ret = 0;
int drvnum;
dev = getidedev();
if (dev == NULL) {
return 0;
}
drvnum = (dev->drivesel & 0x1);
ret |= (1 << (drvnum ^ 0x1));
ret |= (~dev->drv[drvnum].hd) << 2;
ret |= 0x40;
return ret;
}
 
 
// ----
 
static REG8 IOINPCALL ideio_i642(UINT port) {
IDEDEV dev;
 
IDEDRV drv;
 
(void)port;
dev = getidedev();
 
drv = getidedrv();
if (drv) {
drv->status &= ~IDESTAT_ERR;
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio get error %.2x [%.4x:%.8x]", drv->error, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio get error %.2x [%.4x:%.8x]",
drv->error, CPU_CS, CPU_EIP));
return(drv->error);
}
else {
return(0x00);
return(0xff);
}
}
 
@@ -989,17 +706,11 @@
 
drv = getidedrv();
if (drv) {
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio get SC %.2x [%.4x:%.8x]", drv->sc, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio get SC %.2x [%.4x:%.8x]", drv->sc, CPU_CS, CPU_EIP));
return(drv->sc);
}
else {
return(0x00);
return(0xff);
}
}
 
@@ -1011,17 +722,11 @@
 
drv = getidedrv();
if (drv) {
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio get SN %.2x [%.4x:%.8x]", drv->sn, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio get SN %.2x [%.4x:%.8x]", drv->sn, CPU_CS, CPU_EIP));
return(drv->sn);
}
else {
return(0x00);
return(0xff);
}
}
 
@@ -1030,20 +735,14 @@
IDEDRV drv;
 
(void)port;
 
drv = getidedrv();
if (drv) {
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio get CYL %.4x [%.4x:%.8x]", drv->cy, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio get CYL %.4x [%.4x:%.8x]", drv->cy, CPU_CS, CPU_EIP));
return((UINT8)drv->cy);
}
else {
return(0x00);
return(0xff);
}
}
 
@@ -1055,70 +754,50 @@
 
drv = getidedrv();
if (drv) {
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio get CYH %.4x [%.4x:%.8x]", drv->cy, CPU_CS, CPU_EIP));
}
}
TRACEOUT(("ideio get CYH %.4x [%.4x:%.8x]", drv->cy, CPU_CS, CPU_EIP));
return((REG8)(drv->cy >> 8));
}
else {
return(0x00);
return(0xff);
}
}
 
static REG8 IOINPCALL ideio_i64c(UINT port) {
 
IDEDRV drv;
REG8 ret;
 
(void)port;
 
drv = getidedrv();
if (drv) {
ret = drv->dr | drv->hd;// | drv->slave;
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio get DRHD %.2x [%.4x:%.8x]", ret, CPU_CS, CPU_EIP));
}
}
ret = drv->dr | drv->hd;
TRACEOUT(("ideio get DRHD %.2x [%.4x:%.8x]", ret, CPU_CS, CPU_EIP));
return(ret);
}
else {
//TRACEOUT(("ideio get DRHD ERR [%.4x:%.8x]", CPU_CS, CPU_EIP));
return(0x00);
return(0xff);
}
}
 
static REG8 IOINPCALL ideio_i64e(UINT port) {
IDEDEV dev;
 
IDEDRV drv;
 
(void)port;
dev = getidedev();
 
drv = getidedrv();
if (drv) {
//if(drv->device==IDETYPE_CDROM && drv->status!=0x40 && drv->status!=0x48){
{
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio status %.2x [%.4x:%.8x]", drv->status, CPU_CS, CPU_EIP));
}
}
//
//}
TRACEOUT(("ideio status %.2x [%.4x:%.8x]",
drv->status, CPU_CS, CPU_EIP));
if (!(drv->ctrl & IDECTRL_NIEN)) {
//TRACEOUT(("ideio: resetirq"));
TRACEOUT(("ideio: resetirq"));
pic_resetirq(IDE_IRQ);
}
return(drv->status);
}
else {
return(0x00);
return(0xff);
}
}
 
@@ -1130,20 +809,12 @@
 
drv = getidedrv();
if (drv) {
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ideio alt status %.2x [%.4x:%.8x]", drv->status, CPU_CS, CPU_EIP));
}
}
//if(drv->device==IDETYPE_CDROM){
//TRACEOUT(("ideio alt status %.2x [%.4x:%.8x]", drv->status, CPU_CS, CPU_EIP));
//}
TRACEOUT(("ideio alt status %.2x [%.4x:%.8x]",
drv->status, CPU_CS, CPU_EIP));
return(drv->status);
}
else {
return(0x00);
return(0xff);
}
}
 
@@ -1154,22 +825,16 @@
 
IDEDRV drv;
UINT8 *p;
FILEPOS sec;
long sec;
 
drv = getidedrv();
if ((drv != NULL) &&
(drv->status & IDESTAT_DRQ) && (drv->bufdir == IDEDIR_OUT)) {
p = drv->buf + drv->bufpos;
p[0] = (UINT8)value;
p[1] = (UINT8)(value >> 8);
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ide-data send %.4x (%.4x) [%.4x:%.8x]", value, drv->bufpos, CPU_CS, CPU_EIP));
}
}
//TRACEOUT(("ide-data send %.4x (%.4x) [%.4x:%.8x]",
// value, drv->bufpos, CPU_CS, CPU_EIP));
TRACEOUT(("ide-data send %.4x (%.4x) [%.4x:%.8x]",
value, drv->bufpos, CPU_CS, CPU_EIP));
drv->bufpos += 2;
if (drv->bufpos >= drv->bufsize) {
drv->status &= ~IDESTAT_DRQ;
@@ -1178,8 +843,8 @@
case 0x31:
case 0xc5:
sec = getcursec(drv);
//TRACEOUT(("writesec->drv %d sec %x cnt %d thr %d",
// drv->sxsidrv, sec, drv->mulcnt, drv->multhr));
TRACEOUT(("writesec->drv %d sec %x cnt %d thr %d",
drv->sxsidrv, sec, drv->mulcnt, drv->multhr));
if (sxsi_write(drv->sxsidrv, sec, drv->buf, drv->bufsize)) {
TRACEOUT(("write error!"));
cmdabort(drv);
@@ -1190,15 +855,11 @@
drv->sc--;
if (drv->sc) {
writesec(drv);
}else{
//TRACEOUT(("ide-data send finished."));
//pic_setirq(IDE_IRQ);
setintr(drv);
}
break;
 
case 0xa0:
//TRACEOUT(("ideio: execute atapi packet command"));
TRACEOUT(("ideio: execute atapi packet command"));
atapicmd_a0(drv);
break;
}
@@ -1206,6 +867,7 @@
}
(void)port;
}
 
REG16 IOINPCALL ideio_r16(UINT port) {
 
IDEDRV drv;
@@ -1222,44 +884,23 @@
if ((drv->status & IDESTAT_DRQ) && (drv->bufdir == IDEDIR_IN)) {
p = drv->buf + drv->bufpos;
ret = p[0] + (p[1] << 8);
{
IDEDEV dev;
dev = getidedev();
if(dev->drivesel==1 && (ideio.bank[1] & 0x7f)==0){
TRACEOUT(("ide-data recv %.4x (%.4x) [%.4x:%.8x]", ret, drv->bufpos, CPU_CS, CPU_EIP));
}
}
//if(rcvflg!=1){
// TRACEOUT(("ide-data recv %.4x (%.4x) [%.4x:%.8x]",
// ret, drv->bufpos, CPU_CS, CPU_EIP));
// rcvflg = 1;
//}
if (drv->bufpos+2 >= drv->bufsize) {
TRACEOUT(("ide-data recv %.4x (%.4x) [%.4x:%.8x]",
ret, drv->bufpos, CPU_CS, CPU_EIP));
drv->bufpos += 2;
if (drv->bufpos >= drv->bufsize) {
drv->status &= ~IDESTAT_DRQ;
switch(drv->cmd) {
case 0x20:
case 0x21:
case 0xc4:
#ifdef IDEIO_ASYNC
drv->bufpos += 2;
if(readsecex(drv)){
drv->status &= ~IDESTAT_DRQ;
}else{
drv->bufpos -= 2;
}
#else
drv->status &= ~IDESTAT_DRQ;
drv->bufpos += 2;
incsec(drv);
drv->sc--;
if (drv->sc) {
readsec(drv);
}
#endif
break;
 
case 0xa0:
drv->status &= ~IDESTAT_DRQ;
drv->bufpos += 2;
if (drv->buftc == IDETC_ATAPIREAD) {
atapi_dataread(drv);
break;
@@ -1270,37 +911,13 @@
drv->error = 0;
setintr(drv);
break;
default:
drv->bufpos += 2;
drv->status &= ~IDESTAT_DRQ;
break;
}
}else{
drv->bufpos += 2;
}
}
return(ret);
}
 
static void IOOUTCALL ideio_o435(UINT port, REG8 dat) {
//TRACEOUT(("out435 dat=%02X - %.4x %.4x", dat, CPU_CS, CPU_IP));
}
 
static REG8 IOINPCALL ideio_i435(UINT port) {
//TRACEOUT(("in435 - %.4x %.4x", CPU_CS, CPU_IP));
return(0x02);
}
 
static void IOOUTCALL ideio_o433(UINT port, REG8 dat) {
//TRACEOUT(("out433 dat=%02X - %.4x %.4x", dat, CPU_CS, CPU_IP));
}
 
static REG8 IOINPCALL ideio_i433(UINT port) {
//TRACEOUT(("in433 - %.4x %.4x", CPU_CS, CPU_IP));
return(0x00);
}
 
 
// ----
 
#if 1
@@ -1375,12 +992,6 @@
static void devinit(IDEDRV drv, REG8 sxsidrv) {
 
SXSIDEV sxsi;
#ifdef IDEIO_ASYNC
DWORD index;
IDEDEV dev;
dev = getidedev();
index = ((ideio.bank[1] & 0x7f)<<1) | dev->drivesel;
#endif
 
ZeroMemory(drv, sizeof(_IDEDRV));
drv->sxsidrv = sxsidrv;
@@ -1409,12 +1020,6 @@
drv->error = IDEERR_TR0;
drv->device = IDETYPE_NONE;
}
#ifdef IDEIO_ASYNC
if(dataDrv[index]){
dataReady[index] = 0;
dataReq[index] = 0;
}
#endif
}
 
void ideio_reset(const NP2CFG *pConfig) {
@@ -1441,11 +1046,10 @@
sound_streamregist(NULL, (SOUNDCB)playaudio);
#endif
iocore_attachout(0x0430, ideio_o430);
iocore_attachout(0x0432, ideio_o432);
iocore_attachout(0x0432, ideio_o430);
iocore_attachinp(0x0430, ideio_i430);
iocore_attachinp(0x0432, ideio_i432);
//iocore_attachout(0x0640, ideio_o640); --> ideio_w16
iocore_attachinp(0x0432, ideio_i430);
 
iocore_attachout(0x0642, ideio_o642);
iocore_attachout(0x0644, ideio_o644);
iocore_attachout(0x0646, ideio_o646);
@@ -1453,7 +1057,6 @@
iocore_attachout(0x064a, ideio_o64a);
iocore_attachout(0x064c, ideio_o64c);
iocore_attachout(0x064e, ideio_o64e);
//iocore_attachinp(0x0640, ideio_i640); --> ideio_r16
iocore_attachinp(0x0642, ideio_i642);
iocore_attachinp(0x0644, ideio_i644);
iocore_attachinp(0x0646, ideio_i646);
@@ -1465,13 +1068,6 @@
iocore_attachout(0x074c, ideio_o74c);
iocore_attachout(0x074e, ideio_o74e);
iocore_attachinp(0x074c, ideio_i74c);
iocore_attachinp(0x074e, ideio_i74e);
// “äƒ|[ƒg
iocore_attachinp(0x0433, ideio_i433);
iocore_attachout(0x0433, ideio_o433);
iocore_attachinp(0x0435, ideio_i435);
iocore_attachout(0x0435, ideio_o435);
}
}
 
@@ -1504,9 +1100,6 @@
drv->media |= IDEIO_MEDIA_DATA;
if (sxsi->mediatype & SXSIMEDIA_AUDIO)
drv->media |= IDEIO_MEDIA_AUDIO;
//drv->error = 0x20;
//drv->status = 0x01;
//setintr(drv);
break;
 
case 0:
@@ -1515,64 +1108,5 @@
}
}
 
#ifdef IDEIO_ASYNC
DWORD WINAPI IDEThreadFunc(LPVOID vdParam) {
int index = *(DWORD*)(vdParam);
while(!shutdownflg){
if(dataReq[index]){
if (sxsi_read(dataDrv[index]->sxsidrv, dataSec[index], dataDrv[index]->buf, 512)) {
cmdabort(dataDrv[index]);
dataReq[index] = 0;
SuspendThread(hIDEThread[index]);
}else{
if(!dataReq[index]) {
}else{
dataDrv[index]->bufdir = IDEDIR_IN;
dataDrv[index]->buftc = IDETC_TRANSFEREND;
dataDrv[index]->bufpos = 0;
dataDrv[index]->bufsize = 512;
 
if ((dataDrv[index]->mulcnt & (dataDrv[index]->multhr - 1)) == 0) {
dataDrv[index]->status = IDESTAT_DRDY | IDESTAT_DSC | IDESTAT_DRQ;
dataDrv[index]->error = 0;
dataReady[index] = 0;
dataReq[index] = 0;
dataDrv[index]->mulcnt++;
setintr(dataDrv[index]);
SuspendThread(hIDEThread[index]);
}else{
dataDrv[index]->mulcnt++;
}
}
}
}else{
SuspendThread(hIDEThread[index]);
}
}
return 0;
}
#endif
 
void ideio_init(){
#ifdef IDEIO_ASYNC
DWORD dwID;
DWORD dwIDs[] = {0, 1, 2, 3};
shutdownflg = 0;
hIDEThread[0] = CreateThread(NULL , 0 , IDEThreadFunc , (LPVOID)(&dwIDs[0]) , 0 , &dwID);
hIDEThread[1] = CreateThread(NULL , 0 , IDEThreadFunc , (LPVOID)(&dwIDs[1]) , 0 , &dwID);
hIDEThread[2] = CreateThread(NULL , 0 , IDEThreadFunc , (LPVOID)(&dwIDs[2]) , 0 , &dwID);
hIDEThread[3] = CreateThread(NULL , 0 , IDEThreadFunc , (LPVOID)(&dwIDs[3]) , 0 , &dwID);
#endif
}
void ideio_shutdown(){
#ifdef IDEIO_ASYNC
shutdownflg = 1;
hIDEThread[0] = NULL;
hIDEThread[1] = NULL;
hIDEThread[2] = NULL;
hIDEThread[3] = NULL;
#endif
}
 
#endif /* SUPPORT_IDEIO */
 
/np21/cbus/ideio.h
@@ -177,9 +177,6 @@
void ideio_bind(void);
void ideio_notify(REG8 sxsidrv, UINT action);
 
void ideio_init();
void ideio_shutdown();
 
#ifdef __cplusplus
}
#endif
/np21/i386c/cpumem.c
@@ -15,44 +15,43 @@
#include "memepp.h"
#include "vram.h"
#include "font/font.h"
#if defined(SUPPORT_CL_GD5430)
#include "video.h"
#endif
 
 
UINT8 mem[0x200000];
 
 
typedef void (MEMCALL * MEM8WRITE )(UINT32 address, REG8 value );
typedef REG8 (MEMCALL * MEM8READ )(UINT32 address);
typedef void (MEMCALL * MEM16WRITE)(UINT32 address, REG16 value);
typedef REG16 (MEMCALL * MEM16READ )(UINT32 address);
typedef void (MEMCALL * MEM8WRITE)(UINT32 address, REG8 value);
typedef REG8 (MEMCALL * MEM8READ)(UINT32 address);
typedef void (MEMCALL * MEM16WRITE)(UINT32 address, REG16 value);
typedef REG16 (MEMCALL * MEM16READ)(UINT32 address);
 
 
// ---- MAIN
 
static REG8 MEMCALL memmain_rd8(UINT32 address) {
 
return(mem[address]);
}
 
static REG16 MEMCALL memmain_rd16(UINT32 address) {
 
//const UINT8 *ptr;
const UINT8 *ptr;
 
//ptr = mem + address;
return(LOADINTELWORD(mem + address));
ptr = mem + address;
return(LOADINTELWORD(ptr));
}
 
static void MEMCALL memmain_wr8(UINT32 address, REG8 value) {
 
*(mem+address) = (UINT8)value;
mem[address] = (UINT8)value;
}
 
static void MEMCALL memmain_wr16(UINT32 address, REG16 value) {
 
//UINT8 *ptr;
UINT8 *ptr;
 
//ptr = mem + address;
STOREINTELWORD(mem + address, value);
ptr = mem + address;
STOREINTELWORD(ptr, value);
}
 
 
@@ -269,25 +268,25 @@
 
static REG8 MEMCALL memsys_rd8(UINT32 address) {
 
address ^= 0xf00000;
address -= 0xf00000;
return(memfn0.rd8[address >> 15](address));
}
 
static REG16 MEMCALL memsys_rd16(UINT32 address) {
address ^= 0xf00000;
 
address -= 0xf00000;
return(memfn0.rd16[address >> 15](address));
}
 
static void MEMCALL memsys_wr8(UINT32 address, REG8 value) {
address ^= 0xf00000;
 
address -= 0xf00000;
memfn0.wr8[address >> 15](address, value);
}
 
static void MEMCALL memsys_wr16(UINT32 address, REG16 value) {
 
address ^= 0xf00000;
address -= 0xf00000;
memfn0.wr16[address >> 15](address, value);
}
 
@@ -315,75 +314,13 @@
memnc_wr16, memsys_wr16, memsys_wr16, memsys_wr16}};
#endif
 
int dispskip = 0;
 
// ----
//int p05bacounter = 0;
 
REG8 MEMCALL memp_read8(UINT32 address) {
#if defined(SUPPORT_CL_GD5430)
if(cirrusvga_opaque && (UINT32)0xF0000000 <= address && address <= (UINT32)0xF00FFFFF){
if(address <= (UINT32)0xF0000FFF){
return cirrus_vga_mem_readb(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0001FFF){
return cirrus_linear_readb(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0002FFF){
return cirrus_linear_bitblt_readb(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0003FFF){
return cirrus_mmio_readb(cirrusvga_opaque, address);
}
if(!(dispskip = (dispskip+1)%0x1000))TRACEOUT(("MMIOR WINDOW : %02X", address));
}
if(cirrusvga_opaque && (UINT32)0xF00000 <= address && address <= (UINT32)0xFFFFFF){
TRACEOUT(("VRAM WINDOW : %02X", address));
}
#endif
 
if (address < I286_MEMREADMAX) {
REG8 ret = mem[address];
if(0x400 <= address && address <= 0x5ff){
//if(address!=0x058a) TRACEOUT(("BDA read %04X : %02X", address, ret));
if(address==0x0481)
//TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, 0x48|ret));
return 0x40|ret;
/*if(address==0x05ba){
if(p05bacounter==0) {
TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, 0x03));
return 0xff;
}else{
p05bacounter--;
}
}*/
/*if(address==0x0480){
TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, ret&~0x80));
return ret&~0x80;
}*/
/*if(address==0x055D){
TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, 0x33));
return 0x03;
}
if(address==0x045D){
TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, 0x18));
return 0x18;
}
if(address==0x045E) {
TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, 0x60));
return 0x60;
}
if(address==0x045A) {
TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, 0xb4));
return 0xb4;
}
if(address==0x0484) {
TRACEOUT(("BDA read %04X : %02X -> %02X", address, ret, 0xfe));
return 0xfe;
}*/
/*if(address==0x055d) {
TRACEOUT(("BDA read %04X : %02X", address, ret));
if(CPU_STAT_PM) return 0x0f;
}*/
//if(address==0x055d)
// return 0x03;
}
return(ret);
return(mem[address]);
}
else {
address = address & CPU_ADRSMASK;
@@ -418,34 +355,9 @@
 
REG16 MEMCALL memp_read16(UINT32 address) {
 
register REG16 ret;
#if defined(SUPPORT_CL_GD5430)
if(cirrusvga_opaque && (UINT32)0xF0000000 <= address && address <= (UINT32)0xF00FFFFF){
if(address <= (UINT32)0xF0000FFF){
return cirrus_vga_mem_readw(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0001FFF){
return cirrus_linear_readw(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0002FFF){
return cirrus_linear_bitblt_readw(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0003FFF){
return cirrus_mmio_readw(cirrusvga_opaque, address);
}
if(!(dispskip = (dispskip+1)%0x1000))TRACEOUT(("MMIOR WINDOW : %02X", address));
}
if(cirrusvga_opaque && (UINT32)0xF00000 <= address && address <= (UINT32)0xFFFFFF){
TRACEOUT(("VRAM WINDOW : %02X", address));
}
#endif
REG16 ret;
 
if (address < (I286_MEMREADMAX - 1)) {
if(0x400 <= address && address <= 0x5ff){
//if(address!=0x058a) TRACEOUT(("BDA read %04X : %04X", address, LOADINTELWORD(mem + address)));
/*if(address==0x055C) {
TRACEOUT(("BDA read %04X : %04X", address, LOADINTELWORD(mem + address)));
if(CPU_STAT_PM) return 0x030f;
}*/
}
return(LOADINTELWORD(mem + address));
}
else if ((address + 1) & 0x7fff) { // non 32kb boundary
@@ -486,31 +398,10 @@
 
UINT32 MEMCALL memp_read32(UINT32 address) {
 
register UINT32 pos;
register UINT32 ret;
#if defined(SUPPORT_CL_GD5430)
if(cirrusvga_opaque && (UINT32)0xF0000000 <= address && address <= (UINT32)0xF00FFFFF){
if(address <= (UINT32)0xF0000FFF){
return cirrus_vga_mem_readl(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0001FFF){
return cirrus_linear_readl(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0002FFF){
return cirrus_linear_bitblt_readl(cirrusvga_opaque, address);
}else if(address <= (UINT32)0xF0003FFF){
return cirrus_mmio_readl(cirrusvga_opaque, address);
}
if(!(dispskip = (dispskip+1)%0x1000))TRACEOUT(("MMIOR WINDOW : %02X", address));
}
if(cirrusvga_opaque && (UINT32)0xF00000 <= address && address <= (UINT32)0xFFFFFF){
TRACEOUT(("VRAM WINDOW : %02X", address));
}
#endif
UINT32 pos;
UINT32 ret;
 
if (address < (I286_MEMREADMAX - 3)) {
if(0x400 <= address && address <= 0x5ff){
//if(address!=0x058a) TRACEOUT(("BDA read %04X : %08X", address, LOADINTELDWORD(mem + address)));
}
return(LOADINTELDWORD(mem + address));
}
else if (address >= USE_HIMEM) {
@@ -532,28 +423,7 @@
}
 
void MEMCALL memp_write8(UINT32 address, REG8 value) {
#if defined(SUPPORT_CL_GD5430)
if(cirrusvga_opaque && (UINT32)0xF0000000 <= address && address <= (UINT32)0xF00FFFFF){
if(address <= (UINT32)0xF0000FFF){
cirrus_vga_mem_writeb(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0001FFF){
cirrus_linear_writeb(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0002FFF){
cirrus_linear_bitblt_writeb(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0003FFF){
cirrus_mmio_writeb(cirrusvga_opaque, address, value);
}
if(!(dispskip = (dispskip+1)%0x1000))TRACEOUT(("MMIOW WINDOW : %02X", address));
}
if(cirrusvga_opaque && (UINT32)0xF00000 <= address && address <= (UINT32)0xFFFFFF){
TRACEOUT(("VRAM WINDOW : %02X", address));
}
#endif
 
//if(0x400 <= address && address <= 0x5ff){
// TRACEOUT(("BDA write %04X : %02X", address, value));
//}
if (address < I286_MEMWRITEMAX) {
mem[address] = (UINT8)value;
}
@@ -587,24 +457,6 @@
}
 
void MEMCALL memp_write16(UINT32 address, REG16 value) {
#if defined(SUPPORT_CL_GD5430)
if(cirrusvga_opaque && (UINT32)0xF0000000 <= address && address <= (UINT32)0xF00FFFFF){
if(address <= (UINT32)0xF0000FFF){
cirrus_vga_mem_writew(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0001FFF){
cirrus_linear_writew(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0002FFF){
cirrus_linear_bitblt_writew(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0003FFF){
cirrus_mmio_writew(cirrusvga_opaque, address, value);
}
if(!(dispskip = (dispskip+1)%0x1000))TRACEOUT(("MMIOW WINDOW : %02X", address));
}
if(cirrusvga_opaque && (UINT32)0xF00000 <= address && address <= (UINT32)0xFFFFFF){
TRACEOUT(("VRAM WINDOW : %02X", address));
}
#endif
 
if (address < (I286_MEMWRITEMAX - 1)) {
STOREINTELWORD(mem + address, value);
@@ -644,25 +496,7 @@
 
void MEMCALL memp_write32(UINT32 address, UINT32 value) {
 
register UINT32 pos;
#if defined(SUPPORT_CL_GD5430)
if(cirrusvga_opaque && (UINT32)0xF0000000 <= address && address <= (UINT32)0xF00FFFFF){
if(address <= (UINT32)0xF0000FFF){
cirrus_vga_mem_writel(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0001FFF){
cirrus_linear_writel(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0002FFF){
cirrus_linear_bitblt_writel(cirrusvga_opaque, address, value);
}else if(address <= (UINT32)0xF0003FFF){
cirrus_mmio_writel(cirrusvga_opaque, address, value);
}
if(!(dispskip = (dispskip+1)%0x1000))TRACEOUT(("MMIOW WINDOW : %02X", address));
}
if(cirrusvga_opaque && (UINT32)0xF00000 <= address && address <= (UINT32)0xFFFFFF){
TRACEOUT(("VRAM WINDOW : %02X", address));
}
#endif
UINT32 pos;
 
if (address < (I286_MEMWRITEMAX - 3)) {
STOREINTELDWORD(mem + address, value);
@@ -689,25 +523,22 @@
 
void MEMCALL memp_reads(UINT32 address, void *dat, UINT leng) {
 
register UINT8 *out = (UINT8 *)dat;
register UINT diff;
UINT8 *out = (UINT8 *)dat;
UINT diff;
 
/* fast memory access */
if ((address + leng) < I286_MEMREADMAX) {
if(0x400 <= address && address <= 0x5ff){
//if(address!=0x058a) TRACEOUT(("BDA read %04X : READS", address));
}
memcpy(dat, mem + address, leng);
CopyMemory(dat, mem + address, leng);
return;
}
address = address & CPU_ADRSMASK;
if ((address >= USE_HIMEM) && (address < CPU_EXTLIMIT16)) {
diff = CPU_EXTLIMIT16 - address;
if (diff >= leng) {
memcpy(dat, CPU_EXTMEMBASE + address, leng);
CopyMemory(dat, CPU_EXTMEMBASE + address, leng);
return;
}
memcpy(dat, CPU_EXTMEMBASE + address, diff);
CopyMemory(dat, CPU_EXTMEMBASE + address, diff);
out += diff;
leng -= diff;
address += diff;
@@ -722,21 +553,21 @@
void MEMCALL memp_writes(UINT32 address, const void *dat, UINT leng) {
 
const UINT8 *out = (UINT8 *)dat;
register UINT diff;
UINT diff;
 
/* fast memory access */
if ((address + leng) < I286_MEMREADMAX) {
memcpy(mem + address, dat, leng);
CopyMemory(mem + address, dat, leng);
return;
}
address = address & CPU_ADRSMASK;
if ((address >= USE_HIMEM) && (address < CPU_EXTLIMIT16)) {
diff = CPU_EXTLIMIT16 - address;
if (diff >= leng) {
memcpy(CPU_EXTMEMBASE + address, dat, leng);
CopyMemory(CPU_EXTMEMBASE + address, dat, leng);
return;
}
memcpy(CPU_EXTMEMBASE + address, dat, diff);
CopyMemory(CPU_EXTMEMBASE + address, dat, diff);
out += diff;
leng -= diff;
address += diff;
@@ -753,9 +584,9 @@
 
static UINT32 MEMCALL physicaladdr(UINT32 addr, BOOL wr) {
 
register UINT32 a;
register UINT32 pde;
register UINT32 pte;
UINT32 a;
UINT32 pde;
UINT32 pte;
 
a = CPU_STAT_PDE_BASE + ((addr >> 20) & 0xffc);
pde = memp_read32(a);
@@ -786,8 +617,8 @@
 
void MEMCALL meml_reads(UINT32 address, void *dat, UINT leng) {
 
register UINT size;
UINT size;
 
if (!CPU_STAT_PAGING) {
memp_reads(address, dat, leng);
}
@@ -805,7 +636,7 @@
 
void MEMCALL meml_writes(UINT32 address, const void *dat, UINT leng) {
 
register UINT size;
UINT size;
 
if (!CPU_STAT_PAGING) {
memp_writes(address, dat, leng);
@@ -825,7 +656,7 @@
 
REG8 MEMCALL memr_read8(UINT seg, UINT off) {
 
register UINT32 addr;
UINT32 addr;
 
addr = (seg << 4) + LOW16(off);
if (CPU_STAT_PAGING) {
@@ -836,7 +667,7 @@
 
REG16 MEMCALL memr_read16(UINT seg, UINT off) {
 
register UINT32 addr;
UINT32 addr;
 
addr = (seg << 4) + LOW16(off);
if (!CPU_STAT_PAGING) {
@@ -850,7 +681,7 @@
 
void MEMCALL memr_write8(UINT seg, UINT off, REG8 dat) {
 
register UINT32 addr;
UINT32 addr;
 
addr = (seg << 4) + LOW16(off);
if (CPU_STAT_PAGING) {
@@ -861,7 +692,7 @@
 
void MEMCALL memr_write16(UINT seg, UINT off, REG16 dat) {
 
register UINT32 addr;
UINT32 addr;
 
addr = (seg << 4) + LOW16(off);
if (!CPU_STAT_PAGING) {
@@ -878,9 +709,9 @@
 
void MEMCALL memr_reads(UINT seg, UINT off, void *dat, UINT leng) {
 
register UINT32 addr;
register UINT rem;
register UINT size;
UINT32 addr;
UINT rem;
UINT size;
 
while(leng) {
off = LOW16(off);
@@ -901,9 +732,9 @@
 
void MEMCALL memr_writes(UINT seg, UINT off, const void *dat, UINT leng) {
 
register UINT32 addr;
register UINT rem;
register UINT size;
UINT32 addr;
UINT rem;
UINT size;
 
while(leng) {
off = LOW16(off);
/np21/i386c/ia32/instructions/bin_arith.c
@@ -46,9 +46,9 @@
void CPUCALL
IMUL_ALEb(UINT32 op)
{
register UINT32 madr;
register SINT32 res;
register SINT8 src, dst;
UINT32 madr;
SINT32 res;
SINT8 src, dst;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(13);
@@ -66,9 +66,9 @@
void CPUCALL
IMUL_AXEw(UINT32 op)
{
register UINT32 madr;
register SINT32 res;
register SINT16 src, dst;
UINT32 madr;
SINT32 res;
SINT16 src, dst;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(21);
@@ -87,9 +87,9 @@
void CPUCALL
IMUL_EAXEd(UINT32 op)
{
register UINT32 madr;
register SINT64 res;
register SINT32 src, dst;
UINT32 madr;
SINT64 res;
SINT32 src, dst;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(21);
@@ -108,10 +108,10 @@
void
IMUL_GwEw(void)
{
register UINT16 *out;
register UINT32 op;
register SINT32 res;
register SINT16 src, dst;
UINT16 *out;
UINT32 op;
SINT32 res;
SINT16 src, dst;
 
PREPART_REG16_EA(op, src, out, 21, 27);
dst = *out;
@@ -122,10 +122,10 @@
void
IMUL_GdEd(void)
{
register UINT32 *out;
register UINT32 op;
register SINT64 res;
register SINT32 src, dst;
UINT32 *out;
UINT32 op;
SINT64 res;
SINT32 src, dst;
 
PREPART_REG32_EA(op, src, out, 21, 27);
dst = *out;
@@ -136,10 +136,10 @@
void
IMUL_GwEwIb(void)
{
register UINT16 *out;
register UINT32 op;
register SINT32 res;
register SINT16 src, dst;
UINT16 *out;
UINT32 op;
SINT32 res;
SINT16 src, dst;
 
PREPART_REG16_EA(op, src, out, 21, 24);
GET_PCBYTES(dst);
@@ -150,10 +150,10 @@
void
IMUL_GdEdIb(void)
{
register UINT32 *out;
register UINT32 op;
register SINT64 res;
register SINT32 src, dst;
UINT32 *out;
UINT32 op;
SINT64 res;
SINT32 src, dst;
 
PREPART_REG32_EA(op, src, out, 21, 24);
GET_PCBYTESD(dst);
@@ -164,10 +164,10 @@
void
IMUL_GwEwIw(void)
{
register UINT16 *out;
register UINT32 op;
register SINT32 res;
register SINT16 src, dst;
UINT16 *out;
UINT32 op;
SINT32 res;
SINT16 src, dst;
 
PREPART_REG16_EA(op, src, out, 21, 24);
GET_PCWORD(dst);
@@ -178,10 +178,10 @@
void
IMUL_GdEdId(void)
{
register UINT32 *out;
register UINT32 op;
register SINT64 res;
register SINT32 src, dst;
UINT32 *out;
UINT32 op;
SINT64 res;
SINT32 src, dst;
 
PREPART_REG32_EA(op, src, out, 21, 24);
GET_PCDWORD(dst);
@@ -196,8 +196,8 @@
void CPUCALL
MUL_ALEb(UINT32 op)
{
register UINT32 res, madr;
register UINT8 src, dst;
UINT32 res, madr;
UINT8 src, dst;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(13);
@@ -215,8 +215,8 @@
void CPUCALL
MUL_AXEw(UINT32 op)
{
register UINT32 res, madr;
register UINT16 src, dst;
UINT32 res, madr;
UINT16 src, dst;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(21);
@@ -235,8 +235,8 @@
void CPUCALL
MUL_EAXEd(UINT32 op)
{
register UINT32 res, madr;
register UINT32 src, dst;
UINT32 res, madr;
UINT32 src, dst;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(21);
@@ -259,9 +259,9 @@
void CPUCALL
IDIV_ALEb(UINT32 op)
{
register UINT32 madr;
register SINT16 tmp, r;
register SINT8 src;
UINT32 madr;
SINT16 tmp, r;
SINT8 src;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(17);
@@ -289,9 +289,9 @@
void CPUCALL
IDIV_AXEw(UINT32 op)
{
register SINT32 tmp, r;
register UINT32 madr;
register SINT16 src;
SINT32 tmp, r;
UINT32 madr;
SINT16 src;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(17);
@@ -319,9 +319,9 @@
void CPUCALL
IDIV_EAXEd(UINT32 op)
{
register SINT64 tmp, r;
register SINT32 src;
register UINT32 madr;
SINT64 tmp, r;
SINT32 src;
UINT32 madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(17);
@@ -353,9 +353,9 @@
void CPUCALL
DIV_ALEb(UINT32 op)
{
register UINT32 madr;
register UINT16 tmp;
register UINT8 src;
UINT32 madr;
UINT16 tmp;
UINT8 src;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(17);
@@ -382,9 +382,9 @@
void CPUCALL
DIV_AXEw(UINT32 op)
{
register UINT32 madr;
register UINT32 tmp;
register UINT16 src;
UINT32 madr;
UINT32 tmp;
UINT16 src;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(17);
@@ -411,9 +411,9 @@
void CPUCALL
DIV_EAXEd(UINT32 op)
{
register UINT32 madr;
register UINT64 tmp;
register UINT32 src;
UINT32 madr;
UINT64 tmp;
UINT32 src;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(17);
@@ -493,7 +493,7 @@
static UINT32 CPUCALL
NEG1(UINT32 src, void *arg)
{
register UINT32 dst;
UINT32 dst;
BYTE_NEG(dst, src);
return dst;
}
@@ -501,7 +501,7 @@
static UINT32 CPUCALL
NEG2(UINT32 src, void *arg)
{
register UINT32 dst;
UINT32 dst;
WORD_NEG(dst, src);
return dst;
}
@@ -509,7 +509,7 @@
static UINT32 CPUCALL
NEG4(UINT32 src, void *arg)
{
register UINT32 dst;
UINT32 dst;
DWORD_NEG(dst, src);
return dst;
}
@@ -517,8 +517,8 @@
void CPUCALL
NEG_Eb(UINT32 op)
{
register UINT8 *out;
register UINT32 src, dst, madr;
UINT8 *out;
UINT32 src, dst, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -536,8 +536,8 @@
void CPUCALL
NEG_Ew(UINT32 op)
{
register UINT16 *out;
register UINT32 src, dst, madr;
UINT16 *out;
UINT32 src, dst, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -555,8 +555,8 @@
void CPUCALL
NEG_Ed(UINT32 op)
{
register UINT32 *out;
register UINT32 src, dst, madr;
UINT32 *out;
UINT32 src, dst, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -578,8 +578,8 @@
void
CMP_EbGb(void)
{
register UINT8 *out;
register UINT32 op, src, dst, res, madr;
UINT8 *out;
UINT32 op, src, dst, res, madr;
 
PREPART_EA_REG8(op, src);
if (op >= 0xc0) {
@@ -597,8 +597,8 @@
void
CMP_EwGw(void)
{
register UINT16 *out;
register UINT32 op, src, dst, res, madr;
UINT16 *out;
UINT32 op, src, dst, res, madr;
 
PREPART_EA_REG16(op, src);
if (op >= 0xc0) {
@@ -616,8 +616,8 @@
void
CMP_EdGd(void)
{
register UINT32 *out;
register UINT32 op, src, dst, res, madr;
UINT32 *out;
UINT32 op, src, dst, res, madr;
 
PREPART_EA_REG32(op, src);
if (op >= 0xc0) {
@@ -635,8 +635,8 @@
void
CMP_GbEb(void)
{
register UINT8 *out;
register UINT32 op, src, dst, res;
UINT8 *out;
UINT32 op, src, dst, res;
 
PREPART_REG8_EA(op, src, out, 2, 5);
dst = *out;
@@ -646,8 +646,8 @@
void
CMP_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src, dst, res;
UINT16 *out;
UINT32 op, src, dst, res;
 
PREPART_REG16_EA(op, src, out, 2, 5);
dst = *out;
@@ -657,8 +657,8 @@
void
CMP_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src, dst, res;
UINT32 *out;
UINT32 op, src, dst, res;
 
PREPART_REG32_EA(op, src, out, 2, 5);
dst = *out;
@@ -668,7 +668,7 @@
void
CMP_ALIb(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(2);
GET_PCBYTE(src);
@@ -679,7 +679,7 @@
void
CMP_AXIw(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(2);
GET_PCWORD(src);
@@ -690,7 +690,7 @@
void
CMP_EAXId(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(2);
GET_PCDWORD(src);
@@ -701,7 +701,7 @@
void CPUCALL
CMP_EbIb(UINT8 *regp, UINT32 src)
{
register UINT32 dst, res;
UINT32 dst, res;
 
dst = *regp;
BYTE_SUB(res, dst, src);
@@ -710,7 +710,7 @@
void CPUCALL
CMP_EbIb_ext(UINT32 madr, UINT32 src)
{
register UINT32 dst, res;
UINT32 dst, res;
 
dst = cpu_vmemoryread(CPU_INST_SEGREG_INDEX, madr);
BYTE_SUB(res, dst, src);
@@ -719,7 +719,7 @@
void CPUCALL
CMP_EwIx(UINT16 *regp, UINT32 src)
{
register UINT32 dst, res;
UINT32 dst, res;
 
dst = *regp;
WORD_SUB(res, dst, src);
@@ -728,7 +728,7 @@
void CPUCALL
CMP_EwIx_ext(UINT32 madr, UINT32 src)
{
register UINT32 dst, res;
UINT32 dst, res;
 
dst = cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr);
WORD_SUB(res, dst, src);
@@ -737,7 +737,7 @@
void CPUCALL
CMP_EdIx(UINT32 *regp, UINT32 src)
{
register UINT32 dst, res;
UINT32 dst, res;
 
dst = *regp;
DWORD_SUB(res, dst, src);
@@ -746,7 +746,7 @@
void CPUCALL
CMP_EdIx_ext(UINT32 madr, UINT32 src)
{
register UINT32 dst, res;
UINT32 dst, res;
 
dst = cpu_vmemoryread_d(CPU_INST_SEGREG_INDEX, madr);
DWORD_SUB(res, dst, src);
/np21/i386c/ia32/instructions/bit_byte.c
@@ -44,7 +44,7 @@
void
BT_EwGw(void)
{
register UINT32 op, src, dst, madr;
UINT32 op, src, dst, madr;
 
PREPART_EA_REG16(op, src);
if (op >= 0xc0) {
@@ -63,7 +63,7 @@
void
BT_EdGd(void)
{
register UINT32 op, src, dst, madr;
UINT32 op, src, dst, madr;
 
PREPART_EA_REG32(op, src);
if (op >= 0xc0) {
@@ -82,7 +82,7 @@
void CPUCALL
BT_EwIb(UINT32 op)
{
register UINT32 src, dst, madr;
UINT32 src, dst, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -101,7 +101,7 @@
void CPUCALL
BT_EdIb(UINT32 op)
{
register UINT32 src, dst, madr;
UINT32 src, dst, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -123,9 +123,9 @@
void
BTS_EwGw(void)
{
register UINT16 *out;
register UINT32 op, src, dst, res, madr;
register UINT16 bit;
UINT16 *out;
UINT32 op, src, dst, res, madr;
UINT16 bit;
 
PREPART_EA_REG16(op, src);
bit = BIT_MAKEBIT16(src);
@@ -158,9 +158,9 @@
void
BTS_EdGd(void)
{
register UINT32 *out;
register UINT32 op, src, dst, res, madr;
register UINT32 bit;
UINT32 *out;
UINT32 op, src, dst, res, madr;
UINT32 bit;
 
PREPART_EA_REG32(op, src);
bit = BIT_MAKEBIT32(src);
@@ -193,9 +193,9 @@
void CPUCALL
BTS_EwIb(UINT32 op)
{
register UINT16 *out;
register UINT32 src, dst, res, madr;
register UINT16 bit;
UINT16 *out;
UINT32 src, dst, res, madr;
UINT16 bit;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -229,9 +229,9 @@
void CPUCALL
BTS_EdIb(UINT32 op)
{
register UINT32 *out;
register UINT32 src, dst, res, madr;
register UINT32 bit;
UINT32 *out;
UINT32 src, dst, res, madr;
UINT32 bit;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -268,9 +268,9 @@
void
BTR_EwGw(void)
{
register UINT16 *out;
register UINT32 op, src, dst, res, madr;
register UINT16 bit;
UINT16 *out;
UINT32 op, src, dst, res, madr;
UINT16 bit;
 
PREPART_EA_REG16(op, src);
bit = BIT_MAKEBIT16(src);
@@ -303,9 +303,9 @@
void
BTR_EdGd(void)
{
register UINT32 *out;
register UINT32 op, src, dst, res, madr;
register UINT32 bit;
UINT32 *out;
UINT32 op, src, dst, res, madr;
UINT32 bit;
 
PREPART_EA_REG32(op, src);
bit = BIT_MAKEBIT32(src);
@@ -338,9 +338,9 @@
void CPUCALL
BTR_EwIb(UINT32 op)
{
register UINT16 *out;
register UINT32 src, dst, res, madr;
register UINT16 bit;
UINT16 *out;
UINT32 src, dst, res, madr;
UINT16 bit;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -374,9 +374,9 @@
void CPUCALL
BTR_EdIb(UINT32 op)
{
register UINT32 *out;
register UINT32 src, dst, res, madr;
register UINT32 bit;
UINT32 *out;
UINT32 src, dst, res, madr;
UINT32 bit;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -413,9 +413,9 @@
void
BTC_EwGw(void)
{
register UINT16 *out;
register UINT32 op, src, dst, res, madr;
register UINT16 bit;
UINT16 *out;
UINT32 op, src, dst, res, madr;
UINT16 bit;
 
PREPART_EA_REG16(op, src);
bit = BIT_MAKEBIT16(src);
@@ -448,9 +448,9 @@
void
BTC_EdGd(void)
{
register UINT32 *out;
register UINT32 op, src, dst, res, madr;
register UINT32 bit;
UINT32 *out;
UINT32 op, src, dst, res, madr;
UINT32 bit;
 
PREPART_EA_REG32(op, src);
bit = BIT_MAKEBIT32(src);
@@ -483,9 +483,9 @@
void CPUCALL
BTC_EwIb(UINT32 op)
{
register UINT16 *out;
register UINT32 src, dst, res, madr;
register UINT16 bit;
UINT16 *out;
UINT32 src, dst, res, madr;
UINT16 bit;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -519,9 +519,9 @@
void CPUCALL
BTC_EdIb(UINT32 op)
{
register UINT32 *out;
register UINT32 src, dst, res, madr;
register UINT32 bit;
UINT32 *out;
UINT32 src, dst, res, madr;
UINT32 bit;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -558,9 +558,9 @@
void
BSF_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
register int bit;
UINT16 *out;
UINT32 op, src;
int bit;
 
PREPART_REG16_EA(op, src, out, 2, 7);
if (src == 0) {
@@ -579,9 +579,9 @@
void
BSF_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
register int bit;
UINT32 *out;
UINT32 op, src;
int bit;
 
PREPART_REG32_EA(op, src, out, 2, 7);
if (src == 0) {
@@ -603,9 +603,9 @@
void
BSR_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
register int bit;
UINT16 *out;
UINT32 op, src;
int bit;
 
PREPART_REG16_EA(op, src, out, 2, 7);
if (src == 0) {
@@ -624,9 +624,9 @@
void
BSR_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
register int bit;
UINT32 *out;
UINT32 op, src;
int bit;
 
PREPART_REG32_EA(op, src, out, 2, 7);
if (src == 0) {
@@ -648,8 +648,8 @@
void
SETO_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_O?1:0;
UINT32 op, madr;
UINT8 v = CC_O?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -665,8 +665,8 @@
void
SETNO_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NO?1:0;
UINT32 op, madr;
UINT8 v = CC_NO?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -682,8 +682,8 @@
void
SETC_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_C?1:0;
UINT32 op, madr;
UINT8 v = CC_C?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -699,8 +699,8 @@
void
SETNC_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NC?1:0;
UINT32 op, madr;
UINT8 v = CC_NC?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -716,8 +716,8 @@
void
SETZ_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_Z?1:0;
UINT32 op, madr;
UINT8 v = CC_Z?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -733,8 +733,8 @@
void
SETNZ_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NZ?1:0;
UINT32 op, madr;
UINT8 v = CC_NZ?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -750,8 +750,8 @@
void
SETA_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_A?1:0;
UINT32 op, madr;
UINT8 v = CC_A?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -767,8 +767,8 @@
void
SETNA_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NA?1:0;
UINT32 op, madr;
UINT8 v = CC_NA?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -784,8 +784,8 @@
void
SETS_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_S?1:0;
UINT32 op, madr;
UINT8 v = CC_S?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -801,8 +801,8 @@
void
SETNS_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NS?1:0;
UINT32 op, madr;
UINT8 v = CC_NS?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -818,8 +818,8 @@
void
SETP_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_P?1:0;
UINT32 op, madr;
UINT8 v = CC_P?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -835,8 +835,8 @@
void
SETNP_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NP?1:0;
UINT32 op, madr;
UINT8 v = CC_NP?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -852,8 +852,8 @@
void
SETL_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_L?1:0;
UINT32 op, madr;
UINT8 v = CC_L?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -869,8 +869,8 @@
void
SETNL_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NL?1:0;
UINT32 op, madr;
UINT8 v = CC_NL?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -886,8 +886,8 @@
void
SETLE_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_LE?1:0;
UINT32 op, madr;
UINT8 v = CC_LE?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -903,8 +903,8 @@
void
SETNLE_Eb(void)
{
register UINT32 op, madr;
register UINT8 v = CC_NLE?1:0;
UINT32 op, madr;
UINT8 v = CC_NLE?1:0;
 
GET_PCBYTE(op);
if (op >= 0xc0) {
@@ -923,7 +923,7 @@
void
TEST_EbGb(void)
{
register UINT32 op, src, tmp, madr;
UINT32 op, src, tmp, madr;
 
PREPART_EA_REG8(op, src);
if (op >= 0xc0) {
@@ -940,7 +940,7 @@
void
TEST_EwGw(void)
{
register UINT32 op, src, tmp, madr;
UINT32 op, src, tmp, madr;
 
PREPART_EA_REG16(op, src);
if (op >= 0xc0) {
@@ -957,7 +957,7 @@
void
TEST_EdGd(void)
{
register UINT32 op, src, tmp, madr;
UINT32 op, src, tmp, madr;
 
PREPART_EA_REG32(op, src);
if (op >= 0xc0) {
@@ -974,7 +974,7 @@
void
TEST_ALIb(void)
{
register UINT32 src, tmp;
UINT32 src, tmp;
 
CPU_WORKCLOCK(3);
tmp = CPU_AL;
@@ -985,7 +985,7 @@
void
TEST_AXIw(void)
{
register UINT32 src, tmp;
UINT32 src, tmp;
 
CPU_WORKCLOCK(3);
tmp = CPU_AX;
@@ -996,7 +996,7 @@
void
TEST_EAXId(void)
{
register UINT32 src, tmp;
UINT32 src, tmp;
 
CPU_WORKCLOCK(3);
tmp = CPU_EAX;
@@ -1007,7 +1007,7 @@
void CPUCALL
TEST_EbIb(UINT32 op)
{
register UINT32 src, tmp, madr;
UINT32 src, tmp, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -1024,7 +1024,7 @@
void CPUCALL
TEST_EwIw(UINT32 op)
{
register UINT32 src, tmp, madr;
UINT32 src, tmp, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -1041,7 +1041,7 @@
void CPUCALL
TEST_EdId(UINT32 op)
{
register UINT32 src, tmp, madr;
UINT32 src, tmp, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
/np21/i386c/ia32/instructions/string_inst.c
@@ -34,7 +34,7 @@
void
MOVSB_XbYb(void)
{
register UINT8 tmp;
UINT8 tmp;
 
CPU_WORKCLOCK(5);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -54,7 +54,7 @@
void
MOVSW_XwYw(void)
{
register UINT16 tmp;
UINT16 tmp;
 
CPU_WORKCLOCK(5);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -74,7 +74,7 @@
void
MOVSD_XdYd(void)
{
register UINT32 tmp;
UINT32 tmp;
 
CPU_WORKCLOCK(5);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -96,7 +96,7 @@
void
CMPSB_XbYb(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(8);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -118,7 +118,7 @@
void
CMPSW_XwYw(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(8);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -140,7 +140,7 @@
void
CMPSD_XdYd(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(8);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -164,7 +164,7 @@
void
SCASB_ALXb(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(7);
dst = CPU_AL;
@@ -182,7 +182,7 @@
void
SCASW_AXXw(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(7);
dst = CPU_AX;
@@ -200,7 +200,7 @@
void
SCASD_EAXXd(void)
{
register UINT32 src, dst, res;
UINT32 src, dst, res;
 
CPU_WORKCLOCK(7);
dst = CPU_EAX;
@@ -327,7 +327,7 @@
void
INSB_YbDX(void)
{
register UINT8 data;
UINT8 data;
 
CPU_WORKCLOCK(12);
data = cpu_in(CPU_DX);
@@ -343,7 +343,7 @@
void
INSW_YwDX(void)
{
register UINT16 data;
UINT16 data;
 
CPU_WORKCLOCK(12);
data = cpu_in_w(CPU_DX);
@@ -359,7 +359,7 @@
void
INSD_YdDX(void)
{
register UINT32 data;
UINT32 data;
 
CPU_WORKCLOCK(12);
data = cpu_in_d(CPU_DX);
@@ -377,7 +377,7 @@
void
OUTSB_DXXb(void)
{
register UINT8 data;
UINT8 data;
 
CPU_WORKCLOCK(14);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -395,7 +395,7 @@
void
OUTSW_DXXw(void)
{
register UINT16 data;
UINT16 data;
 
CPU_WORKCLOCK(14);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -413,7 +413,7 @@
void
OUTSD_DXXd(void)
{
register UINT32 data;
UINT32 data;
 
CPU_WORKCLOCK(14);
CPU_INST_SEGREG_INDEX = DS_FIX;
/np21/i386c/ia32/instructions/arith.mcr
@@ -50,8 +50,8 @@
void CPUCALL \
inst##_Eb(UINT32 op) \
{ \
register UINT8 *out; \
register UINT32 dst, madr; \
UINT8 *out; \
UINT32 dst, madr; \
\
if (op >= 0xc0) { \
CPU_WORKCLOCK(2); \
@@ -69,8 +69,8 @@
void CPUCALL \
inst##_Ew(UINT32 op) \
{ \
register UINT16 *out; \
register UINT32 dst, madr; \
UINT16 *out; \
UINT32 dst, madr; \
\
if (op >= 0xc0) { \
CPU_WORKCLOCK(2); \
@@ -88,8 +88,8 @@
void CPUCALL \
inst##_Ed(UINT32 op) \
{ \
register UINT32 *out; \
register UINT32 dst, madr; \
UINT32 *out; \
UINT32 dst, madr; \
\
if (op >= 0xc0) { \
CPU_WORKCLOCK(2); \
@@ -109,21 +109,21 @@
static UINT32 CPUCALL \
inst##1(UINT32 dst, void *arg) \
{ \
register UINT32 src = PTR_TO_UINT32(arg); \
UINT32 src = PTR_TO_UINT32(arg); \
BYTE_##inst(dst, src); \
return dst; \
} \
static UINT32 CPUCALL \
inst##2(UINT32 dst, void *arg) \
{ \
register UINT32 src = PTR_TO_UINT32(arg); \
UINT32 src = PTR_TO_UINT32(arg); \
WORD_##inst(dst, src); \
return dst; \
} \
static UINT32 CPUCALL \
inst##4(UINT32 dst, void *arg) \
{ \
register UINT32 src = PTR_TO_UINT32(arg); \
UINT32 src = PTR_TO_UINT32(arg); \
DWORD_##inst(dst, src); \
return dst; \
} \
@@ -131,8 +131,8 @@
void \
inst##_EbGb(void) \
{ \
register UINT8 *out; \
register UINT32 op, src, dst, madr; \
UINT8 *out; \
UINT32 op, src, dst, madr; \
\
PREPART_EA_REG8(op, src); \
if (op >= 0xc0) { \
@@ -151,8 +151,8 @@
void \
inst##_EwGw(void) \
{ \
register UINT16 *out; \
register UINT32 op, src, dst, madr; \
UINT16 *out; \
UINT32 op, src, dst, madr; \
\
PREPART_EA_REG16(op, src); \
if (op >= 0xc0) { \
@@ -171,8 +171,8 @@
void \
inst##_EdGd(void) \
{ \
register UINT32 *out; \
register UINT32 op, src, dst, madr; \
UINT32 *out; \
UINT32 op, src, dst, madr; \
\
PREPART_EA_REG32(op, src); \
if (op >= 0xc0) { \
@@ -191,8 +191,8 @@
void \
inst##_GbEb(void) \
{ \
register UINT8 *out; \
register UINT32 op, src, dst; \
UINT8 *out; \
UINT32 op, src, dst; \
\
PREPART_REG8_EA(op, src, out, 2, 7); \
dst = *out; \
@@ -203,8 +203,8 @@
void \
inst##_GwEw(void) \
{ \
register UINT16 *out; \
register UINT32 op, src, dst; \
UINT16 *out; \
UINT32 op, src, dst; \
\
PREPART_REG16_EA(op, src, out, 2, 7); \
dst = *out; \
@@ -215,8 +215,8 @@
void \
inst##_GdEd(void) \
{ \
register UINT32 *out; \
register UINT32 op, src, dst; \
UINT32 *out; \
UINT32 op, src, dst; \
\
PREPART_REG32_EA(op, src, out, 2, 7); \
dst = *out; \
@@ -227,7 +227,7 @@
void \
inst##_ALIb(void) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
CPU_WORKCLOCK(3); \
GET_PCBYTE(src); \
@@ -239,7 +239,7 @@
void \
inst##_AXIw(void) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
CPU_WORKCLOCK(3); \
GET_PCWORD(src); \
@@ -251,7 +251,7 @@
void \
inst##_EAXId(void) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
CPU_WORKCLOCK(3); \
GET_PCDWORD(src); \
@@ -263,7 +263,7 @@
void CPUCALL \
inst##_EbIb(UINT8 *regp, UINT32 src) \
{ \
register UINT32 dst; \
UINT32 dst; \
\
dst = *regp; \
BYTE_##inst(dst, src); \
@@ -280,7 +280,7 @@
void CPUCALL \
inst##_EwIx(UINT16 *regp, UINT32 src) \
{ \
register UINT32 dst; \
UINT32 dst; \
\
dst = *regp; \
WORD_##inst(dst, src); \
@@ -297,7 +297,7 @@
void CPUCALL \
inst##_EdIx(UINT32 *regp, UINT32 src) \
{ \
register UINT32 dst; \
UINT32 dst; \
\
dst = *regp; \
DWORD_##inst(dst, src); \
@@ -316,24 +316,24 @@
static UINT32 CPUCALL \
inst##1(UINT32 dst, void *arg) \
{ \
register UINT32 src = PTR_TO_UINT32(arg); \
register UINT32 res; \
UINT32 src = PTR_TO_UINT32(arg); \
UINT32 res; \
BYTE_##inst(res, dst, src); \
return res; \
} \
static UINT32 CPUCALL \
inst##2(UINT32 dst, void *arg) \
{ \
register UINT32 src = PTR_TO_UINT32(arg); \
register UINT32 res; \
UINT32 src = PTR_TO_UINT32(arg); \
UINT32 res; \
WORD_##inst(res, dst, src); \
return res; \
} \
static UINT32 CPUCALL \
inst##4(UINT32 dst, void *arg) \
{ \
register UINT32 src = PTR_TO_UINT32(arg); \
register UINT32 res; \
UINT32 src = PTR_TO_UINT32(arg); \
UINT32 res; \
DWORD_##inst(res, dst, src); \
return res; \
} \
@@ -341,8 +341,8 @@
void \
inst##_EbGb(void) \
{ \
register UINT8 *out; \
register UINT32 op, src, dst, res, madr; \
UINT8 *out; \
UINT32 op, src, dst, res, madr; \
\
PREPART_EA_REG8(op, src); \
if (op >= 0xc0) { \
@@ -361,8 +361,8 @@
void \
inst##_EwGw(void) \
{ \
register UINT16 *out; \
register UINT32 op, src, dst, res, madr; \
UINT16 *out; \
UINT32 op, src, dst, res, madr; \
\
PREPART_EA_REG16(op, src); \
if (op >= 0xc0) { \
@@ -381,8 +381,8 @@
void \
inst##_EdGd(void) \
{ \
register UINT32 *out; \
register UINT32 op, src, dst, res, madr; \
UINT32 *out; \
UINT32 op, src, dst, res, madr; \
\
PREPART_EA_REG32(op, src); \
if (op >= 0xc0) { \
@@ -401,8 +401,8 @@
void \
inst##_GbEb(void) \
{ \
register UINT8 *out; \
register UINT32 op, src, dst, res; \
UINT8 *out; \
UINT32 op, src, dst, res; \
\
PREPART_REG8_EA(op, src, out, 2, 7); \
dst = *out; \
@@ -413,8 +413,8 @@
void \
inst##_GwEw(void) \
{ \
register UINT16 *out; \
register UINT32 op, src, dst, res; \
UINT16 *out; \
UINT32 op, src, dst, res; \
\
PREPART_REG16_EA(op, src, out, 2, 7); \
dst = *out; \
@@ -425,8 +425,8 @@
void \
inst##_GdEd(void) \
{ \
register UINT32 *out; \
register UINT32 op, src, dst, res; \
UINT32 *out; \
UINT32 op, src, dst, res; \
\
PREPART_REG32_EA(op, src, out, 2, 7); \
dst = *out; \
@@ -437,7 +437,7 @@
void \
inst##_ALIb(void) \
{ \
register UINT32 src, dst, res; \
UINT32 src, dst, res; \
\
CPU_WORKCLOCK(2); \
GET_PCBYTE(src); \
@@ -449,7 +449,7 @@
void \
inst##_AXIw(void) \
{ \
register UINT32 src, dst, res; \
UINT32 src, dst, res; \
\
CPU_WORKCLOCK(2); \
GET_PCWORD(src); \
@@ -461,7 +461,7 @@
void \
inst##_EAXId(void) \
{ \
register UINT32 src, dst, res; \
UINT32 src, dst, res; \
\
CPU_WORKCLOCK(2); \
GET_PCDWORD(src); \
@@ -473,7 +473,7 @@
void CPUCALL \
inst##_EbIb(UINT8 *regp, UINT32 src) \
{ \
register UINT32 dst, res; \
UINT32 dst, res; \
\
dst = *regp; \
BYTE_##inst(res, dst, src); \
@@ -490,7 +490,7 @@
void CPUCALL \
inst##_EwIx(UINT16 *regp, UINT32 src) \
{ \
register UINT32 dst, res; \
UINT32 dst, res; \
\
dst = *regp; \
WORD_##inst(res, dst, src); \
@@ -507,7 +507,7 @@
void CPUCALL \
inst##_EdIx(UINT32 *regp, UINT32 src) \
{ \
register UINT32 dst, res; \
UINT32 dst, res; \
\
dst = *regp; \
DWORD_##inst(res, dst, src); \
/np21/i386c/ia32/instructions/fpu/fpdummy.c
@@ -1,7 +1,4 @@
#include "compiler.h"
 
#ifndef USE_FPU
 
#include "cpu.h"
#include "ia32.mcr"
#include "fp.h"
@@ -13,7 +10,7 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU d8 %.2x", op));
TRACEOUT(("use FPU d8 %.2x", op));
if (op >= 0xc0) {
EXCEPTION(NM_EXCEPTION, 0);
} else {
@@ -28,19 +25,19 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU d9 %.2x", op));
TRACEOUT(("use FPU d9 %.2x", op));
if (op >= 0xc0) {
EXCEPTION(NM_EXCEPTION, 0);
} else {
madr = calc_ea_dst(op);
switch (op & 0x38) {
case 0x28:
//TRACEOUT(("FLDCW"));
TRACEOUT(("FLDCW"));
(void) cpu_vmemoryread_w(CPU_INST_SEGREG_INDEX, madr);
break;
 
case 0x38:
//TRACEOUT(("FSTCW"));
TRACEOUT(("FSTCW"));
cpu_vmemorywrite_w(CPU_INST_SEGREG_INDEX, madr, 0xffff);
break;
 
@@ -57,7 +54,7 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU da %.2x", op));
TRACEOUT(("use FPU da %.2x", op));
if (op >= 0xc0) {
EXCEPTION(NM_EXCEPTION, 0);
} else {
@@ -72,7 +69,7 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU db %.2x", op));
TRACEOUT(("use FPU db %.2x", op));
if (op >= 0xc0) {
if (op != 0xe3) {
EXCEPTION(NM_EXCEPTION, 0);
@@ -91,7 +88,7 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU dc %.2x", op));
TRACEOUT(("use FPU dc %.2x", op));
if (op >= 0xc0) {
EXCEPTION(NM_EXCEPTION, 0);
} else {
@@ -106,7 +103,7 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU dd %.2x", op));
TRACEOUT(("use FPU dd %.2x", op));
if (op >= 0xc0) {
EXCEPTION(NM_EXCEPTION, 0);
} else {
@@ -115,7 +112,7 @@
EXCEPTION(NM_EXCEPTION, 0);
}
/* FSTSW */
//TRACEOUT(("FSTSW"));
TRACEOUT(("FSTSW"));
cpu_vmemorywrite_w(CPU_INST_SEGREG_INDEX, madr, 0xffff);
}
}
@@ -126,7 +123,7 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU de %.2x", op));
TRACEOUT(("use FPU de %.2x", op));
if (op >= 0xc0) {
EXCEPTION(NM_EXCEPTION, 0);
} else {
@@ -141,19 +138,16 @@
UINT32 op, madr;
 
GET_PCBYTE(op);
//TRACEOUT(("use FPU df %.2x", op));
TRACEOUT(("use FPU df %.2x", op));
if (op >= 0xc0) {
if (op != 0xe0) {
EXCEPTION(NM_EXCEPTION, 0);
}
/* FSTSW AX */
//TRACEOUT(("FSTSW AX"));
TRACEOUT(("FSTSW AX"));
CPU_AX = 0xffff;
} else {
madr = calc_ea_dst(op);
EXCEPTION(NM_EXCEPTION, 0);
}
}
 
 
#endif /* !USE_FPU */
/np21/i386c/ia32/instructions/fpu/fpemul.c
@@ -25,8 +25,6 @@
 
#include "compiler.h"
 
#if defined(USE_FPU)
 
#include "cpu.h"
#include "ia32.mcr"
 
@@ -1181,5 +1179,3 @@
/* 正規化 */
}
#endif
 
#endif /* USE_FPU */
/np21/i386c/ia32/instructions/seg_reg.c
@@ -33,8 +33,8 @@
void
LES_GwMp(void)
{
register UINT16 *out;
register UINT32 op, dst, madr;
UINT16 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -53,8 +53,8 @@
void
LES_GdMp(void)
{
register UINT32 *out;
register UINT32 op, dst, madr;
UINT32 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -73,8 +73,8 @@
void
LSS_GwMp(void)
{
register UINT16 *out;
register UINT32 op, dst, madr;
UINT16 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -93,8 +93,8 @@
void
LSS_GdMp(void)
{
register UINT32 *out;
register UINT32 op, dst, madr;
UINT32 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -113,8 +113,8 @@
void
LDS_GwMp(void)
{
register UINT16 *out;
register UINT32 op, dst, madr;
UINT16 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -133,8 +133,8 @@
void
LDS_GdMp(void)
{
register UINT32 *out;
register UINT32 op, dst, madr;
UINT32 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -153,8 +153,8 @@
void
LFS_GwMp(void)
{
register UINT16 *out;
register UINT32 op, dst, madr;
UINT16 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -173,8 +173,8 @@
void
LFS_GdMp(void)
{
register UINT32 *out;
register UINT32 op, dst, madr;
UINT32 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -193,8 +193,8 @@
void
LGS_GwMp(void)
{
register UINT16 *out;
register UINT32 op, dst, madr;
UINT16 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
@@ -213,8 +213,8 @@
void
LGS_GdMp(void)
{
register UINT32 *out;
register UINT32 op, dst, madr;
UINT32 *out;
UINT32 op, dst, madr;
UINT16 sreg;
 
GET_PCBYTE(op);
/np21/i386c/ia32/instructions/ctrl_trans.c
@@ -62,8 +62,8 @@
void CPUCALL
JMP_Ew(UINT32 op)
{
register UINT32 madr;
register UINT16 new_ip;
UINT32 madr;
UINT16 new_ip;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(7);
@@ -82,8 +82,8 @@
void CPUCALL
JMP_Ed(UINT32 op)
{
register UINT32 madr;
register UINT32 new_ip;
UINT32 madr;
UINT32 new_ip;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(7);
@@ -103,8 +103,8 @@
JMP16_Ap(void)
{
descriptor_t sd;
register UINT16 new_ip;
register UINT16 new_cs;
UINT16 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(11);
@@ -129,8 +129,8 @@
JMP32_Ap(void)
{
descriptor_t sd;
register UINT32 new_ip;
register UINT16 new_cs;
UINT32 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(11);
@@ -155,9 +155,9 @@
JMP16_Ep(UINT32 op)
{
descriptor_t sd;
register UINT32 madr;
register UINT16 new_ip;
register UINT16 new_cs;
UINT32 madr;
UINT16 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(11);
@@ -187,9 +187,9 @@
JMP32_Ep(UINT32 op)
{
descriptor_t sd;
register UINT32 madr;
register UINT32 new_ip;
register UINT16 new_cs;
UINT32 madr;
UINT32 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(11);
@@ -784,7 +784,7 @@
void
LOOPNE_Jb(void)
{
register UINT32 cx;
UINT32 cx;
 
if (!CPU_INST_AS32) {
cx = CPU_CX;
@@ -809,7 +809,7 @@
void
LOOPE_Jb(void)
{
register UINT32 cx;
UINT32 cx;
 
if (!CPU_INST_AS32) {
cx = CPU_CX;
@@ -834,7 +834,7 @@
void
LOOP_Jb(void)
{
register UINT32 cx;
UINT32 cx;
 
if (!CPU_INST_AS32) {
cx = CPU_CX;
@@ -861,8 +861,8 @@
void
CALL_Aw(void)
{
register UINT16 new_ip;
register SINT16 dest;
UINT16 new_ip;
SINT16 dest;
 
CPU_WORKCLOCK(7);
CPU_SET_PREV_ESP();
@@ -879,8 +879,8 @@
void
CALL_Ad(void)
{
register UINT32 new_ip;
register UINT32 dest;
UINT32 new_ip;
UINT32 dest;
 
CPU_WORKCLOCK(7);
CPU_SET_PREV_ESP();
@@ -897,8 +897,8 @@
void CPUCALL
CALL_Ew(UINT32 op)
{
register UINT32 madr;
register UINT16 new_ip;
UINT32 madr;
UINT16 new_ip;
 
CPU_SET_PREV_ESP();
if (op >= 0xc0) {
@@ -920,8 +920,8 @@
void CPUCALL
CALL_Ed(UINT32 op)
{
register UINT32 madr;
register UINT32 new_ip;
UINT32 madr;
UINT32 new_ip;
 
CPU_SET_PREV_ESP();
if (op >= 0xc0) {
@@ -944,8 +944,8 @@
CALL16_Ap(void)
{
descriptor_t sd;
register UINT16 new_ip;
register UINT16 new_cs;
UINT16 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(13);
@@ -975,8 +975,8 @@
CALL32_Ap(void)
{
descriptor_t sd;
register UINT32 new_ip;
register UINT16 new_cs;
UINT32 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(13);
@@ -1006,9 +1006,9 @@
CALL16_Ep(UINT32 op)
{
descriptor_t sd;
register UINT32 madr;
register UINT16 new_ip;
register UINT16 new_cs;
UINT32 madr;
UINT16 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(16);
@@ -1043,9 +1043,9 @@
CALL32_Ep(UINT32 op)
{
descriptor_t sd;
register UINT32 madr;
register UINT32 new_ip;
register UINT16 new_cs;
UINT32 madr;
UINT32 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(16);
@@ -1082,7 +1082,7 @@
void
RETnear16(void)
{
register UINT16 new_ip;
UINT16 new_ip;
 
CPU_WORKCLOCK(11);
CPU_SET_PREV_ESP();
@@ -1097,7 +1097,7 @@
void
RETnear32(void)
{
register UINT32 new_ip;
UINT32 new_ip;
 
CPU_WORKCLOCK(11);
CPU_SET_PREV_ESP();
@@ -1112,8 +1112,8 @@
void
RETnear16_Iw(void)
{
register UINT16 new_ip;
register UINT16 size;
UINT16 new_ip;
UINT16 size;
 
CPU_WORKCLOCK(11);
CPU_SET_PREV_ESP();
@@ -1134,8 +1134,8 @@
void
RETnear32_Iw(void)
{
register UINT32 new_ip;
register UINT16 size;
UINT32 new_ip;
UINT16 size;
 
CPU_WORKCLOCK(11);
CPU_SET_PREV_ESP();
@@ -1157,8 +1157,8 @@
RETfar16(void)
{
descriptor_t sd;
register UINT16 new_ip;
register UINT16 new_cs;
UINT16 new_ip;
UINT16 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(15);
@@ -1187,8 +1187,8 @@
RETfar32(void)
{
descriptor_t sd;
register UINT32 new_ip;
register UINT32 new_cs;
UINT32 new_ip;
UINT32 new_cs;
UINT16 sreg;
 
CPU_WORKCLOCK(15);
@@ -1217,10 +1217,10 @@
RETfar16_Iw(void)
{
descriptor_t sd;
register UINT16 new_ip;
register UINT16 new_cs;
UINT16 new_ip;
UINT16 new_cs;
UINT16 sreg;
register UINT16 size;
UINT16 size;
 
CPU_WORKCLOCK(15);
GET_PCWORD(size);
@@ -1254,10 +1254,10 @@
RETfar32_Iw(void)
{
descriptor_t sd;
register UINT32 new_ip;
register UINT32 new_cs;
UINT32 new_ip;
UINT32 new_cs;
UINT16 sreg;
register UINT16 size;
UINT16 size;
 
CPU_WORKCLOCK(15);
GET_PCWORD(size);
@@ -1291,10 +1291,10 @@
IRET(void)
{
descriptor_t sd;
register UINT32 new_ip;
register UINT32 new_flags;
register UINT32 new_cs;
register UINT32 mask;
UINT32 new_ip;
UINT32 new_flags;
UINT32 new_cs;
UINT32 mask;
UINT16 sreg;
 
CPU_WORKCLOCK(22);
@@ -1365,7 +1365,7 @@
void
INT_Ib(void)
{
register UINT8 vect;
UINT8 vect;
 
CPU_WORKCLOCK(37);
if (!CPU_STAT_PM || !CPU_STAT_VM86 || (CPU_STAT_IOPL == CPU_IOPL3)) {
@@ -1383,8 +1383,8 @@
void
BOUND_GwMa(void)
{
register UINT32 op, madr;
register UINT16 reg;
UINT32 op, madr;
UINT16 reg;
 
CPU_WORKCLOCK(13);
GET_PCBYTE(op);
@@ -1404,8 +1404,8 @@
void
BOUND_GdMa(void)
{
register UINT32 op, madr;
register UINT32 reg;
UINT32 op, madr;
UINT32 reg;
 
CPU_WORKCLOCK(13);
GET_PCBYTE(op);
@@ -1428,11 +1428,11 @@
void
ENTER16_IwIb(void)
{
register UINT32 sp, bp;
register UINT32 val;
register UINT16 dimsize;
register UINT16 new_bp;
register UINT8 level;
UINT32 sp, bp;
UINT32 val;
UINT16 dimsize;
UINT16 new_bp;
UINT8 level;
 
GET_PCWORD(dimsize);
GET_PCBYTE(level);
@@ -1495,11 +1495,11 @@
void
ENTER32_IwIb(void)
{
register UINT32 sp, bp;
register UINT32 new_bp;
register UINT32 val;
register UINT16 dimsize;
register UINT8 level;
UINT32 sp, bp;
UINT32 new_bp;
UINT32 val;
UINT16 dimsize;
UINT8 level;
 
GET_PCWORD(dimsize);
GET_PCBYTE(level);
/np21/i386c/ia32/instructions/data_trans.c
@@ -35,7 +35,7 @@
void
MOV_EbGb(void)
{
register UINT32 op, src, madr;
UINT32 op, src, madr;
 
PREPART_EA_REG8(op, src);
if (op >= 0xc0) {
@@ -51,7 +51,7 @@
void
MOV_EwGw(void)
{
register UINT32 op, src, madr;
UINT32 op, src, madr;
 
PREPART_EA_REG16(op, src);
if (op >= 0xc0) {
@@ -67,7 +67,7 @@
void
MOV_EdGd(void)
{
register UINT32 op, src, madr;
UINT32 op, src, madr;
 
PREPART_EA_REG32(op, src);
if (op >= 0xc0) {
@@ -83,8 +83,8 @@
void
MOV_GbEb(void)
{
register UINT8 *out;
register UINT32 op, src;
UINT8 *out;
UINT32 op, src;
 
PREPART_REG8_EA(op, src, out, 2, 5);
*out = (UINT8)src;
@@ -93,8 +93,8 @@
void
MOV_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
*out = (UINT16)src;
@@ -103,8 +103,8 @@
void
MOV_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
*out = src;
@@ -113,8 +113,8 @@
void
MOV_EwSw(void)
{
register UINT32 op, src, madr;
register UINT8 idx;
UINT32 op, src, madr;
UINT8 idx;
 
GET_PCBYTE(op);
idx = (UINT8)((op >> 3) & 7);
@@ -136,8 +136,8 @@
void
MOV_EdSw(void)
{
register UINT32 op, src, madr;
register UINT8 idx;
UINT32 op, src, madr;
UINT8 idx;
 
GET_PCBYTE(op);
idx = (UINT8)((op >> 3) & 7);
@@ -159,8 +159,8 @@
void
MOV_SwEw(void)
{
register UINT32 op, src, madr;
register UINT8 idx;
UINT32 op, src, madr;
UINT8 idx;
 
GET_PCBYTE(op);
idx = ((UINT8)(op >> 3) & 7);
@@ -185,7 +185,7 @@
void
MOV_ALOb(void)
{
register UINT32 madr;
UINT32 madr;
 
CPU_WORKCLOCK(5);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -200,7 +200,7 @@
void
MOV_AXOw(void)
{
register UINT32 madr;
UINT32 madr;
 
CPU_WORKCLOCK(5);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -215,7 +215,7 @@
void
MOV_EAXOd(void)
{
register UINT32 madr;
UINT32 madr;
 
CPU_WORKCLOCK(5);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -230,7 +230,7 @@
void
MOV_ObAL(void)
{
register UINT32 madr;
UINT32 madr;
 
CPU_WORKCLOCK(3);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -245,7 +245,7 @@
void
MOV_OwAX(void)
{
register UINT32 madr;
UINT32 madr;
 
CPU_WORKCLOCK(3);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -260,7 +260,7 @@
void
MOV_OdEAX(void)
{
register UINT32 madr;
UINT32 madr;
 
CPU_WORKCLOCK(3);
CPU_INST_SEGREG_INDEX = DS_FIX;
@@ -275,7 +275,7 @@
void
MOV_EbIb(void)
{
register UINT32 op, src, res, madr;
UINT32 op, src, res, madr;
 
PREPART_EA_REG8(op, src);
if (op >= 0xc0) {
@@ -293,7 +293,7 @@
void
MOV_EwIw(void)
{
register UINT32 op, src, res, madr;
UINT32 op, src, res, madr;
 
PREPART_EA_REG16(op, src);
if (op >= 0xc0) {
@@ -311,7 +311,7 @@
void
MOV_EdId(void)
{
register UINT32 op, src, res, madr;
UINT32 op, src, res, madr;
 
PREPART_EA_REG32(op, src);
if (op >= 0xc0) {
@@ -359,8 +359,8 @@
void
CMOVO_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_O) {
@@ -371,8 +371,8 @@
void
CMOVO_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_O) {
@@ -383,8 +383,8 @@
void
CMOVNO_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NO) {
@@ -395,8 +395,8 @@
void
CMOVNO_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NO) {
@@ -407,8 +407,8 @@
void
CMOVC_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_C) {
@@ -419,8 +419,8 @@
void
CMOVC_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_C) {
@@ -431,8 +431,8 @@
void
CMOVNC_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NC) {
@@ -443,8 +443,8 @@
void
CMOVNC_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NC) {
@@ -455,8 +455,8 @@
void
CMOVZ_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_Z) {
@@ -467,8 +467,8 @@
void
CMOVZ_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_Z) {
@@ -479,8 +479,8 @@
void
CMOVNZ_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NZ) {
@@ -491,8 +491,8 @@
void
CMOVNZ_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NZ) {
@@ -503,8 +503,8 @@
void
CMOVA_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_A) {
@@ -515,8 +515,8 @@
void
CMOVA_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_A) {
@@ -527,8 +527,8 @@
void
CMOVNA_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NA) {
@@ -539,8 +539,8 @@
void
CMOVNA_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NA) {
@@ -551,8 +551,8 @@
void
CMOVS_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_S) {
@@ -563,8 +563,8 @@
void
CMOVS_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_S) {
@@ -575,8 +575,8 @@
void
CMOVNS_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NS) {
@@ -587,8 +587,8 @@
void
CMOVNS_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NS) {
@@ -599,8 +599,8 @@
void
CMOVP_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_P) {
@@ -611,8 +611,8 @@
void
CMOVP_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_P) {
@@ -623,8 +623,8 @@
void
CMOVNP_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NP) {
@@ -635,8 +635,8 @@
void
CMOVNP_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NP) {
@@ -647,8 +647,8 @@
void
CMOVL_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_L) {
@@ -659,8 +659,8 @@
void
CMOVL_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_L) {
@@ -671,8 +671,8 @@
void
CMOVNL_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NL) {
@@ -683,8 +683,8 @@
void
CMOVNL_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NL) {
@@ -695,8 +695,8 @@
void
CMOVLE_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_LE) {
@@ -707,8 +707,8 @@
void
CMOVLE_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_LE) {
@@ -719,8 +719,8 @@
void
CMOVNLE_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
if (CC_NLE) {
@@ -731,8 +731,8 @@
void
CMOVNLE_GdEd(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA(op, src, out, 2, 5);
if (CC_NLE) {
@@ -746,7 +746,7 @@
static UINT32 CPUCALL
XCHG(UINT32 dst, void *arg)
{
register UINT32 src = PTR_TO_UINT32(arg);
UINT32 src = PTR_TO_UINT32(arg);
(void)dst;
return src;
}
@@ -754,8 +754,8 @@
void
XCHG_EbGb(void)
{
register UINT8 *out, *src;
register UINT32 op, madr;
UINT8 *out, *src;
UINT32 op, madr;
 
PREPART_EA_REG8P(op, src);
if (op >= 0xc0) {
@@ -772,8 +772,8 @@
void
XCHG_EwGw(void)
{
register UINT16 *out, *src;
register UINT32 op, madr;
UINT16 *out, *src;
UINT32 op, madr;
 
PREPART_EA_REG16P(op, src);
if (op >= 0xc0) {
@@ -790,8 +790,8 @@
void
XCHG_EdGd(void)
{
register UINT32 *out, *src;
register UINT32 op, madr;
UINT32 *out, *src;
UINT32 op, madr;
 
PREPART_EA_REG32P(op, src);
if (op >= 0xc0) {
@@ -829,7 +829,7 @@
static INLINE UINT32 CPUCALL
BSWAP_DWORD(UINT32 val)
{
register UINT32 v;
UINT32 v;
v = (val & 0x000000ff) << 24;
v |= (val & 0x0000ff00) << 8;
v |= (val & 0x00ff0000) >> 8;
@@ -852,8 +852,8 @@
static UINT32 CPUCALL
XADD1(UINT32 dst, void *arg)
{
register UINT32 src = PTR_TO_UINT32(arg);
register UINT32 res;
UINT32 src = PTR_TO_UINT32(arg);
UINT32 res;
BYTE_ADD(res, dst, src);
return res;
}
@@ -861,8 +861,8 @@
static UINT32 CPUCALL
XADD2(UINT32 dst, void *arg)
{
register UINT32 src = PTR_TO_UINT32(arg);
register UINT32 res;
UINT32 src = PTR_TO_UINT32(arg);
UINT32 res;
WORD_ADD(res, dst, src);
return res;
}
@@ -870,8 +870,8 @@
static UINT32 CPUCALL
XADD4(UINT32 dst, void *arg)
{
register UINT32 src = PTR_TO_UINT32(arg);
register UINT32 res;
UINT32 src = PTR_TO_UINT32(arg);
UINT32 res;
DWORD_ADD(res, dst, src);
return res;
}
@@ -879,8 +879,8 @@
void
XADD_EbGb(void)
{
register UINT8 *out, *src;
register UINT32 op, dst, res, madr;
UINT8 *out, *src;
UINT32 op, dst, res, madr;
 
PREPART_EA_REG8P(op, src);
if (op >= 0xc0) {
@@ -900,8 +900,8 @@
void
XADD_EwGw(void)
{
register UINT16 *out, *src;
register UINT32 op, dst, res, madr;
UINT16 *out, *src;
UINT32 op, dst, res, madr;
 
PREPART_EA_REG16P(op, src);
if (op >= 0xc0) {
@@ -921,8 +921,8 @@
void
XADD_EdGd(void)
{
register UINT32 *out, *src;
register UINT32 op, dst, res, madr;
UINT32 *out, *src;
UINT32 op, dst, res, madr;
 
PREPART_EA_REG32P(op, src);
if (op >= 0xc0) {
@@ -945,9 +945,9 @@
void
CMPXCHG_EbGb(void)
{
register UINT8 *out;
register UINT32 op, src, dst, madr, tmp;
register UINT8 al;
UINT8 *out;
UINT32 op, src, dst, madr, tmp;
UINT8 al;
 
PREPART_EA_REG8(op, src);
al = CPU_AL;
@@ -974,9 +974,9 @@
void
CMPXCHG_EwGw(void)
{
register UINT16 *out;
register UINT32 op, src, dst, madr, tmp;
register UINT16 ax;
UINT16 *out;
UINT32 op, src, dst, madr, tmp;
UINT16 ax;
 
PREPART_EA_REG16(op, src);
ax = CPU_AX;
@@ -1003,9 +1003,9 @@
void
CMPXCHG_EdGd(void)
{
register UINT32 *out;
register UINT32 op, src, dst, madr, tmp;
register UINT32 eax;
UINT32 *out;
UINT32 op, src, dst, madr, tmp;
UINT32 eax;
 
PREPART_EA_REG32(op, src);
eax = CPU_EAX;
@@ -1032,7 +1032,7 @@
void CPUCALL
CMPXCHG8B(UINT32 op)
{
register UINT32 madr, dst_l, dst_h;
UINT32 madr, dst_l, dst_h;
 
if (op < 0xc0) {
CPU_WORKCLOCK(2);
@@ -1077,7 +1077,7 @@
void CPUCALL
PUSH_Ew(UINT32 op)
{
register UINT32 dst, madr;
UINT32 dst, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -1093,7 +1093,7 @@
void CPUCALL
PUSH_Ed(UINT32 op)
{
register UINT32 dst, madr;
UINT32 dst, madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -1109,7 +1109,7 @@
void
PUSH_Ib(void)
{
register SINT32 val;
SINT32 val;
 
CPU_WORKCLOCK(3);
GET_PCBYTESD(val);
@@ -1119,7 +1119,7 @@
void
PUSH_Iw(void)
{
register UINT16 val;
UINT16 val;
 
CPU_WORKCLOCK(3);
GET_PCWORD(val);
@@ -1129,7 +1129,7 @@
void
PUSH_Id(void)
{
register UINT32 val;
UINT32 val;
 
CPU_WORKCLOCK(3);
GET_PCDWORD(val);
@@ -1174,8 +1174,8 @@
void
POP_Ew(void)
{
register UINT32 op, madr;
register UINT16 src;
UINT32 op, madr;
UINT16 src;
 
CPU_WORKCLOCK(5);
 
@@ -1194,8 +1194,8 @@
void CPUCALL
POP_Ew_G5(UINT32 op)
{
register UINT32 madr;
register UINT16 src;
UINT32 madr;
UINT16 src;
 
CPU_WORKCLOCK(5);
 
@@ -1213,8 +1213,8 @@
void
POP_Ed(void)
{
register UINT32 op, madr;
register UINT32 src;
UINT32 op, madr;
UINT32 src;
 
CPU_WORKCLOCK(5);
 
@@ -1233,7 +1233,7 @@
void CPUCALL
POP_Ed_G5(UINT32 op)
{
register UINT32 src, madr;
UINT32 src, madr;
 
CPU_WORKCLOCK(5);
 
@@ -1251,7 +1251,7 @@
void
POP16_ES(void)
{
register UINT16 src;
UINT16 src;
 
CPU_WORKCLOCK(5);
 
@@ -1264,7 +1264,7 @@
void
POP32_ES(void)
{
register UINT32 src;
UINT32 src;
 
CPU_WORKCLOCK(5);
 
@@ -1277,7 +1277,7 @@
void
POP16_SS(void)
{
register UINT16 src;
UINT16 src;
 
CPU_WORKCLOCK(5);
 
@@ -1291,7 +1291,7 @@
void
POP32_SS(void)
{
register UINT32 src;
UINT32 src;
 
CPU_WORKCLOCK(5);
 
@@ -1305,7 +1305,7 @@
void
POP16_DS(void)
{
register UINT16 src;
UINT16 src;
 
CPU_WORKCLOCK(5);
 
@@ -1318,7 +1318,7 @@
void
POP32_DS(void)
{
register UINT32 src;
UINT32 src;
 
CPU_WORKCLOCK(5);
 
@@ -1331,7 +1331,7 @@
void
POP16_FS(void)
{
register UINT16 src;
UINT16 src;
 
CPU_WORKCLOCK(5);
 
@@ -1344,7 +1344,7 @@
void
POP32_FS(void)
{
register UINT32 src;
UINT32 src;
 
CPU_WORKCLOCK(5);
 
@@ -1357,7 +1357,7 @@
void
POP16_GS(void)
{
register UINT16 src;
UINT16 src;
 
CPU_WORKCLOCK(5);
 
@@ -1370,7 +1370,7 @@
void
POP32_GS(void)
{
register UINT32 src;
UINT32 src;
 
CPU_WORKCLOCK(5);
 
@@ -1386,7 +1386,7 @@
void
PUSHA(void)
{
register UINT16 sp = CPU_SP;
UINT16 sp = CPU_SP;
 
CPU_WORKCLOCK(17);
CPU_SET_PREV_ESP();
@@ -1415,7 +1415,7 @@
void
PUSHAD(void)
{
register UINT32 esp = CPU_ESP;
UINT32 esp = CPU_ESP;
 
CPU_WORKCLOCK(17);
CPU_SET_PREV_ESP();
@@ -1444,7 +1444,7 @@
void
POPA(void)
{
register UINT16 ax, cx, dx, bx, bp, si, di;
UINT16 ax, cx, dx, bx, bp, si, di;
 
CPU_WORKCLOCK(19);
CPU_SET_PREV_ESP();
@@ -1481,7 +1481,7 @@
void
POPAD(void)
{
register UINT32 eax, ecx, edx, ebx, ebp, esi, edi;
UINT32 eax, ecx, edx, ebx, ebp, esi, edi;
 
CPU_WORKCLOCK(19);
CPU_SET_PREV_ESP();
@@ -1545,7 +1545,7 @@
void
IN_ALIb(void)
{
register UINT port;
UINT port;
 
CPU_WORKCLOCK(12);
GET_PCBYTE(port);
@@ -1555,7 +1555,7 @@
void
IN_AXIb(void)
{
register UINT port;
UINT port;
 
CPU_WORKCLOCK(12);
GET_PCBYTE(port);
@@ -1565,7 +1565,7 @@
void
IN_EAXIb(void)
{
register UINT port;
UINT port;
 
CPU_WORKCLOCK(12);
GET_PCBYTE(port);
@@ -1612,7 +1612,7 @@
void
OUT_IbAX(void)
{
register UINT port;
UINT port;
 
CPU_WORKCLOCK(10);
GET_PCBYTE(port);
@@ -1622,7 +1622,7 @@
void
OUT_IbEAX(void)
{
register UINT port;
UINT port;
 
CPU_WORKCLOCK(10);
GET_PCBYTE(port);
@@ -1659,7 +1659,7 @@
void
CBW(void)
{
register UINT16 tmp;
UINT16 tmp;
 
CPU_WORKCLOCK(2);
tmp = __CBW(CPU_AL);
@@ -1669,7 +1669,7 @@
void
CWDE(void)
{
register UINT32 tmp;
UINT32 tmp;
 
CPU_WORKCLOCK(2);
tmp = __CWDE(CPU_AX);
@@ -1682,8 +1682,8 @@
void
MOVSX_GwEb(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA8(op, src, out, 2, 5);
*out = __CBW(src);
@@ -1692,8 +1692,8 @@
void
MOVSX_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
*out = (UINT16)src;
@@ -1702,8 +1702,8 @@
void
MOVSX_GdEb(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA8(op, src, out, 2, 5);
*out = __CBD(src);
@@ -1712,8 +1712,8 @@
void
MOVSX_GdEw(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA16(op, src, out, 2, 5);
*out = __CWDE(src);
@@ -1725,8 +1725,8 @@
void
MOVZX_GwEb(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA8(op, src, out, 2, 5);
*out = (UINT8)src;
@@ -1735,8 +1735,8 @@
void
MOVZX_GwEw(void)
{
register UINT16 *out;
register UINT32 op, src;
UINT16 *out;
UINT32 op, src;
 
PREPART_REG16_EA(op, src, out, 2, 5);
*out = (UINT16)src;
@@ -1745,8 +1745,8 @@
void
MOVZX_GdEb(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA8(op, src, out, 2, 5);
*out = (UINT8)src;
@@ -1755,8 +1755,8 @@
void
MOVZX_GdEw(void)
{
register UINT32 *out;
register UINT32 op, src;
UINT32 *out;
UINT32 op, src;
 
PREPART_REG32_EA16(op, src, out, 2, 5);
*out = (UINT16)src;
/np21/i386c/ia32/instructions/system_inst.c
@@ -33,9 +33,9 @@
void CPUCALL
LGDT_Ms(UINT32 op)
{
register UINT32 madr;
register UINT32 base;
register UINT16 limit;
UINT32 madr;
UINT32 base;
UINT16 limit;
 
if (op < 0xc0) {
if (!CPU_STAT_PM || (CPU_STAT_CPL == 0 && !CPU_STAT_VM86)) {
@@ -64,9 +64,9 @@
void CPUCALL
SGDT_Ms(UINT32 op)
{
register UINT32 madr;
register UINT32 base;
register UINT16 limit;
UINT32 madr;
UINT32 base;
UINT16 limit;
 
if (op < 0xc0) {
CPU_WORKCLOCK(11);
@@ -86,8 +86,8 @@
void CPUCALL
LLDT_Ew(UINT32 op)
{
register UINT32 madr;
register UINT16 src;
UINT32 madr;
UINT16 src;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
if (CPU_STAT_CPL == 0) {
@@ -112,8 +112,8 @@
void CPUCALL
SLDT_Ew(UINT32 op)
{
register UINT32 madr;
register UINT16 ldtr;
UINT32 madr;
UINT16 ldtr;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
ldtr = CPU_LDTR;
@@ -138,8 +138,8 @@
void CPUCALL
LTR_Ew(UINT32 op)
{
register UINT32 madr;
register UINT16 src;
UINT32 madr;
UINT16 src;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
if (CPU_STAT_CPL == 0) {
@@ -164,8 +164,8 @@
void CPUCALL
STR_Ew(UINT32 op)
{
register UINT32 madr;
register UINT16 tr;
UINT32 madr;
UINT16 tr;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
tr = CPU_TR;
@@ -190,9 +190,9 @@
void CPUCALL
LIDT_Ms(UINT32 op)
{
register UINT32 madr;
register UINT32 base;
register UINT16 limit;
UINT32 madr;
UINT32 base;
UINT16 limit;
 
if (op < 0xc0) {
if (!CPU_STAT_PM || (CPU_STAT_CPL == 0 && !CPU_STAT_VM86)) {
@@ -221,9 +221,9 @@
void CPUCALL
SIDT_Ms(UINT32 op)
{
register UINT32 madr;
register UINT32 base;
register UINT16 limit;
UINT32 madr;
UINT32 base;
UINT16 limit;
 
if (op < 0xc0) {
CPU_WORKCLOCK(11);
@@ -243,9 +243,9 @@
void
MOV_CdRd(void)
{
register UINT32 op, src;
register UINT32 reg;
register int idx;
UINT32 op, src;
UINT32 reg;
int idx;
 
CPU_WORKCLOCK(11);
GET_PCBYTE(op);
@@ -383,9 +383,9 @@
void
MOV_RdCd(void)
{
register UINT32 *out;
register UINT32 op;
register int idx;
UINT32 *out;
UINT32 op;
int idx;
 
CPU_WORKCLOCK(11);
GET_PCBYTE(op);
@@ -429,8 +429,8 @@
void CPUCALL
LMSW_Ew(UINT32 op)
{
register UINT32 src, madr;
register UINT32 cr0;
UINT32 src, madr;
UINT32 cr0;
 
if (!CPU_STAT_PM || CPU_STAT_CPL == 0) {
if (op >= 0xc0) {
@@ -457,7 +457,7 @@
void CPUCALL
SMSW_Ew(UINT32 op)
{
register UINT32 madr;
UINT32 madr;
 
if (op >= 0xc0) {
CPU_WORKCLOCK(2);
@@ -488,8 +488,8 @@
void
ARPL_EwGw(void)
{
register UINT32 op, madr;
register UINT src, dst;
UINT32 op, madr;
UINT src, dst;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
PREPART_EA_REG16(op, src);
@@ -530,11 +530,11 @@
LAR_GwEw(void)
{
selector_t sel;
register UINT16 *out;
register UINT32 op;
register UINT32 h;
register int rv;
register UINT16 selector;
UINT16 *out;
UINT32 op;
UINT32 h;
int rv;
UINT16 selector;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
PREPART_REG16_EA(op, selector, out, 5, 11);
@@ -588,11 +588,11 @@
LAR_GdEw(void)
{
selector_t sel;
register UINT32 *out;
register UINT32 op;
register UINT32 h;
register int rv;
register UINT32 selector;
UINT32 *out;
UINT32 op;
UINT32 h;
int rv;
UINT32 selector;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
PREPART_REG32_EA(op, selector, out, 5, 11);
@@ -646,10 +646,10 @@
LSL_GwEw(void)
{
selector_t sel;
register UINT16 *out;
register UINT32 op;
register int rv;
register UINT16 selector;
UINT16 *out;
UINT32 op;
int rv;
UINT16 selector;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
PREPART_REG16_EA(op, selector, out, 5, 11);
@@ -699,10 +699,10 @@
LSL_GdEw(void)
{
selector_t sel;
register UINT32 *out;
register UINT32 op;
register int rv;
register UINT32 selector;
UINT32 *out;
UINT32 op;
int rv;
UINT32 selector;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
PREPART_REG32_EA(op, selector, out, 5, 11);
@@ -752,9 +752,9 @@
VERR_Ew(UINT32 op)
{
selector_t sel;
register UINT32 madr;
register int rv;
register UINT16 selector;
UINT32 madr;
int rv;
UINT16 selector;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
if (op >= 0xc0) {
@@ -805,9 +805,9 @@
VERW_Ew(UINT32 op)
{
selector_t sel;
register UINT32 madr;
register int rv;
register UINT16 selector;
UINT32 madr;
int rv;
UINT16 selector;
 
if (CPU_STAT_PM && !CPU_STAT_VM86) {
if (op >= 0xc0) {
@@ -851,9 +851,9 @@
void
MOV_DdRd(void)
{
register UINT32 src;
register UINT op;
register int idx;
UINT32 src;
UINT op;
int idx;
 
CPU_WORKCLOCK(11);
GET_PCBYTE(op);
@@ -904,9 +904,9 @@
void
MOV_RdDd(void)
{
register UINT32 *out;
register UINT op;
register int idx;
UINT32 *out;
UINT op;
int idx;
 
CPU_WORKCLOCK(11);
GET_PCBYTE(op);
@@ -978,8 +978,8 @@
INVLPG(UINT32 op)
{
descriptor_t *sdp;
register UINT32 madr;
register int idx;
UINT32 madr;
int idx;
 
if (CPU_STAT_PM && (CPU_STAT_VM86 || CPU_STAT_CPL != 0)) {
VERBOSE(("INVLPG: VM86(%s) or CPL(%d) != 0", CPU_STAT_VM86 ? "true" : "false", CPU_STAT_CPL));
@@ -1048,7 +1048,7 @@
void
RDMSR(void)
{
register int idx;
int idx;
 
if (CPU_STAT_PM && (CPU_STAT_VM86 || CPU_STAT_CPL != 0)) {
VERBOSE(("RDMSR: VM86(%s) or CPL(%d) != 0", CPU_STAT_VM86 ? "true" : "false", CPU_STAT_CPL));
@@ -1066,7 +1066,7 @@
void
WRMSR(void)
{
register int idx;
int idx;
 
if (CPU_STAT_PM && (CPU_STAT_VM86 || CPU_STAT_CPL != 0)) {
VERBOSE(("WRMSR: VM86(%s) or CPL(%d) != 0", CPU_STAT_VM86 ? "true" : "false", CPU_STAT_CPL));
@@ -1086,12 +1086,8 @@
void
RDTSC(void)
{
static LARGE_INTEGER li = {0};
QueryPerformanceCounter(&li);
CPU_STATSAVE.cpu_regs.reg[CPU_EDX_INDEX].d = li.HighPart;
CPU_STATSAVE.cpu_regs.reg[CPU_EAX_INDEX].d = li.LowPart;
 
//ia32_panic("RDTSC: not implemented yet!");
ia32_panic("RDTSC: not implemented yet!");
}
 
void
/np21/i386c/ia32/instructions/misc_inst.c
@@ -34,8 +34,8 @@
void
LEA_GwM(void)
{
register UINT16 *out;
register UINT32 op, dst;
UINT16 *out;
UINT32 op, dst;
 
GET_PCBYTE(op);
if (op < 0xc0) {
@@ -51,8 +51,8 @@
void
LEA_GdM(void)
{
register UINT32 *out;
register UINT32 op, dst;
UINT32 *out;
UINT32 op, dst;
 
GET_PCBYTE(op);
if (op < 0xc0) {
@@ -162,19 +162,19 @@
void
_2byte_ESC16(void)
{
register UINT32 op;
UINT32 op;
 
GET_PCBYTE(op);
(*insttable_2byte[op])();
(*insttable_2byte[0][op])();
}
 
void
_2byte_ESC32(void)
{
register UINT32 op;
UINT32 op;
 
GET_PCBYTE(op);
(*insttable_2byte[op | 256])();
(*insttable_2byte[1][op])();
}
 
void
/np21/i386c/ia32/instructions/shift_rotate.mcr
@@ -33,45 +33,45 @@
static UINT32 CPUCALL \
inst##1(UINT32 src, void *arg) \
{ \
register UINT32 dst; \
UINT32 dst; \
BYTE_##inst##1(dst, src); \
return dst; \
} \
static UINT32 CPUCALL \
inst##2(UINT32 src, void *arg) \
{ \
register UINT32 dst; \
UINT32 dst; \
WORD_##inst##1(dst, src); \
return dst; \
} \
static UINT32 CPUCALL \
inst##4(UINT32 src, void *arg) \
{ \
register UINT32 dst; \
UINT32 dst; \
DWORD_##inst##1(dst, src); \
return dst; \
} \
static UINT32 CPUCALL \
inst##CL1(UINT32 src, void *arg) \
{ \
register UINT32 cl = PTR_TO_UINT32(arg); \
register UINT32 dst; \
UINT32 cl = PTR_TO_UINT32(arg); \
UINT32 dst; \
BYTE_##inst##CL(dst, src, cl); \
return dst; \
} \
static UINT32 CPUCALL \
inst##CL2(UINT32 src, void *arg) \
{ \
register UINT32 cl = PTR_TO_UINT32(arg); \
register UINT32 dst; \
UINT32 cl = PTR_TO_UINT32(arg); \
UINT32 dst; \
WORD_##inst##CL(dst, src, cl); \
return dst; \
} \
static UINT32 CPUCALL \
inst##CL4(UINT32 src, void *arg) \
{ \
register UINT32 cl = PTR_TO_UINT32(arg); \
register UINT32 dst; \
UINT32 cl = PTR_TO_UINT32(arg); \
UINT32 dst; \
DWORD_##inst##CL(dst, src, cl); \
return dst; \
} \
@@ -79,7 +79,7 @@
void CPUCALL \
inst##_Eb(UINT8 *out) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
src = *out; \
BYTE_##inst##1(dst, src); \
@@ -96,7 +96,7 @@
void CPUCALL \
inst##_Ew(UINT16 *out) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
src = *out; \
WORD_##inst##1(dst, src); \
@@ -113,7 +113,7 @@
void CPUCALL \
inst##_Ed(UINT32 *out) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
src = *out; \
DWORD_##inst##1(dst, src); \
@@ -131,7 +131,7 @@
void CPUCALL \
inst##_EbCL(UINT8 *out, UINT32 cl) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
src = *out; \
BYTE_##inst##CL(dst, src, cl); \
@@ -148,7 +148,7 @@
void CPUCALL \
inst##_EwCL(UINT16 *out, UINT32 cl) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
src = *out; \
WORD_##inst##CL(dst, src, cl); \
@@ -165,7 +165,7 @@
void CPUCALL \
inst##_EdCL(UINT32 *out, UINT32 cl) \
{ \
register UINT32 src, dst; \
UINT32 src, dst; \
\
src = *out; \
DWORD_##inst##CL(dst, src, cl); \
/np21/i386c/ia32/instructions/flag_ctrl.c
@@ -98,7 +98,7 @@
 
CPU_WORKCLOCK(3);
if (!CPU_STAT_PM || !CPU_STAT_VM86 || (CPU_STAT_IOPL == CPU_IOPL3)) {
register UINT16 flags = REAL_FLAGREG;
UINT16 flags = REAL_FLAGREG;
flags = (flags & ALL_FLAG) | 2;
PUSH0_16(flags);
return;
@@ -113,7 +113,7 @@
 
CPU_WORKCLOCK(3);
if (!CPU_STAT_PM || !CPU_STAT_VM86 || (CPU_STAT_IOPL == CPU_IOPL3)) {
register UINT32 flags = REAL_EFLAGREG & ~(RF_FLAG|VM_FLAG);
UINT32 flags = REAL_EFLAGREG & ~(RF_FLAG|VM_FLAG);
flags = (flags & ALL_EFLAG) | 2;
PUSH0_32(flags);
return;
@@ -125,7 +125,7 @@
void
POPF_Fw(void)
{
register UINT16 flags, mask;
UINT16 flags, mask;
 
CPU_WORKCLOCK(3);
CPU_SET_PREV_ESP();
@@ -161,7 +161,7 @@
void
POPFD_Fd(void)
{
register UINT32 flags, mask;
UINT32 flags, mask;
 
CPU_WORKCLOCK(3);
CPU_SET_PREV_ESP();
/np21/i386c/ia32/inst_table.c
@@ -337,9 +337,9 @@
0,
};
 
void (*insttable_1byte[2*256])(void) = {
void (*insttable_1byte[2][256])(void) = {
/* 16bit */
//{
{
ADD_EbGb, /* 00 */
ADD_EwGw,
ADD_GbEb,
@@ -611,10 +611,10 @@
STD,
Grp4,
Grp5_Ew,
//},
},
 
/* 32bit */
//{
{
ADD_EbGb, /* 00 */
ADD_EdGd,
ADD_GbEb,
@@ -886,12 +886,12 @@
STD,
Grp4,
Grp5_Ed,
//},
},
};
 
void (*insttable_2byte[2*256])(void) = {
void (*insttable_2byte[2][256])(void) = {
/* 16bit */
//{
{
Grp6, /* 00 */
Grp7,
LAR_GwEw,
@@ -1163,10 +1163,10 @@
undef_op,
undef_op,
undef_op,
//},
},
 
/* 32bit */
//{
{
Grp6, /* 00 */
Grp7,
LAR_GdEw,
@@ -1438,7 +1438,7 @@
undef_op,
undef_op,
undef_op,
//},
},
};
 
 
/np21/i386c/ia32/cpu.c
@@ -59,18 +59,13 @@
CPU_REGS cpu_debug_rep_regs;
#endif
 
long long int timeuse_totalcount = 0;
long long int timeuse_irq = 0;
long long int timeuse_cpu = 0;
long long int timeuse_nevent[8] = {0};
long long int timeuse_tmpstart = 0;
LARGE_INTEGER timeuse_li = {0};
 
void
exec_1step(void)
{
register int prefix;
register UINT32 op;
int prefix;
UINT32 op;
 
CPU_PREV_EIP = CPU_EIP;
CPU_STATSAVE.cpu_inst = CPU_STATSAVE.cpu_inst_default;
 
@@ -118,7 +113,7 @@
}
ctx[ctx_index].opbytes = 0;
#endif
 
for (prefix = 0; prefix < MAX_PREFIX; prefix++) {
GET_PCBYTE(op);
#if defined(IA32_INSTRUCTION_TRACE)
@@ -128,7 +123,7 @@
 
/* prefix */
if (insttable_info[op] & INST_PREFIX) {
(*insttable_1byte[op])();
(*insttable_1byte[0][op])();
continue;
}
break;
@@ -136,7 +131,6 @@
if (prefix == MAX_PREFIX) {
EXCEPTION(UD_EXCEPTION, 0);
}
 
#if defined(IA32_INSTRUCTION_TRACE)
if (op == 0x0f) {
@@ -147,141 +141,121 @@
}
ctx_index = (ctx_index + 1) % NELEMENTS(ctx);
#endif
 
/* normal / rep, but not use */
if (!(insttable_info[op] & INST_STRING) || !CPU_INST_REPUSE) {
#if defined(DEBUG)
cpu_debug_rep_cont = 0;
#endif
//QueryPerformanceCounter(&timeuse_li);
//timeuse_tmpstart = timeuse_li.QuadPart;
(*insttable_1byte[CPU_INST_OP32][op])();
return;
}
 
(*insttable_1byte[op | (CPU_INST_OP32<<8)])();
}else{
 
/* rep */
CPU_WORKCLOCK(20);
/* rep */
CPU_WORKCLOCK(5);
#if defined(DEBUG)
if (!cpu_debug_rep_cont) {
cpu_debug_rep_cont = 1;
cpu_debug_rep_regs = CPU_STATSAVE.cpu_regs;
}
if (!cpu_debug_rep_cont) {
cpu_debug_rep_cont = 1;
cpu_debug_rep_regs = CPU_STATSAVE.cpu_regs;
}
#endif
if (!CPU_INST_AS32) {
if (CPU_CX != 0) {
if (!(insttable_info[op] & REP_CHECKZF)) {
/* rep */
for (;;) {
(*insttable_1byte[op | (CPU_INST_OP32<<8)])();
if (--CPU_CX == 0) {
if (!CPU_INST_AS32) {
if (CPU_CX != 0) {
if (!(insttable_info[op] & REP_CHECKZF)) {
/* rep */
for (;;) {
(*insttable_1byte[CPU_INST_OP32][op])();
if (--CPU_CX == 0) {
#if defined(DEBUG)
cpu_debug_rep_cont = 0;
cpu_debug_rep_cont = 0;
#endif
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
break;
}
} else if (CPU_INST_REPUSE != 0xf2) {
/* repe */
for (;;) {
(*insttable_1byte[op | (CPU_INST_OP32<<8)])();
if (--CPU_CX == 0 || CC_NZ) {
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
}
} else if (CPU_INST_REPUSE != 0xf2) {
/* repe */
for (;;) {
(*insttable_1byte[CPU_INST_OP32][op])();
if (--CPU_CX == 0 || CC_NZ) {
#if defined(DEBUG)
cpu_debug_rep_cont = 0;
cpu_debug_rep_cont = 0;
#endif
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
break;
}
} else {
/* repne */
for (;;) {
(*insttable_1byte[op | (CPU_INST_OP32<<8)])();
if (--CPU_CX == 0 || CC_Z) {
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
}
} else {
/* repne */
for (;;) {
(*insttable_1byte[CPU_INST_OP32][op])();
if (--CPU_CX == 0 || CC_Z) {
#if defined(DEBUG)
cpu_debug_rep_cont = 0;
cpu_debug_rep_cont = 0;
#endif
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
}
}
} else {
if (CPU_ECX != 0) {
if (!(insttable_info[op] & REP_CHECKZF)) {
/* rep */
for (;;) {
(*insttable_1byte[op | (CPU_INST_OP32<<8)])();
if (--CPU_ECX == 0) {
}
} else {
if (CPU_ECX != 0) {
if (!(insttable_info[op] & REP_CHECKZF)) {
/* rep */
for (;;) {
(*insttable_1byte[CPU_INST_OP32][op])();
if (--CPU_ECX == 0) {
#if defined(DEBUG)
cpu_debug_rep_cont = 0;
cpu_debug_rep_cont = 0;
#endif
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
break;
}
} else if (CPU_INST_REPUSE != 0xf2) {
/* repe */
for (;;) {
(*insttable_1byte[op | (CPU_INST_OP32<<8)])();
if (--CPU_ECX == 0 || CC_NZ) {
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
}
} else if (CPU_INST_REPUSE != 0xf2) {
/* repe */
for (;;) {
(*insttable_1byte[CPU_INST_OP32][op])();
if (--CPU_ECX == 0 || CC_NZ) {
#if defined(DEBUG)
cpu_debug_rep_cont = 0;
cpu_debug_rep_cont = 0;
#endif
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
break;
}
} else {
/* repne */
for (;;) {
(*insttable_1byte[op | (CPU_INST_OP32<<8)])();
if (--CPU_ECX == 0 || CC_Z) {
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
}
} else {
/* repne */
for (;;) {
(*insttable_1byte[CPU_INST_OP32][op])();
if (--CPU_ECX == 0 || CC_Z) {
#if defined(DEBUG)
cpu_debug_rep_cont = 0;
cpu_debug_rep_cont = 0;
#endif
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
break;
}
if (CPU_REMCLOCK <= 0) {
CPU_EIP = CPU_PREV_EIP;
break;
}
}
}
}
}
//QueryPerformanceCounter(&timeuse_li);
//timeuse_nevent[op>>5] = timeuse_li.QuadPart - timeuse_tmpstart;
//timeuse_nevent[op>>5]++;
//if(timeuse_totalcount>10000000){
// long long int total = timeuse_nevent[0]+timeuse_nevent[1]+timeuse_nevent[2]+timeuse_nevent[3]
// + timeuse_nevent[4]+timeuse_nevent[5]+timeuse_nevent[6]+timeuse_nevent[7];
// if(total>0){
// TRACEOUT(("0:%d%%, 1:%d%%, 2:%d%%, 3:%d%%, 4:%d%%, 5:%d%%, 6:%d%%, 7:%d%%", (int)(100*timeuse_nevent[0]/total), (int)(100*timeuse_nevent[1]/total), (int)(100*timeuse_nevent[2]/total), (int)(100*timeuse_nevent[3]/total)
// , (int)(100*timeuse_nevent[4]/total), (int)(100*timeuse_nevent[5]/total), (int)(100*timeuse_nevent[6]/total), (int)(100*timeuse_nevent[7]/total)));
// timeuse_totalcount = timeuse_nevent[0] = timeuse_nevent[1] = timeuse_nevent[2] = timeuse_nevent[3]
// = timeuse_nevent[4] = timeuse_nevent[5] = timeuse_nevent[6] = timeuse_nevent[7] = 0;
// }
//}else{
// timeuse_totalcount++;
//}
}
/np21/i386c/ia32/inst_table.h
@@ -30,14 +30,12 @@
extern "C" {
#endif
 
void changeInstTable(int PM, int VM86);
 
/* info of instruction */
extern UINT8 insttable_info[256];
 
/* table of instruction */
extern void (*insttable_1byte[2*256])(void);
extern void (*insttable_2byte[2*256])(void);
extern void (*insttable_1byte[2][256])(void);
extern void (*insttable_2byte[2][256])(void);
 
 
/*
/np21/i386c/ia32/ia32.mcr
@@ -42,21 +42,21 @@
 
#define SWAP_BYTE(p, q) \
do { \
register UINT8 __tmp = (p); \
UINT8 __tmp = (p); \
(p) = (q); \
(q) = __tmp; \
} while (/*CONSTCOND*/ 0)
 
#define SWAP_WORD(p, q) \
do { \
register UINT16 __tmp = (p); \
UINT16 __tmp = (p); \
(p) = (q); \
(q) = __tmp; \
} while (/*CONSTCOND*/ 0)
 
#define SWAP_DWORD(p, q) \
do { \
register UINT32 __tmp = (p); \
UINT32 __tmp = (p); \
(p) = (q); \
(q) = __tmp; \
} while (/*CONSTCOND*/ 0)
@@ -90,7 +90,7 @@
/* コードフェッチに使用するので、OpSize の影響を受けてはいけない */
#define _ADD_EIP(v) \
do { \
register UINT32 __tmp_ip = CPU_EIP + (v); \
UINT32 __tmp_ip = CPU_EIP + (v); \
if (!CPU_STATSAVE.cpu_inst_default.op_32) { \
__tmp_ip &= 0xffff; \
} \
@@ -389,7 +389,7 @@
 
#define _DWORD_SBB(r, d, s) \
do { \
register UINT32 __c = (CPU_FLAGL & C_FLAG); \
UINT32 __c = (CPU_FLAGL & C_FLAG); \
(r) = (d) - (s) - __c; \
CPU_OV = ((d) ^ (r)) & ((d) ^ (s)) & 0x80000000; \
CPU_FLAGL = (UINT8)(((r) ^ (d) ^ (s)) & A_FLAG); \
@@ -554,7 +554,7 @@
 
#define _DWORD_MUL(r, d, s) \
do { \
register UINT64 __v; \
UINT64 __v; \
CPU_FLAGL &= (Z_FLAG | S_FLAG | A_FLAG | P_FLAG); \
__v = (UINT64)(d) * (UINT64)(s); \
(r) = (UINT32)__v; \
@@ -597,7 +597,7 @@
/* flag no check */
#define _BYTE_INC(s) \
do { \
register UINT8 __b = (s); \
UINT8 __b = (s); \
__b++; \
CPU_OV = __b & (__b ^ (s)) & 0x80; \
CPU_FLAGL &= C_FLAG; \
@@ -608,7 +608,7 @@
 
#define _WORD_INC(s) \
do { \
register UINT16 __b = (s); \
UINT16 __b = (s); \
__b++; \
CPU_OV = __b & (__b ^ (s)) & 0x8000; \
CPU_FLAGL &= C_FLAG; \
@@ -619,7 +619,7 @@
 
#define _DWORD_INC(s) \
do { \
register UINT32 __b = (s); \
UINT32 __b = (s); \
__b++; \
CPU_OV = __b & (__b ^ (s)) & 0x80000000; \
CPU_FLAGL &= C_FLAG; \
@@ -637,7 +637,7 @@
/* flag no check */
#define _BYTE_DEC(s) \
do { \
register UINT8 __b = (s); \
UINT8 __b = (s); \
__b--; \
CPU_OV = (s) & (__b ^ (s)) & 0x80; \
CPU_FLAGL &= C_FLAG; \
@@ -648,7 +648,7 @@
 
#define _WORD_DEC(s) \
do { \
register UINT16 __b = (s); \
UINT16 __b = (s); \
__b--; \
CPU_OV = (s) & (__b ^ (s)) & 0x8000; \
CPU_FLAGL &= C_FLAG; \
@@ -659,7 +659,7 @@
 
#define _DWORD_DEC(s) \
do { \
register UINT32 __b = (s); \
UINT32 __b = (s); \
__b--; \
CPU_OV = (s) & (__b ^ (s)) & 0x80000000; \
CPU_FLAGL &= C_FLAG; \
@@ -695,7 +695,7 @@
*/
#define REGPUSH(reg, clock) \
do { \
register UINT16 __new_sp = CPU_SP - 2; \
UINT16 __new_sp = CPU_SP - 2; \
CPU_WORKCLOCK(clock); \
cpu_vmemorywrite_w(CPU_SS_INDEX, __new_sp, reg); \
CPU_SP = __new_sp; \
@@ -703,7 +703,7 @@
 
#define REGPUSH_32(reg, clock) \
do { \
register UINT32 __new_esp = CPU_ESP - 4; \
UINT32 __new_esp = CPU_ESP - 4; \
CPU_WORKCLOCK(clock); \
cpu_vmemorywrite_d(CPU_SS_INDEX, __new_esp, reg); \
CPU_ESP = __new_esp; \
@@ -711,7 +711,7 @@
 
#define REGPUSH0(reg) \
do { \
register UINT16 __new_sp = CPU_SP - 2; \
UINT16 __new_sp = CPU_SP - 2; \
cpu_vmemorywrite_w(CPU_SS_INDEX, __new_sp, (UINT16)reg); \
CPU_SP = __new_sp; \
} while (/*CONSTCOND*/ 0)
@@ -719,7 +719,7 @@
/* Operand Size == 16 && Stack Size == 32 */
#define REGPUSH0_16_32(reg) \
do { \
register UINT32 __new_esp = CPU_ESP - 2; \
UINT32 __new_esp = CPU_ESP - 2; \
cpu_vmemorywrite_w(CPU_SS_INDEX, __new_esp, (UINT16)reg); \
CPU_ESP = __new_esp; \
} while (/*CONSTCOND*/ 0)
@@ -727,14 +727,14 @@
/* Operand Size == 32 && Stack Size == 16 */
#define REGPUSH0_32_16(reg) \
do { \
register UINT16 __new_sp = CPU_SP - 4; \
UINT16 __new_sp = CPU_SP - 4; \
cpu_vmemorywrite_d(CPU_SS_INDEX, __new_sp, reg); \
CPU_SP = __new_sp; \
} while (/*CONSTCOND*/ 0)
 
#define REGPUSH0_32(reg) \
do { \
register UINT32 __new_esp = CPU_ESP - 4; \
UINT32 __new_esp = CPU_ESP - 4; \
cpu_vmemorywrite_d(CPU_SS_INDEX, __new_esp, reg); \
CPU_ESP = __new_esp; \
} while (/*CONSTCOND*/ 0)
@@ -827,7 +827,7 @@
*/
#define SP_PUSH_16(reg) \
do { \
register UINT16 __sp = CPU_SP; \
UINT16 __sp = CPU_SP; \
if (!CPU_STAT_SS32) { \
REGPUSH0(__sp); \
} else { \
@@ -837,7 +837,7 @@
 
#define ESP_PUSH_32(reg) \
do { \
register UINT32 __esp = CPU_ESP; \
UINT32 __esp = CPU_ESP; \
if (!CPU_STAT_SS32) { \
REGPUSH0_32_16(__esp); \
} else { \
@@ -847,7 +847,7 @@
 
#define SP_POP_16(reg) \
do { \
register UINT32 __sp; \
UINT32 __sp; \
if (!CPU_STAT_SS32) { \
__sp = CPU_SP; \
} else { \
@@ -858,7 +858,7 @@
 
#define ESP_POP_32(reg) \
do { \
register UINT32 __esp; \
UINT32 __esp; \
if (!CPU_STAT_SS32) { \
__esp = CPU_SP; \
} else { \
@@ -873,8 +873,8 @@
*/
#define JMPSHORT(clock) \
do { \
register UINT32 __new_ip; \
register UINT32 __dest; \
UINT32 __new_ip; \
UINT32 __dest; \
CPU_WORKCLOCK(clock); \
GET_PCBYTESD(__dest); \
__new_ip = CPU_EIP + __dest; \
@@ -889,8 +889,8 @@
 
#define JMPNEAR(clock) \
do { \
register UINT16 __new_ip; \
register SINT16 __dest; \
UINT16 __new_ip; \
SINT16 __dest; \
CPU_WORKCLOCK(clock); \
GET_PCWORDS(__dest); \
__new_ip = CPU_IP + __dest; \
@@ -902,8 +902,8 @@
 
#define JMPNEAR32(clock) \
do { \
register UINT32 __new_ip; \
register UINT32 __dest; \
UINT32 __new_ip; \
UINT32 __dest; \
CPU_WORKCLOCK(clock); \
GET_PCDWORD(__dest); \
__new_ip = CPU_EIP + __dest; \
/np21/i386c/ia32/ia32.c
@@ -137,9 +137,9 @@
{
 
if (onoff) {
//TRACEOUT(("change_pm: Entering to Protected-Mode..."));
VERBOSE(("change_pm: Entering to Protected-Mode..."));
} else {
//TRACEOUT(("change_pm: Leaveing from Protected-Mode..."));
VERBOSE(("change_pm: Leaveing from Protected-Mode..."));
}
 
CPU_INST_OP32 = CPU_INST_AS32 =
@@ -155,9 +155,9 @@
{
 
if (onoff) {
//TRACEOUT(("change_pg: Entering to Paging-Mode..."));
VERBOSE(("change_pg: Entering to Paging-Mode..."));
} else {
//TRACEOUT(("change_pg: Leaveing from Paging-Mode..."));
VERBOSE(("change_pg: Leaveing from Paging-Mode..."));
}
 
CPU_STAT_PAGING = onoff;
@@ -170,7 +170,7 @@
 
CPU_STAT_VM86 = onoff;
if (onoff) {
//TRACEOUT(("change_vm: Entering to Virtual-8086-Mode..."));
VERBOSE(("change_vm: Entering to Virtual-8086-Mode..."));
for (i = 0; i < CPU_SEGREG_NUM; i++) {
LOAD_SEGREG(i, CPU_REGS_SREG(i));
}
@@ -180,7 +180,7 @@
CPU_STAT_SS32 = 0;
set_cpl(3);
} else {
//TRACEOUT(("change_vm: Leaveing from Virtual-8086-Mode..."));
VERBOSE(("change_vm: Leaveing from Virtual-8086-Mode..."));
}
}
 
/np21/i386c/ia32/cpu_mem.c
@@ -371,8 +371,8 @@
cpu_codefetch(UINT32 offset)
{
const int ucrw = CPU_PAGE_READ_CODE | CPU_STAT_USER_MODE;
register descriptor_t *sdp;
register UINT32 addr;
descriptor_t *sdp;
UINT32 addr;
 
sdp = &CPU_CS_DESC;
addr = sdp->u.seg.segbase + offset;
@@ -390,8 +390,8 @@
cpu_codefetch_w(UINT32 offset)
{
const int ucrw = CPU_PAGE_READ_CODE | CPU_STAT_USER_MODE;
register descriptor_t *sdp;
register UINT32 addr;
descriptor_t *sdp;
UINT32 addr;
 
sdp = &CPU_CS_DESC;
addr = sdp->u.seg.segbase + offset;
@@ -409,8 +409,8 @@
cpu_codefetch_d(UINT32 offset)
{
const int ucrw = CPU_PAGE_READ_CODE | CPU_STAT_USER_MODE;
register descriptor_t *sdp;
register UINT32 addr;
descriptor_t *sdp;
UINT32 addr;
 
sdp = &CPU_CS_DESC;
addr = sdp->u.seg.segbase + offset;
@@ -431,7 +431,7 @@
UINT64 MEMCALL
cpu_memoryread_q(UINT32 paddr)
{
register UINT64 value;
UINT64 value;
 
value = cpu_memoryread_d(paddr);
value += (UINT64)cpu_memoryread_d(paddr + 4) << 32;
@@ -450,8 +450,8 @@
REG80 MEMCALL
cpu_memoryread_f(UINT32 paddr)
{
register REG80 value;
register int i;
REG80 value;
int i;
 
for (i = 0; i < (int)sizeof(REG80); ++i) {
value.b[i] = cpu_memoryread(paddr + i);
@@ -462,7 +462,7 @@
void MEMCALL
cpu_memorywrite_f(UINT32 paddr, const REG80 *value)
{
register int i;
int i;
 
for (i = 0; i < (int)sizeof(REG80); ++i) {
cpu_memorywrite(paddr + i, value->b[i]);
@@ -488,9 +488,9 @@
REG80 MEMCALL
cpu_vmemoryread_f(int idx, UINT32 offset)
{
register descriptor_t *sdp;
register UINT32 addr;
register int exc;
descriptor_t *sdp;
UINT32 addr;
int exc;
 
__ASSERT((unsigned int)idx < CPU_SEGREG_NUM);
 
@@ -527,9 +527,9 @@
void MEMCALL
cpu_vmemorywrite_f(int idx, UINT32 offset, const REG80 *value)
{
register descriptor_t *sdp;
register UINT32 addr;
register int exc;
descriptor_t *sdp;
UINT32 addr;
int exc;
 
__ASSERT((unsigned int)idx < CPU_SEGREG_NUM);
 
/np21/i386c/ia32/interface.c
@@ -186,7 +186,7 @@
ia32_interrupt(int vect, int soft)
{
 
//TRACEOUT(("int (%x, %x) PE=%d VM=%d", vect, soft, CPU_STAT_PM, CPU_STAT_VM86));
// TRACEOUT(("int (%x, %x) PE=%d VM=%d", vect, soft, CPU_STAT_PM, CPU_STAT_VM86));
if (!soft) {
INTERRUPT(vect, INTR_TYPE_EXTINTR);
} else {
/np21/i386c/ia32/paging.c
@@ -204,9 +204,9 @@
cpu_memory_access_la_RMW_b(UINT32 laddr, UINT32 (CPUCALL *func)(UINT32, void *), void *arg)
{
const int ucrw = CPU_PAGE_WRITE_DATA | CPU_STAT_USER_MODE;
register UINT32 paddr;
register UINT32 result;
register UINT8 value;
UINT32 paddr;
UINT32 result;
UINT8 value;
 
paddr = paging(laddr, ucrw);
value = cpu_memoryread(paddr);
@@ -220,8 +220,8 @@
{
const int ucrw = CPU_PAGE_WRITE_DATA | CPU_STAT_USER_MODE;
UINT32 paddr[2];
register UINT32 result;
register UINT16 value;
UINT32 result;
UINT16 value;
 
paddr[0] = paging(laddr, ucrw);
if ((laddr + 1) & CPU_PAGE_MASK) {
@@ -245,9 +245,9 @@
{
const int ucrw = CPU_PAGE_WRITE_DATA | CPU_STAT_USER_MODE;
UINT32 paddr[2];
register UINT32 result;
register UINT32 value;
register int remain;
UINT32 result;
UINT32 value;
int remain;
 
paddr[0] = paging(laddr, ucrw);
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -308,7 +308,7 @@
cpu_linear_memory_read_w(UINT32 laddr, int ucrw)
{
UINT32 paddr[2];
register UINT16 value;
UINT16 value;
 
paddr[0] = paging(laddr, ucrw);
if ((laddr + 1) & CPU_PAGE_MASK)
@@ -324,8 +324,8 @@
cpu_linear_memory_read_d(UINT32 laddr, int ucrw)
{
UINT32 paddr[2];
register UINT32 value;
register UINT remain;
UINT32 value;
UINT remain;
 
paddr[0] = paging(laddr, ucrw);
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -363,8 +363,8 @@
cpu_linear_memory_read_q(UINT32 laddr, int ucrw)
{
UINT32 paddr[2];
register UINT64 value;
register UINT remain;
UINT64 value;
UINT remain;
 
paddr[0] = paging(laddr, ucrw);
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -430,9 +430,9 @@
cpu_linear_memory_read_f(UINT32 laddr, int ucrw)
{
UINT32 paddr[2];
register REG80 value;
register UINT remain;
register UINT i, j;
REG80 value;
UINT remain;
UINT i, j;
 
paddr[0] = paging(laddr, ucrw);
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -477,7 +477,7 @@
cpu_linear_memory_write_d(UINT32 laddr, UINT32 value, int ucrw)
{
UINT32 paddr[2];
register UINT remain;
UINT remain;
 
paddr[0] = paging(laddr, ucrw);
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -515,7 +515,7 @@
cpu_linear_memory_write_q(UINT32 laddr, UINT64 value, int ucrw)
{
UINT32 paddr[2];
register UINT remain;
UINT remain;
 
paddr[0] = paging(laddr, ucrw);
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -581,8 +581,8 @@
cpu_linear_memory_write_f(UINT32 laddr, const REG80 *value, int ucrw)
{
UINT32 paddr[2];
register UINT remain;
register UINT i, j;
UINT remain;
UINT i, j;
 
paddr[0] = paging(laddr, ucrw);
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -606,9 +606,9 @@
void MEMCALL
cpu_memory_access_la_region(UINT32 laddr, UINT length, int ucrw, UINT8 *data)
{
register UINT32 paddr;
register UINT remain; /* page remain */
register UINT r;
UINT32 paddr;
UINT remain; /* page remain */
UINT r;
 
while (length > 0) {
remain = CPU_PAGE_SIZE - (laddr & CPU_PAGE_MASK);
@@ -645,13 +645,13 @@
paging(UINT32 laddr, int ucrw)
{
struct tlb_entry *ep;
register UINT32 paddr; /* physical address */
register UINT32 pde_addr; /* page directory entry address */
register UINT32 pde; /* page directory entry */
register UINT32 pte_addr; /* page table entry address */
register UINT32 pte; /* page table entry */
register UINT bit;
register UINT err;
UINT32 paddr; /* physical address */
UINT32 pde_addr; /* page directory entry address */
UINT32 pde; /* page directory entry */
UINT32 pte_addr; /* page table entry address */
UINT32 pte; /* page table entry */
UINT bit;
UINT err;
 
ep = tlb_lookup(laddr, ucrw);
if (ep != NULL)
@@ -775,8 +775,8 @@
tlb_flush(BOOL allflush)
{
struct tlb_entry *ep;
register int i;
register int n;
int i;
int n;
 
if (allflush) {
tlb_init();
@@ -797,8 +797,8 @@
tlb_flush_page(UINT32 laddr)
{
struct tlb_entry *ep;
register int idx;
register int n;
int idx;
int n;
 
idx = (laddr >> TLB_ENTRY_SHIFT) & TLB_ENTRY_MASK;
 
@@ -816,9 +816,9 @@
tlb_lookup(UINT32 laddr, int ucrw)
{
struct tlb_entry *ep;
register UINT bit;
register int idx;
register int n;
UINT bit;
int idx;
int n;
 
n = (ucrw & CPU_PAGE_CODE) ? 1 : 0;
idx = (laddr >> TLB_ENTRY_SHIFT) & TLB_ENTRY_MASK;
@@ -848,8 +848,8 @@
tlb_update(UINT32 laddr, UINT entry, int bit)
{
struct tlb_entry *ep;
register int idx;
register int n;
int idx;
int n;
 
n = bit & 1;
idx = (laddr >> TLB_ENTRY_SHIFT) & TLB_ENTRY_MASK;
/np21/pccore.h
@@ -136,23 +136,12 @@
UINT8 hdrvacc;
 
OEMCHAR sasihdd[2][MAX_PATH]; // ver0.74
#if defined(SUPPORT_IDEIO)
OEMCHAR idecd[2][MAX_PATH]; // ver0.74
#endif
#if defined(SUPPORT_SCSI)
OEMCHAR scsihdd[4][MAX_PATH]; // ver0.74
#endif
OEMCHAR fontfile[MAX_PATH];
OEMCHAR biospath[MAX_PATH];
OEMCHAR hdrvroot[MAX_PATH];
#ifdef SUPPORT_LGY98
UINT8 uselgy98;
UINT16 lgy98io;
UINT8 lgy98irq;
OEMCHAR lgy98tap[MAX_PATH];
#endif
 
};
typedef struct tagNP2Config NP2CFG; /*!< The define of config */
 
/np21/io/cpuio.c
@@ -3,22 +3,16 @@
#include "pccore.h"
#include "iocore.h"
 
#if defined(SUPPORT_IDEIO)
#include "ideio.h"
#endif
 
// ---- I/O
 
static void IOOUTCALL cpuio_of0(UINT port, REG8 dat) {
 
#if defined(TRACE)
if (CPU_MSW & 1) {
TRACEOUT(("80286 ProtectMode Disable"));
}
#endif
if (CPU_MSW & 1) {
//return;
TRACEOUT(("80286 ProtectMode Disable"));
}
epsonio.cpumode = (CPU_MSW & 1)?'P':'R';
CPU_A20EN(FALSE);
CPU_RESETREQ = 1;
@@ -27,11 +21,6 @@
(void)dat;
}
 
static void IOOUTCALL cpuio_of1(UINT port, REG8 dat) {
TRACEOUT(("IDE master/slave read"));
//f0_ide_status_read = 2; // IDE master/slave read
}
 
static void IOOUTCALL cpuio_of2(UINT port, REG8 dat) {
 
CPU_A20EN(TRUE);
@@ -49,41 +38,6 @@
else { // for AMD-98
ret = 0x18; // 0x14?
}
#if defined(SUPPORT_IDEIO)
/*if(f0_ide_status_read){
REG8 bank = ideio.bank[1] & 0x7f;
if(bank < 2){
IDEDEV dev = ideio.dev + bank;
if (dev) {
IDEDRV drv = dev->drv + (f0_ide_status_read - 1);
if (drv->device != IDETYPE_NONE) {
ret = (ret & ~(1<<5))|(1<<5);
}else{
ret = (ret & ~(1<<5));
}
}
}
f0_ide_status_read--;
}*/
{
REG8 bank = ideio.bank[1] & 0x7f;
TRACEOUT(("IDE master/slave read"));
ret = (ret & ~0x60);
if(bank == 0){
IDEDEV dev = ideio.dev + bank;
if (dev) {
IDEDRV drv = dev->drv;
if (drv->device != IDETYPE_NONE) {
ret |= 0x20;
}
drv++;
if (drv->device != IDETYPE_NONE) {
ret |= 0x40;
}
}
}
}
#endif
(void)port;
return(ret);
}
@@ -142,23 +96,18 @@
cpuio_if0, cpuio_if2, NULL, NULL,
NULL, NULL, NULL, NULL};
#else
static const IOOUT cpuioof0[16] = {
cpuio_of0, cpuio_of1, cpuio_of2, NULL, NULL, NULL, cpuio_of6, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
static const IOOUT cpuioof0[8] = {
cpuio_of0, cpuio_of2, NULL, cpuio_of6,
NULL, NULL, NULL, NULL};
 
static const IOINP cpuioif0[16] = {
cpuio_if0, NULL, cpuio_if2, NULL, NULL, NULL, cpuio_if6, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
static const IOINP cpuioif0[8] = {
cpuio_if0, cpuio_if2, NULL, cpuio_if6,
NULL, NULL, NULL, NULL};
#endif
//static const IOOUT cpuioof1[1] = {cpuio_of1};
 
void cpuio_bind(void) {
#if !defined(CPUCORE_IA32)
iocore_attachsysoutex(0x00f0, 0x0cf1, cpuioof0, 16);
iocore_attachsysinpex(0x00f0, 0x0cf1, cpuioif0, 16);
#else
iocore_attachsysoutex(0x00f0, 0x0cf0, cpuioof0, 16);
iocore_attachsysinpex(0x00f0, 0x0cf0, cpuioif0, 16);
#endif
 
iocore_attachsysoutex(0x00f0, 0x0cf1, cpuioof0, 8);
iocore_attachsysinpex(0x00f0, 0x0cf1, cpuioif0, 8);
}
 
/np21/io/serial.c
@@ -24,7 +24,7 @@
keybrd.data = keybrd.buf[keybrd.bufpos];
keybrd.bufpos = (keybrd.bufpos + 1) & KB_BUFMASK;
}
//TRACEOUT(("recv -> %02x", keybrd.data));
// TRACEOUT(("recv -> %02x", keybrd.data));
}
pic_setirq(1);
nevent_set(NEVENT_KEYBOARD, keybrd.xferclock,
@@ -34,10 +34,9 @@
}
 
static void IOOUTCALL keyboard_o41(UINT port, REG8 dat) {
//TRACEOUT(("out41 -> %02x %.4x:%.8x PM=%d", dat, CPU_CS, CPU_EIP, CPU_STAT_PM));
 
if (keybrd.cmd & 1) {
//TRACEOUT(("send -> %02x", dat));
// TRACEOUT(("send -> %02x", dat));
keystat_ctrlsend(dat);
}
else {
@@ -48,13 +47,10 @@
 
static void IOOUTCALL keyboard_o43(UINT port, REG8 dat) {
 
//TRACEOUT(("out43 -> %02x %.4x:%.8x PM=%d", dat, CPU_CS, CPU_EIP, CPU_STAT_PM));
// TRACEOUT(("out43 -> %02x %.4x:%.8x", dat, CPU_CS, CPU_EIP));
if ((!(dat & 0x08)) && (keybrd.cmd & 0x08)) {
keyboard_resetsignal();
}
if ((!(dat & 0x30)) && (keybrd.cmd & 0x30)) {
keyboard_resetsignal();
}
if (dat & 0x10) {
keybrd.status &= ~(0x38);
}
@@ -67,42 +63,18 @@
(void)port;
keybrd.status &= ~2;
pic_resetirq(1);
//TRACEOUT(("in41 -> %02x %.4x:%.8x PM=%d", keybrd.data, CPU_CS, CPU_EIP, CPU_STAT_PM));
// TRACEOUT(("in41 -> %02x %.4x:%.8x", keybrd.data, CPU_CS, CPU_EIP));
return(keybrd.data);
}
 
static REG8 IOINPCALL keyboard_i43(UINT port) {
 
(void)port;
//TRACEOUT(("in43 -> %02x %.4x:%.8x PM=%d", keybrd.status, CPU_CS, CPU_EIP, CPU_STAT_PM));
// TRACEOUT(("in43 -> %02x %.4x:%.8x", keybrd.status, CPU_CS, CPU_EIP));
return(keybrd.status | 0x85);
}
 
 
 
 
static void IOOUTCALL keyboard_oE1(UINT port, REG8 dat) {
keyboard_o41(port, dat);
TRACEOUT(("outE0 -> %02x %.4x:%.8x", dat, CPU_CS, CPU_EIP));
}
static void IOOUTCALL keyboard_oE3(UINT port, REG8 dat) {
keyboard_o43(port, dat);
TRACEOUT(("outE1 -> %02x %.4x:%.8x", dat, CPU_CS, CPU_EIP));
}
static REG8 IOINPCALL keyboard_iE1(UINT port) {
static REG8 tmp = 0;
TRACEOUT(("inE1 -> %02x %.4x:%.8x", keybrd.data, CPU_CS, CPU_EIP));
tmp++;
return tmp;//keyboard_i41(port);
}
static REG8 IOINPCALL keyboard_iE3(UINT port) {
static REG8 tmp = 0;
TRACEOUT(("inE3 -> %02x %.4x:%.8x", keybrd.status, CPU_CS, CPU_EIP));
tmp++;
return tmp;//keyboard_i43(port);
}
 
 
// ----
 
static const IOOUT keybrdo41[2] = {
@@ -111,14 +83,7 @@
static const IOINP keybrdi41[2] = {
keyboard_i41, keyboard_i43};
 
static const IOOUT keybrdoE1[2] = {
keyboard_oE1, keyboard_oE3};
 
static const IOINP keybrdiE1[2] = {
keyboard_iE1, keyboard_iE3};
 
 
void keyboard_reset(const NP2CFG *pConfig) {
 
ZeroMemory(&keybrd, sizeof(keybrd));
@@ -132,10 +97,8 @@
 
keystat_ctrlreset();
keybrd.xferclock = pccore.realclock / 1920;
iocore_attachsysoutex(0x0041, 0x00f1, keybrdo41, 2);
iocore_attachsysinpex(0x0041, 0x00f1, keybrdi41, 2);
//iocore_attachsysoutex(0x00E1, 0x0cf1, keybrdoE1, 2);
//iocore_attachsysinpex(0x00E1, 0x0cf1, keybrdiE1, 2);
iocore_attachsysoutex(0x0041, 0x0cf1, keybrdo41, 2);
iocore_attachsysinpex(0x0041, 0x0cf1, keybrdi41, 2);
}
 
void keyboard_resetsignal(void) {
/np21/io/iocore.c
@@ -6,7 +6,6 @@
#include "sound.h"
#include "fmboard.h"
#include "ideio.h"
#include "network/lgy98.h"
#include "cs4231io.h"
#include "iocore16.tbl"
 
@@ -63,37 +62,7 @@
static _IOCORE iocore;
static UINT8 ioterminate[0x100];
 
static REG8 PnP_initialized = 0;
static REG8 PnP_RegAddr = 0x00;
static UINT PnP_RD_Port = 0x0000;
 
static REG8 PnP_RegisterBuf[256][256] = {0};
static REG8 PnP_RegisterBufCSUM[256] = {0};
static REG8 PnP_RegisterBufIsoFlg = 0;
static REG8 PnP_RegisterBufSendPos = 0;
 
extern UINT lgy98_baseaddr;
 
void PnP_init(){
int i, j;
for(i=0;i<256;i++){
PnP_RegisterBuf[i][0x00] = i;
PnP_RegisterBuf[i][0x01] = i;
PnP_RegisterBufCSUM[i] = 0;
for(j=0;j<8;j++){
if((PnP_RegisterBuf[i][0x01]>>j)&0x1) PnP_RegisterBufCSUM[i]++;
}
}
}
int PnP_findRegAddrFromPort(UINT port){
REG8 ptmp = port >> 2;
int i;
for(i=0;i<256;i++){
if(PnP_RegisterBuf[i][0x00]==ptmp) return i;
}
return -1;
}
 
// ----
 
static void IOOUTCALL defout8(UINT port, REG8 dat) {
@@ -116,54 +85,10 @@
dipsw_w8(port, dat);
return;
}
//keytmp = (port & 0xfcff);
//if (0xE0 <= keytmp && keytmp <= 0xEE) {
// //TRACEOUT(("out%X - %02X %.4x %.4x", port&0xff, dat, CPU_CS, CPU_IP));
// //dipsw_w8(port, dat);
// //keytmp = keytmp ^ 0xff;
// return;
//}
//if ((port & 0xffff) == 0x0259) {
// //TRACEOUT(("PnP 0259h Register Address = %02X %.4x %.4x", dat, CPU_CS, CPU_IP));
// /*if(!PnP_initialized){
// PnP_init();
// PnP_initialized = 1;
// }
// PnP_RegAddr = dat;
// switch(PnP_RegAddr){
// case 0x01:
// PnP_RegisterBufIsoFlg = 0;
// PnP_RegisterBufSendPos = 0;
// break;
// }*/
// //dipsw_w8(port, dat);
// return;
//}
//if ((port & 0xffff) == 0x0A59) {
// //TRACEOUT(("PnP 0A59h Register Write Data - %x %.4x %.4x", dat, CPU_CS, CPU_IP));
// /*switch(PnP_RegAddr){
// case 0x00:
// PnP_RegisterBuf[dat][0x00] = dat;
// PnP_RD_Port = (PnP_RegisterBuf[dat][0x00] << 2) | 0x3;
// break;
// case 0x02:
// PnP_RegisterBufSendPos = 0;
// PnP_RegisterBufIsoFlg = 0;
// break;
// default:
// PnP_RegisterBuf[dat][PnP_RegAddr] = dat;
// break;
// }*/
// //dipsw_w8(port, dat);
// return;
//}
//if ((port&0xfff0) != 0x0140) {
// TRACEOUT(("defout8 - %x %x %.4x %.4x", port, dat, CPU_CS, CPU_IP));
//}
// TRACEOUT(("defout8 - %x %x %.4x %.4x", port, dat, CPU_CS, CPU_IP));
}
 
static REG8 IOINPCALL definp8(UINT port) {
//static UINT keytmp = 0xff;
 
#if !defined(DISABLE_SOUND)
UINT tmp;
@@ -180,44 +105,7 @@
if ((port & 0xf0ff) == 0x801e) {
return(dipsw_r8(port));
}
//keytmp = (port & 0xfcff);
//if (0xE0 <= keytmp && keytmp <= 0xEE) {
// //TRACEOUT(("in%X - %.4x %.4x", port&0xff, CPU_CS, CPU_IP));
// //dipsw_w8(port, dat);
// //keytmp = keytmp ^ 0xff;
// return(0xff);
//}
//if (PnP_RD_Port!=0 && port==PnP_RD_Port) {
// int regport;
// //TRACEOUT(("PnP %04X Register Read Data - %.4x %.4x", port, CPU_CS, CPU_IP));
// /*regport = PnP_findRegAddrFromPort(port);
// if(regport>=0){
// REG8 ret = 0x00;
// switch(PnP_RegAddr){
// case 0x01: // Serial Isolation
// if(!PnP_RegisterBufIsoFlg){
// ret = 0x55;
// }else{
// if(PnP_RegisterBufSendPos & 0x8){
// ret = ((7-(PnP_RegisterBufSendPos & 0x7)) <= PnP_RegisterBufCSUM[regport]) ? 0xAA : 0x00;
// PnP_RegisterBufSendPos = (PnP_RegisterBufSendPos+1) & 0xf;
// }else{
// ret = ((PnP_RegisterBuf[regport][0x01] >> PnP_RegisterBufSendPos) & 0x1) ? 0xAA : 0x00;
// PnP_RegisterBufSendPos = (PnP_RegisterBufSendPos+1) & 0xf;
// }
// }
// PnP_RegisterBufIsoFlg = !PnP_RegisterBufIsoFlg;
// return(ret);
// default:
// return(PnP_RegisterBuf[regport][PnP_RegAddr]);
// }
// }else{*/
// return(0xff);
// //}
//}
//if ((port&0xfff0) != 0x0140) {
// TRACEOUT(("definp8 - %x %.4x %.4x", port, CPU_CS, CPU_IP));
//}
// TRACEOUT(("definp8 - %x %.4x %.4x", port, CPU_CS, CPU_IP));
return(0xff);
}
 
@@ -657,16 +545,6 @@
return;
}
#endif
#if defined(SUPPORT_LGY98)
if (port == lgy98_baseaddr + 0x200) {
lgy98_ob200_16(port, dat);
return;
}
//if (port == lgy98_baseaddr + 0x201) {
// lgy98_ob200_8(port, dat);
// return;
//}
#endif
if ((port & 0xfff1) == 0x04a0) {
egc_w16(port, dat);
return;
@@ -703,14 +581,6 @@
return(ideio_r16(port));
}
#endif
#if defined(SUPPORT_LGY98)
if (port == lgy98_baseaddr + 0x200) {
return(lgy98_ib200_16(port));
}
//if (port == lgy98_baseaddr + 0x201) {
// return(lgy98_ib200_8(port));
//}
#endif
if ((port & 0xfffc) == 0x005c) {
return(artic_r16(port));
}
/np21/io/pit.c
@@ -46,7 +46,7 @@
setsystimerevent(pitch->value, NEVENT_RELATIVE);
}
else {
setsystimerevent(1, NEVENT_RELATIVE);
setsystimerevent(0, NEVENT_RELATIVE);
}
}
}
@@ -248,14 +248,12 @@
flag = pitch->flag;
pitch->flag = flag ^ PIT_FLAG_W;
if (!(flag & PIT_FLAG_W)) {
//pitch->value &= 0xff00;
//pitch->value += value;
pitch->value = (pitch->value & 0xff00) | (value);
pitch->value &= 0xff00;
pitch->value += value;
return(TRUE);
}
pitch->value = (pitch->value & 0x00ff) | (value << 8);
//pitch->value &= 0x00ff;
//pitch->value += value << 8;
pitch->value &= 0x00ff;
pitch->value += value << 8;
break;
}
pitch->ctrl &= ~PIT_STAT_CMD;
@@ -389,7 +387,7 @@
}
#if defined(uPD71054)
else {
//TRACEOUT(("multiple latch commands - %x", dat));
TRACEOUT(("multiple latch commands - %x", dat));
for (chnum=0; chnum<3; chnum++) {
if (dat & (2 << chnum)) {
latchcmd(pit.ch + chnum, dat);
/np21/io/fdc.c
@@ -434,7 +434,7 @@
fdc.buf[1] = fdc.treg[fdc.us];
fdc.bufcnt = 2;
fdc.stat[fdc.us] = 0;
// //TRACEOUT(("fdc stat - %d [%.2x]", fdc.us, fdc.buf[0]));
// TRACEOUT(("fdc stat - %d [%.2x]", fdc.us, fdc.buf[0]));
}
else {
for (; i<4; i++) {
@@ -443,7 +443,7 @@
fdc.buf[1] = fdc.treg[i];
fdc.bufcnt = 2;
fdc.stat[i] = 0;
// //TRACEOUT(("fdc stat - %d [%.2x]", i, fdc.buf[0]));
// TRACEOUT(("fdc stat - %d [%.2x]", i, fdc.buf[0]));
break;
}
}
@@ -712,7 +712,7 @@
 
static void IOOUTCALL fdc_o92(UINT port, REG8 dat) {
 
//TRACEOUT(("fdc out %.2x %.2x [%.4x:%.4x]", port, dat, CPU_CS, CPU_IP));
// TRACEOUT(("fdc out %.2x %.2x [%.4x:%.4x]", port, dat, CPU_CS, CPU_IP));
 
if (((port >> 4) ^ fdc.chgreg) & 1) {
return;
@@ -724,7 +724,7 @@
 
static void IOOUTCALL fdc_o94(UINT port, REG8 dat) {
 
//TRACEOUT(("fdc out %.2x %.2x [%.4x:%.4x]", port, dat, CPU_CS, CPU_IP));
// TRACEOUT(("fdc out %.2x %.2x [%.4x:%.4x]", port, dat, CPU_CS, CPU_IP));
 
if (((port >> 4) ^ fdc.chgreg) & 1) {
return;
@@ -738,16 +738,14 @@
}
 
static REG8 IOINPCALL fdc_i90(UINT port) {
int ret;
 
//TRACEOUT(("fdc in %.2x %.2x [%.4x:%.4x]", port, fdc.status, CPU_CS, CPU_IP));
// TRACEOUT(("fdc in %.2x %.2x [%.4x:%.4x]", port, fdc.status,
// CPU_CS, CPU_IP));
 
if (((port >> 4) ^ fdc.chgreg) & 1) {
return(0xff);
}
ret = fdc.status;
//fdc.status = fdc.status ^ 0xf;
return(ret);
return(fdc.status);
}
 
static REG8 IOINPCALL fdc_i92(UINT port) {
@@ -764,7 +762,7 @@
else {
ret = fdc.lastdata;
}
////TRACEOUT(("fdc in %.2x %.2x [%.4x:%.4x]", port, ret, CPU_CS, CPU_IP));
// TRACEOUT(("fdc in %.2x %.2x [%.4x:%.4x]", port, ret, CPU_CS, CPU_IP));
return(ret);
}
 
@@ -791,8 +789,7 @@
{
ret |= 0x08; /* ŠO•t‚¯—Dæ */
}
//TRACEOUT(("fdc in %.2x %.2x [%.4x:%.4x]", port, ret, CPU_CS, CPU_IP));
 
return ret;
}
 
@@ -806,12 +803,11 @@
else {
CTRL_FDMEDIA = DISKTYPE_2DD;
}
//TRACEOUT(("fdc out %.2x %.2x [%.4x:%.4x]", port, dat, CPU_CS, CPU_IP));
(void)port;
}
 
static REG8 IOINPCALL fdc_ibe(UINT port) {
//TRACEOUT(("fdc in %.2x %.2x [%.4x:%.4x]", port, (fdc.chgreg & 3) | 8, CPU_CS, CPU_IP));
 
(void)port;
return((fdc.chgreg & 3) | 8);
}
@@ -822,12 +818,11 @@
if (dat & 0x10) {
fdc.rpm[(dat >> 5) & 3] = dat & 1;
}
//TRACEOUT(("fdc out %.2x %.2x [%.4x:%.4x]", port, dat, CPU_CS, CPU_IP));
(void)port;
}
 
static REG8 IOINPCALL fdc_i4be(UINT port) {
//TRACEOUT(("fdc in %.2x %.2x [%.4x:%.4x]", port, fdc.rpm[(fdc.reg144 >> 5) & 3] | 0xf0, CPU_CS, CPU_IP));
 
(void)port;
return(fdc.rpm[(fdc.reg144 >> 5) & 3] | 0xf0);
}