post your advmame.rc file contents
have you made any changes to the file, especially dealing with audio?
after loading suprmrio, hit F11 to bring up the speed and report the results after coining up and playing
have you tried other games and had similar/different reactions?
I'm not that much of a Linux guru, but try searching the Gentoo Wiki (http://gentoo-wiki.com/Main_Page). Lot's of good stuff in there!
Which FBDev device are you using (ie: what did you compile intro your kernel)? SVGA FBDev won't work very well with Advmame. Make sure you are using the proper radeon one.
oh yeah,
try changing advmame.rc with this setting:
device_sound none
this will turn off the sound and narrow down the problem to either your audio or video config. I'm sure either one can cause your choppy play. Play a troublesome game with hitting f11 to see if you can get smooth play. A 2.4 ghz processor should be plenty to run all but the few oddball games at full speed.
What mode is video being chosen by the system when you play the slow games? (Use the TAB menu to find out). Also check to make sure you're not applying a resize or filter, as these slow things down a lot.
Always try to use generate or 1.0X modes, and not scale modes. The scaling is done by software for FBDev and SVGALib, and makes things very slow.
This was at cga resolution, so i wasn't using any kind of scaling and was running at the original refresh rates so sync issues wouldn't have been a problem.
cool, I will re-emerge tonight and report results... do you happen to know if it applies the fb patches when it builds? Or wait, I would have to rebuild my kernel with the fb patches that come with advmame, correct? Do you know if the emerge build patches the kernel source?
thanks again,
Rock
#else /* Kernel 2.6 */
#define NO_TASK
# ifndef KERNEL_2_6
# define KERNEL_2_6
# endif
# define my_io_remap_page_range(vma, start, ofs, len, prot) \
io_remap_page_range(vma,start,ofs,len,prot)
#else /* Kernel 2.6 */
#define NO_TASK
# ifndef KERNEL_2_6
# define KERNEL_2_6
# endif
// majorrockhardy - added this vvvvvv
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
# define io_remap_page_range(vma, vaddr, paddr, size, prot) \
remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot)
#endif
// majorrockhardy - added this ^^^^^^
# define my_io_remap_page_range(vma, start, ofs, len, prot) \
io_remap_page_range(vma,start,ofs,len,prot)
so due to this thread on the gentoo forums (http://forums.gentoo.org/viewtopic.php?t=216985) it looks as if the kernel? function "pci_find_class" was at some point (and perhaps only in gentoo kernels?) changed to "pci_get_class".
I have a question though - stunrun is one of my favorite games. In win2k it plays at pretty much full speed. However in advmame it doesn't - unless I turn the sound off. Any ideas? In other games, sound works just fine. Surely this isn't a processing overhead issue w/ Linux not being able to do what win2k can do, right?
Anyone using Linux advmame not get stunrun to work w/ sound at full speed? Or, if it does work for you, what processor do you have?
OK, thanks elvis...
I changed Resize to no, Color to bgr16, Resize Effect to no, Rgb Effect to no, Vsync to no, SMP to no...
[edit] the above seemed to help a bit, but it's still draggin' a**
where do I find out about double_buffer?
Thanks,
Rock
My OS:
gentoo-sources 2.6.14-r2 kernel, emerge'd advancemame, alsa
Device Drivers -->
Input Device Support -->
<*> Joystick Interface
<*> Event Interface
[*] Joysticks
USB Support -->
<*> Support for Host-side USB
[*] USB device filesystem
<*> EHCI HCD (USB 2.0) support
<*> OHCI HCD support
<*> UHCI HCD (most Intel and VIA) support
<*> USB Human Interface Device (full HID) support
[*] HID input layer support
I use a keyboard encoder. Don't have any analog sticks anyway, so I still couldn't help there.
Has something changed since 2.6.5 as far as setting permissions?
chance you are thinking about going to 49 ways?
got it working last night so the permissions came up correctly after reboot!
I went into /etc/udev/rules.d/50-udev.rules and changed this line:
KERNEL=="event*", NAME="input/%k", MODE="0600"
to read like this (red is new stuff):
KERNEL=="event*", NAME="input/%k", MODE="0660", GROUP="games"
save the file, reboot, and you're done.
Are you able to change the 49 way mode with software in linux or are you just doing it manually with the button combos?
this PM thread really should be in our Software forum thread, since we're solving problems that others may encounter too. I wonder if you'd feel like copying the pertinent parts into our "current status of gentoo linux / advancemame" thread? And of course post fbsplash updates there too!
Congratulations!
so far you are the only one I know of who has successfully gotten analog controls working under advancemame w/ SVGAlib in linux. Trust me I've been looking. And you did it with a new kernel, so that might disprove my theory that my problems were with the kernel drivers. I would like to know,
1) do a uname -r and let me know what it says...
2) can you PM me your advmame.rc file?
once again, thank you and congratulations - there is hope!
Rock
Meant to put this in the post but I was too longwinded about my own troubles!!!
I've got this device (AKI) to work in my Gentoo 2.12.6-r6 build:
http://www.dave.bit2000.com/
So far I've only tried it w/ Outrun and Chase HQ but it works great. It should definitely work w/ a SW yoke. I think I saw somewhere a 49-way interface as well.
Regards,
MH
It is interesting to me that you are using a different kernel release than I am. I am very suspicious that my kernel joystick code is the problem. I know for a fact I'm going to have to write a custom driver for my gpwiz49 boards, but I expected my A-PAC to work right out of the box w/ the kernel drivers and it didn't. Oh well, I have done C programming in the past - what's a little more? Perhaps I should have gone with the AKI instead of A-PAC. Don't know why I didn't. The AKI has 5 axes and the A-PAC only 4.
have you tried the jscal program mentioned here:
http://gentoo-wiki.com/HOWTO_Joystick_Setup
? If so, do you get similar results as advj for the position values?
Rock
Right now I am calibrating the wheel/petals via the Control Center-> Peripherals->Joystick utility in KDE.
interesting. But you use svgalib advancemame, launched from the console - not in X, correct? If so, does calibrating under KDE stick when you leave X and return to the console? There seems to be a scarcity of info on calibrating joysticks under linux.
BTW -- I'm thinking of changing my kernel version as well to something newer as there appears to issues w/ the Matrox Framebuffer support -- what Gentoo kernel version are you using?
are you planning to use framebuffer? I thought (once again) that you were using svgalib, which does not use framebuffer. I would be interested to see how far you get with your videocard using framebuffer however. That's how I started, but I ended up going to svgalib - the whole thing was documented in:
http://forum.arcadecontrols.com/index.php?topic=46747.0
I'm using a gentoo-sources 2.6.14-r2 kernel - however if you do upgrade, don't blow away your old kernels. Save them in /boot so you can always fall back on them. Saving your .config files is a good idea too.
keep me posted.
Rock
Yes, it sticks... So far that's the only way I can make it work, and I have to do that everytime after a re-boot...
cool! I hope I don't have to use KDE to get this analog control working. I am going through the kernel code.
No, I have gotten SVGAlib to work perfectly, after studying your post... However, like I mentioned, I would really like to get a nice bootsplash screen w/ a progress bar working as the final touch to my cab... It seems that in order to use fbsplash, you need to compile FB in your kernel (which killed everything in my setup). Someone has done this w/ a Matrox card however... (but they used FB for advMAME -- I'd rather not do that if possible):
http://symlink.dk/nostalgia/arcade/software/bootsplash/
cool link - that would be something I'd like to do as well... however I'm pretty far away from "final touches"!
Can SVGAlib exist in conjunction w/ matroxfb? That's the issue I'm researching now... It (matroxfb) destroys xstart (& KDE). Removing it and re-compiling seems to bring everything back (except SVGAlib -- which means AdvMAME is broken), but like I mentioned I think that particular anomaly is a kernel issue. I'll see what I can find out...
Any opinions?
hmmm... that seems weird. When you say it destroys things - does that mean that when you emerge it, the emerge process deletes the other programs? Did you mean to say startx instead of xstart? If so, that's really weird. When I was playing around w/ framebuffer stuff for my P.O.S. Radeon 7000 VE card, I could go into X from one console, switch to another virtual console (CTRL+ALT+F2 for instance), log in, and run advmame using fb from that console. And having X running was my only saving grace when Super Mario Bros. would give me the black screen of death!
Rock
MotorHedJr-
I don't remember even trying any mouse things when I was screwing around w/ fb. This is because fb worked so poorly for me that I spent the entire time just trying to get the video working. I don't think I ever tried mouse games.
It sounds like you were using the raw driver for your analog joystick? I thought you were using event joysticks...
It is still unclear to me how the advmame software uses raw as opposed to event. I am bogged down studying the USB HID joystick driver which is not much fun. All this pain just to play some games
As for your mouse - I'm not sure what is going wrong. I definitely had problems with advmame when a ps/2 mouse was plugged in but a usb mouse was fine. I assume you have gone into the kernel config and turned on USB mouse support (may be the same as the HID driver) in the kernel under device drivers->input devices? Based on my experience trying event drivers for everything - you should see a /dev/input/eventN (N being the number of the device recognized) for everything - that is, keyboard, mice (yes plural), joysticks. If you aren't, I would focus my attention there. Event mice work flawlessly for me. I have effectively 3 mice hooked up and I can play marble madness and my two trackballs work great for the 2 different marbles while the regular USB scroll mouse doesnt contribute to either. I did have to do some input mapping to get this to work, but I think you are familiar w/ this. One thing that may help point you in the right direction is to do this (as root)
unplug your USB mouse(s)
# tail -f /var/log/messages
now, plug in a USB mouse. You should see it recognized and some kind of kernel output. Look for error messages. Hit CTRL+C to exit this program.
thanks for the fbsplash links. I really hope I will be able to accomplish a splash screen but still use SVGAlib.
Rock
I could never get the event driver to work. I'll have to check my kernel, but I believe in the last compile, I complied it as a module and maybe that made the difference...
It's not supposed to make a difference, but I remember having ALSA (sound) as a module worked, whereas hard-compiled into the kernel did not. You should try some scientific experiments where you change one variable at a time and then you'll know!
BTW, what do you use as a USB X/y axis encoder for your spinner/trackballs? Previously, I used the Hagstom Electronics ME4:
http://www.hagstromelectronics.com/products/trackball.html Great product -- but for PS/2...
Hmm... when you said x/y I immediately thought analog joystick encoder - the answer in that case would be an Ultimarc A-PAC (still not working correctly under linux). However, when you said trackballs - that's optical. I don't want to get bogged down in details here but an optical control reports relative movement - i.e. you moved 2 tics to the left, then 3 tics up, from your last position. Whereas an analog control gives an absolute measurement any time its driver reports - i.e. you are right now exactly at coordinates -14796 (horizontal), 21369 (vertical). That's why when you run out of mousepad while moving your mouse, you can pick it up, put it at the other side and keep it going in the same direction - you can't do that with an analog stick, which is why calibration is so necessary (and frustrating in my case!). Anyway, to answer your question, for my trackballs (no spinner(s) yet), I use an Ultimarc Opti-PAC.
Also, I notice a remarkable difference in using the USB mouse vs. the ps/2... using the advm utility it seems that my PC polls for the USB mouse about 10x more/second than the PS/2... Fascinating...
I know for a fact (due to my slowdown issue) that the USB driver is very different than the ps/2 in Linux. However I believe the difference is that the USB driver is actually interrupt driven, meaning the processor can go off and handle more important things most of the time, like emulation, and the mouse driver will only notify it when things are going on - but the PS/2 driver is a polling driver, meaning every so many compute cycles (arguably too often in my case), the processor polls to find out if the mouse has moved - whether it has or not. Just a guess on my part though.
BTW-- Be sure to go into your udev rules and change permissions for the event driver. I had to do this -- otherwise the RAW driver will take precedence over it...
MRH: Keep up the great work!
just for my information, is there anyone out there following this thread that is interested in a gpwiz49 driver for linux?
Rock
Great news, about the A-PAC! What did you have to do to make it work? (Or what wasn't working)?see below for the code diffs
Can you calibrate it, and if so how?
I need to calibrate my AKI (analog HID joystick interface) -- I have it connected to a steering wheel and pedals. The pedals are wired for a dual axis configuration. When I play a game like Outrun, the wheel works great but there is not enough of a 'range of motion' for AdvMAME to see the pedals.
So far nothing w/ 'emerge joystick' (no ebuilds), jscalibrator (display issue), and jstest, jscal, commands (get bashed).
Also, to the best of my knowledge: Joystick calibration is NOT supported in AdvMAME outside of the DOS platforms.
/*
* HID device quirks.
*/
#define HID_QUIRK_INVERT 0x001
#define HID_QUIRK_NOTOUCH 0x002
#define HID_QUIRK_IGNORE 0x004
#define HID_QUIRK_NOGET 0x008
#define HID_QUIRK_HIDDEV 0x010
#define HID_QUIRK_BADPAD 0x020
#define HID_QUIRK_MULTI_INPUT 0x040
#define HID_QUIRK_2WHEEL_MOUSE_HACK_7 0x080
#define HID_QUIRK_2WHEEL_MOUSE_HACK_5 0x100
#define HID_QUIRK_2WHEEL_MOUSE_HACK_ON 0x200
#define HID_QUIRK_2WHEEL_POWERMOUSE 0x400
#define HID_QUIRK_ANALOG_RANGE_HACK 0x800
if (usage->type == EV_ABS) {
int a = field->logical_minimum;
int b = field->logical_maximum;
if ((device->quirks & HID_QUIRK_BADPAD) && (usage->code == ABS_X || usage->code == ABS_Y)) {
a = field->logical_minimum = 0;
b = field->logical_maximum = 255;
#ifdef DEBUG
printk("(set logical min/max to %d / %d)", field->logical_minimum, field->logical_maximum);
#endif
}
if ((device->quirks & HID_QUIRK_ANALOG_RANGE_HACK) && (usage->code == ABS_X || usage->code == ABS_Y)) {
a = field->logical_minimum = -32768;
b = field->logical_maximum = 32767;
#ifdef DEBUG
printk("(HID_QUIRK_ANALOG_RANGE_HACK: set logical min/max to %d/%d)", field->logical_minimum, field->logical_maximum);
#endif
}
if (field->application == HID_GD_GAMEPAD || field->application == HID_GD_JOYSTICK)
input_set_abs_params(input, usage->code, a, b, (b - a) >> 8, (b - a) >> 4);
else input_set_abs_params(input, usage->code, a, b, 0, 0);
}
#define USB_VENDOR_ID_LD 0x0f11
#define USB_DEVICE_ID_CASSY 0x1000
#define USB_DEVICE_ID_POCKETCASSY 0x1010
#define USB_DEVICE_ID_MOBILECASSY 0x1020
#define USB_DEVICE_ID_JWM 0x1080
#define USB_DEVICE_ID_DMMP 0x1081
#define USB_DEVICE_ID_UMIP 0x1090
#define USB_DEVICE_ID_VIDEOCOM 0x1200
#define USB_DEVICE_ID_COM3LAB 0x2000
#define USB_DEVICE_ID_TELEPORT 0x2010
#define USB_DEVICE_ID_NETWORKANALYSER 0x2020
#define USB_DEVICE_ID_POWERCONTROL 0x2030
#define USB_VENDOR_ID_APPLE 0x05ac
#define USB_DEVICE_ID_APPLE_POWERMOUSE 0x0304
#define USB_VENDOR_ID_GGG 0xfafa
#define USB_DEVICE_ID_GGG_GPWIZ49 0x0007
#define USB_VENDOR_ID_ULTIMARC 0xd209
#define USB_DEVICE_ID_APAC 0x0306 // actually the G-PAC, but should be the same as the A-PAC
/*
* Alphabetically sorted blacklist by quirk type.
*/
static struct hid_blacklist {
{ USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_CHIC, USB_DEVICE_ID_CHIC_GAMEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FIGHTING, HID_QUIRK_BADPAD | HID_QUIRK_MULTI_INPUT },
{ USB_VENDOR_ID_NEC, USB_DEVICE_ID_NEC_USB_GAME_PAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RUMBLEPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_GGG, USB_DEVICE_ID_GGG_GPWIZ49, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_GGG, USB_DEVICE_ID_GGG_GPWIZ49 + 1, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_GGG, USB_DEVICE_ID_GGG_GPWIZ49 + 2, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_GGG, USB_DEVICE_ID_GGG_GPWIZ49 + 3, HID_QUIRK_BADPAD },
{ USB_VENDOR_ID_ULTIMARC, USB_DEVICE_ID_APAC, HID_QUIRK_ANALOG_RANGE_HACK},
{ 0, 0 }
};
if ((device->quirks & HID_QUIRK_ANALOG_RANGE_HACK) && (usage->code == ABS_PEDAL_AXIS)) {
a = field->logical_minimum = APPROPRIATE_LOW_VALUE;
b = field->logical_maximum = APPROPRIATE_HIGH_VALUE;
#ifdef DEBUG
printk("(HID_QUIRK_ANALOG_RANGE_HACK: set logical min/max to %d/%d)", field->logical_minimum, field->logical_maximum);
#endif
}
just for my information, is there anyone out there following this thread that is interested in a gpwiz49 driver for linux?
Rock