Closed hardl1 closed 5 months ago
There is a post in the WiKi: Setting up printing in DOSBox-X. There are examples for Windows and Linux. Does anyone have an example for macOS?
There is an example in the wiki you mentioned, at the bottom, using the macOS preview application to print. Assuming the preview application can print to AirPrint, you should have no issue.
I have already tested that. I see the printout on the screen, but I can't find a file.
I installed a Windows VM on the macbook with an Intel chip via bootcamp. There I was able to use DosBox-SVN to send all print files directly to the Airprint printer without any problems. Now I switched to a macbook M1 with ARM architecture and bootcamp doesn't work there. It is difficult to understand why airprint works on Windows but not on macOS.
Are you using DOSBox-X or DOSBox SVN? They are not the same thing!
DosBox-X in my nee MacBook M1, SVN on my old MacBook
Am 01.08.2022 um 18:11 schrieb Robert @.***>:
Are you using DOSBox-X or DOSBox SVN? They are not the same thing!
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
If you follow the instructions on the wiki. Select a PostScript printer in the DOS application connected to LPT1. And in your dosbox-x config file set the settings as mentioned on the wiki.
If you then print from the DOS application the macOS Preview application should open with the printout. You should then be able to either print or save from the Preview application.
If the Preview application does not open, try to set the captures=
setting to a different location where you can actually create files.
Unfortunately does not work. I use an old CLIPPER program, there I can choose the Postscript character set. Then text is output to the printer with e.g. @ 01,08 SAY "Name ". The macOS Preview application does not open, the file is output in the DOSBox-X window, but not in a file. Change e.g. captures= /User has no effect.
I have no macOS system, so I have no way to check myself. Perhaps it is something specific to ARM Macs.
Ok, thanks anyway. I am now trying to write directly to a file in the CLIPPER program.
My setup of DOSBox-X for the Mac (DOSBox-X wrapped in an AppleScript) prints to any attached printer, including AirPrint printers. You might want to look at its config file (it uses shell scripts to perform various printing tasks):
@emendelson , Unfortunately the APP doesn't work for me on a macbook 16" M1. After the download, you will be prompted to move the APP. After moving, an exception error appeared when clicking on the APP. When trying to open again appears an icon with C:/ and closes immediately. A new download doesn't change anything either.
Process: dosbox-x [8800] Path: /Applications/DOSBox-X-App.app/Contents/Resources/Files/DOSBox-X.app/Contents/MacOS/dosbox-x Identifier: org.wpdos.dosbox-x Version: 2022.07.31 (???) Code Type: ARM-64 (Native) Parent Process: launchd [1] Responsible: droplet [8782] User ID: 501
Date/Time: 2022-08-09 12:44:14.3212 +0200 OS Version: macOS 12.5 (21G72) Report Version: 12 Anonymous UUID: 6835328A-D48C-0026-8FC5-27A85AB1A460
Sleep/Wake UUID: 7B3DEFD4-0D88-4FF4-9DD1-06588A3533CD
Time Awake Since Boot: 18000 seconds Time Since Wake: 1408 seconds
System Integrity Protection: enabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace DYLD, Code 1 Library missing Library not loaded: '/opt/homebrew//libslirp.0.dylib' Referenced from: '/Applications/DOSBox-X-App.app/Contents/Resources/Files/DOSBox-X.app/Contents/MacOS/dosbox-x' Reason: tried: '/opt/homebrew//libslirp.0.dylib' (no such file), '' (no such file) (terminated at launch; ignore backtrace)
Thread 0 Crashed: 0 dyld 0x1098bfe98 __abort_with_payload + 8 1 dyld 0x1098c7024 abort_with_payload_wrapper_internal + 104 2 dyld 0x1098c7058 abort_with_payload + 16 3 dyld 0x10987ea28 dyld4::halt(char const) + 580 4 dyld 0x109879fb8 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const) + 3644 5 dyld 0x10987906c start + 488
Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016b782908 x3: 0x00000000000000a1 x4: 0x000000016b782508 x5: 0x0000000000000000 x6: 0x0062696c79642e30 x7: 0x00000000000002e0 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x000000016b7825d2 x11: 0x00000000000000f9 x12: 0x0000000000000000 x13: 0x0000000000000038 x14: 0x0000000267a57d56 x15: 0x0000000000000000 x16: 0x0000000000000209 x17: 0x000000010987714c x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016b782508 x21: 0x00000000000000a1 x22: 0x000000016b782908 x23: 0x0000000000000001 x24: 0x0000000000000006 x25: 0x000000016b782508 x26: 0x0000000000000400 x27: 0x00000000000003e7 x28: 0x000000000000010c fp: 0x000000016b7824d0 lr: 0x00000001098c7024 sp: 0x000000016b782490 pc: 0x00000001098bfe98 cpsr: 0x00001000 far: 0x000000010976c000 esr: 0x56000080 Address size fault
Binary Images: 0x109874000 - 0x1098d3fff dyld (*) <75627683-a780-32ad-ae34-cf86dd23a26b> /usr/lib/dyld
External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 0 thread_create: 0 thread_set_state: 0
VM Region Summary: ReadOnly portion of Libraries: Total=16.4M resident=0K(0%) swapped_out_or_unallocated=16.4M(100%) Writable regions: Total=72.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=72.2M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= STACK GUARD 56.0M 1 Stack 8176K 1 VM_ALLOCATE 16K 1 DATA 64.0M 3 DATA_CONST 224K 2 LINKEDIT 2272K 2 TEXT 14.1M 2 dyld private memory 1024K 1 =========== ======= ======= TOTAL 145.6M 13
{"app_name":"dosbox-x","timestamp":"2022-08-09 12:44:14.00 +0200","app_version":"2022.07.31","slice_uuid":"73704c9e-c9c5-35ec-bd92-d0e28261e665","build_version":"","platform":1,"bundleID":"org.wpdos.dosbox-x","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 12.5 (21G72)","incident_id":"723C760D-5A32-4F78-A634-C427185253DB","name":"dosbox-x"} { "uptime" : 18000, "procLaunch" : "2022-08-09 12:44:14.3199 +0200", "procRole" : "Unspecified", "version" : 2, "userID" : 501, "deployVersion" : 210, "modelCode" : "MacBookPro18,1", "procStartAbsTime" : 435780735242, "coalitionID" : 1274, "osVersion" : { "train" : "macOS 12.5", "build" : "21G72", "releaseType" : "User" }, "captureTime" : "2022-08-09 12:44:14.3212 +0200", "incident" : "723C760D-5A32-4F78-A634-C427185253DB", "bug_type" : "309", "pid" : 8800, "procExitAbsTime" : 435780763184, "translated" : false, "cpuType" : "ARM-64", "procName" : "dosbox-x", "procPath" : "\/Applications\/DOSBox-X-App.app\/Contents\/Resources\/Files\/DOSBox-X.app\/Contents\/MacOS\/dosbox-x", "bundleInfo" : {"CFBundleShortVersionString":"2022.07.31","CFBundleIdentifier":"org.wpdos.dosbox-x"}, "storeInfo" : {"deviceIdentifierForVendor":"58D69137-D51E-5830-A422-DB68380BED0E","thirdParty":true}, "parentProc" : "launchd", "parentPid" : 1, "coalitionName" : "org.wpdos.dosbox-x-app", "crashReporterKey" : "6835328A-D48C-0026-8FC5-27A85AB1A460", "responsiblePid" : 8782, "responsibleProc" : "droplet", "wakeTime" : 1408, "sleepWakeUUID" : "7B3DEFD4-0D88-4FF4-9DD1-06588A3533CD", "sip" : "enabled", "isCorpse" : 1, "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"}, "termination" : {"code":1,"flags":518,"namespace":"DYLD","indicator":"Library missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Library not loaded: '\/opt\/homebrew\/\/libslirp.0.dylib'","Referenced from: '\/Applications\/DOSBox-X-App.app\/Contents\/Resources\/Files\/DOSBox-X.app\/Contents\/MacOS\/dosbox-x'","Reason: tried: '\/opt\/homebrew\/\/libslirp.0.dylib' (no such file), '' (no such file)"]}, "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0}, "faultingThread" : 0, "threads" : [{"triggered":true,"id":228885,"threadState":{"x":[{"value":6},{"value":1},{"value":6098004232},{"value":161},{"value":6098003208},{"value":0},{"value":27700462331637296},{"value":736},{"value":32},{"value":9},{"value":6098003410},{"value":249},{"value":0},{"value":56},{"value":10328833366},{"value":0},{"value":521},{"value":4454838604,"symbolLocation":392,"symbol":"simple_bprintf"},{"value":0},{"value":0},{"value":6098003208},{"value":161},{"value":6098004232},{"value":1},{"value":6},{"value":6098003208},{"value":1024},{"value":999},{"value":268}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4455165988},"cpsr":{"value":4096},"fp":{"value":6098003152},"sp":{"value":6098003088},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":4455136920,"matchesCrashFrame":1},"far":{"value":4453744640}},"frames":[{"imageOffset":310936,"symbol":"__abort_with_payload","symbolLocation":8,"imageIndex":0},{"imageOffset":340004,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":104,"imageIndex":0},{"imageOffset":340056,"symbol":"abort_with_payload","symbolLocation":16,"imageIndex":0},{"imageOffset":43560,"symbol":"dyld4::halt(char const)","symbolLocation":580,"imageIndex":0},{"imageOffset":24504,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const)","symbolLocation":3644,"imageIndex":0},{"imageOffset":20588,"symbol":"start","symbolLocation":488,"imageIndex":0}]}], "usedImages" : [ { "source" : "P", "arch" : "arm64e", "base" : 4454825984, "size" : 393216, "uuid" : "75627683-a780-32ad-ae34-cf86dd23a26b", "path" : "\/usr\/lib\/dyld", "name" : "dyld" } ], "sharedCache" : { "base" : 7242711040, "size" : 3144695808, "uuid" : "ffede77c-d90b-366b-96f2-665c2f50ee59" }, "vmSummary" : "ReadOnly portion of Libraries: Total=16.4M resident=0K(0%) swapped_out_or_unallocated=16.4M(100%)\nWritable regions: Total=72.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=72.2M(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nSTACK GUARD 56.0M 1 \nStack 8176K 1 \nVM_ALLOCATE 16K 1 \nDATA 64.0M 3 \n__DATA_CONST 224K 2 \nLINKEDIT 2272K 2 \nTEXT 14.1M 2 \ndyld private memory 1024K 1 \n=========== ======= ======= \nTOTAL 145.6M 13 \n", "legacyInfo" : { "threadTriggered" : {
} }, "trialInfo" : { "rollouts" : [ { "rolloutId" : "61af99aeda72d16a4beb7756", "factorPackIds" : { "SIRI_DIALOG_ASSETS" : "629fe54ebc762c0b6f758b6b" }, "deploymentId" : 240000298 }, { "rolloutId" : "61301e3a61217b3110231469", "factorPackIds" : { "SIRI_FIND_MY_CONFIGURATION_FILES" : "6216ae152a40e71046e16225" }, "deploymentId" : 240000016 } ], "experiments" : [
] } }
Model: MacBookPro18,1, BootROM 7459.141.1, proc 10:8:2 processors, 16 GB, SMC Graphics: Apple M1 Pro, Apple M1 Pro, Built-In Display: Color LCD, 3456 x 2234 Retina, Main, MirrorOff, Online Memory Module: LPDDR5 AirPort: Wi-Fi, wl0: Apr 6 2022 05:55:54 version 20.90.45.0.8.7.118 FWID 01-e7138ff2 Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Pro, Apple Inc. Thunderbolt Bus: MacBook Pro, Apple Inc. Thunderbolt Bus: MacBook Pro, Apple Inc.
@hardl1 - EDIT: I think I see why this is happening, but I can't fix it for a few days because I'm away from my M1 Mac. Meanwhile, try running the app under Rosetta instead of as a native app and see what happens. (You can set this in Get Info.) Until I get back to my M1 Mac, I won't be able to check whether I built the M1 version of the software in a way that produces that error, but built the Intel version in a way that avoids it.
@emendelson. Thanks very much! DOSBox-X runs fine under Rosetta. Also the control commands for the printer with LPT2. That's enough for me. Nevertheless, please check the printer config. In the printer config are only LPT1-5. In dosboxapp.html LPT1-6.
I'm glad it works under Rosetta. I'll try to fix it for ARM later this week if possible.
I haven't finished writing the code that will make LPT6 work correctly under macOS. It works in the Windows version. I'll make that clear on my web page.
I am very happy that my Clipper program runs very well and even faster under DOSBox-X-App. Two small problems: If I make changes under the "Set window height" option, they are not implemented. Under "Edit base configur(r)ation file" -> lines = 25 is ok, but the window gets much wider than = 80. I would like a smaller window.
Under language I entered an earlier "german.lng" file and copied it to the program directory, but the keyboard remains QUERTY.
Can I start 2 different config-(autoexec) via 2 aliases?
The "set window height" setting did not work if you chose 25 lines for the height. I have now fixed this. Thank you for pointing this out. Please download the current version.
I think you are asking for a smaller font in the DOSBox-X window. You will need to edit the ttf options in the base configuration.
For the keyboard settings, you will need to consult the DOSBox-X documentation and make whatever changes are needed in the base configuration file or when DOSBox-X starts. I don't know the answer, but you can create a separate issue if you can't find it in the wiki.
I don't think you can start two different configurations with the current system, but of course you should feel free to edit the AppleScript for yourself and try to make this possible.
I loaded the current version, but at 25/80 the window is still significantly wider than at 43/80. I'm not looking for a smaller font, but a smaller window. Do I have to rewrite the autoexec.bat with every update? How can I switch to German keyboard? With an earlier Dosbox you could specify two different e.g. heiz.conf and haus.conf when calling it. But that's not so important.
To reduce the size of the window, specify a point size in the [ttf] section and experiment until you get the size you want. You may want to experiment with other settings in that section.
EDIT: You probably will not need to re-create autoexec.bat. Read my page to see where that file is stored.
For information in selecting a keyboard, please read the wiki, which tells you exactly what you need to do. Please look in the wiki and my page for the answers to any questions you may have.
In ordinary DOSBox-X, you can choose between different configurations when launching. My app does not support that, but you can easily modify the AppleScript "wrapper" so that it does.
Sorry . The window size via lins and cols didn't work that way, but via winperc and ptsize.
I know the DOSBox-X wiki, but in DOSBox-X-App I can't enter keyboardlayout=de for [dos]. The KEYB command does not work at the prompt either.
About the keyboard layout: I am traveling and can't test this. Try changing the keyboard layout in the current build of DOSBox-X. If it works in DOSBox-X and doesn't work in my app, then I will see if I can figure out which setting is needed in my app. Meanwhile, if it works in DOSBox-X, you'll need to use DOSBox-X instead of my app.
Ok, I still use your app because printing works here. In the DOSBox-X I had configured under [dos] keyboardlayout = GR and it worked there. Maybe you can change that later.
Try de not gr. My app is exactly the same as DOSBox-X in keyboard handling.
And I've now updated the app so that it should run in native Apple Silicon mode on M1/M2 Macs. And the German keyboard works perfectly in my app (so does French, UK, etc.), so I can't imagine why it isn't working for you. There is absolutely nothing in my build that handles keyboard/regional settings differently from standard DOSBox-X.
I loaded the current version V22.08.17. This runs perfectly under Rosetta, without Rosetta I can now open the DOSBox-X-App.app, but my Clipper program starts with an "E" and hangs.
The KEYB and COUNTRY problem was mine! The Clipper program's config has overwritten "MOUNT C" and the "C:/ path". With %PATH% that's ok. I can now enter all commands at the prompt.
Under "Edit base configuration file" I did not find in [dos] "keyboardlayout =" and in [config] "country =". Can this be set somewhere else with DOSBox-X-App.app?
I loaded the current version V22.08.17. This runs perfectly under Rosetta, without Rosetta I can now open the DOSBox-X-App.app, but my Clipper program starts with an "E" and hangs.
If it works under Rosetta, then run it under Rosetta.
Also, have you tried it in standard ARM DOSBox-X? As far I know, my app does nothing that can affect the way a program runs, and if there is any problem running a Clipper program in my app, but not in standard DOSBox-X, I will not know how to fix it.
The KEYB and COUNTRY problem was mine! The Clipper program's config has overwritten "MOUNT C" and the "C:/ path". With %PATH% that's ok. I can now enter all commands at the prompt.
Under "Edit base configuration file" I did not find in [dos] "keyboardlayout =" and in [config] "country =". Can this be set somewhere else with DOSBox-X-App.app?
Add those lines to the file.
And to be clear about the custom DOSBox-X build in my app: My build is identical to standard DOSBox-X in every way except these:
In everything else, it is absolutely identical to standard DOSBox-X. It is absolutely identical in handling languages, keyboards, regional settings, and everything else. If a program doesn't work correctly in my build, then PLEASE test it in standard DOSBox-X to confirm that the problem is also in standard DOSBox-X, and report the problem as a DOSBox-X problem.
I added the lines and changed some parameters in the config, now everything works as I want. Thank you for your help and good luck with the project! I was able to learn a lot and probably wouldn't have done it on my own.
@emendelson why not integrate those video modes/menu items in DOSbox-X itself?
@Torinde - The video modes that I added are listed here, under "Alternate video modes":
http://www.columbia.edu/~em36/dosboxapp.html
They are (mostly) no longer needed, now that TrueType support makes it possible to have any combination of rows and columns. I created those video modes (and the commands that switch to them) in order to have them available back in the time when DOSBox and DOSBox-X only supported bitmap fonts. Also, I was never able to make them work perfectly: the DOS prompt disappears when you switch to some of them - and you need to type echo or ver or some other command to get the prompt back; I was never able to figure out how to make the screen rewrite automatically in order to avoid this (it seems to need a delay before the rewrite, and I don't know how to do this.
However, if anyone wants it, I'll post my fork on Github and anyone can experiment with it and improve it to the point where it would make sense to post a pull request for it.
As for the system-menu items, they point to my web page and list my custom default keystrokes (I disable most of the standard mapper keys in DOSBox-X because my app is for applications, not games.)
@Torinde - I've posted a fork that contains my custom video modes, but they don't work well enough for me to create a pull request:
I'm also not so experienced to tackle that.
@Torinde - Download the free version of Visual Studio 2022; download my version; in the "vs" folder, double-click on the "sln" file, when it opens in Visual Studio, click Build on the menu, and you'll have a working copy of the program.
Thank you @emendelson . Maybe I actually should, yes :)
Question
Is there a way to print from Mac via AirPrint or IP? From the DosBox in a Windows VM, this works without any problems.
Have you checked that no similar question(s) exist?
Code of Conduct & Contributing Guidelines