AminetAminet
Search:
84520 packages online
About
Recent
Browse
Search
Upload
Setup
Services

misc/emu/pcemu-0.0.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Slow buggy PC emul. port w/src, A68k/PPC
Author:Peter McGavin (p.mcgavin at irl.cri.nz) (originally by David Hedley)
Uploader:Peter McGavin (p mcgavin irl cri nz)
Type:misc/emu
Architecture:m68k-amigaos; ppc-powerup
Date:1998-08-30
Download:http://aminet.net/misc/emu/pcemu-0.0.lha - View contents
Readme:http://aminet.net/misc/emu/pcemu-0.0.readme
Downloads:962


                          PCEmuAmiga 0.0                        30 Aug 1998
                          --------------


This archive contains an Amiga port of David Hedley's PC Emulator for
Unix/X Windows.  Written entirely in C, it emulates a standard
text-only 8086 based PC with 640 kb memory.

David Hedley did most of the work in 1993/1994 for a 3rd year
university project.  He took several months to do the hard work,
writing and debugging the 8086 emulator, bios interface and hardware
emulation code.  For a full report of his activities, take a look at
report.ps with a PostScript viewer.  David's version of the emulator
is available from sunsite as pcemu1.01alpha.tar.gz.  It runs on Linux,
Solaris, HP-UX, etc.

The Amiga port took 2 days (so far), plus another 2 or 3 hours to
write this document.  I reckon that's a tribute to how well David made
his code portable and separated the hardware independent from hardware
dependent code.

I replaced the X Windows module, xstuff.c, with an Amiga equivalent,
astuff.c.  It handles colour text video and the keyboard.  Apart from
that, I replaced the 100 Hz timer interrupt code (tricky for PPC),
resolved various naming conflicts with the Amiga includes, and changed
some Unix versus Amiga path naming conventions.

Unfortunately the original emulator is far from complete.  For
example, there are no graphics modes, no mouse/joystick, no sound,
incomplete bios emulation, no 80286 emulation, and so on.  Indeed,
these days it's quite hard to find compatible software for it.  Also,
it is quite slow, and there are bugs.  No doubt there are more bugs
and limitations in my Amiga version than in David's Unix/X Windows
version.

On the positive side, when things go wrong, pcemu generally exits
cleanly and leaves the Amiga stable.  If it freezes, a clean exit can
be forced by sending pcemu a CTRL/C BREAK signal.  I have yet to crash
my Amiga with pcemu.

See the other documentation files for David's description of the
emulator.



REQUIREMENTS
------------

A fast Amiga, preferably a 68060 or PPC, with at least KS3.0.

The PPC version uses PowerUp, not WarpOS, sorry.

Stack requirements are small, I think.



INSTALLATION
------------

You should be able to run pcemu and/or pcemuppc directly from the
distribution directory.

To install to a hard disk:

Copy pcemu and/or pcemuppc to a directory of your choice.

Install the vga/16 font in your fonts directory or under the program
directory.  (The program directory is the directory containing pcemu
and/or pcemuppc.)

Copy .pcemurc to the program directory.

Edit .pcemurc, look at the comments in the file and make changes if
required.  Here you can configure your keyboard and PPC bus speed,
among other things.

Copy DriveA to the program directory.  DriveA is an image of a
bootable floppy disk.  The emulator loads it then boots to it.



DOS
---

PCs run operating systems such as MS-DOS.  PC emulators do the same.
A PC emulator is pretty useless without an OS.

Unfortunately I can't give away MS-DOS with pcemu.  It still belongs
to Bill Gates.

However there's a mostly MS-DOS compatible OS called FreeDOS that's
governed by the GNU license.  I can give it away provided I tell you
how I got it and how you can get the source code.  Well I downloaded
it from "http://www.freedos.org/" and you can get it from there too.

The file DriveA is an image of a 1.44 Mb bootable floppy disk
containing some of the base components of FreeDOS --- just enough to
boot the emulator and try a few things.  It doesn't contain a single
byte of Micro$oft code.

