Main > Linux

gentoo / advancemame fresh install

<< < (2/9) > >>

Major Rock Hardy:

--- Quote from: csa3d on August 25, 2007, 01:00:53 am ---Keep going!  Good documentation!  I went down this road once and realized I had no clue how to begin fixing 75% of anything which went wrong during install.  Three days later, I reinstalled xp and said "f that".

-csa

--- End quote ---

... cool, someone is reading this!  Thanks for the words of encouragement!

MRH

tikbalang:
i've been wanting to do this too, but my programming skills are not that good. why gentoo? will this work on other distros, like zenwalk?

btw, here a link to another guy who installed advancemame on linux:

http://www.wicksta.com/arcade/index.php

Major Rock Hardy:

--- Quote from: tikbalang on August 25, 2007, 02:52:50 am ---why gentoo?
--- End quote ---
... I chose gentoo because its philosophy is to compile EVERYTHING from source.  The advantage there is that you have a build environment set up from the get-go. 

Also, it doesn't come loaded with any extra bloat other than the kernel and some other basics.  You even have to install vi!  The advantage there is that every possible cpu cycle will be used for emulation.


--- Quote from: tikbalang on August 25, 2007, 02:52:50 am ---will this work on other distros, like zenwalk?

--- End quote ---
I am not familiar with zenwalk but it should work with other distros... as long as you get a development environment -recommended- here is a link for you...

http://easymamecab.mameworld.net/html/linux.htm

Major Rock Hardy:
OK, this is really starting to piss me off.

I went in and manually hacked the drivers/video/aty/radeon_base.c file with the stuff in the advancemame/contrib/mame/fb/linux-2.4.21-radeonfb-lowclock.diff patch file.  There were 2 diffs in there, only the first one seemed applicable (2nd one seemed redundant in my 2.6.22 kernel code).  Recompiled the kernel and rebooted with it.  Machine rebooted fine but when I ran advcfg it errored out with the same ---smurfing--- message in the advcfg.log file:


--- Code: ---ERROR:video:fb: ioctl(FBIOPUT_VSCREENINFO) failed
advance:msg: Error setting the variable video mode information.

--- End code ---

this smells like a fb driver problem or a problem with advancmame interfacing with the fb driver.  I am now officially punting my fb work (at least with this Radeon card) and pressing on with svgalib!

Major Rock Hardy:
OK so tonight I went back and un-did the hack to the kernel's fb radeon driver in the aforementioned radeon_base.c file.  In other words, I reverted to the original code.  This is so it will get future kernel compiles back on track as if I had started from a clean gentoo-sources kernel, version 2.6.22 (Linux i686 2.6.22-gentoo-r2 to be specific as possible).

on to svgalib-1.9.19 compilation.  This keeps erroring out with a "invalid lvalue in assignment" in src/drivers/apm.c, line 151.

thanks to http://groups.google.co.ve/group/svgalib/msg/d7737019b740d690 , I tried the following approach:

--- Quote ---it compiles if you change the last 6 assignments to

   *(unsigned long *)(&(regs[APMREG_SAVE(18)])) =
   inlXR(0xf0) ;
   *(unsigned long *)(&(regs[APMREG_SAVE(22)])) =
   inlXR(0xf4) ;
   *(unsigned long *)(&(regs[APMREG_SAVE(26)])) =
   inlXR(0x140) ;
   *(unsigned short *)(&(regs[APMREG_SAVE(30)])) =
   inXR(0x144) ;
   *(unsigned long *)(&(regs[APMREG_SAVE(32)])) =
   inlXR(0x148) ;
   *(unsigned short *)(&(regs[APMREG_SAVE(36)])) =
   inXR(0x14c) ;
--- End quote ---

Well, after a 'make clean' followed by a 'make install', It errored out, in an assembler message, saying:

--- Code: ---suffix or operands invalid for 'movzbl'
--- End code ---
... this was also addressed by the above website:

--- Quote ---changes to demos/speedtest.c and demos/linearspeed.c and
gl/inlstring.h
-- 1st "movzbl" in __memset(): the destination register
   should be "eax" (both versions of this function)
--- End quote ---
...basically search for 'movzbl' in these 3 files and change the lines so they read:

--- Code: ---"movzbl %%al,%%eax\n\t"
--- End code ---
(in other words you are sticking an 'e' in front of 'ax')

... now I'm getting an error in kernel/svgalib_helper/main.c:

--- Code: ---error: linux/config.h: No such file or directory
--- End code ---

... and thanks to another good Google ( http://www.linuxquestions.org/questions/showthread.php?t=506363 - apparently include/config.h is no longer used as of kernel 2.6.19), I commented out the include on the first line of main.c

... similarly I'm getting another error in the same c file:

--- Code: ---error: linux/devfs_fs_kernel.h: No such file or directory
--- End code ---

... and thanks to YET another good Google ( http://www.nabble.com/Linux-kernel-2.6.18-t2575425.html - apparently include/devfs_fs_kernel.h is no longer used as of kernel 2.6.17), I also commented out this include  in main.c.

... OK, still same main.c file, now the errors are:

--- Code: ---kernel/svgalib_helper/main.c: error: expected ')' before string constant
--- End code ---
... well the lines in question are these:

--- Code: ---MODULE_PARM(debug, "i")
...
MODULE_PARM(all_devices, "i")
--- End code ---

AFAICT, this is another kernel deprecation thing and I have changed the above lines to:

--- Code: ---module_param(debug, int, 0644)
...
module_param(all_devices, int, 0644)

--- End code ---
(where '...' means there is other stuff between the two lines that I didn't touch)


 :banghead: ... just when I think I'm getting somewhere... :banghead:
(although I think I'm getting close to a successful make)

... now it's giving me:

--- Code: ---kernel/svgalib_helper/interrupt.c: error: 'PCI_VENDOR_ID_RENDITION' undeclared
--- End code ---
... I found this (http://groups.google.com/group/svgalib/browse_thread/thread/dbca938113f5c1cc) where a patch was posted to fix this (among another) problem.  My fix is based on this patch.  I added the following lines to the beginning (after the #include statements, but before other code) of interrupt.c:


--- Code: ---#ifndef PCI_VENDOR_ID_RENDITION
#define PCI_VENDOR_ID_RENDITION               0x1163
#endif
--- End code ---

It worked!!! :cheers:

but wait... there is a scary looking warning:

--- Code: ---WARNING: "io_remap_page_range" [svgalib_helper.ko] undefined!
--- End code ---
... well this certainly brings back memories (http://forum.arcadecontrols.com/index.php?topic=46747.msg455507#msg455507), posted by (ahem) me, the first time I went through this masochism.  So I made the same change (macro substitution) and once again:

--- Code: ---make clean
make install
make demoprogs
cp -f kernel/svgalib_helper/svgalib_helper.ko /lib/modules/2.6.22-gentoo-r2/kernel/misc
insmod /lib/modules/2.6.22-gentoo-r2/kernel/misc/svgalib_helper.ko
lsmod | grep svga

--- End code ---

WOOHOO!  IT WORKED!  :applaud:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version