joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.68k stars 381 forks source link

reopening #3312: DOSbox-X freezes with any printer command in Borland dBase-IV #4920

Open hcw3 opened 6 months ago

hcw3 commented 6 months ago

Describe the bug

(I'm unsure if re-opening the previous Issue (#3312) is the way to have this looked at again, or if creating a new "Issue" with the same details is the right way to do it - I was mistaken when I thought the problem was fixed -two years ago- my apologies)

I'm trying to use Borland's dBase-IV v2, and it nearly works, except for printing. While in the dBase environment, and attempting to print either from the dBase command-line, or while running a dBase app, any time a print command is issued, DOSbox freezes, requiring Ctrl-Alt-Del or Menu-choice>Restart or Reboot or Quit.

I've tried various dBase printer drivers, ie: Postscript, IBM, Canon, 'Generic', with the same result.

Steps to reproduce the behaviour

From dBase dot-prompt, issue the Command ??? "Test" DosBox-X freezes and needs to be restarted from the DosBox menu.

Expected behavior

I expect it to output to the DosBox-X specified 'print output file', preferably using the dBase-IV Postscript driver (so I can feed the PS output to macOS and my printer.

What operating system(s) this bug have occurred on?

macOS 12.2.1 Monterey / M1 Apple silicon

What version(s) of DOSBox-X have this bug?

dosbox-x-macosx-arm64-20240301150043 SDL-2

Used configuration

[parallel]
parallel1 = file file:output.ps
# parallel1 = reallpt realport:/dev/parport0
parallel2 = disabled
parallel3 = disabled
parallel4 = disabled
parallel5 = disabled
parallel6 = disabled
parallel7 = disabled
parallel8 = disabled
parallel9 = disabled
dongle    = false

[printer]
printer     = false
dpi         = 300
width       = 85
height      = 110
printoutput = ps
multipage   = true
device      = 
docpath     = ~/Desktop/DosBox2024-03-working-folder/DOSBox_Print_output
fontpath    = FONTS
openwith    = open -s "/System/Applications/Preview.app/Contents/MacOS/Preview %1"
openerror   = 
printdbcs   = auto
shellhide   = false
timeout     = 1000

Output log

Logging: opened logfile 'this_log2024-03-01.txt' successfully. All further logging will go to this file.
DOSBox-X version 2024.03.01 Commit 02f36ba (macOS ARM SDL2 64-bit)
macOS EXE path: /private/var/folders/rl/zw65dh_j62s4d1_gmflgkvkr0000gn/T/AppTranslocation/4BB64862-AF8D-4FEA-BEA6-5285D281A5C2/d/dosbox-x.app/Contents/MacOS/dosbox-x
macOS Resource path: /private/var/folders/rl/zw65dh_j62s4d1_gmflgkvkr0000gn/T/AppTranslocation/4BB64862-AF8D-4FEA-BEA6-5285D281A5C2/d/dosbox-x.app/Contents/Resources
macOS: NSTouchBar support detected in system
SDL: version 2.28.2, Video cocoa, Audio coreaudio
Host keyboard layout is now us (US English)
Mapper keyboard layout is now us (US English)
SDL2 reports desktop display mode 1680 x 1050
SDL(sdlmain.cpp): TTF activated
LOG: freetype version 2.13.1
SDL: TTF activated 
Configured windowposition: -
SDL: Current window pixel format: SDL_PIXELFORMAT_ARGB8888
Screen report: Method 'CoreGraphics' (1680.000 x 1050.000 pixels) at (0.000 x 0.000) (468.923 x 299.663 mm) (18.462 x 11.798 in) (91.000 x 89.000 DPI)
ISA BCLK: 8333333.333Hz (25000000/3)
monopal: green, 
Active save slot: 1 [Empty]
USING AVI+ZMBV
Max 3670016 sz 16384
Final 16384
MIDI:Opened device:coreaudio
VOODOO LFB now at d0000000
Serial1: BASE 3f8h
Serial2: BASE 2f8h
Parallel1: BASE 378h
MPU-401 Registering I/O ports as if IBM PC MPU-401 at base 330h
Memory I/O complexity optimization enabled aka option 'memory io optimization 1'. If the game or demo is unable to draw to the screen properly, set the option to false.
The 'scanline render on demand' option is available and may provide a modest boost in video render performance if set to true.
Screen report: Method 'CoreGraphics' (1680.000 x 1050.000 pixels) at (0.000 x 0.000) (468.923 x 299.663 mm) (18.462 x 11.798 in) (91.000 x 89.000 DPI)
Allocated APM BIOS pm entry point at f000:ce40
Writing code to fce40
Writing code to fce60
Screen report: Method 'CoreGraphics' (1680.000 x 1050.000 pixels) at (0.000 x 0.000) (468.923 x 299.663 mm) (18.462 x 11.798 in) (91.000 x 89.000 DPI)
ISA Plug & Play BIOS enabled
VGA ROM BIOS init callback
pixratio 1.350, dw false, dh false
Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: freetype version 2.13.1
SDL: TTF activated 
WARNING: No translation support (to host) for code page 0
Loaded system codepage: 437
   2990243 ERROR BIOS:Keyboard layout file auto not found
   2990243 ERROR BIOS:Keyboard layout file auto not found
XMS: 50 handles allocated for use by the DOS environment
EMS page frame at 0xe000-0xefff
COMMAND.COM env size:             720 bytes
COMMAND.COM environment block:    0x0701 sz=0x002d
COMMAND.COM main body (PSP):      0x072f sz=0x009a
COMMAND.COM stack:                0x0749
SHELL:Redirect output to lpt1
   3126910 ERROR BIOS:INT15:Unknown call ax=BFDE
   3137275 ERROR BIOS:INT15:Unknown call ax=BF01
DOSBox-X has switched to max cycles, because of the setting: cycles=auto.
If the game runs too fast, try a fixed cycles amount in DOSBox-X's options.
LOG: freetype version 2.13.1
SDL: TTF activated 
   3199627 ERROR DOSMISC:DOS:IOCTL Call E0 unhandled

Additional information

output from the DOS commandline works fine ie: DIR > lpt1 will output to a file as expected, however, this creates a simple text output, not a PS-coded file.

When setting [printer] 'printer = true', and 'printoutput = ps', the output is coded in PostScript, but DosBox-X will only create a binary image of all text, as opposed to the postscript-formatted text itself.

Either way however, attempting to output to printer in dBase only causes DosBox-X to lock up.

dBase-IV's postscript driver creates postscript code that can be interpreted by a postscript reader, or postscript printer. It would be most useful if I could get the code that is output from dBase-IV into a file, to use in macOS as wished.

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines