~ubuntu-branches/ubuntu/raring/vice/raring

1.1.3 by Zed Pobre
Import upstream version 1.19
1
Compiling MS-DOS VICE with ethernet-support with DJGPP
2
======================================================
3
4
By Marco van den Heuvel (blackystardust68@yahoo.com)
5
6
Based on the "MSDOS-Howto.txt" by Fabrizio Gennari (fabrizio.ge@tiscalinet.it)
7
8
A way of compiling the MS-DOS version of VICE is to use a cross-compiler
9
which runs on Linux. But it is also possible to compile VICE with a native
10
MS-DOS compiler, DJGPP. The only limitation is that VICE cannot be compiled
11
on native MS-DOS, only on an MS-DOS prompt under Windows. Why? Because VICE
12
sources use long filenames, while MS-DOS only supports "8+3" filenames: when
13
unpacking VICE sources, often two different filenames become identical after
14
8+3 truncation, and it is impossible to distinguish between them. Luckily,
15
DJGPP supports long filenames when run in a Windows environment.
16
17
First of all, download the required DJGPP files from the official site
18
(http://www.delorie.com/pub/djgpp/current/) or a mirror. These are the files for a
19
minimum installation, newer version of the files should be fine:
20
* from directory v2, djdev203.zip
21
* from directory v2gnu, bnu214b.zip, bsh204b.zip, dif28b.zip, fil41b.zip,
22
gcc332b.zip, gpp332b.zip, grep24b.zip, mak3791b.zip, sed407b.zip, shl2011b.zip,
23
txt20b.zip
24
* from directory v2tk/allegro, all403.zip . Actually, any Allegro from 3.1
25
on will do. Note that Allegro is distributed as source only, so you will have
26
to compile it.
27
Follow the instructions to install DJGPP. In short, unpack all the DJGPP ZIP
28
files in the same directory (remember to preserve the directory structure
29
while unpacking!), which will be called DJDIR from now on, add DJDIR\bin to
30
the PATH variable, and run the command
31
32
setdjgpp DJDIR DJDIR
33
34
where the first DJDIR has MS-DOS directory separators (\), and the second
35
DJDIR has Unix directory separators (/). Example:
36
37
setdjgpp C:\DJGPP C:/DJGPP
38
39
If you want those command to be automatically executed at boot, add them in
40
the AUTOEXEC.BAT file.
41
42
In order for VICE to be able to use the ethernet card it needs a library
43
that provides bsd-sockets compatibilty, this library is watt32. Download the
44
source package of watt32 (http://www.bgnett.no/~giva/watt32s-2.2-dev.9.zip).
45
Unpack the source in the DJGPP directory. Follow the instructions to compile
46
watt32. After it has been compiled you can copy the lib/libwatt.a to the lib
47
directory in the DJGPP directory, and copy the contents of the inc directory
48
to the include directory of the DJGPP directory.
49
50
In order for VICE to be able to capture all packets from an ethernet card it
51
needs a library that provides this capabillity, this library is called libpcap.
52
Download the source package of libpcap (http://www.bgnett.no/~giva/pcap/libpcap.zip)
53
Unpack the source and follow the instructions to compile pcap. After it has been
54
compiled you can copy libpcap.a to the lib directory of the DJGPP directory and
55
copy pcap.h and pc-bpf.h to the include directory of the DJGPP directory.
56
57
Optionally you can install another library to handle the outgoing packets,
58
this library is called libnet and you can download it from
59
(http://www.bgnett.no/~giva/pcap/libnet.zip), unpack and compile by following
60
the instructions in the package. This package is not needed for VICE to be able
61
to use the ethernet, it only provides a different means to do outgoing packets.
62
63
Now, unpack VICE sources in a directory: all VICE files will be in a
64
sub-directory called vice-<version number>. Open an MS-DOS prompt window,
65
go to the vice-<version number> dir and type
66
67
bash
68
69
. From now on, you just have to follow the instructions to compile Unix
70
VICE: the simplest way is to type
71
72
./configure --enable-ethernet
73
make
1.1.4 by Zed Pobre
Import upstream version 1.20
74
make bindist
75
76
After that, you will have a binary distribution from which you can run
77
VICE.
78
79
Note for the more advanced users : libpcap uses the dma.o module from the allegro
1.1.3 by Zed Pobre
Import upstream version 1.19
80
library therefor compiling a program and linking in libpcap and allegro would result
81
in a collision between the two modules. The makefile generated when ethernet is
82
enabled will take care of this problem by generating a libpcap_nodma.a without the
83
dma.o module.
84
85
Before starting VICE make sure you have setup the msdos ethernet package driver
86
for your ethernet card and make sure you have setup the watt32 configuration
87
files correctly, instructions for how to do this are in the watt32 package.
88
1.1.4 by Zed Pobre
Import upstream version 1.20
89
You can run the compiled VICE either from windows or on native MS-DOS.
90
1.1.3 by Zed Pobre
Import upstream version 1.19
91
Note that to run the compiled emulator on native MS-DOS mode you need to download
92
the file csdpmi5b.zip (older version should be OK, too) from subdir v2misc of
93
DJGPP website  and unzip the file CWSDPMI.EXE in the same directory as the
94
VICE .EXE files, or in a directory in the path.