Unfortunately FreeDOS has its share of bugs which, added to the bugs
in pcemu, makes for a very unstable situation.  You'll do much better
if you get yourself a real bootable MS-DOS disk and make your own
DriveA image from it.

The program amidumpdisk in the programs directory can dump 720 kb and
1.44 Mb PC floppies to a disk image.  Run it from a CLI to see how to
use it.  You'll need a high-density drive to make a 1.44 Mb image.
Well, either that or use David Hedley's dumpdisk (also in the programs
directory) on a PC.  Or try "cp /dev/fd0 DriveA" on a Unix box.  If
you make a 720 kb image (or another size), you'll have to change a
line in .pcemurc.

It might be a good idea to make an image of a bootable MS-DOS disk
with EDIT.EXE, QBASIC.EXE, some text Basic games like NIBBLES.BAS,
Norton SysInfo, and so on.  Something with colour makes a difference.



WINDOWS
-------

You must be kidding...



LREDIR AND EMUFS
----------------

These are PC programs in the programs directory which allow the PC
emulator to access the Unix file system behind the emulator.  See
ldir.readme in the programs directory for a full description.

Please note that I made only minimal changes to the EMUFS support in
the emulator to get the code to compile.  In particular, I did not
change any path naming conventions from Unix.  You can try installing
EMUFS.SYS in your config.sys to access Amiga files, but the result may
not be what you expect.

Absolute pathnames in Unix start with a slash "/".  When the emulator
passes a name beginning with a "/" to AmigaDOS, AmigaDOS looks in the
parent directory, i.e, one up from where you are now.  If you're very
lucky, you might be able to access files in the parent directory from
inside pcemu.  Constructions like "../" probably won't work at all.
In any case, MFS often seems to list files with the wrong sizes, or
complete gibberish.  MFS is the most bug-ridden part of PCEmuAmiga.



TIMING
------

The original emulator uses setitimer() to generate 100 Hz regular
interrupts.  The interrupt routine sets a flag which the emulator
checks before every 8086 instruction.  If the flag is set, the
emulator generates 8086 interrupts as required, checks for keyboard
input, updates the display, and so on.

SAS/C doesn't provide setitimer().  For the Amiga A68k version, I used
timer.device and TR_ADDREQUEST to provide the same functionality.

I couldn't see how to generate 100 Hz interrupts with PPC PowerUp
without massive overheads with every 8086 instruction.  Therefore I
changed to a different method.  Before every instruction, the emulator
reads the PPC time base facility registers and checks to see whether
0.01 seconds has elapsed since the last interrupt.

Calling a subroutine to read the time base registers and doing 64-bit
comparisons is slower than checking a flag.  Therefore I changed the
emulator to execute a fixed number of instructions before checking the
clock.  You can set this number in .pcemurc.  By default it is 100.
Not checking for interrupts after every instruction my cause
compatibility problems with some software.



SPEED
-----

Frankly, I'm disappointed in the speed, especially the PPC version.  I
compiled David Hedley's original version with egcs on APUS and it went
several times faster on the same Amiga.  And that was sending all the
graphics across a network to another X-server too (because I haven't
got an X-server working on APUS yet).  I don't know whether the
difference is egcs versus SAS/C or whether I did something silly when
I ported it to the Amiga.  Perhaps it's doing too many A68k/PPC
context switches.  Profiling the A68k version indicates it spends
about 99% of its time in the 8086 emulator.



FUTURE PLANS
------------

Sorry but I don't have any future plans for PCEmuAmiga really.  It
would be incredibly time-consuming to fix many of the bugs and
limitations.  I was only interested in seeing how easily it could be
ported to the Amiga and how fast it would go.  Perhaps if I see an
easy fix that would make a big difference, and if I have enough spare
time, I might do something.  There are too many other things to do...

However all the source code is there for anyone to modify for
non-commercial purposes.  Why don't you go for it?



Peter McGavin (p.mcgavin at irl.cri.nz).


Contents of misc/emu/pcemu-0.0.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  298    2100  14.2% -lh5- b43b Aug 30  1998 pcemu.info
[generic]                  564    1089  51.8% -lh5- fad6 Aug 30  1998 pcemu/.pcemurc
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/.pcemurc.info
[generic]                 3706    8055  46.0% -lh5- 8474 Aug 31  1998 pcemu/AMIGA.README
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/AMIGA.README.info
[generic]                  568    1007  56.4% -lh5- 457c Aug 28  1998 pcemu/BUGS
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/BUGS.info
[generic]                  782    1397  56.0% -lh5- b82f Aug 28  1998 pcemu/CHANGES
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/CHANGES.info
[generic]                 1485    3152  47.1% -lh5- 7fad Aug 28  1998 pcemu/COPYRIGHT
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/COPYRIGHT.info
[generic]                  191     300  63.7% -lh5- 2c09 Aug 28  1998 pcemu/dot.pcemurc
[generic]               804943 1474560  54.6% -lh5- 7d5a Aug 30  1998 pcemu/DriveA
[generic]                  298    2100  14.2% -lh5- b43b Aug 30  1998 pcemu/fonts.info
[generic]                74626  162692  45.9% -lh5- e9c1 Aug 30  1998 pcemu/pcemu
[generic]                  387     835  46.3% -lh5- c23a Aug 28  1998 pcemu/pcemu.info
[generic]               149917  415194  36.1% -lh5- f21d Aug 30  1998 pcemu/pcemuppc
[generic]                  392     835  46.9% -lh5- 494c Aug 29  1998 pcemu/pcemuppc.info
[generic]                  298    2100  14.2% -lh5- b43b Aug 30  1998 pcemu/programs.info
[generic]                 4280    9287  46.1% -lh5- 6b60 Aug 28  1998 pcemu/README
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/README.info
[generic]               222829  701069  31.8% -lh5- 24c6 Aug 28  1998 pcemu/report.ps
[generic]                  298    2100  14.2% -lh5- b43b Aug 30  1998 pcemu/src.info
[generic]                 1090    2255  48.3% -lh5- c4ca Aug 28  1998 pcemu/TODO
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/TODO.info
[generic]                   25     264   9.5% -lh5- 5916 Aug 29  1998 pcemu/fonts/vga.font
[generic]                 6395    9932  64.4% -lh5- 8883 Aug 30  1998 pcemu/programs/amidumpdisk
[generic]                 1212    3123  38.8% -lh5- ba87 Aug 30  1998 pcemu/programs/amidumpdisk.c
[generic]                  389     835  46.6% -lh5- a490 Aug 30  1998 pcemu/programs/amidumpdisk.info
[generic]                   32      32 100.0% -lh0- 6b41 Aug 28  1998 pcemu/programs/config.sys
[generic]                 1014    2444  41.5% -lh5- f914 Aug 28  1998 pcemu/programs/dumpdisk.c
[generic]                 7962   13204  60.3% -lh5- bbf5 Aug 28  1998 pcemu/programs/dumpdisk.exe
[generic]                 2902    7174  40.5% -lh5- 8bf3 Aug 28  1998 pcemu/programs/emufs.S
[generic]                  496     736  67.4% -lh5- 3171 Aug 28  1998 pcemu/programs/emufs.sys
[generic]                 3368   12204  27.6% -lh5- 227c Aug 28  1998 pcemu/programs/lredir.c
[generic]                 5388    8736  61.7% -lh5- 3f9a Aug 28  1998 pcemu/programs/lredir.exe
[generic]                 2070    4922  42.1% -lh5- ebbf Aug 28  1998 pcemu/programs/lredir.readme
[generic]                  452    2567  17.6% -lh5- 8469 Jan  6  1998 pcemu/programs/lredir.readme.info
[generic]                  143     215  66.5% -lh5- 05eb Aug 28  1998 pcemu/programs/Makefile
[generic]                   12      12 100.0% -lh0- 6708 Aug 28  1998 pcemu/programs/vga50.com
[generic]                   43      43 100.0% -lh0- 972c Jun 24  1998 pcemu/src/amiga_timer.h
[generic]                  153     244  62.7% -lh5- 6264 Jun 28  1998 pcemu/src/amiga_timer.s
[generic]                 2995   10687  28.0% -lh5- 2fc1 Aug 30  1998 pcemu/src/astuff.c
[generic]                  378    1551  24.4% -lh5- 7d44 Aug 30  1998 pcemu/src/astuff.h
[generic]                  688    1889  36.4% -lh5- 0927 Aug 30  1998 pcemu/src/bdf2bmf.bas
[generic]                 7387   31612  23.4% -lh5- 1942 Aug 28  1998 pcemu/src/bios.c
[generic]                  395    1488  26.5% -lh5- 8382 Aug 28  1998 pcemu/src/bios.h
[generic]                12953   96090  13.5% -lh5- 9492 Aug 30  1998 pcemu/src/cpu.c
[generic]                 1549    5008  30.9% -lh5- a3c2 Aug 30  1998 pcemu/src/cpu.h
[generic]                 4714   24745  19.1% -lh5- bb91 Aug 28  1998 pcemu/src/debugger.c
[generic]                  288    1255  22.9% -lh5- 4404 Aug 28  1998 pcemu/src/debugger.h
[generic]                 2717   17163  15.8% -lh5- 32db Aug 28  1998 pcemu/src/disasm.h
[generic]                  487    1768  27.5% -lh5- c8cc Aug 28  1998 pcemu/src/global.h
[generic]                 2692    9983  27.0% -lh5- b6c4 Aug 29  1998 pcemu/src/hardware.c
[generic]                  427    1488  28.7% -lh5- 5f52 Aug 28  1998 pcemu/src/hardware.h
[generic]                  253    1325  19.1% -lh5- 7b2e Aug 28  1998 pcemu/src/icon.h
[generic]                 2456   17700  13.9% -lh5- f34b Aug 28  1998 pcemu/src/instr.h
[generic]                 1005    3407  29.5% -lh5- 78d8 Aug 28  1998 pcemu/src/keytabs.h
[generic]                 1371    4542  30.2% -lh5- 60ca Aug 30  1998 pcemu/src/main.c
[generic]                 1539    4212  36.5% -lh5- a509 Aug 28  1998 pcemu/src/Makefile
[generic]                27410  100782  27.2% -lh5- 24f0 Aug 30  1998 pcemu/src/mfs.c
[generic]                 4778   14402  33.2% -lh5- b72c Aug 28  1998 pcemu/src/mfs.h
[generic]                  667    2176  30.7% -lh5- 1095 Aug 28  1998 pcemu/src/mfs_link.h
[generic]                  375    1442  26.0% -lh5- 545d Aug 28  1998 pcemu/src/mytypes.h
[generic]                  971    2756  35.2% -lh5- 49de Aug 30  1998 pcemu/src/prof1.txt
[generic]                 1910    5999  31.8% -lh5- 7f34 Aug 30  1998 pcemu/src/smakefile
[generic]                 4477   28431  15.7% -lh5- c5ff Aug 28  1998 pcemu/src/vga.bdf
[generic]                 3360   41912   8.0% -lh5- e938 Aug 29  1998 pcemu/src/vga.bmf
[generic]                 4457   18820  23.7% -lh5- 33bf Aug 30  1998 pcemu/src/vga.c
[generic]                  293    1217  24.1% -lh5- 5c99 Aug 28  1998 pcemu/src/vga.h
[generic]                 2139    8338  25.7% -lh5- 35ea Aug 30  1998 pcemu/src/vgahard.c
[generic]                  400    1557  25.7% -lh5- f399 Aug 28  1998 pcemu/src/vgahard.h
[generic]                 4403   15933  27.6% -lh5- 690a Aug 28  1998 pcemu/src/xstuff.c
[generic]                  354    1506  23.5% -lh5- b897 Aug 28  1998 pcemu/src/xstuff.h
[generic]                 2633    5572  47.3% -lh5- 87a1 Aug 29  1998 pcemu/fonts/vga/16
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        75 files 1405093 3361539  41.8%            Aug 30  1998

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>