alinebee / Boxer

The DOS game emulator that's fit for your Mac.
http://boxerapp.com/
773 stars 139 forks source link

Make a release? #56

Open santagada opened 9 years ago

santagada commented 9 years ago

I wanted to know if there is any intention on releasing this as boxer 2.0 in the future, and if there is any work that need help for that. Boxer is way to awesome to vanish or stop in the 2012 1.3.2 release.

PatTheMav commented 6 years ago

@MaddTheSane Is there more critical code that was changed in Boxer? Depending on those re-integrating newer DosBox builds might get even trickier.. 😬

Also how would you suggest we measure "success" given that some performance hits are to be expected? Are there games that taxed the dynamic core especially hard (e.g. games with lots of I/O and released closer to the Pentium era, i.e. "Rebel Assault 2") so their actual hardware requirements might give us some indicators?

almeath commented 6 years ago

@PatTheMav Did you have a chance to compile and test @MaddTheSane 's 64 bit Boxer? I never seem to have any luck with Xcode and it will not compile successfully for me. Can anyone build and host a fully compiled version of this?

However, I did manage to compile a 64 bit build of DOSBox SVN and have it running within separate macOS application wrappers for a bunch of games. I have tested everything from early Sierra AGI games up to and including more demanding titles like TIE Fighter CD (with Super VGA resolution) and also Rebel Assault 2, Descent 2 etc.

On my Haswell Core i7 with 16GB of RAM I am not noticing any slow down at all - if there is any performance hit it is imperceptible on my system. It would be interesting to know how the customized Boxer build compares.

PatTheMav commented 6 years ago

@almeath Sorry for the radio silence - haven't had time to do a compile, will try to put some time in for this on the Weekend though.

I guess that with modern Core CPUs the drawbacks might be negligible and I'd be willing to accept that as a necessary condition for a 64-bit build made for modern macOS versions that need fast-enough CPUs anyway (but I'm curios as to how my Macbook's Core m3 will fare).

almeath commented 6 years ago

@PatTheMav Thanks, if you are successful in compiling it would be great if you could make it available for download somewhere.

I tested out the same games on my old MacBook (Core 2 Duo, 4GB RAM) and only TIE Fighter and Decent 2 seem to struggle. Anything that is not SVGA seems to work well with no perceptible slow down. Given my MacBook is a 10 year old machine, it appears that a transition to DOSBox 64 bit is not going to be too painful for anyone with reasonably modern hardware.

Looking forward to seeing how Boxer's performance compares to the DOSBox SVN.

almeath commented 6 years ago

I just updated to Xcode 9.3 and I get these errors right off the bat when trying to compile @MaddTheSane 's 64-bit build:

error

Any advice would be welcome.

I am continuing to test with 64-bit DOSBox SVN, and there are some things that Boxer can still do better, such as displaying thousands or millions of colors in Windows 3.11 (which DOSBox cannot do in macOS) and it fixes some obscure sound bugs with Tandy emulation etc.

MaddTheSane commented 6 years ago

Make sure you also check out the submodules, and at least one submodule has a submodule of its own. You should be able to use git submodule update --init --recursive to get them all.

almeath commented 6 years ago

Thanks. I followed your advice and got all the submodules loaded up. Unfortunately, it seems to fail to build at the last hurdle. To make sure it is not an issue with my system, I tried building in both Xcode 9.3 on macOS 10.13 and Xcode 8.2.1 on macOS 10.11. On each system the build fails due to the same 'semantic issues'.

error

In the code, it is looking for: textShadow = theme.textShadow

And produces the error: Property 'textShadow' not found on object of type 'BGTheme *

screen shot 2018-04-23 at 12 14 04 am

MaddTheSane commented 6 years ago

It looks like it's trying to use a different version of BGHUDAppKit then that supplied by Boxer's repo. You may need to clean your build, as well as checking in the Frameworks directory for BGHUDAppKit.framework: there shouldn't be one there.

Edit: Oh wait, were you building for release? I think I found a bug in the configuration of BGHUDAppKit. Fix incoming.

MaddTheSane commented 6 years ago

And fixed. You'll need to update the BGHUDAppKit submodule: git submodule update

almeath commented 6 years ago

Thanks again for pointing me in the right direction and for applying those updates. I found that my main mistake was selecting "update to recommended settings" for the frameworks within Xcode before building. Ignoring those allowed me to successfully build.

almeath commented 6 years ago

I have been testing out this build of Boxer and I can happily report that on my i7 system it is working better than the 64-bit DOS Box SVN. Like with DOSBox, I am not experiencing any noticeable performance issues, but I am not measuring actual frame rates. If there is no difference to the naked eye then I am happy. However, I have only tested games up to 800x600 resolution.

Also, Boxer fixes a sound stuttering and slow down bug that affects DOSBox (0.74 through latest SVN) on macOS High Sierra. I think it is some kind of SDL related issue that Alun must have patched or bypassed a long time ago.

If I have anything further to report about 64-bit builds, I will do so here:

https://github.com/alunbestor/Boxer/issues/76

jiansong commented 6 years ago

The 64bit/master build successfully on Xcode 9.4

getaaron commented 6 years ago

@alunbestor @almeath @MaddTheSane Apple announced today that we have 1 more year for 32-bit apps. They will run on macOS Mojave “with compromises” and this is the last year 32-bit apps will be supported.

brunocastello commented 6 years ago

