Closed wyatt-wong closed 3 years ago
Do you have libao installed?
I don't know. But the error showed it cannot find the ao folder. I checked the source have NO ao folder.
I got this error after installed libao and glfw.
I don't know how to configure the joystick.ini. Is there a sample file for my reference ?
Wyatt, I apologize but you've reached the ragged edge of the codebase! Here's one I used with a Samsung joypad, and may work for you: 3 4 12 11 I'm afraid I wrote that by altering the code to print values from the GLFW joystick routines and kind of figuring out which axes were which by hand.
If you want a little code adventure, you can make the "if(false)" on line 1785 in interface.cpp be "if(true)". Then, when you compile and run, you should see a stream of "Axis 6: 0.000000" for all axes that GLFW could find in your game controller. You can then move your X/left-right axis (pick whichever thumbstick or whatever makes the most sense to you), and you should see one of the "Axis #: ..." numbers change a lot. Put that axis number as the first number in joystick.ini. Then move your Y axis, and put the axis number that changes the most as the second number. Change that back to "if(false)". Change line 1787 to "if(true)" and run apple2e
again. You'll see a bunch of "Button 12: not pressed" for all buttons GLFW can find. Press your buttons 1 and 2 and put the button numbers printed as the 3rd and 4th numbers in joystick.ini.
I had ambitions about writing a joystick configurator when I first wrote this but never made the time.
To help, I've just checked in 216f74cc - if you pull that, change line 1786 in interface.cpp
to if(true) {
, apple2e
will only print the axes and buttons that are changing, so you can more easily tell which one you want. Just move your X and Y axis and then press buttons 1 and 2 and put those 4 numbers in joystick.ini. (And turn 1786 back to if(false) {
again!)
Okay, I added support in b76c734 for just setting the environment variable PROBE_JOYSTICKS
and then the emulator dumps out the axes and buttons as you move and press them.
I put a brief explanation in https://github.com/bradgrantham/apple2e/wiki
compiles in XCode
The source failed to compile in Xocde 11.