From owner-freebsd-emulation Sun Nov 3 03:56:16 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA17078 for emulation-outgoing; Sun, 3 Nov 1996 03:56:16 -0800 (PST) Received: from deceased.hb.north.de (deceased.hb.north.de [194.94.232.249]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA17067 for ; Sun, 3 Nov 1996 03:56:06 -0800 (PST) Received: from jelal.hb.north.de by deceased.hb.north.de with uucp (Smail3.2) id m0vK19L-0016CjC; Sun, 3 Nov 1996 12:55:35 +0100 (MET) Received: by jelal.hb.north.de (SMail-ST 0.95gcc/2.5+) id AA00622; Sun, 3 Nov 1996 12:46:34 +0100 (CET) Received: (from nox@localhost) by saturn.hb.north.de (8.7.5/8.7.3) id MAA04001; Sun, 3 Nov 1996 12:39:35 +0100 (MET) From: Juergen Lock Message-Id: <199611031139.MAA04001@saturn.hb.north.de> Subject: Re: New PC-Emu (fwd) To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Sun, 3 Nov 1996 12:39:34 +0100 (MET) Cc: luigi@iet.unipi.it, emulation@freebsd.org, babkin@hq.icb.chel.su In-Reply-To: <199611010553.QAA03882@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Nov 1, 96 04:23:04 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Michael Smith writes: > > I have something that vaguely approximates a cut at this here (very > ragged still though 8( ), and what I'm looking for is a small set of > testers (perferably ones that are using PC-Emu already) to check that > I've correctly merged things and that the result is mildly cohesive. > > If/when this proves the case, I'll release the result in > comp.emulators.misc and make a 'real' port out of it. > > If you're interested, have a look at > ftp://gsoft.com.au/pub/pcemu1.9pre.tar.gz > > and let me know how you go. OK i just tried to sync this with my own old hacked copy of the port, and here is what i have now: - turn on some of the added instructions (actually i see now at least bound is still left turned off), working versions of enter/leave (enter second arg 0 only), added back(?) c0pre/c1pre - #ifdef'd the exit(1) in i_notdone (-DEXIT_NOTDONE) - handle keymap code=0xff (hex) a quick test looks like its now running everything my old version did, i haven't checked out the new features yet... Index: cpu.c @@ -4223,16 +4223,21 @@ /********************************************************************** * lr 941008 - these are new codes (non 8086) *********************************************************************/ -static INLINE2 i_push_imm8(void) +static INLINE2 void i_push_imm8(void) { register unsigned tmp1=(WORD)(ReadWord(&wregs[SP])-2); +#if 1 + /* direct sign extend, more efficient(?) */ + register unsigned imm=(WORD)((INT16)((INT8)GetMemInc(c_cs,ip))); +#else register unsigned imm=GetMemInc(c_cs,ip); if (imm>127) imm |= 0xff00; +#endif WriteWord(&wregs[SP],tmp1); PutMemW(c_stack, tmp1, imm); } -static INLINE2 i_push_imm16(void) +static INLINE2 void i_push_imm16(void) { register unsigned tmp1=(WORD)(ReadWord(&wregs[SP])-2); register unsigned imm=GetMemInc(c_cs,ip); @@ -4240,7 +4245,41 @@ WriteWord(&wregs[SP],tmp1); PutMemW(c_stack, tmp1, imm); } + +#if 1 +/* these seem to work a little better :) */ +static INLINE2 void i_leave(void) +{ + /* Opcode 0xc9 (80186) */ + + wregs[SP] = wregs[BP]; + PopWordReg(BP); +} +static INLINE2 void i_enter(void) +{ + /* Opcode 0xc8 (80186) */ + + register unsigned tmp; + register unsigned tmp1 = (WORD)(ReadWord(&wregs[SP])-2); + WORD tmp2; + tmp2 = ReadWord(&wregs[BP]); + PutMemW(c_stack,tmp1,tmp2); + WriteWord(&wregs[BP],tmp1); + + tmp = GetMemInc(c_cs,ip); + tmp += GetMemInc(c_cs,ip) << 8; + tmp2 = GetMemInc(c_cs,ip); + if (tmp2) { + /* XXX handle non-0 second arg... */ + fprintf(stderr,"Error: Unimplemented opcode c8 xxxx %02X at cs:ip = %04X:%04X\n", + tmp2,sregs[CS],ip-3); +/* exit(1); */ + } + + WriteWord(&wregs[SP],tmp1-tmp); +} +#else static INLINE2 i_leave(void) { /* MOV BP, SP; POP BP */ @@ -4269,6 +4308,7 @@ WriteWord(&wregs[BP], fp ); WriteWord(&wregs[SP], ReadWord(&wregs[SP]) - disp ); } +#endif static void i_bound(void) { @@ -4283,13 +4323,177 @@ if (op< low || op >high) interrupt(5); } + +static INLINE2 void i_c0pre(void) +{ + /* Opcode 0xc0 (80186) */ + + unsigned ModRM = GetMemInc(c_cs,ip); + unsigned count = GetMemInc(c_cs,ip); + register BYTE *dest = GetModRMRMB(ModRM); + register unsigned tmp = *dest; + + for (; count; --count) { /*!!!fix OF? not on intel it seems... */ + register unsigned tmp2 = tmp; + + switch (ModRM & 0x38) + { + case 0x00: /* ROL eb,count */ + CF = (tmp & 0x80) != 0; + *dest = (tmp << 1) + CF; + OF = !(!(tmp & 0x40)) != CF; + break; + case 0x08: /* ROR eb,count */ + CF = (tmp & 0x01) != 0; + *dest = (tmp >> 1) + (CF << 7); + OF = !(!(tmp & 0x80)) != CF; + break; + case 0x10: /* RCL eb,count */ + OF = (tmp ^ (tmp << 1)) & 0x80; + *dest = (tmp << 1) + CF; + CF = (tmp & 0x80) != 0; + break; + case 0x18: /* RCR eb,count */ + *dest = (tmp >> 1) + (CF << 7); + OF = !(!(tmp & 0x80)) != CF; + CF = (tmp & 0x01) != 0; + break; + case 0x20: /* SHL eb,count */ + case 0x30: + tmp += tmp; + + SetCFB_Add(tmp,tmp2); + SetOFB_Add(tmp,tmp2,tmp2); + AF = 1; + SetZFB(tmp); + SetSFB(tmp); + SetPF(tmp); + + *dest = (BYTE)tmp; + break; + case 0x28: /* SHR eb,count */ + CF = (tmp & 0x01) != 0; + OF = tmp & 0x80; + + tmp2 = tmp >> 1; + + SetSFB(tmp2); + SetPF(tmp2); + SetZFB(tmp2); + AF = 1; + *dest = (BYTE)tmp2; + tmp = tmp2; + break; + case 0x38: /* SAR eb,count */ + CF = (tmp & 0x01) != 0; + OF = 0; + + tmp2 = (tmp >> 1) | (tmp & 0x80); + + SetSFB(tmp2); + SetPF(tmp2); + SetZFB(tmp2); + AF = 1; + *dest = (BYTE)tmp2; + tmp = tmp2; + break; + } + } +} + +static INLINE2 void i_c1pre(void) +{ + /* Opcode 0xc1 (80186) */ + + unsigned ModRM = GetMemInc(c_cs,ip); + unsigned count = GetMemInc(c_cs,ip); + register WORD *dest = GetModRMRMW(ModRM); + register unsigned tmp = ReadWord(dest); + + for (; count; --count) { /*!!!fix OF?*/ + register unsigned tmp2 = tmp; + + switch (ModRM & 0x38) + { + case 0x00: /* ROL ew,count */ + CF = (tmp & 0x8000) != 0; + tmp2 = (tmp << 1) + CF; + OF = !(!(tmp & 0x4000)) != CF; + WriteWord(dest,tmp2); + tmp = tmp2; + break; + case 0x08: /* ROR ew,count */ + CF = (tmp & 0x01) != 0; + tmp2 = (tmp >> 1) + ((unsigned)CF << 15); + OF = !(!(tmp & 0x8000)) != CF; + WriteWord(dest,tmp2); + tmp = tmp2; + break; + case 0x10: /* RCL ew,count */ + tmp2 = (tmp << 1) + CF; + OF = (tmp ^ (tmp << 1)) & 0x8000; + CF = (tmp & 0x8000) != 0; + WriteWord(dest,tmp2); + tmp = tmp2; + break; + case 0x18: /* RCR ew,count */ + tmp2 = (tmp >> 1) + ((unsigned)CF << 15); + OF = !(!(tmp & 0x8000)) != CF; + CF = (tmp & 0x01) != 0; + WriteWord(dest,tmp2); + tmp = tmp2; + break; + case 0x20: /* SHL ew,count */ + case 0x30: + tmp += tmp; + + SetCFW_Add(tmp,tmp2); + SetOFW_Add(tmp,tmp2,tmp2); + AF = 1; + SetZFW(tmp); + SetSFW(tmp); + SetPF(tmp); + + WriteWord(dest,tmp); + break; + case 0x28: /* SHR ew,count */ + CF = (tmp & 0x01) != 0; + OF = tmp & 0x8000; + + tmp2 = tmp >> 1; + + SetSFW(tmp2); + SetPF(tmp2); + SetZFW(tmp2); + AF = 1; + WriteWord(dest,tmp2); + tmp = tmp2; + break; + case 0x38: /* SAR ew,count */ + CF = (tmp & 0x01) != 0; + OF = 0; + + tmp2 = (tmp >> 1) | (tmp & 0x8000); + + SetSFW(tmp2); + SetPF(tmp2); + SetZFW(tmp2); + AF = 1; + WriteWord(dest,tmp2); + tmp = tmp2; + break; + } + } +} /* lr 941008 - no reason to make this inlined! */ static void i_notdone(void) { fprintf(stderr,"Warning: non-8086 opcode %02X at cs:ip = %04X:%04X\n", c_cs[ip-1],sregs[CS],ip-1); +#ifdef EXIT_NOTDONE exit(1); +#endif } @@ -4424,9 +4628,9 @@ case 0x65: i_notdone(); break; case 0x66: i_notdone(); break; case 0x67: i_notdone(); break; - case 0x68: i_notdone(); break; + case 0x68: i_push_imm16(); break; case 0x69: i_notdone(); break; - case 0x6a: i_notdone(); break; + case 0x6a: i_push_imm8(); break; case 0x6b: i_notdone(); break; case 0x6c: i_notdone(); break; case 0x6d: i_notdone(); break; /* XXX */ @@ -4512,16 +4716,16 @@ case 0xbd: i_mov_bpd16(); break; case 0xbe: i_mov_sid16(); break; case 0xbf: i_mov_did16(); break; - case 0xc0: i_notdone(); break; - case 0xc1: i_notdone(); break; + case 0xc0: i_c0pre(); break; + case 0xc1: i_c1pre(); break; case 0xc2: i_ret_d16(); break; case 0xc3: i_ret(); break; case 0xc4: i_les_dw(); break; case 0xc5: i_lds_dw(); break; case 0xc6: i_mov_bd8(); break; case 0xc7: i_mov_wd16(); break; - case 0xc8: i_notdone(); break; - case 0xc9: i_notdone(); break; + case 0xc8: i_enter(); break; + case 0xc9: i_leave(); break; case 0xca: i_retf_d16(); break; case 0xcb: i_retf(); break; case 0xcc: i_int3(); break; Index: instr.h @@ -112,6 +112,8 @@ static INLINE2 void i_pop_bp(void); static INLINE2 void i_pop_si(void); static INLINE2 void i_pop_di(void); +static INLINE2 void i_push_imm16(void); +static INLINE2 void i_push_imm8(void); static INLINE2 void i_jo(void); static INLINE2 void i_jno(void); static INLINE2 void i_jb(void); @@ -191,12 +193,16 @@ static INLINE2 void i_mov_bpd16(void); static INLINE2 void i_mov_sid16(void); static INLINE2 void i_mov_did16(void); +static INLINE2 void i_c0pre(); +static INLINE2 void i_c1pre(); static INLINE2 void i_ret_d16(void); static INLINE2 void i_ret(void); static INLINE2 void i_les_dw(void); static INLINE2 void i_lds_dw(void); static INLINE2 void i_mov_bd8(void); static INLINE2 void i_mov_wd16(void); +static INLINE2 void i_enter(void); +static INLINE2 void i_leave(void); static INLINE2 void i_retf_d16(void); static INLINE2 void i_retf(void); static INLINE2 void i_int3(void); @@ -352,9 +358,9 @@ i_notdone, /* 0x65 XXX */ i_notdone, /* 0x66 XXX */ i_notdone, /* 0x67 XXX */ - i_notdone, /* 0x68 XXX */ + i_push_imm16, /* 0x68 */ i_notdone, /* 0x69 XXX */ - i_notdone, /* 0x6a XXX */ + i_push_imm8, /* 0x6a */ i_notdone, /* 0x6b XXX */ i_notdone, /* 0x6c XXX -- insb (286) */ i_notdone, /* 0x6d XXX -- insw (286) */ @@ -440,16 +446,16 @@ i_mov_bpd16, /* 0xbd */ i_mov_sid16, /* 0xbe */ i_mov_did16, /* 0xbf */ - i_notdone, - i_notdone, + i_c0pre, /* 0xc0 */ + i_c1pre, /* 0xc1 */ i_ret_d16, /* 0xc2 */ i_ret, /* 0xc3 */ i_les_dw, /* 0xc4 */ i_lds_dw, /* 0xc5 */ i_mov_bd8, /* 0xc6 */ i_mov_wd16, /* 0xc7 */ - i_notdone, - i_notdone, + i_enter, /* 0xc8 */ + i_leave, /* 0xc9 */ i_retf_d16, /* 0xca */ i_retf, /* 0xcb */ i_int3, /* 0xcc */ Index: main.c @@ -50,10 +50,13 @@ static char *set_keymap(char *buf) { char c; - int code; + int code, chx; if(sscanf(buf, " %*s %i=%c", &code, &c) != 2) return "usage: keymap code=char"; + /* handle 0x... (== hex) */ + if(c == '0' && sscanf(buf, " %*s %*i=%i", &chx) == 1) + c = chx; if(put_scan_table(code, (unsigned char)c)) return "bad value for keymap"; return 0; From owner-freebsd-emulation Sun Nov 3 11:22:56 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA16234 for emulation-outgoing; Sun, 3 Nov 1996 11:22:56 -0800 (PST) Received: from hq.icb.chel.su (hq.icb.chel.su [193.125.10.33]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id LAA16034 for ; Sun, 3 Nov 1996 11:19:45 -0800 (PST) Received: (babkin@localhost) by hq.icb.chel.su (8.7.5/8.6.5) id AAA23331; Mon, 4 Nov 1996 00:13:56 +0500 (ESK) From: "Serge A. Babkin" Message-Id: <199611031913.AAA23331@hq.icb.chel.su> Subject: Re: New PC-Emu (fwd) To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Mon, 4 Nov 1996 00:13:55 +0500 (ESK) Cc: luigi@iet.unipi.it, emulation@freebsd.org In-Reply-To: <199611010553.QAA03882@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Nov 1, 96 04:23:04 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I have tried Pcemu 1.9 pre. The networking support (my part) is OK. But I have few notices (considering the code as a prerelease snapshot): 1. It has defaults different from the previous version. When started without .pcemurc is searches for DriveA in the current directory instead of /usr/local/lib/pcemurc. 2. The file .pcemurc must be modified to more general form (IMHO using of /home/luigi in the skeleton file is not the best idea) and moved into dot.pcemurc (which is still old!). IMHO it must refer to 720K boot disk image to be compatible with the previous version. 3. Running Pcemu in text mode is great but I think that it must run in text mode OR graphics mode, not both simultaneously. 4. How about to use getopt() ? -SB From owner-freebsd-emulation Mon Nov 4 01:11:44 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA14871 for emulation-outgoing; Mon, 4 Nov 1996 01:11:44 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA14853 for ; Mon, 4 Nov 1996 01:11:39 -0800 (PST) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id TAA14791; Mon, 4 Nov 1996 19:33:31 +1030 From: Michael Smith Message-Id: <199611040903.TAA14791@genesis.atrad.adelaide.edu.au> Subject: Re: New PC-Emu (fwd) To: babkin@hq.icb.chel.su (Serge A. Babkin) Date: Mon, 4 Nov 1996 19:33:30 +1030 (CST) Cc: msmith@atrad.adelaide.edu.au, luigi@iet.unipi.it, emulation@freebsd.org, nox@jelal.hb.north.de In-Reply-To: <199611031913.AAA23331@hq.icb.chel.su> from "Serge A. Babkin" at Nov 4, 96 00:13:55 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Serge A. Babkin stands accused of saying: > > I have tried Pcemu 1.9 pre. The networking support (my part) is OK. But > I have few notices (considering the code as a prerelease snapshot): > > 1. It has defaults different from the previous version. When > started without .pcemurc is searches for DriveA in the > current directory instead of /usr/local/lib/pcemurc. Good point; fixed now in both the Makefile comment and bios.c > 2. The file .pcemurc must be modified to more general form (IMHO > using of /home/luigi in the skeleton file is not the best idea) > and moved into dot.pcemurc (which is still old!). IMHO it must refer > to 720K boot disk image to be compatible with the previous version. Ok, also fixed. > 3. Running Pcemu in text mode is great but I think that it must > run in text mode OR graphics mode, not both simultaneously. That's Luigi's baby; he's promised me some more patches, which I eagerly await 8) Thanks Juergen for your diffs; I've incorporated those, and activated the bound instruction as well. If anyone finds any other inactive instructions, please let me know. > 4. How about to use getopt() ? I guess I should. For now, the next snapshot is ftp://gsoft.com.au/pub/pcemu1.91pre.tar.gz; if you get a chance to test it, that'd be great. If not, I'll announce on the freebsd-emulation list when I have Luigi's patches incorporated. Is anyone here not on that list? > -SB -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[ From owner-freebsd-emulation Mon Nov 4 15:28:36 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA12104 for emulation-outgoing; Mon, 4 Nov 1996 15:28:36 -0800 (PST) Received: from ingenieria ([168.176.15.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA12095 for ; Mon, 4 Nov 1996 15:28:30 -0800 (PST) Received: by ingenieria (SMI-8.6/SMI-SVR4) id SAA10584; Mon, 4 Nov 1996 18:28:40 +0600 Date: Mon, 4 Nov 1996 18:28:40 +0600 (GMT) From: Pedro Giffuni To: emulation@freebsd.org Subject: COFF->BSD converter (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I found this message in my box and though it should go to the emulation list! Pedro. ---------- Forwarded message ---------- Date: Tue, 5 Nov 1996 00:30:45 +0500 (ESK) From: Serge A. Babkin To: hackers@freebsd.org Subject: COFF->BSD converter I wrote the COFF -> BSD object file converter. It needs more extensive testing but it works for now. Now the compatibility library and set of headers are needed to use it. I don't know how long would it take from me to write them. So if anyone can suggest any help it will be gladly accepted. The possible benefits from this project are: - getting semi-native version of Oracle (or any other product distributed as set of object files) - using some libraries (say, Motif) converted from SCO (it's possible to get personal SCO license for free, so why do not use some godd things from it ?) -SB From owner-freebsd-emulation Wed Nov 6 07:53:47 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA27134 for emulation-outgoing; Wed, 6 Nov 1996 07:53:47 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id HAA27105 for ; Wed, 6 Nov 1996 07:52:43 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id QAA08343; Wed, 6 Nov 1996 16:12:08 +0100 From: Luigi Rizzo Message-Id: <199611061512.QAA08343@labinfo.iet.unipi.it> Subject: Re: New PC-Emu To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Wed, 6 Nov 1996 16:12:07 +0100 (MET) Cc: babkin@hq.icb.chel.su, msmith@atrad.adelaide.edu.au, luigi@iet.unipi.it, emulation@freebsd.org, nox@jelal.hb.north.de In-Reply-To: <199611040903.TAA14791@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Nov 4, 96 07:33:11 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk A few speed tests on pcemu1.91 COMPILATION FLAGS: Config. A: OPTIONS = -DBOOT1_44 -DALIGNED_ACCESS -DBIGCASE -DINLINE_FUNCTIONS CFLAGS = -I$(XROOT)/include -O2 -pipe #-fomit-frame-pointer Config B: OPTIONS = -DBOOT1_44 CFLAGS = -I$(XROOT)/include -O Runtime test #1: cl -c progmain.c (559 lines C source resulting in 7KB .obj file) Config. A Config. B Compile Time 1:02 0:27 Run time for test #1 0:40 0:37 stripped pcemu size 176128 114888 Config B wins in all cases! It appears that either the compile options or the flags do not do much good! Actually, using INLINE_FUNCTIONS is probably harmful since some functions are very large, and they get included several times. Perhaps some benefit can be achieved by deciding which functions to inline case-by-case. For the debugging releases, perhaps it is better to limit optimizations :) Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ==================================================================== From owner-freebsd-emulation Wed Nov 6 10:35:09 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA00651 for emulation-outgoing; Wed, 6 Nov 1996 10:35:09 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA00616 for ; Wed, 6 Nov 1996 10:35:04 -0800 (PST) Received: from ravenock.cybercity.dk (disn48.cybercity.dk [194.16.57.48]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id JAA13690 for ; Wed, 6 Nov 1996 09:38:26 -0800 (PST) Received: (from sos@localhost) by ravenock.cybercity.dk (8.8.2/8.7.3) id SAA02409; Wed, 6 Nov 1996 18:26:47 +0100 (MET) Message-Id: <199611061726.SAA02409@ravenock.cybercity.dk> Subject: Re: New PC-Emu To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Wed, 6 Nov 1996 18:26:36 +0100 (MET) From: "Soren Schmidt" Cc: msmith@atrad.adelaide.edu.au, babkin@hq.icb.chel.su, luigi@iet.unipi.it, emulation@freebsd.org, nox@jelal.hb.north.de In-Reply-To: <199611061512.QAA08343@labinfo.iet.unipi.it> from "Luigi Rizzo" at Nov 6, 96 04:12:07 pm From: sos@freebsd.org Reply-to: sos@freebsd.org X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On another topic, I have made some (very rude) changes to pcemu, so that it will run on a terminal, with no X at all compiled in. I could makes this even better by letting it at the video memory through syscons. Also I'm about to add support for tempering with REAL memory (I need that for a card I only have dos init code for). Is there interest in this ? If there is I'll try making this all a little bit more "world useable". -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end .. From owner-freebsd-emulation Wed Nov 6 11:46:16 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA20210 for emulation-outgoing; Wed, 6 Nov 1996 11:46:16 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA20205; Wed, 6 Nov 1996 11:46:11 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id UAA08802; Wed, 6 Nov 1996 20:10:13 +0100 From: Luigi Rizzo Message-Id: <199611061910.UAA08802@labinfo.iet.unipi.it> Subject: Re: New PC-Emu To: sos@freebsd.org Date: Wed, 6 Nov 1996 20:10:12 +0100 (MET) Cc: msmith@atrad.adelaide.edu.au, babkin@hq.icb.chel.su, luigi@iet.unipi.it, emulation@freebsd.org, nox@jelal.hb.north.de In-Reply-To: <199611061726.SAA02409@ravenock.cybercity.dk> from "sos@freebsd.org" at Nov 6, 96 06:26:17 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > On another topic, I have made some (very rude) changes to pcemu, so > that it will run on a terminal, with no X at all compiled in. I This would be GREAT! I have started doing something similar but my patches are only partial. Would you like to submit them, so that we can replace my stuff ? > could makes this even better by letting it at the video memory > through syscons. Well, this is probably less important since the emulator is (relatively) slow anyways and works fine in X. Running on a terminal is much more important because it allows to run it remotely. > Also I'm about to add support for tempering with REAL memory > (I need that for a card I only have dos init code for). That's curious, a memory mapped card ! Isn't access to I/O enough ? My patches already let you use I/O ports in the range specified in the .pcemurc Using this, I have run a lot of stuff, even interlnk/intersvr between a couple of PCemu's and a PCemu and a real dos machine (so that the dos machine could "mount" the Unix file system across the serial port using interlnk and the pcemu redirector... performance ? did you say performance ? ) Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ==================================================================== From owner-freebsd-emulation Wed Nov 6 12:19:12 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA22153 for emulation-outgoing; Wed, 6 Nov 1996 12:19:12 -0800 (PST) Received: from ravenock.cybercity.dk (disn60.cybercity.dk [194.16.57.60]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA22143; Wed, 6 Nov 1996 12:19:06 -0800 (PST) Received: (from sos@localhost) by ravenock.cybercity.dk (8.8.2/8.7.3) id VAA02727; Wed, 6 Nov 1996 21:18:59 +0100 (MET) Message-Id: <199611062018.VAA02727@ravenock.cybercity.dk> Subject: Re: New PC-Emu To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Wed, 6 Nov 1996 21:18:58 +0100 (MET) From: "Soren Schmidt" Cc: sos@freebsd.org, msmith@atrad.adelaide.edu.au, babkin@hq.icb.chel.su, luigi@iet.unipi.it, emulation@freebsd.org, nox@jelal.hb.north.de In-Reply-To: <199611061910.UAA08802@labinfo.iet.unipi.it> from "Luigi Rizzo" at Nov 6, 96 08:10:12 pm From: sos@freebsd.org Reply-to: sos@freebsd.org X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In reply to Luigi Rizzo who wrote: > > > > On another topic, I have made some (very rude) changes to pcemu, so > > that it will run on a terminal, with no X at all compiled in. I > > This would be GREAT! I have started doing something similar but my > patches are only partial. Would you like to submit them, so that we can > replace my stuff ? Well, its partly based on your pathces, I just took out the X stuff, and added a bit of code to deal with the keyboard. I still has some update problems, but given a couble of hours those can probably be ironed out. > > could makes this even better by letting it at the video memory > > through syscons. > > Well, this is probably less important since the emulator is (relatively) > slow anyways and works fine in X. Running on a terminal is much more > important because it allows to run it remotely. Yes, I now that, but it would also give some "interesting" possibilities on PC hardware, such as settting videomodes etc etc. I should be an option anyways. > > Also I'm about to add support for tempering with REAL memory > > (I need that for a card I only have dos init code for). > > That's curious, a memory mapped card ! Isn't access to I/O enough ? > My patches already let you use I/O ports in the range specified > in the .pcemurc No, the card has 8K shared memory used to download the firmware to the card, and to pass chuncks of data when it runs. I'll work on it over the next couble of days... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end .. From owner-freebsd-emulation Wed Nov 6 17:17:06 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA13946 for emulation-outgoing; Wed, 6 Nov 1996 17:17:06 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA13938; Wed, 6 Nov 1996 17:17:02 -0800 (PST) Received: from msmith@localhost by genesis.atrad.adelaide.edu.au (8.6.12/8.6.9) id LAA05994; Thu, 7 Nov 1996 11:46:43 +1030 From: Michael Smith Message-Id: <199611070116.LAA05994@genesis.atrad.adelaide.edu.au> Subject: Re: New PC-Emu To: sos@freebsd.org Date: Thu, 7 Nov 1996 11:46:42 +1030 (CST) Cc: luigi@labinfo.iet.unipi.it, msmith@atrad.adelaide.edu.au, babkin@hq.icb.chel.su, luigi@iet.unipi.it, emulation@freebsd.org, nox@jelal.hb.north.de In-Reply-To: <199611062018.VAA02727@ravenock.cybercity.dk> from "sos@freebsd.org" at Nov 6, 96 09:18:58 pm MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk sos@freebsd.org stands accused of saying: > > Well, its partly based on your pathces, I just took out the X > stuff, and added a bit of code to deal with the keyboard. > I still has some update problems, but given a couble of hours > those can probably be ironed out. If you can supply some diffs against the 1.91 prerelease, I'll stick 'em straight in! > I'll work on it over the next couble of days... Neat! > Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[ From owner-freebsd-emulation Wed Nov 6 22:27:08 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA03036 for emulation-outgoing; Wed, 6 Nov 1996 22:27:08 -0800 (PST) Received: from hq.icb.chel.su (hq.icb.chel.su [193.125.10.33]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA03030 for ; Wed, 6 Nov 1996 22:27:04 -0800 (PST) Received: (babkin@localhost) by hq.icb.chel.su (8.7.5/8.6.5) id LAA05679; Thu, 7 Nov 1996 11:25:39 +0500 (ESK) From: "Serge A. Babkin" Message-Id: <199611070625.LAA05679@hq.icb.chel.su> Subject: Re: New PC-Emu To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Thu, 7 Nov 1996 11:25:39 +0500 (ESK) Cc: msmith@atrad.adelaide.edu.au, luigi@iet.unipi.it, emulation@freebsd.org, nox@jelal.hb.north.de In-Reply-To: <199611061512.QAA08343@labinfo.iet.unipi.it> from "Luigi Rizzo" at Nov 6, 96 04:12:07 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk It appears that the reason of problem is in the -DALIGNED_ACCESS. It must be undefined for any machine that supports unaligned access (i386 shurely does that). If it is defined any 2-byte memory references are implemented as 2 1-byte memory references. -SB > > A few speed tests on pcemu1.91 > > COMPILATION FLAGS: > > Config. A: > > OPTIONS = -DBOOT1_44 -DALIGNED_ACCESS -DBIGCASE -DINLINE_FUNCTIONS > CFLAGS = -I$(XROOT)/include -O2 -pipe #-fomit-frame-pointer > > Config B: > OPTIONS = -DBOOT1_44 > CFLAGS = -I$(XROOT)/include -O > > Runtime test #1: > > cl -c progmain.c (559 lines C source resulting in 7KB .obj file) > > Config. A Config. B > > Compile Time 1:02 0:27 > Run time for test #1 0:40 0:37 > stripped pcemu size 176128 114888 > > Config B wins in all cases! > > It appears that either the compile options or the flags do not do much > good! Actually, using INLINE_FUNCTIONS is probably harmful since some > functions are very large, and they get included several times. > Perhaps some benefit can be achieved by deciding which functions to > inline case-by-case. > > For the debugging releases, perhaps it is better to limit > optimizations :) > > Luigi > ==================================================================== > Luigi Rizzo Dip. di Ingegneria dell'Informazione > email: luigi@iet.unipi.it Universita' di Pisa > tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) > fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ > ==================================================================== > From owner-freebsd-emulation Thu Nov 7 00:02:18 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA09801 for emulation-outgoing; Thu, 7 Nov 1996 00:02:18 -0800 (PST) Received: from deceased.hb.north.de (deceased.hb.north.de [194.94.232.249]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id XAA09394 for ; Wed, 6 Nov 1996 23:52:46 -0800 (PST) Received: from jelal.hb.north.de by deceased.hb.north.de with uucp (Smail3.2) id m0vLPFK-0016F5C; Thu, 7 Nov 1996 08:51:30 +0100 (MET) Received: by jelal.hb.north.de (SMail-ST 0.95gcc/2.5+) id AA00847; Thu, 7 Nov 1996 08:45:16 +0100 (CET) Received: (from nox@localhost) by saturn.hb.north.de (8.7.5/8.7.3) id IAA01961; Thu, 7 Nov 1996 08:15:05 +0100 (MET) From: Juergen Lock Message-Id: <199611070715.IAA01961@saturn.hb.north.de> Subject: Re: New PC-Emu (fwd) To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Thu, 7 Nov 1996 08:15:04 +0100 (MET) Cc: babkin@hq.icb.chel.su, msmith@atrad.adelaide.edu.au, luigi@iet.unipi.it, emulation@freebsd.org In-Reply-To: <199611040903.TAA14791@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Nov 4, 96 07:33:30 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Michael Smith writes: > Thanks Juergen for your diffs; I've incorporated those, and activated > the bound instruction as well. If anyone finds any other inactive > instructions, please let me know. It wasn't activated fully, this was missing: Index: instr.h @@ -358,7 +358,7 @@ i_pop_di, /* 0x5f */ i_notdone, /* 0x60 XXX */ i_notdone, /* 0x61 XXX */ - i_notdone, /* 0x62 XXX */ + i_bound, /* 0x62 */ i_notdone, /* 0x63 XXX */ i_notdone, /* 0x64 XXX */ i_notdone, /* 0x65 XXX */ (not that i've seen a program actually using it yet but you never know...) cheers, Juergen From owner-freebsd-emulation Thu Nov 7 00:03:20 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA09877 for emulation-outgoing; Thu, 7 Nov 1996 00:03:20 -0800 (PST) Received: from ra.dkuug.dk (ra.dkuug.dk [193.88.44.193]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id AAA09845; Thu, 7 Nov 1996 00:02:56 -0800 (PST) Received: (from sos@localhost) by ra.dkuug.dk (8.6.12/8.6.12) id JAA23124; Thu, 7 Nov 1996 09:02:45 +0100 Message-Id: <199611070802.JAA23124@ra.dkuug.dk> Subject: Re: New PC-Emu To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Thu, 7 Nov 1996 09:02:45 +0100 (MET) Cc: sos@FreeBSD.org, luigi@labinfo.iet.unipi.it, msmith@atrad.adelaide.edu.au, babkin@hq.icb.chel.su, luigi@iet.unipi.it, emulation@FreeBSD.org, nox@jelal.hb.north.de In-Reply-To: <199611070116.LAA05994@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Nov 7, 96 11:46:42 am From: sos@FreeBSD.org Reply-to: sos@FreeBSD.org X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-emulation@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk In reply to Michael Smith who wrote: > > sos@freebsd.org stands accused of saying: > > > > Well, its partly based on your pathces, I just took out the X > > stuff, and added a bit of code to deal with the keyboard. > > I still has some update problems, but given a couble of hours > > those can probably be ironed out. > > If you can supply some diffs against the 1.91 prerelease, I'll stick 'em > straight in! OK, I'll try clean it up a little and see if I can get a clamp on the update problem... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Soren Schmidt (sos@FreeBSD.org) FreeBSD Core Team So much code to hack -- so little time. From owner-freebsd-emulation Thu Nov 7 00:54:38 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id AAA12741 for emulation-outgoing; Thu, 7 Nov 1996 00:54:38 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id AAA12730 for ; Thu, 7 Nov 1996 00:54:29 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id JAA10571; Thu, 7 Nov 1996 09:16:08 +0100 From: Luigi Rizzo Message-Id: <199611070816.JAA10571@labinfo.iet.unipi.it> Subject: Re: New PC-Emu (fwd) To: nox@jelal.hb.north.de (Juergen Lock) Date: Thu, 7 Nov 1996 09:16:08 +0100 (MET) Cc: msmith@atrad.adelaide.edu.au, babkin@hq.icb.chel.su, luigi@iet.unipi.it, emulation@freebsd.org In-Reply-To: <199611070715.IAA01961@saturn.hb.north.de> from "Juergen Lock" at Nov 7, 96 08:14:45 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Michael Smith writes: > > > Thanks Juergen for your diffs; I've incorporated those, and activated > > the bound instruction as well. If anyone finds any other inactive > > instructions, please let me know. > > It wasn't activated fully, this was missing: > > Index: instr.h > @@ -358,7 +358,7 @@ > i_pop_di, /* 0x5f */ > i_notdone, /* 0x60 XXX */ > i_notdone, /* 0x61 XXX */ > - i_notdone, /* 0x62 XXX */ > + i_bound, /* 0x62 */ > i_notdone, /* 0x63 XXX */ > i_notdone, /* 0x64 XXX */ > i_notdone, /* 0x65 XXX */ > > (not that i've seen a program actually using it yet but you never know...) perhaps code generated by some pascal compiler with bound checks enabled ? I am under the impression that enter, leave and bound were introduced to get better support for Pascal. Luigi From owner-freebsd-emulation Thu Nov 7 09:34:10 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA06072 for emulation-outgoing; Thu, 7 Nov 1996 09:34:10 -0800 (PST) Received: from haus.efn.org (haus.efn.org [198.68.17.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA06026 for ; Thu, 7 Nov 1996 09:34:05 -0800 (PST) Received: from garcia.efn.org (j_mini@garcia.efn.org [198.68.17.5]) by haus.efn.org (8.7.5/8.7.3) with ESMTP id JAA16744; Thu, 7 Nov 1996 09:37:48 -0800 (PST) Received: from localhost (j_mini@localhost) by garcia.efn.org (8.7.4/8.7.2) with SMTP id JAA26421; Thu, 7 Nov 1996 09:32:00 -0800 (PST) X-Authentication-Warning: garcia.efn.org: j_mini owned process doing -bs Date: Thu, 7 Nov 1996 09:32:00 -0800 (PST) From: Jonathan Mini To: Luigi Rizzo cc: Juergen Lock , msmith@atrad.adelaide.edu.au, babkin@hq.icb.chel.su, luigi@iet.unipi.it, emulation@freebsd.org Subject: Re: New PC-Emu (fwd) In-Reply-To: <199611070816.JAA10571@labinfo.iet.unipi.it> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Thu, 7 Nov 1996, Luigi Rizzo wrote: > > (not that i've seen a program actually using it yet but you never know...) > > perhaps code generated by some pascal compiler with bound checks > enabled ? I am under the impression that enter, leave and bound > were introduced to get better support for Pascal. Borland's Turbo/Borland Pascal has an "advanced stack checking" option for a few releases.. Same thing with thier C compilers. This opetion uses bound to stack check. The problem with it is that you can't use it inside a few unhappy programs like windows, so they removed it. Enter and leave are used by just about everybody. Excpet Watcom, whihc just ignores stack frames. ;) Jon Mini, j_mini@efn.org, mini@4j.lane.edu GAMMA Development Team -------------------------------------------------------------------------- "I think I can, I think I can, I think I can...." little.blue.engine:Reality Protection Fault. (core dumped) -------------------------------------------------------------------------- From owner-freebsd-emulation Thu Nov 7 09:44:31 1996 Return-Path: owner-emulation Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA07404 for emulation-outgoing; Thu, 7 Nov 1996 09:44:31 -0800 (PST) Received: from sierra.zyzzyva.com (ppp0.zyzzyva.com [198.183.2.50]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA07396; Thu, 7 Nov 1996 09:44:23 -0800 (PST) Received: from sierra.zyzzyva.com (localhost [127.0.0.1]) by sierra.zyzzyva.com (8.7.5/8.7.3) with ESMTP id LAA17804; Thu, 7 Nov 1996 11:44:15 -0600 (CST) Message-Id: <199611071744.LAA17804@sierra.zyzzyva.com> To: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org Subject: Virus scanning DOS software on FreeBSD X-uri: http://www.zyzzyva.com/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 07 Nov 1996 11:44:15 -0600 From: Randy Terbush Sender: owner-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Is anyone on the list aware of a way to virus scan DOS/Windoze binaries for viruses on FreeBSD? Is there a way to batch process files like this in an emulation environment? I'm not subscribed to freebsd-emulation, so please reply directly. Thanks