xboxscene.org forums

Pages: 1 ... 3 4 [5] 6 7 ... 10

Author Topic: Xmugen  (Read 2956 times)

guybird

  • Archived User
  • Sr. Member
  • *
  • Posts: 407
Xmugen
« Reply #60 on: July 25, 2009, 04:46:00 PM »

Are you launching it before or after mugen?  In our current setup, it sleeps for 7 seconds, then loads joy2key.  Not sure why, but that's what currently works.
Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #61 on: July 25, 2009, 11:57:00 PM »

yeah, im launching joy2key 7 seconds after mugen is started. but i looked into it more, this is the end of dmesg after i start the launch script:
CODE
xpad-core.c: opening device
xpad-core.c: closing device
xpad-core.c: urb status
so, this has to mean something, but i just dont know what.

also, while trying to get this to work, i ran "joy2key1 103 106 108 105 28 1 30 31 32 33 119 35 29 59 63 62 36 61 2 4&" from telnet. then i got:
CODE
# joy2key1 - joystick one to keys.
 Using parameters.
but, on the actual tv screen, in the middle of the menu (like a console wrote on top of the menu, starting where the "OK" is) i got:
CODE
usb.c: USB device not accepting addres
=21 (error=-110)

it even had the line break in there, but that might be because it reached the end of the screen. so now i am totally confused. also, i looked up some documentation on joy2key, and the usage they describebed looked totally different from yours? where did you get this version of joy2key? did you compile it yourself?

edit: also, if its not against forum rules, i need some screenpacks. the set you gave me gets to the character screen, but freezes (no characters?) so then i threw a character in /chars, but now i just get to the screen where it shows the characters head to head with the vs. between them. if you could i would prefer clean working /data and /char folders, so then its easy to make a working setup when we finally get this thing working. also, ill be hanging out on the irc.
Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #62 on: July 31, 2009, 12:59:00 AM »

just an update for anyone out there. i am working on this and i have got some success.

