diff options
author | garbled <garbled@pkgsrc.org> | 1999-03-31 06:34:07 +0000 |
---|---|---|
committer | garbled <garbled@pkgsrc.org> | 1999-03-31 06:34:07 +0000 |
commit | 09e4abae98bffdda958227c0890298183f5df0e3 (patch) | |
tree | 52f65fd3f6ddaf265766bc85103e6e807b7506ee /emulators/pcemu/patches | |
parent | 99281b5e7b8a8992b4dd22c5e18098d3f68dd4e4 (diff) | |
download | pkgsrc-09e4abae98bffdda958227c0890298183f5df0e3.tar.gz |
Initial import of pcemu-1.01a. An 8086/8088 CPU emulator.
Closes PR 7294 by Eric Fox.
Diffstat (limited to 'emulators/pcemu/patches')
-rw-r--r-- | emulators/pcemu/patches/patch-aa | 50 | ||||
-rw-r--r-- | emulators/pcemu/patches/patch-ab | 80 | ||||
-rw-r--r-- | emulators/pcemu/patches/patch-ac | 55 | ||||
-rw-r--r-- | emulators/pcemu/patches/patch-ad | 95 | ||||
-rw-r--r-- | emulators/pcemu/patches/patch-ae | 11 |
5 files changed, 291 insertions, 0 deletions
diff --git a/emulators/pcemu/patches/patch-aa b/emulators/pcemu/patches/patch-aa new file mode 100644 index 00000000000..884c5ba2973 --- /dev/null +++ b/emulators/pcemu/patches/patch-aa @@ -0,0 +1,50 @@ +--- Makefile.orig Wed Jun 22 07:29:06 1994 ++++ Makefile Tue Mar 30 20:01:40 1999 +@@ -49,10 +49,15 @@ + # been known to crash the emulator when running on certain machines (80x86 + # based PCs under Linux, and HPs running HPUX). + ++.include "Makefile.inc" ++ + CC = gcc +-OPTIONS = -DBOOT720 -DBIG_ENDIAN -DALIGNED_ACCESS -DBIGCASE -DINLINE_FUNCTIONS +-XROOT = /usr/local/X11R5 +-CFLAGS = -I$(XROOT)/include -O2 #-fomit-frame-pointer ++#OPTIONS = -DBOOT720 -DBIG_ENDIAN -DALIGNED_ACCESS -DBIGCASE -DINLINE_FUNCTIONS ++OPTIONS = -DBOOT720 -DBIGCASE -DINLINE_FUNCTIONS \ ++ -DBOOTFILE=\"${PREFIX}/lib/pcemu/DriveA\" ++#XROOT = /usr/local/X11R5 ++XROOT = ${X11BASE} ++CFLAGS = -I$(XROOT)/include -O2 -pipe #-fomit-frame-pointer + + # You may need to add -N to the LFLAGS if you get sporadic segmentation + # faults. So far I have only needed to do this when compiling under Linux +@@ -86,3 +91,28 @@ + + clean: + rm $(PROGNAME) *.o ++ ++bootstrapper: ++ (cd bootstrap; make unpack) ++ ++#mode 0666 is required for DriveA, alas ++install: pcemu bootstrapper ++ -mkdir -p ${LOCALPREFIX}/lib/pcemu \ ++ ${LOCALPREFIX}/lib/pcemu/doc \ ++ ${LOCALPREFIX}/lib/pcemu/font \ ++ ${LOCALPREFIX}/lib/pcemu/C \ ++ ${LOCALPREFIX}/bin ++ install -c -s -o bin -g bin pcemu ${LOCALPREFIX}/bin/ ++ install -c -m 666 bootstrap/display.bin \ ++ ${LOCALPREFIX}/lib/pcemu/DriveA ++ install -c -m 644 BUGS CHANGES README TODO bootstrap/README.BSD \ ++ programs/lredir.readme \ ++ ${LOCALPREFIX}/lib/pcemu/doc/ ++ rm -f ${LOCALPREFIX}/lib/pcemu/doc/report.ps.gz ++ gzip --best < report.ps > ${LOCALPREFIX}/lib/pcemu/doc/report.ps.gz ++ rm -f ${LOCALPREFIX}/lib/pcemu/font/vga.pcf.Z ++ bdftopcf vga.bdf | compress > ${LOCALPREFIX}/lib/pcemu/font/vga.pcf.Z ++ mkfontdir ${LOCALPREFIX}/lib/pcemu/font ++ install -c -m 644 programs/vga50.com programs/config.sys \ ++ programs/dumpdisk.exe programs/lredir.exe programs/emufs.sys \ ++ ${LOCALPREFIX}/lib/pcemu/C diff --git a/emulators/pcemu/patches/patch-ab b/emulators/pcemu/patches/patch-ab new file mode 100644 index 00000000000..13b57f3d48b --- /dev/null +++ b/emulators/pcemu/patches/patch-ab @@ -0,0 +1,80 @@ +# $NetBSD: patch-ab,v 1.1.1.1 1999/03/31 06:34:07 garbled Exp $ +*** cpu.c.orig Wed Jun 22 16:24:50 1994 +--- cpu.c Tue Jan 24 18:37:17 1995 +*************** +*** 1127,1132 **** +--- 1127,1133 ---- + + static INLINE2 void i_daa(void) + { ++ /* Opcode 0x27 */ + if (AF || ((*bregs[AL] & 0xf) > 9)) + { + *bregs[AL] += 6; +*************** +*** 1300,1305 **** +--- 1301,1330 ---- + c_ss = SegToMemPtr(SS); + } + ++ static INLINE2 void i_das(void) ++ { ++ /* Opcode 0x2f */ ++ if (AF || ((*bregs[AL] & 0xf) > 9)) ++ { ++ *bregs[AL] -= 6; ++ AF = 1; ++ } ++ else ++ AF = 0; ++ ++ if (CF || (*bregs[AL] > 0x9f)) ++ { ++ *bregs[AL] -= 0x60; ++ CF = 1; ++ } ++ else ++ CF = 0; ++ ++ SetPF(*bregs[AL]); ++ SetSFB(*bregs[AL]); ++ SetZFB(*bregs[AL]); ++ } ++ + + /* most XOR instructions go here */ + +*************** +*** 4140,4146 **** + { + fprintf(stderr,"Error: Unimplemented opcode %02X at cs:ip = %04X:%04X\n", + c_cs[ip-1],sregs[CS],ip-1); +! exit(1); + } + + +--- 4165,4171 ---- + { + fprintf(stderr,"Error: Unimplemented opcode %02X at cs:ip = %04X:%04X\n", + c_cs[ip-1],sregs[CS],ip-1); +! /* exit(1); */ + } + + +*************** +*** 4218,4224 **** + case 0x2c: i_sub_ald8(); break; + case 0x2d: i_sub_axd16(); break; + case 0x2e: i_cs(); break; +! case 0x2f: i_notdone(); break; + case 0x30: i_xor_br8(); break; + case 0x31: i_xor_wr16(); break; + case 0x32: i_xor_r8b(); break; +--- 4243,4249 ---- + case 0x2c: i_sub_ald8(); break; + case 0x2d: i_sub_axd16(); break; + case 0x2e: i_cs(); break; +! case 0x2f: i_das(); break; + case 0x30: i_xor_br8(); break; + case 0x31: i_xor_wr16(); break; + case 0x32: i_xor_r8b(); break; diff --git a/emulators/pcemu/patches/patch-ac b/emulators/pcemu/patches/patch-ac new file mode 100644 index 00000000000..df2821dbcad --- /dev/null +++ b/emulators/pcemu/patches/patch-ac @@ -0,0 +1,55 @@ +# $NetBSD: patch-ac,v 1.1.1.1 1999/03/31 06:34:07 garbled Exp $ +*** mfs.c.orig Wed Jun 22 16:24:51 1994 +--- mfs.c Tue Jan 24 18:41:20 1995 +*************** +*** 319,325 **** +--- 319,327 ---- + #include <errno.h> + #include <sys/param.h> + #include <stdlib.h> ++ #if !__STDC__ + #include <malloc.h> ++ #endif + + #ifdef SOLARIS + #include <fcntl.h> +*************** +*** 327,335 **** + #endif + + #if defined(SGI) || defined(RS6000) +! #include <sys/statfs.h> + #else +! #include <sys/vfs.h> + #endif + + +--- 329,342 ---- + #endif + + #if defined(SGI) || defined(RS6000) +! # include <sys/statfs.h> + #else +! # include <sys/param.h> +! # if BSD >= 199103 +! # include <sys/mount.h> +! # else +! # include <sys/vfs.h> +! # endif /* new BSD */ + #endif + + +*** mfs.h.orig Wed Jun 22 16:24:51 1994 +--- mfs.h Tue Jan 24 18:37:18 1995 +*************** +*** 45,51 **** +--- 45,53 ---- + + #include "mfs_link.h" + ++ #if BSD < 199306 /* newer BSDs have it in <stdio.h> */ + extern char *sys_errlist[]; ++ #endif + + #if !defined(__hpux) && !defined(SOLARIS) && !defined(SGI) && !defined(RS6000) + #define strerror(x) sys_errlist[x] diff --git a/emulators/pcemu/patches/patch-ad b/emulators/pcemu/patches/patch-ad new file mode 100644 index 00000000000..8cac640d260 --- /dev/null +++ b/emulators/pcemu/patches/patch-ad @@ -0,0 +1,95 @@ +# $NetBSD: patch-ad,v 1.1.1.1 1999/03/31 06:34:07 garbled Exp $ +*** main.c.orig Wed Jun 22 16:24:50 1994 +--- main.c Tue Jan 24 18:37:18 1995 +*************** +*** 39,44 **** +--- 39,56 ---- + exit(0); + } + ++ static char *set_keymap(char *buf) ++ { ++ char c; ++ int code; ++ ++ if(sscanf(buf, " %*s %i=%c", &code, &c) != 2) ++ return "usage: keymap code=char"; ++ if(put_scan_table(code, (unsigned char)c)) ++ return "bad value for keymap"; ++ return 0; ++ } ++ + + void check_error(char *msg, int line) + { +*************** +*** 89,94 **** +--- 101,108 ---- + check_error(set_update_rate(strtol(value, NULL,10)), line); + else if (strcasecmp(keyword,"cursorspeed") == 0) + check_error(set_cursor_rate(strtol(value, NULL,10)), line); ++ else if (strcasecmp(keyword,"keymap") == 0) ++ check_error(set_keymap(buffer), line); + else + check_error("Syntax error in .pcemu file", line); + } +*** xstuff.c.orig Wed Jun 22 16:24:51 1994 +--- xstuff.c Tue Jan 24 18:37:19 1995 +*************** +*** 316,322 **** + } + + +! static BYTE scan_table1[] = + { + 0x39, 0x02, + #ifdef KBUK /* double quotes, hash symbol */ +--- 316,322 ---- + } + + +! static BYTE scan_table1[256 - 0x20] = + { + 0x39, 0x02, + #ifdef KBUK /* double quotes, hash symbol */ +*************** +*** 360,365 **** +--- 360,366 ---- + #else + 0x29, + #endif ++ 0 + }; + + +*************** +*** 458,463 **** +--- 459,474 ---- + return (scan_table2[i].scan_code); + + return 0; ++ } ++ ++ ++ int put_scan_table(BYTE code, unsigned char c) ++ { ++ /* interface to overload scan_table1 from .pcemurc */ ++ if(c < ' ' || c >= ' ' + sizeof scan_table1) ++ return 1; ++ scan_table1[c - ' '] = code; ++ return 0; + } + + +*** xstuff.h.orig Wed Jun 22 16:24:51 1994 +--- xstuff.h Tue Jan 24 18:37:19 1995 +*************** +*** 17,22 **** +--- 17,23 ---- + + void start_X(void); + void end_X(void); ++ int put_scan_table(BYTE, unsigned char); + void process_Xevents(void); + void flush_X(void); + diff --git a/emulators/pcemu/patches/patch-ae b/emulators/pcemu/patches/patch-ae new file mode 100644 index 00000000000..7fe17f9c0f3 --- /dev/null +++ b/emulators/pcemu/patches/patch-ae @@ -0,0 +1,11 @@ +# $NetBSD: patch-ae,v 1.1.1.1 1999/03/31 06:34:07 garbled Exp $ +*** programs/config.sys.orig Mon Mar 27 21:27:23 1995 +--- programs/config.sys Mon Mar 27 22:19:26 1995 +*************** +*** 1,2 **** +! device=emufs.sys / +! stacks 9,512 +--- 1,3 ---- +! device=\emufs.sys /usr/local/lib/pcemu/C +! stacks 9,512 +! |