You
need to install your kernel's source before compiling SVGAlib.
SVGAlib will look for the kernel source in /usr/src/linux
and if isn't there, it won't compile. Since all major distributions
feature a kernel source package of some sort (except Fedora),
you don't have to do anything special. Just use your distro's
package installer to install your kernel's source.
Note, you must build
SVGAlib with the same compiler used to build your kernel.
Type gcc --version; cat /proc/version
at a command prompt if unsure. So, on an LFS build with gcc-2.95.3
you would use make CC=/opt/gcc-2.95.3/bin/gcc
install, not just make install.
Download advancemame
source to your home directory
Download svgalib
source to your home directory
Launch a terminal and enter:
cd
tar xvzf advancemame-version.tar.gz
tar xvzf svgalib-version.tar.gz
cd svgalib-version
ls ../advancemame-version/contrib/mame/svgalib/*
patch -p1 < ../advancemame-version/contrib/mame/svgalib/svgalib-version-patch1.diff
patch -p1 < ../advancemame-version/contrib/mame/svgalib/svgalib-version-patch2.diff
patch -p1 < ../advancemame-version/contrib/mame/svgalib/svgalib-version-...
su
make install
make demoprogs
cp -f
kernel/svgalib_helper/svgalib_helper.ko
/lib/modules/`uname -r`/kernel/misc
insmod /lib/modules/`uname
-r`/kernel/misc/svgalib_helper.ko
lsmod | grep svga
If everything went well you should see the
svgalib_helper module listed. Once installed you need to edit
/etc/vga/libvga.conf and modify
the HorizSync and VertRefresh
parameters so that they exceed your monitor's capabilities.
Your advancemame settings will override these settings, so
it is best to overstate your monitor's capabilities here.
It's also a good idea to add an SVGAlib entry to your modules.conf
file. So to make these changes enter:
sed -i 's/^HorizSync.*/HorizSync
15 120/' /etc/vga/libvga.config
sed -i 's/^VertRefresh.*/VertRefresh 40 160/' /etc/vga/libvga.config
grep "svgalib_helper" /etc/modules.conf || echo
"alias char-major-209 svgalib_helper" >> /etc/modules.conf
depmod -a
exit
After SVGAlib is installed and working, you
can compile AdvanceMAME and AdvanceMENU. To force AdvanceMAME
or AdvanceMENU to use svgalib simply change
device_video
auto to device_video
svgalib slang in the respective file (advmame.rc or
advmenu.rc).
If the svgalib_helper module won't load
1. you compiled svgalib with a different compiler than the
one used to compile your kernel
2. you are trying to load the wrong version of the module.
2.6.x modules end in .ko and 2.4.x modules in .o Both modules
can be found in the kernel/svgalib_helper
directory. The SVGAlib make install by default places these
modules in /lib/modules/`uname -r`/kernel/misc
directory.
If SVGAlib doesn't seem to be working
1. you forgot to insert the svgalib_helper module, insmod
svgalib_helper.ko (or insmod
svgalib_helper.o on 2.4.x kernels). Note, you must
re-insert (insmod) the svgalib_helper
module every time you boot your computer. To load the module
automatically at bootup add insmod /lib/modules/`uname
-r`/kernel/misc/svgalib_helper.ko to your bootup scripts
(use svgalib_helper.o on 2.4.x kernels) or add alias
char-major-209 svgalib_helper to your
/etc/modules.conf file.
2. you haven't edited your /etc/vga/libvga.conf
file
3. your card isn't supported. Check the contrib directory
of AdvanceMAME for patches, or try a different version of
SVGAlib. You can quickly test your
card for basic support by running the demo programs in the
threeDKit directory, plane or
wrapdemo. You should be able
to manipulate the images using your keyboard. Press c to exit
the demos.
4. you are using a precompiled AdvanceMAME
binary. You must compile AdvanceMAME
from source AFTER you install SVGAlib.
5. your SDL installation doesn't support SVGAlib (SUSE 9.1,
for example). You must compile and install SDL. Follow the
directions at Beyond
Linux From Scratch, then recompile AdvanceMAME from source.
|