Duke4.net Forums: Mac / MacOS / OSX solutions - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Mac / MacOS / OSX solutions  "What I did to get EDuke32 all working with joystick"

User is offline   robby 

#1

Herewith a dump of steps I worked out getting EDuke32 working on my mac, including joystick and HRP. Some minor source code edits listed below as well - reporting how to make things work, not necessarily the correct fixes so not trying to submit directly.
I could not find most of this by searching and reading, so I hope the information is of use to someone and not simply redundant to some resource I did not find.
I'm running Mojave and using the current Mac download or the 7241 build from svn.

  • /Applications/logs/eduke32.log is your friend
    Meditate on the lines in this file. If you think you have enabled something but don't see it mentioned here, probably you have not.
    First problem with the regular download version, the file says at the end 'Wrote eduke32.cfg.' (it's lying) ... 'failed to write settings.cfg : permission denied' (truth!). This is because:
  • The config directory is ~/.config/eduke32, not ~/.eduke32 as it says in various places on the website.
    This comes up in a nice error requester in the 7241 build.
    Once you get editable eduke32.cfg and settings.cfg you are on your way!
  • to get HRP and the other cool things working, change the 'NoAutoLoad' setting to 0 instead of 1 in the eduke32.cfg file
    Now things in the autoload directory should work as described, and will be reported in eduke32.log.
  • 360Controller worked for me to use an Xbox controller on my Mac
    Get it working on its own so you can see functionality in its Preferences pane, or whatever other joystick you think you can use.
    The joystick should be reported in eduke32.log, but this doesn't mean you can use it yet.
    As I found here in the forums, create a file '~/.config/eduke32/autoexec.cfg' with the lines
    in_joystick 1
    in_mouse 0
    (not sure if the 'in_mouse 0' is necessary, doesn't seem to do anything).
    These lines got copied to the end of my settings.cfg file, so maybe you only need to put them there


Now it mostly works, except for the joystick settings. This is where there's an issue with the code, (I think) because it has a few hardcoded defaults for the analog axes. The bug here is that a setting of "none" for the action will get overwritten by the hard coded default (but not specific action settings). This is fine if you want the Xbox controller trigger to do something like 'move forward' but actually I want to pull the trigger to fire the gun. Call me old fashioned....
The specific workaround I applied was to modify the file duke3d/src/_functio.h and change all the joystick default actions to "". I did not explore to find the correct fix to make it so that "none" in a config file would not get superseded by the default setting.

Here's a few of my joystick settings in settings.cfg if anyone cares:

[Controls]
JoystickAnalogAxes0 = "analog_turning"
JoystickAnalogScale0 = 8192
JoystickAnalogAxes1 = "analog_lookingupanddown"
JoystickAnalogScale1 = -8192
JoystickAnalogAxes2 = "none"
JoystickAnalogAxes3 = "analog_strafing"
JoystickAnalogAxes4 = "analog_moving"
JoystickAnalogAxes5 = "none"
JoystickDigitalAxes2_1 = "Quick_Kick"
JoystickDigitalAxes5_1 = "Fire"
JoystickButton0 = "Open"
JoystickButton1 = "MedKit"
JoystickButton2 = "Center_View"
JoystickButton3 = "Inventory"
JoystickButton4 = "Next_Weapon"
JoystickButton5 = "Previous_Weapon"


Also some further points on the code:

in Build/src/compat.cpp : 614, I had to change:

uint32_t Bgetsysmemsize(void)

    if (scpagesiz >= 0 && scphyspages >= 0) 
      siz = (uint32_t) min<int64_t>(UINT32_MAX, (scpagesiz * scphyspages));
      //siz = min<uint32_t>(UINT32_MAX, (scpagesiz * scphyspages));


because on my 16gig and 32gig Macs the pagesize * pages calculation overflows the uint32_t and sets siz=0.

Probably a similar issue that I did not track down, for versions I compiled I could not get the display to work in a window, only full screen (the window comes up but is just black).

It looks like there is a typo in the 7241 commit:
7240->7241
/source/duke3d/src/startosx.game.mm
settings.forcesetup = ud.setup.forcesetup. needs ; not .


And for those trying to build from source to get it working on a Mac, I found 'Make' and 'osxbuild.sh' worked just great, but the Xcode project was more troublesome (never got it to build).

And for all those who worked so long and hard on EDuke32 -- Wow! Thank you!!!!!! This is F'ing Brilliant! (even if, just like 1998, I've spent far longer making it work than actually playing it :-))
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options