Boxer

Developer diary: plans and progress reports.

PC LOAD LETTER Monday 12th November 2012

After several months of big noisy feature work I needed to blow off a little steam: so over the past few weekends I’ve been pottering away on a feature I knew would be of use to approximately 6 people. Can you guess what feature that could be? That’s right!

Boxer 1.4 emulates a 24-pin dot matrix parallel printer, compatible with the IBM PPDS and Epson ESC/P2 printer languages popular in the DOS heyday. This means any DOS app can print text; any DOS app with drivers for IBM ProPrinter or Epson LX/LQ-series printers (including Word, Works, WordPerfect and others) can print graphics too. Authentically shitty graphics, as you can see — just like the old days.

This emulation is built on the third-party printer emulation patch that’s been floating around for DOSBox: rewritten in Objective-C with Cocoa's native PDF support, and sprinkled with some UI magic to help the medicine go down. Boxer uses the standard OS X print panel, so you can print to a PDF file or straight to a real printer. Because Boxer generates actual PDF data, the PDFs you save are fully vectorised and have selectable text.

Impedance mismatch

One of the challenges of printer emulation is that the print workflow in DOS programs is quite different to how we roll these days. Printing in OS X is done in discrete print jobs representing a set of pages or an entire document. But DOS programs squirt text and graphics to the printer line-by-line: they have no notion of a print job, and there’s no formal indication of when they’re actually done printing. This means a human (you) has to decide when the printing is done — and that means you need to be able to see what the printer is doing.

So once the DOS program starts printing, Boxer brings up a live animated print preview showing you what’s coming out of the emulated printer. After the emulated printer has been idle for more than a couple of seconds, Boxer lets you print or discard the pages so far – or you can keep printing more pages to add to the print job. Once you’re ready, hit Print and Boxer will wrap it up as a print job and hand you over to the OS X print panel.

I’ll be honest: the print preview was the reason I implemented this whole feature, because it was a fun design challenge and a way to make printer emulation about me instead. I call this Design By Narcissism.

Commentary

  1. This is so insane…but also so awesome :D

  2. Mind blowing great!!!!

  3. Wow, that is really cool!

  4. That is freaking fantastic! Absolutely love the UI. I have been running windows 3.1 in boxer. (Because I can XD) Think it could be of use? I should try it out let you know if any drivers are needed :)

  5. Haha it works! I just selected the IBM Graphics printer and presto!

  6. Or rather I'm sure any of those printers you suggested would work too. :) is there a way to scroll up in the Printer Preview?

  7. Not yet, but that's the next logical avenue for improvement - I haven't decided whether to fit that in for 1.4 yet.

    I should note that there's currently no PostScript emulation, and no support for soft fonts, so it won’t give the best results in later Windows WYSIWYG programs. If there's sufficient interest I may look at rolling up PostScript ‘emulation’ in a later release. (Ironically that would bypass the print preview and go pretty much straight to the OS X print system: PostScript print jobs can be converted directly to PDF.)

  8. [...] [...]

  9. Lol, only if you want. I don't think there are a lot of people using boxer as a windows 3.1 emulator. XD In fact, i think you could probably count 'em on one finger. As for scrolling, my old dot matrix printer, we had for our Macintosh plus, use to have knobs on the side to scroll through the paper similar to a typewriter. Might be a nice way to give the functionality via visual representation. On the other hand people might not notice.

  10. I've heard from quite a few people using Win 3.1 in Boxer - mostly out of curiosity, but also to run some early windows games. It’s not officially supported though and I don’t do any testing in the environment myself.

    Regarding scrolling, really it would just have a discreet scrollbar like any other scrollable view. I'm not committed enough to the skeumorphism to make people mess around with knobs ;)

  11. Is it possible to download this somewhere? The download link is just for v1.3. I gotta see this kewl new feature!!

  12. only if you dl xcode and compile the source yourself. It isn't hard but you would need to figure out the brunt of it yourself. Fortunately, Alun's Xcode Project file and setup is like an 8th wonder. It is the perfect specimen that all OSX software should aspire too.

  13. On topic: This is awesome. And perhaps more practical than one might think. Dungeon Hack, for example, has an in-game option for printing maps. I'm sure it's not the only game with that feature.

    Off-topic: Does your blog here have an RSS feed?

  14. Oh wow, I had no idea Dungeon Hack had such a feature - I have it handy, I'll have to test it to make sure it works correctly. Thanks for the heads-up!

    The blog does have an RSS feed, though it isn't linked anywhere on the page itself - I was relying on the browser to expose it, but Safari removed its RSS support in 5.0.

  15. It's just too cool for school. These little features make Boxer a fantastic program. Compiled and ran it last night without any hitches. Thank you Alun.

  16. I once tried Windows 3.1 in Boxer because I wanted to play Golden Gate Killer, but there were too many problems with Mouse/Cursor it wasn't playable because of that. :(

    The printing feature might be good to get Boxer away from gaming only to also support old applications.

  17. Diskutant: under what version of Boxer did you encounter mouse problems? I'm not aware of any mouse issues in Win 3.1 in current versions, though the mouse does need to be locked.

  18. I just wanted to write to you to say that you are awesome, that now I can buy games in GOG.com and have them beautifully running on a modern mac is so great. Every thing about boxer makes me happy to use it.

    On a side note is there any plans for retina display support (although I think the upscale would maybe take too much processor time)?

  19. @Alun That would be Safari 6.0, not 5.0.

  20. Leonardo: Boxer's development code already has retina display support, though I haven't been able to test it on a real device yet. The performance difference will be almost nonexistent in the standard rendering mode (which just upscales straight to the target resolution) but may suffer significantly in the new shader-based smoothing and CRT modes.

Design by 40watt.