VOGONS


First post, by rhoenie

User metadata
Rank Newbie
Rank
Newbie

Hi,

I found a few issues with latest DOSBox on my OS X machines and I'd like to know wether others have these too or if its just something with my setup.

1) USB joystick attached to the system will crash DOSBox immediately after startup:

[bali]:~ $ /Applications/DOSBox.app/Contents/MacOS/DOSBox 
CONFIG:Loading primary settings from config file /Users/rhoenie/Library/Preferences/DOSBox Preferences
MIDI:Opened device:coreaudio
Using joystick USB 2A4K GamePad with 2 axes, 4 buttons and 0 hat(s)
Bus error

(see attached crash log for more details)

2) On G4 PowerBook (aluminium) the right SHIFT key sends the same code as the left one.

3) The DOSBox icon in the dock is exchanged with the internal 32x32 icon after the first start and remains there forever (OK, this is an issue that I am having ever since .. but it is worth asking if others have it too).

Attachments

  • Filename
    crash_output.txt
    File size
    20.58 KiB
    Downloads
    512 downloads
    File license
    Fair use/fair dealing exception

Reply 1 of 11, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Try putting a breakpoint at
CBind * CreateAxisBind(Bitu axis,bool positive) {
(the first if) and see what the values for axis and emulated_axes are
before it crashes. Or use a bunch of LOG_MSGs (well two) in that function.

Reply 2 of 11, by darkgamorck

User metadata
Rank Member
Rank
Member

I've never plugged in a USB joystick... but I'll try that after work today. As for the icon issue... yes I've had that one forever. Never seemed to be important enough to complain about 😀

Reply 3 of 11, by presto

User metadata
Rank Newbie
Rank
Newbie

Yes, I've had that same icon problem (I replace the DOSBox icon with whatever game or app icon I've set that particular DOSBox up for, but then the icon changes to the DOSBox icon in the dock upon opening). Even if you make an alias to DOSBox and change the alias icon, the dock icon will still change back to DOSBox upn opening.

However, I've found a way around this that has worked for me (for 0.65, 0.70, and 0.71). In the info.plist in "package contents" for DOSBox, insert the following two lines:

<key>LSUIElement</key>
<string>1</string>

Then use the Unix "touch" command on the DOSBox.App directory and also on the DOSBox executable found at DOSBox.App/Contents/MacOS/DOSBox. Then make an alias for DOSBox, give it your favorite game icon, and drag the alias to the dock. Also, replace the dosbox.icns in the package contents with your favorite icon, renaming it dosbox.icns. After that, open DOSBox with the alias two or three times; the first couple of times the DOSBox icon will appear on the dock, but after that you'll just have the icon you want.

NOTE: The touch command also has the possibly negative effect of making DOSBox invisible to the OS X menu bar at the top. This doesn't bother me, but it may bother someone else. And also, there is no longer a little black arrow underneath the dock icon when DOSBox is open.

OK, this is a lot of trouble for what is in reality a tiny problem.

Reply 5 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I recall that at one point in time the mac os x package maker disabled our internal icon as mac os x would set it's own. This can be done inthe file src/gui/sdlmain.cpp

near the bottom (some #ifdef with BIG_WORDS)

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 11, by rhoenie

User metadata
Rank Newbie
Rank
Newbie

Now this is totaly odd! I removed the icon init code in src/gui/sdlmain.cpp ...

#if 0
/* Set Icon (must be done before any sdl_setvideomode call) */
#if WORDS_BIGENDIAN
SDL_Surface* logos= SDL_CreateRGBSurfaceFrom((void*)logo,32,32,32,128,0xff000000,0x00ff0000,0x0000ff00,0);
#else
SDL_Surface* logos= SDL_CreateRGBSurfaceFrom((void*)logo,32,32,32,128,0x000000ff,0x0000ff00,0x00ff0000,0);
#endif
SDL_WM_SetIcon(logos,NULL);
#endif // #if 0

..and added two LOG_MSG(); lines ...

        LOG_MSG("========= JOYSTICK");
if( SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0 ) LOG_MSG("Failed to init joystick support");
LOG_MSG("========= JOYSTICK");

...and now joystick support works like a charm. I just played a level in Wolfenstein 3D and no issues anymore. Here is the output from console:

[bali]:~/Source/_DOSBox_i386_BUILD/dosbox-0.71 $ ./src/dosbox
========= JOYSTICK
========= JOYSTICK
CONFIG:Loading primary settings from config file /Users/rhoenie/Library/Preferences/DOSBox Preferences
MIDI:Opened device:coreaudio
Using joystick USB 2A4K GamePad with 2 axes, 4 buttons and 0 hat(s)

Any ideas whats going on here? 😀

Reply 7 of 11, by rhoenie

User metadata
Rank Newbie
Rank
Newbie

Any ideas whats going on here?

OK.. found it. Nothing spooky here. Its just an issue with the universal binary - the native binary works the lipo'ed universal binary doesn't. I have to get deeper into this and do a new universal build for OSX.

🙄

Reply 9 of 11, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie
darkgamorck wrote:

I can verify the USB joystick issue using DosBox 0.71, OSX 10.4.9 on an Intel Macbook C2D Pro.

Same for PowerBook G4 Late 2005 w/MacOS X 10.4.10.
if DOSBox opened by using the Terminal, it replies just two words, "bus error".

Klimawandel.

Reply 10 of 11, by rhoenie

User metadata
Rank Newbie
Rank
Newbie

Today I found something very interesting. I have a tool called Afloat (http://millenomi.altervista.org/Afloat/) installed in my PreferencePane. As long as I enable it DOSBox (native build) would crash on startup with a joystick attached. If it is disabled DOSBox comes up fine. I reproduced this several times so I am sure this is no coincidence.

Unfortunately this doesn't work with the universal DOSBox binary. 🙁 This one still keeps crashing no matter if Afloat is enabled or disabled.