
In this week’s episode, the Inspector panel gets some more sweet hot lovin’. Download the new build here, and read more below.

Now that Boxer stores per-user-per-gamebox settings, we can have some much-needed tweaks for mouse behaviour:
A slider for mouse speed, to fix games that get it wrong and don’t let you adjust it in-game. This applies only while the mouse is locked: while unlocked, Boxer sticks to OS X’s mouse speed to keep the OS X and DOS cursors in sync.
A toggle to ignore the mouse until it’s locked. When enabled, the mouse does nothing until you click on the window, at which point it is automatically locked. (This is analogous to DOSBox’s original “autolock” mode.)
This latter setting is vital for games where moving the mouse also moves the game view: Boxer’s regular behaviour can be frustrating as hell, if the game goes spinning or scrolling off into oblivion while you reach for a menu.
I’ve been humming and hawing for some time over how to present the option. It’s clear that it’s necessary, but it may be worth going further and making it the default; or making it Boxer-wide instead of per-gamebox, like rendering settings; or making it per-gamebox instead of per-user, like CPU settings. Time will tell where it should best live.
For the moment though, I feel that Boxer’s regular mouse behaviour does a good job for most games; and I find I only want to change it for one or two that misbehave. So for me, it strikes the best balance to have it as a per-user-per-gamebox option that’s disabled by default.

I’ve been primping and preening it to within an inch of its life. Besides aesthetic improvements, I’ve put in buttons to add, eject and manipulate drives, making the panel’s functionality more obvious and accessible.
The biggest addition though is the ability to import drives into the gamebox straight from the Drives panel. This copies an entire volume or disc image into the gamebox, so it comes along for the ride and gets mounted whenever you play the game.
Of course, this is just like Boxer 0.8x used to do when installing games, and will be a key feature of Boxer 1.0’s upcoming game installer too. It’s not often that you’ll need to use it outside of game installation; but I want to ensure that anything you can do during installation, you can do afterwards too.
This will hopefully be the last alpha build before Boxer 1.0 goes beta. That will be a Boxer feature-complete and mere weeks away from a final release. After one-and-a-half years, the time is nigh.
There’s two core features left to (re)implement before then: game installation, and the DOS Games folder. I’ll be working furiously through August to get these ready, and I’m very excited for what we’ll have to play with at the end of it.
Today’s new build is all about gameboxes and game configuration:
This build also fixes a number of recent UI bugs in OS X 10.5 which had busted the program panel and drive list. There’s no reason not to be downloading the new build right now dammit.
These improvements were all blockers for 1.0 final, and are more pieces of the game-installation IKEA wall unit screwed firmly in place. While none of these features are very visible, they do pave the way for exciting new things in Boxer’s future.
Yup, gameboxes have been extended to add a new metadata file, Game Info.plist, which is stored in the gamebox’s root folder alongside DOSBox Preferences.conf.
In future Boxer versions, this file will store things like the game’s developer, publisher, year, genre, Mobygames page etc. This metadata would be used for Spotlight and Quicklook integration, and for a snazzy game manager UI I’ve been thinking about for a while.
For the moment however, this file only stores the game’s unique identifier.
Many long-planned Boxer features have needed a way to unambiguously identify gameboxes, in order to associate external data with them: data that cannot be stored inside the gamebox itself for whatever reason.
For this purpose, Boxer now creates and stores a “unique” identifier for each gamebox, by generating an SHA-1 hash out of every executable file inside it. I put “unique” in quotation marks, because this approach has the desirable effect that the hash will be the same each time it is generated, and the same for anyone in the world running that version of that game.
This latter fact is crucial for another long-planned Boxer feature: integration with an online game repository. The idea is a kind of CDDB for games: to let Boxer automatically retrieve user-submitted metadata and configurations for newly-minted gameboxes. More on this in a future blog post!
Boxer has had automatic game detection for most of its life, and it works by scanning the folder or gamebox you opened for files that match known games. This behaviour has been improved in this build to detect games outside of gameboxes once again, the same as Boxer 0.8x does.
Boxer has to be careful about how deep it scans for games, though. If you open a floppy disk, CD-ROM or gamebox then Boxer will scan the whole file heirarchy inside it, since it is known to be a manageable size. The rest of the time however, Boxer will only scan the base folder it is opening and will not search into any subfolders.
This is necessary to avoid massive slowdowns if you open (for example) your Home folder in Boxer. However, this does make Boxer less reliable at detecting games outside of gameboxes, since it may stop looking too early.
For historical reasons, Boxer 0.8x would save the autodetected configuration into the gamebox. Boxer 1.0 no longer does this: Boxer runs the auto-detection at every launch regardless, so it would be redundant to store it, and a stored configuration could get in the way of future corrections to the autodetected version. The gamebox configuration file is now meant solely for persisting a user’s own adjustments of the emulation settings.
When you adjust emulation settings from the CPU panel, Boxer works out what DOSBox configuration parameters would represent the changed settings and then writes those parameters back to the gamebox’s own configuration file.
Boxer now also compares against the parameters that are in the game’s auto-detected configuration file; if any are the same, they are stripped from the gamebox configuration file instead. This way, Boxer won’t store redundant settings.
Not all emulation settings are created equal of course. Some, like CPU speed and core optimization, concern the game itself and should apply to anyone playing it; these do belong in the gamebox configuration file. Others, like framerate or window size, are about your own Mac and your own personal preferences, and should only apply to you.
Such settings are not stored inside the gamebox configuration file anymore: instead, Boxer stores them inside its own application preferences, keyed to each gamebox by its unique identifier. This way, they don’t come along for the ride if you pass the gamebox on to someone else.
A new Boxer 1.0 alpha build is fresh out of the oven. Since this build has ended up focusing on UI refinement, a few gratuitous screenshots seemed in order:
Opening additional gameboxes or DOS windows will launch additional Boxer instances to handle them. More on this below.