so far i have the following done:
-working kernel and initrd with the xpad to keyboard mapping patch removed.
-a modified "/usr/bin/xbox-menu" that now shows "Start Xmugen" as the first option.
-a new launch script system that will return you to the main menu after exiting mugen. (it really goes to "press enter...", but its about the same thing.
-the same system also logs to a file "F:\Games\xmugen\logs\xmugenlog.txt" (however, xmugen has sev erely limited logging capabilities, it will only tell you about the initiation of audio, video, etc.
-a playable setup based on the final linux mugen release. it only has the character kfm and his stage.

now, what i need to work on. if you have any ideas please share them.
-find a working joypad to keyboard mapping tool. the "joy2key" hack that was used in old xmugen setups will not work on this minilinix. i am currently looking into "leanstick"
-recompile the kernel to support ALSA and digital audio output. this should be easy, there is a tut on http://www.xbox-linu...A_kernel-module
-edit the initrd to support a swap file at F:\Games\xmugen\swapfile\swapfile" this should be an easy edit of the "/etc/fstab", but you never know.
-finally, rebuild the system so it works off of E:\Games\xmugen\ for those of you with 8gb hard drives.

again, if you have any ideas, especially on the joystick to keyboard problem, or you know how to edit the xpad patch that friedgold originally used, please share. if you do have a suggestion for an alternate joystick to keybaord mapper, remember that minilinux is a very limited system, so less dependencies is best.

thanks.
Logged

ldotsfan

  • Archived User
  • Hero Member
  • *
  • Posts: 2072
Xmugen
« Reply #63 on: July 31, 2009, 08:23:00 PM »

QUOTE(bc54 @ Jul 31 2009, 02:59 PM) View Post

now, what i need to work on. if you have any ideas please share them.
-find a working joypad to keyboard mapping tool. the "joy2key" hack that was used in old xmugen setups will not work on this minilinix. i am currently looking into "leanstick"

I see that there is a newer version of joy2key on sourceforge, you can also try joyd. I'm not sure what are teh library dependencies though.
Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #64 on: August 01, 2009, 03:56:00 PM »

yeah i know that there is a real joy2key, but unfortunately nothing will run on the mini linux. i always get "/bin/sh: /usr/bin/joy2key not found". and its at /usr/bin/, its chmod +x'ed, and i dont know why it wont run it.

i think ultimately that the problem is that this mini linux is just missing too many things. i think in order to get this to work the initrd must be completely rebuit with enough "linux" in there to support all the stuff we need.

last night i was able to get mugen and joy2key (from apt-get) to run fine on xebian basic, so its possible.

Logged

ldotsfan

  • Archived User
  • Hero Member
  • *
  • Posts: 2072
Xmugen
« Reply #65 on: August 01, 2009, 08:19:00 PM »

Some linux executable binaries support static linking at point of compiling - the binary has all the libraries statically linked in hence you get a bigger sized file but with less external dependencies.

is there a sh at /bin or is that an ash? If Xebian works, why not use that as a basis for Xmugen instead? Any compelling reason to use minilinux?
Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #66 on: August 02, 2009, 02:34:00 PM »

well the reason xebian isnt a good idea is because xebian requires a loopback filesystem, and that would make the required space rather large.

im going to try to get it to work on xdsl. then it would be smaller, and changing it should be much easier.

there is a file /bin/sh, but it is actually a symlink to the busybox executeable (as is just about every other executeable in minilinux).

i have already gotten mugen to work on xdsl, but i just need to set it up correctly so that it runs fullscreen from the console. then i have to get the joystick mappings correct, and then it should work.

now, i found something weird when using it on xebian, if i went into options > joystick config. i could config the joystick without any mappers, but for some reason mugen couldnt interpret them correctly. in actual gameplay , B might mean crouch, and down could mean kick. i dont know if this was a problem with the xpad driver or mugen itself.
Logged

guybird

  • Archived User
  • Sr. Member
  • *
  • Posts: 407
Xmugen
« Reply #67 on: August 03, 2009, 11:17:00 AM »

How does the mapping work?  Is it an onscreen gui, or is it similar to what we have where you have to put in ascii keyscan codes?
Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #68 on: August 03, 2009, 02:33:00 PM »

mapping is set thru 2 config files named /root/.joy2keyrc and /root/.joy2keyrc2. i am using scan codes for this particular application. it is also ably to use plain letters for "X" based games.

so i have already set it up, and i even set up a reasonable threshold for the axis.

here is a quick setup guide for a loopback install:

so first get your loopback installthen
1. upgrade to alsa - menu > XDSL Upgrades > Upgrade Sound > Install ALSA (this will also install gnu utils)
2. install gcc - menu >My DSL >My DSL browser > Text search "gcc" >pivk the package "GCC-with-libs"
3. download the source code for joy2key-1.6.1 here. then make and install it
CODE
wget http://interreality.org/~tetron/technology/joy2key/joy2key-1.6.tar.gz
tar -xzvf joy2key-1.6.1.tar.gz
cd joy2key-1.6.1
./configure
make
sudo make install

6. then make a bash script to launch mugen at /usr/bin/mugen:
CODE
#!/bin/bash
#This script launches the 2d fighter game Mugen from either E:\Games\xmugen or F:\Games\xmugen.

#Find the Mugen executable.
if [ -f /mnt/hda50/Games/xmugen/mugen ]
then
MUGEN=/mnt/hda50/Games/xmugen
echo 'Using Xmugen on E Drive...'
else
if [ -f /mnt/hda55/Games/xmugen/mugen ]
then
MUGEN=/mnt/hda55/Games/xmugen
echo 'Using Xmugen on F Drive...'
else
echo 'No xmugen folder found in either E:\Games\ or F:\Games\'
echo 'Please copy your xmugen folder to one of these locations'
echo 'and make sure that the Mugen executable is named "mugen".'
fi
fi
#Execute the joystick to keyboard mapper for both 1st controller and 2nd controller.
joy2key -dev /dev/js0 -rcfile /root/.joy2keyrc -config mugen > $MUGEN/logs/joy2key1log.txt &
joy2key -dev /dev/js1 -rcfile /root/.joy2keyrc2 -config mugen > $MUGEN/logs/joy2key2log.txt &
#Change directory to the Mugen directory.
cd $MUGEN
#Execute the Mugen executable.
./mugen > $MUGEN/logs/mugenlog.txt
#When the Mugen executable exits, kill the joystick to keyboard mapper.
killall joy2key

*make sure that in F:\games\xmugen there is a folder named "logs".

7. then copy this into /root/.joy2keyrc
CODE
COMMON
-thresh -16014 16753 -15179 17588 -32767 0 -16747 16019 -17857 14909 -32767 0 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767

START mugen
# send keyup codes
2 -rawconsole
# Q : W : E : R : T : Y : U : I : F1 : O : P : [ : ] : Escape
-buttons 16 17 18 19 20 21 22 23 59 24 25 26 27 0x1
# ] (Left) : P (Right) : O (Up) : [ (Down)
-axis 27 25 24 26


and this into /root/.joy2keyrc2
CODE
COMMON
-thresh -16014 16753 -15179 17588 -32767 0 -16747 16019 -17857 14909 -32767 0 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767 -32767 32767

START mugen
# send keyup codes
2 -rawconsole
# A : S : D : F : G : H : J : K : F2 : L : ":" : ' : ` : Escape
-buttons 30 31 32 33 34 35 36 37 60 38 39 40 41 0x1
# ` (Left) : ":" (Right) : L (Up) : ' (Down)
-axis 41 39 38 40


7. then just run "mugen" from the console (so to kill the window manager press (CTRL+ALT+BACKSPACE). also remember to make sure that /usr/bin/mugen and /usr/bin/joy2key are executable.

* i have not yet tried this on a different xbox, so you might need to install more mydsl packages, but this is the basic groundwork. this method has worked with every setup i have (r1sky, kakuto, and xtreme).

good luck.
Logged

guybird

  • Archived User
  • Sr. Member
  • *
  • Posts: 407
Xmugen
« Reply #69 on: August 04, 2009, 12:36:00 AM »

Sounds good, I'll give it a whirl tonight.  Now the only concern I see playing it via XDSL is that from what I gather, the whole point of the previous setup for XMugen was to have a Linux setup stripped down to only the essentials for playing it, allowing for more processor/ram power devoted to XMugen.  Is it possible to get all the essentials together (joy2key, alsa, scripts, etc) put them into a setup, then bit by bit take out unnecessary stuff until we have a small setup again?  Not that I can't figure it out, but it'd be preferable to have a preconfigured noob-proof package that people would just copy to their F partition.
Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #70 on: August 04, 2009, 12:41:00 PM »

yeah, that was what my plan was. once i can get a working frugal version, then im going to start to work on breaking it down to the minimums. however now i am having another problem.

so i want it to start mugen on startup, so i add "sudo /usr/bin/mugen &" to the file /opt/bootlocal.sh

but for some reason, only on startup, when mugen is launched says "xpad-core.c: urb status"

right now this is my current /usr/bin/mugen:
CODE
#!/bin/bash
#This script launches the 2d fighter game Mugen from either E:\Games\xmugen or F:\Games\xmugen.

#Tell the user Mugen is loading.
echo 'Loading Mugen. Please wait...'

#(Re)Load Joystick module.
modprobe -r joydev
modprobe joydev

#Find the Mugen executable.
if [ -f /mnt/hda50/Games/xmugen/mugen ]
then
MUGEN=/mnt/hda50/Games/xmugen
echo 'Using Xmugen on E Drive...'
else
if [ -f /mnt/hda55/Games/xmugen/mugen ]
then
MUGEN=/mnt/hda55/Games/xmugen
echo 'Using Xmugen on F Drive...'
else
echo 'No xmugen folder found in either E:\Games\ or F:\Games\'
echo 'Please copy your xmugen folder to one of these locations'
echo 'and make sure that the Mugen executable is named "mugen".'
fi
fi

#Execute the joystick to keyboard mapper for both 1st controller and 2nd controller.
joy2key -dev /dev/js0 -rcfile /root/.joy2keyrc -config mugen > $MUGEN/logs/joy2key1log.txt &
joy2key -dev /dev/js1 -rcfile /root/.joy2keyrc2 -config mugen > $MUGEN/logs/joy2key2log.txt &

#Change directory to the Mugen directory.
cd $MUGEN

#Execute the Mugen executable.
./mugen > $MUGEN/logs/mugenlog.txt

#When the Mugen executable exits, kill the joystick to keyboard mapper.
killall joy2key



maybe i should try adding
CODE
modprobe -r xpad
modprobe xpad


but i really have no idea why its doing that. when mugen is launched after bootup it works perfectly. also, i have tried adding "sleep 10" to /opt/bootlocal.sh and to the beginning of /usr/bin/mugen, but that doesnt seem to work.

also, im going to use the remaster xdsl option in the xdsl menu. it basically decompresses the frugal loopback filesystem (KNOPPIX file), then mounts it. so can i just get a working loopback install then replace the contents of the mounted KNOPPIX file with the working loopback filesystem?
Logged

ldotsfan

  • Archived User
  • Hero Member
  • *
  • Posts: 2072
Xmugen
« Reply #71 on: August 05, 2009, 07:19:00 AM »

QUOTE(bc54 @ Aug 5 2009, 02:41 AM) View Post

but for some reason, only on startup, when mugen is launched says "xpad-core.c: urb status"

but i really have no idea why its doing that. when mugen is launched after bootup it works perfectly. also, i have tried adding "sleep 10" to /opt/bootlocal.sh and to the beginning of /usr/bin/mugen, but that doesnt seem to work.

Add echo at every line,ie "Line 1" "Line 2" to trace which line of script does that.

Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #72 on: August 05, 2009, 05:43:00 PM »

ok, i found the problem. it seems that for some reason when joy2key is run from /opt/bootlocal.sh (actually from /usr/bin/mugen, which is in /opt/bootlocal.sh) it "fails to open /dev/tty"

this is becasue in order for joy2key to work properly it has to be run in "raw console" mode, and this mode needs to open a specific console. so i havent found a fix for this, but maybe we can use a different type of workaround.

instead of starting with mugen, instead start with a semi-graphical menu to choose between starting mugen, reboot, shutdown, different screenpacks, etc.

i would like to base this menu off of the xbox-menu application in minilinux. however that is ncurses based, and for some reason joy2key doesnt map to arrows properly. so what could work is something like this:

(A) Start Xmugen
(B1) Start Xmugen with Screenpack 1
(X) Start Xmugen with Screenpack 1
(Y) Start Xmugen with Screenpack 1
(BLACK) Reboot
(WHITE) Shutdown

of course, (A) means A button, (B1) means "B" button and so on. then just map... doh! i forgot i cant launch joy2key from /opt/bootlocal.sh

edit: i put (B1) because it turned into a smiley with just B.

ok whatever ill think about that later. first i have actually got to playing some mugen, and i found some things. so if i play 2 player, the first controller gets mapped to /dev/input/js1 and the second controller gets mapped to /dev/input/js0. so what this means is that they get swapped. so if your playing single player, and a buddy wants to join, you have to switch ports and restart mugen. any ideas on this?

also, ldotsfan, good idea, but an easier way to that is "bash -x /path/to/bash/script" this runs the script in debug mode, which essentially echo's every line before executing it.
Logged

ldotsfan

  • Archived User
  • Hero Member
  • *
  • Posts: 2072
Xmugen
« Reply #73 on: August 07, 2009, 05:36:00 AM »

QUOTE(bc54 @ Aug 6 2009, 07:43 AM) View Post

also, ldotsfan, good idea, but an easier way to that is "bash -x /path/to/bash/script" this runs the script in debug mode, which essentially echo's every line before executing it.

I learn a new thing every day  biggrin.gif
Logged

bc54

  • Archived User
  • Full Member
  • *
  • Posts: 196
Xmugen
« Reply #74 on: August 07, 2009, 03:42:00 PM »

i got a new idea, i was poking around the xdsl filesystem and i found some joyd config files. so what joyd does, is it takes input from the joypad, then executes commands as specified in the config file.

so i going to try to make a script /usr/bin/mugenopts, then in there i will put something like this:
CODE
#!/bin/bash
#A script to tell the user how to launch mugen, reboot, and shutdown.
#First, load joyd daemon.
/etc/init.d/joyd start #ill have to double check this later.
#Now, specify the user's options.
echo 'Welcome to Xmugen...'
echo 'Press [A] to quick start Xmugen.'
echo 'Press to see a list of screenpacks.'
echo ' Press [L]+[R]+[Back]+ to shutdown the Xbox.'
echo 'Press [L]+[R]+[Back]+ to reboot the xbox.'
#Done, now exit without error.
exit

then just setup the joyd config to do all of those actions.

then create a second script called /usr/bin/scrpakopts, but i am kinda unsure how to do this. im thinking something like this.
CODE
#!/bin/bash
#A script to list the available screenpacks
#change joyd config.
#i have to look ^this up first.
MUGEN=/mnt/hda55/Games/xmugen #i would really use the if then statements used in /usr/bin/mugen to find the mugen dir.
cd $MUGEN/data
ls -1d */ | while read i; do f="${i%/}"; echo "${f}"; done
ls -1d /$MUGEN/data/*/ | while read i; do f="${i%/}"; echo "${f}"; done


but this will just list the directories in the "data" folder, including "font' and "sound". how can i exclude font and sound dirs? maybe something with "if [ !...", but i am unsure how to do it properly (kinda noob in bash scripting. also, i need to prepend "Press [A, B, X, Y, White, Black, L, R] to " before the echo command. then i need to limit it to 8 screenpacks (does anyone have more than 8?)

of course this whole screenpack thing is useless if someone has already made a screenpack selector, so have any of you heard of something like that? then i could just start with /usr/bin/mugenopts, and have the already written screenpack selector do the hard work.
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 10