Friday, June 22, 2007

snes9x

I found this old ipk on my zaurus, snes9x-sdl-qpe_1.39-r1_arm tried to install it, and it complained for missing libsdl, which was already installed by libsdl-1.2, so I forced demands, and installed:

# ipkg install -d loop0 snes9x-sdl-qpe_1.39-r1_arm.ipk -force-depends
# ipkg-link add snes9x-sdl-qpe
when I tried to run it, I got a black window with sound (which was encouraging). I found this website and used the following switches, no snes9x started but it was rather slow (because of the resize):
# snes9x -hi -x2 -xs 640 -ys 480
The -x2 switch causes snes9x to double the picture so it fits the screen nicely, removing it greatly improves performance (but results in a small window). Another possibility is to use qcop commands to change resolution to 320x200 (like I did for mplayer). Now horizontal lines appeard and the picture was upside down. To solve this I added "SDL_QT_INVERT_ROTATION=0" before running snes9x. Now picture is nice, performance seems reasonable, but, the arrow keys are messed up. I couldn't fix the arrow-keys, but I found a way to redefine the controls, so I used g, l, i & m instead. To set the keys a S9XKEYS variable need to be defined (before starting snes9x):
# export S9XKEYS=27,100,99,115,120,97,122,113,32,103,108,105,109,121,98,112,13
Which translate to:
  • Quit = Cancel
  • D = Button A
  • X = Button B
  • S = Button X
  • X = Button Y
  • A = Button L
  • Z = Button R
  • Q = Start
  • Space = Select
  • The directions are:
Y
IP
G
L
B
MCR

The definition of S9XKEYS is explained here:
S9XKEYS=Quit, A, B, X, Y, L, R, START, SELECT, LEFT, RIGHT, UP, DOWN, LEFTUP, LEFTDOWN, RIGHTUP, RIGHTDOWN
The key codes maybe found in this post or here. Maybe I'll manage to fool SDL with redefining the arrow-keys with opie-keyz.

I use this script to run snes9x and set everything to my taste (almost). I also found these additional switches:
-nso = no sound
-dfr = show frame rate.

No comments:

Post a Comment