Besides looking cleaner, the panel now highlights the default program and bumps it to the start of the list. It also slides away after clicking the default program, instead of hanging around taking up space.
button now enlarges the window to fit all the available space, instead of fitting it to a multiple of the DOS resolution.So what are you waiting for? Go grab it already.
A limitation which has dogged Boxer 1.0 from the very beginning is DOSBox’s one-shot nature. Because DOSBox is compiled into Boxer, Boxer’s memory is DOSBox’s memory; and DOSBox stores its emulation state in a vast hive of global variables, which it doesn’t bother cleaning up afterwards.
This prevents DOSBox from handling two emulation sessions at once — because each session clobbers the other one’s state — and from starting up a second emulation session after finishing the first — because the subsequent session inherits a hopelessly polluted state from the first one. Imagine a living room the morning after a student party.
This is of no concern to a hard-living Windows transplant like DOSBox, which was designed to quit as soon as the emulation exits. But it is of concern to a well-behaved native app like Boxer, which wants to stay open in the Dock, and to be able to open and reopen as many windows as it needs, just like all its other Mac chums.
Boxer was a sad panda. Until now.
Would be for Boxer to move the DOSBox emulator core to a separate child process with its own isolated memory space, and spawn instances of this emulator process for each window. This way DOSBox could shit in its own sandpit as much as it likes, it could run alongside other emulator processes without fear of cross-pollution, and it could be terminated or paused or restarted at will by the parent application (Boxer) without ruining everyone else’s day.
This was the approach that Google Chrome took for its tabs, that OpenEMU adopted for its multi-emulator cores, and that Boxer will eventually use for its DOS sessions.
However, restructuring Boxer to manage this parent-child process relationship is complex and has a lot of pitfalls. The groundwork for it is pretty far along, but it’s unlikely to be ready in time for Boxer 1.0.
Is for Boxer to simply launch more Boxers. When Boxer has a DOS window open and it gets a request to open another, it just spawns a new Boxer instance and tells that to open the window instead. If you try to open a new window after closing one, then Boxer quits and immediately relaunches to open the new window with a clean slate.
This approach has disadvantages. Each Boxer instance is a separate application as far as OS X is concerned: so they appear separately in the Dock and CmdTab switcher. Instances can’t coordinate with each other: so windows tend to open exactly over the top of existing ones, and preference changes in one don’t take effect immediately in another. This is very much a stopgap solution.
But, grubby and hackish though this is, it’s so dramatically better than before that I wanted to get it out there for people to play with right away.
Hello chaps! In time for the start of summer, here comes a new Boxer 1.0 build. The highlights for this version:
The big tentpole here is of course DOSBox 0.74’s improved emulation, which should make your games Just Work Better, especially the old ones. Besides that, everything else in Boxer is just that little bit shinier and nicer-smelling. So what are you waiting for? Head on over to BitBucket and grab the new build.
With every new build, it feels like the tectonic plates of Boxer's code shift dramatically underfoot; this time, much was rewritten to make the upgrade to DOSBox 0.74 go painlessly. To that end sdlmain, a megalith of DOSBox application code that was riddled with old Boxer hacks, has now been uprooted and cast into the sea: leaving a cleaner trimmer DOSBox to get on with the emulating, and a happier wiser Boxer to get on with the applicationing. Its expulsion made porting the rest of 0.74 an absolute breeze, and should also make my post-1.0 multithreading plans much easier to achieve.
That aside, much of the code rewrite came about from my whirlwind love affair with OpenEMU, a kickass Cocoa multi-emulator project with some really funky ideas and a commitment to being a first-class Mac citizen. I was delighted to find a kindred spirit, and to discover that they had implemented stuff I'd been longing to try for months: like CALayers for rendering and OpenGL shaders for filtering. So I promptly took them for all I could get.
My tumescence was quelled however by the realization after two weeks of labour that my layer-based rendering path was prohibitively slow, and the GL shaders prohibitively ugly at large scales. Reluctantly I retreated to Boxer’s old NSOpenGLView rendering path and DOSBox's software scalers; but I snatched some small victories along the way, and the rendering in the newest build is crisper and pleasantly faster.
The rest of my vain attempt is still lying dormant in the code, and I'll be revisiting it post-1.0: a layer-based approach is key to some of my future interface plans, and GL shaders have a lot of promise if I can get them looking nice and performing well on my modest little Macbook. For the time being though, it seems that Boxer 1.0 will launch with the renderer it’s got.
Well, now I really have run out of things to rewrite, and I promise to get the hell on with some interface work already. I’m looking forward to bringing back game installation so I won’t have to make excuses anymore; once that’s in place, then Boxer 1.0 will finally be feature-complete and ready for a public beta.
So I got coked up and tore out SDL’s still-beating event system, holding it triumphantly aloft before plunging it into the cleansing fire. From now on Boxer does rendering and input entirely by itself, keeping the SDL framework around only for audio. The new build is a Cocoa zen garden and I am at peace.
While much is changed under the hood, visible improvements from this recoding bacchanalia are fairly few:
Mouse-locking and cursor behaviour in general are much improved: the DOS and OS X cursors stay in sync whenever possible when locking and unlocking, and the cursor should now hide and unhide much more faithfully.
Minimizing or hiding the application from fullscreen now works properly.
Just because I could, I added a chic blur effect behind the Inspector panel.
CtrlOptclick now simulates clicking the left and right buttons simultaneously: a ray of hope for you Syndicate fans rocking a trackpad or a Magic Mouse. (Reminder that Ctrlclick on its own simulates a right-click, and Optclick simulates a middle-click.)
As a result of this input restructuring, joystick support is officially gone and it won’t be back until after 1.0. Which isn't a great loss, since the joystick support left over from DOSBox was a nightmare to configure and never worked very well on the Mac.
Which is not to say I don’t care about joysticks: on the contrary, I love them so dearly I couldn’t bear to support the feature as it was. Once 1.0 is properly out the door, I want to do joysticks right: make them work magically and beautifully, with no initial setup but enough graceful preferences to work how you want. More on this in a future blog entry.
This has been a major code overhaul: there are many small changes in input-handling behaviour and no doubt Lots Of Fun New Bugs. As always, if something seems wrong or broken or just worse than it was before, it is your duty as an Alert Alpha-Tester to report it as a bug so that I can fix it and make the world a better place.