I am struggling really hard to compile a working version from there... XCode 9.4 here. First time user.

almeath commented 6 years ago

Here is Boxer, Boxer Standalone and Boxer Bundler compiled from @MaddTheSane's custom 64-bit build, as of 22 May 2018 (there have been no updates to the code since April 2018):

http://userweb.eftel.com/~almeath/mac/boxer64.zip

brunocastello commented 6 years ago

@almeath thank you so much! I wish I could add the NE2000 patch as well for networking, but hey I'm happy with this as it is. 👍

almeath commented 5 years ago

@MaddTheSane Your current fork of Boxer will successfully build in Xcode 10 on Mojave 10.14, but when you launch the DOS prompt or try to open any existing Boxer bundle (or create a new one) it will completely freeze up and produce a spinning pinwheel. The app has to force quitted.

Interestingly, when I booted back into High Sierra 10.13.6 and built from there (still using Xcode 10) it produced the same result when moving the Boxer app back to the Mojave system. However, the version built within High Sierra worked properly on that system only.

Lastly, the build linked to above (22 May, built in High Sierra) still works properly on my Mojave system. Whatever is going wrong, it only occurs when building from the latest code on the existing Github repository.

MaddTheSane commented 5 years ago

Can confirm. Some change in Mojave must have made Boxer lock-up. I'll investigate later.

MaddTheSane commented 5 years ago

I've narrowed it down to where it's happening: While attempting to load the code page, boxer_processEvents() gets called. From there, eventually -[ADBTexture2D _drawFromNativeRegion:ontoVertices:error:] gets called and deadlocks.

The line in question: https://github.com/MaddTheSane/Boxer/blob/23cc8e4c6d39a8a32d30f8af729152fd3e9becf1/Other%20Sources/ADBToolkit/OpenGL/ADBTexture2D.m#L507 It looks like a previous call to -[BXGLRenderingView drawRect:] is spinning off a new queue when it calls CGLFlushDrawable()

MaddTheSane commented 5 years ago

As for the Xcode 10 version not working on Mojave: Mac OS X uses tricks to make apps built against a previous SDK work on modern systems. It wouldn't surprise me if this is what's happening here.

MaddTheSane commented 5 years ago

Although this seems to be an issue with SDL 1.2 games in general. It also affects DOSBox compiled on Mojave.

almeath commented 5 years ago

Yes, I tried compiling DOSBox in Mojave and it launches with a white screen. As with Boxer, earlier versions compiled in High Sierra will still work when brought across to Mojave.

So, based on all that, if I can revert to XCode 9.x on my High Sierra system, I presume that I should be able to work around this issue until a permanent fix is sorted out. I know it is possible to download earlier versions of Xcode because I once went back to 8.x because of a similar problem.

MaddTheSane commented 5 years ago

You might be able to use Xcode 9.4 on Mojave. You just need to make sure that you build and link against its include 10.13 SDK.

almeath commented 5 years ago

Thanks, that worked. I installed Xcode 9.4.1 in Mojave and I was able to successfully build and run Boxer/Standalone/Bundler with no problems.

almeath commented 5 years ago

@MaddTheSane, I'm sorry but I do not know where else I can post comments/questions about your experimental 64 bit build ..

I am having issues with joystick support. Under generic Boxer 1.4 everything works fine in all joystick supporting games when using my Gravis joystick. However, under your build the same game boxes and settings do not work. The joystick seems to be detected by Boxer, and one of the buttons responds to input, but the directional stick itself does not respond at all.

This seems to indicate an issue within the build that is affecting joystick functionality.

MaddTheSane commented 5 years ago

@almeath What is the vendor/product IDs of the controller in question?

almeath commented 5 years ago

@MaddTheSane, it's a Gravis Analog Pro (4 button).

almeath commented 5 years ago

The one thing I haven't tried yet is testing if a standard 32 bit build of Boxer 2 Alpha exhibits the same behavior, as it might not be a problem with your 64 bit build specifically..

almeath commented 5 years ago

I have tested several different controllers, including PlayStation controllers with left and right joysticks.

In Boxer 1.4 the joysticks on the PlayStation controller work properly (as does the Gravis joystick).

In the 64 bit build the Playstation joysticks do not respond (as with the Gravis joystick).

However, both the Gravis and PlayStation controllers are detected and the regular buttons respond in both builds.

This indicates that something in the 64 bit build is preventing it from recognizing Y/X axis joystick functionality, despite detecting controllers and recognizing the regular 'fire' buttons.

almeath commented 5 years ago

I also tested the above in Boxer 2.0 Alpha (32 bit), and it worked fine in that version.

So it is an issue specific to 64 bit builds of 2.0, and not because of any changes between 1.4 and 2.0.

MaddTheSane commented 5 years ago

Try disabling the Xbox One Bluetooth controller mapping by commenting out the +load class method for BXXBOBluetoothControllerProfile.

almeath commented 5 years ago

How many lines do I need to edit out? Just line 50?

controller

MaddTheSane commented 5 years ago

52

almeath commented 5 years ago

Unfortunately, that did not fix the problem. All fixed button directional pads and fire buttons work, across a range of controllers. Not a single X/Y joystick responds. Very puzzling.

almeath commented 5 years ago

I have developed a work around. Because I use Boxer Bundler to run my games as individual apps, it is fairly straight forward to use USB Overdrive to map my controller/joystick buttons to individual keys on a per-game basis.