-
Notifications
You must be signed in to change notification settings - Fork 2
/
BUILD
362 lines (255 loc) · 10.4 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
=======================
AdvanceMAME Build Notes
=======================
This file contains the instructions to build AdvanceMAME,
AdvanceMESS and AdvanceMENU from the source archives.
1 PREPARING THE SOURCES
=======================
If you are using the standard source packages you don't need
to prepare the sources, and you can go directly to
the `Configuring' chapter.
Instead, if you are using one of the `diff' source package
you need to complete the sources with the original emulator
source.
1.1 AdvanceMAME
---------------
To compile AdvanceMAME you need the MAME source of the same
version of AdvanceMAME. Please note that you must use the original emulator
source, you cannot use the source of another MAME clone like xmame.
The original MAME sources can be downloaded from:
http://www.mame.net/
To complete the source you need to unzip the original MAME archive
in a different directory and copy some files in the AdvanceMAME
tree at the same level of the `advance/' directory.
In Linux and Mac OS X remember to unzip the original .zip archives
with the `unzip -aa' command to convert the files from the
DOS/Windows CR/LF format to the Unix CR format.
After unzipping you must:
* Copy the `src/' directory from the MAME archive in the AdvanceMAME tree.
Please note that only the `src/' directory from the
MAME source is required, all the other files must be deleted.
The final directory tree for AdvanceMAME must be :
advance/advance.mak
src/mame.mak
After unpacked, you need to patch the original MAME source in
the `src/' directory with the patch `advance/advmame.dif'.
If the patch isn't applied correctly, probably you are using the wrong
version of the emulator source.
The commands for patching the source for AdvanceMAME in DOS and Windows are :
cd src
patch -p1 < ..\advance\advmame.dif
and in Linux and Mac OS X are :
cd src
patch -p1 < ../advance/advmame.dif
1.2 AdvanceMESS
---------------
To compile AdvanceMESS you need the MAME and MESS source of
the same version of AdvanceMESS. Please note that you must use the
original emulator source, you cannot use the source of another MAME
clone like xmame.
The original MAME sources can be downloaded from:
http://www.mame.net/
The original MESS sources can be downloaded from:
http://www.mess.org/
To complete the source you need to unzip the original MAME and MESS
archives in different directories and copy some files
in the AdvanceMAME tree at the same level of the `advance/' directory.
In Linux and Mac OS X remember to unzip the original .zip archives
with the `unzip -aa' command to convert the files from the
DOS/Windows CR/LF format to the Unix CR format.
After unzipping you must:
* Copy the `src/' directory from the MAME archive renaming it `srcmess/'.
* Copy the `src/' directory from the MESS archive renaming it `srcmess/'
overwriting any file already present in the MAME archive.
* Copy the `mess/' directory from the MESS archive.
Please note that only the specified directories from the
MAME and MESS source are required, all the other files must be deleted.
The final directory tree for AdvanceMESS must be :
advance/advance.mak
srcmess/mame.mak
mess/mess.mak
After unpacked, you need to patch the original MESS source in
in the `srcmess/' directory with the patch `advance/advmess.dif' and
the source in the `mess/' directory with the patch `advance/mess.dif'.
If the patches aren't applied correctly, probably you are using the wrong
version of the emulator source.
The commands for patching the source for AdvanceMESS in DOS and Windows are :
cd srcmess
patch -p1 < ..\advance\advmess.dif
cd ..\mess
patch -p1 < ..\advance\mess.dif
and in Linux and Mac OS X are :
cd srcmess
patch -p1 < ../advance/advmess.dif
cd ../mess
patch -p1 < ../advance/mess.dif
2 CONFIGURING
=============
2.1 Linux/Mac OS X/Generic Unix
-------------------------------
Run the `./configure' script.
Generally no extra option is required. You can get the complete
option list with the `./configure --help' command.
The default installation prefix is /usr/local. You can change it
with the `--prefix=' option.
The default host configuration directory is /usr/local/etc. You can
change it with the `--sysconfdir=' option. Please note that instead
of /usr/etc is always used /etc.
The configure script automatically detects all the available
libraries and the optimization flags. You can use the
--with-sdl-prefix option to search for the SDL library in a
specific location.
If you want to customize the compilation CFLAGS and LDFLAGS you
can put them on the ./configure command line.
For example for high optimization on Pentium4:
./configure CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer" \
LDFLAGS="-s"
If you have the "Intel C Compiler 8" you can try with the
command:
./configure CC=icc CFLAGS="-I/usr/local/include -O3 -march=pentium4" \
LDFLAGS="-lsvml"
If you want to use the included version of the zlib and expat
libraries instead of the system version you must specify
the --disable-zlib and --disable-expat options.
2.2 DOS/Windows
---------------
In DOS/Windows you need to manually copy the `Makefile.usr'
file as `Makefile' and edit the first section to match your
requirements.
Read the file comments for major details.
3 COMPILING
===========
To compile run `make'.
4 INSTALLING
============
4.1 Linux/Mac OS X/Generic Unix
-------------------------------
Run `make install' to install the binaries and the documentation.
The binaries are installed in $prefix/bin, the program data
files in $prefix/share/advance, the documentation in
$prefix/share/doc/advance, and the man pages in $prefix/man/man1.
The default installation $prefix is /usr/local.
In Mac OS X please check that the directory $prefix/bin is in the
search PATH. Generally /usr/local/bin isn't.
4.2 DOS/Windows
---------------
Copy manually the compiled executables in a directory of your
choice.
5 REQUIREMENTS
==============
To compile AdvanceMAME you need at least 128 Mbyte of memory,
256 Mbyte are suggested.
5.1 Linux
---------
To build in Linux you need the following software:
Linux 2.4.0 (or newer)
GNU gcc C/C++ 3.2.3 or 3.3.4 (or newer)
GNU make 3.79.1 (or newer)
The following software is also used if present:
NASM 0.98.33 (or newer)
SVGALIB 1.9.14 (or newer)
SDL 1.2.4 (or newer)
S-Lang 1.4.3 (or newer)
ncurses 5.4 (or newer)
FreeType 2.1.7 (or newer)
zlib 1.1.4 (or newer)
expat 1.95.6 (or newer)
The suggested gcc compiler versions are 3.2.3 and 3.3.4.
The versions 2.96.x, 3.0.x don't work. Other versions should work.
The SVGALIB 1.4.x versions are NOT supported. Download the latest
ALPHA 1.9.x or 2.0.x version from http://www.svgalib.org/.
In the contrib/svgalib directory there are some source patches to
fix some problems of the library.
Remember to edit the /etc/vga/libvga.conf file with your settings.
Specifically you need at least to set correctly `HorizSync' and
`VertRefresh'.
If your distribution doesn't contain the S-Lang library you
can download it from http://www.s-lang.org/.
5.2 Mac OS X
------------
To build in Mac OS X and other Unix you need the following
software:
GNU gcc C/C++ 3.2.3 (or newer)
GNU make 3.79.1 (or newer)
SDL 1.2.4 (or newer)
The following software is also used if present:
FreeType 2.1.7 (or newer)
zlib 1.1.4 (or newer)
expat 1.95.6 (or newer)
The gcc compiler and make program are included in the Apple
Development Kit which must be installed manually from the
original Mac OS X cd.
The SDL library must be manually compiled and installed.
Please note that you may need to use the --with-sdl-prefix option
of the ./configure script to correctly find the installed SDL
library. Generally "./configure --with-sdl-prefix=/usr/local" is
enough.
5.3 DOS
-------
To build in DOS you need the following software:
DJGPP development kit 2.03 (or never) [djdev*.zip]
DJGPP GNU gcc C/C++ 3.2.3 or 3.3.4 [gcc*b.zip gpp*b.zip]
DJGPP GNU make 3.79.1 (or newer) [mak*b.zip]
DJGPP GNU binutils [bnu*b.zip]
DJGPP GNU fileutils [fil*b.zip]
DJGPP GNU shellutils [shl*b.zip]
DJGPP GNU patch [pat*b.zip]
NASM 0.98.33 (or newer)
Allegro 4.0.0 (or newer)
SEAL 1.0.7 + MAME patch
FreeType 2.1.7 (or newer)
The suggested gcc compiler versions are 3.2.3 and 3.3.4.
The versions 3.0.x don't work. The version 3.4.x may have some
problems related to the new "unit-at-a-time" compilation,
don't use it, or disable this feature with the option
-fnounit-at-a-time. Other versions should work.
The patched SEAL library is available at http://www.mame.net/.
Ensure to have the DOS version of NASM. If you have the Windows
version named `nasmw.exe' you must rename it as `nasm.exe' or
change the `Makefile.usr' to use it.
If compiling you get the "Argument list too long" error,
or "Error -1" you need to use the DJGPP stubedit utility
to increase bufsize value for some DJGPP tools, with the
following commands:
stubedit c:\djgpp\bin\gcc.exe bufsize=32k
stubedit c:\djgpp\bin\ld.exe bufsize=32k
stubedit c:\djgpp\bin\make.exe bufsize=32k
stubedit c:\djgpp\lib\gcc-lib\djgpp\3.23\collect2.exe bufsize=32k
You may need to use different paths to the files,
especially for collect2.exe.
5.4 Windows
-----------
To build in Windows you need the following software:
MINGW 1.1 (or newer)
MINGW GNU gcc C/C++ 3.2.3 (or never)
NASM 0.98.33 (or newer)
SDL 1.2.4 (or newer)
FreeType 2.1.7 (or newer)
The only tested compiler version is 3.2.3. Other versions
should work.
5.5 Generic Unix
----------------
To build in a generic Unix environment you need the following
software:
GNU gcc C/C++ 3.2.3 (or newer)
GNU make 3.79.1 (or newer)
SDL 1.2.4 (or newer)
The following software is also used if present:
zlib 1.1.4 (or newer)
expat 1.95.6 (or newer)
6 DEBUGGING
===========
To debug the program the suggested configuration options
are:
./configure --enable-debug --disable-svgalib \
--disable-pthread
The svgalib library is disabled because it interferes with
the stack backtrace on the signal handler.
The pthread library is disabled because it interferes with
the debugger signals.
The suggested environment is X Window using the SDL
library. This allow to run the debugger and the programs
on the same monitor and keyboard.
7 COPYRIGHT
===========
This file is Copyright (C) 2003, 2004 Andrea Mazzoleni.