joncampbell123 / dosbox-x

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

DOSbox-X freezes with any printer command in dBase #3312

Open hcw3 opened 2 years ago

hcw3 commented 2 years ago

Code of Conduct & Contributing Guidelines

Have you checked that no other similar bug report(s) already exists?

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

Mac-OS Big Sur v11.6.1 on Apple Silicon M1 ARM 16GB

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

DOSbox-X v0.83.19 macOS SDL2 64-bit

Describe the bug

Attempting to use Borland's dBase-IV. Nearly works. While in dBase environment, 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.

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

Expected behavior

Expected output to the designated print 'device', per DOSbox config settings.

Steps to reproduce the behaviour

From dBase dot-prompt, issue the Command ??? "Test"

Used configuration

(Will submit config file separately below)

Emulator log

Not sure if this is complete...
Early LOG Init complete
DOSBox-X's working directory: /Users/chan/Documents/DosBox
Logging init: beginning logging proper. This is the end of the early init logging
Logging: opened logfile 'this_log.txt' successfully. All further logging will go to this file.
DOSBox-X version 0.83.19 (macOS SDL2)
macOS EXE path: /Volumes/CCC-BU-New/Applications/dosbox-x-sdl2.app/Contents/MacOS/DosBox
macOS Resource path: /Volumes/CCC-BU-New/Applications/dosbox-x-sdl2.app/Contents/Resources
macOS: NSTouchBar support detected in system
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: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
Pentium CMPXCHG8B emulation is enabled
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
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:ce20
Writing code to fce20
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
SDL:TTF activated 
Loaded system codepage: 437
   9889034 ERROR BIOS:Keyboard layout file auto not found
   9889034 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
 980637854 ERROR BIOS:INT15:Unknown call ax=BFDE
 980660144 ERROR BIOS:INT15:Unknown call ax=BF01
SDL:TTF activated 
 980739637 ERROR DOSMISC:DOS:IOCTL Call E0 unhandled

Additional context

dBase specifies in its setup instructions, to set FILES=99 and BUFFERS=15

I have FILES=200 (default from DOSbox) I added the BUFFERS= line to the config.sys but DOSbox seems to have removed it. I assume this means DOSbox does not allow it?

Have tried setting DOS v5 and DOS v6.22

One other problem seen with dBase is with two of its commands (so far as I've tested), the {Count} and {Average} commands, will return incorrect amounts.

The Count command for example, returns a negative 7.88, rather than the actual count of the number of records that I've requested.

These two commands have the same kind of syntax rules, so perhaps they use some of the same resources somehow?

At any rate, are these problems related?

I have no idea where to start debugging it. Thanks for any help.

hcw3 commented 2 years ago

DOSBox-config.txt

hcw3 commented 2 years ago

Also FYI, my existing dBase is working fine in a Win7 DOS window, in VMWare-Fusion (on my old Intel Mac). VMWare with Win7 will not run on the Apple M1 Silicon. I'm hoping to get it working with DOSBox, so I can do away with Windows. If needed for debugging, I do have the dBase install / setup manual and all other manuals. Thanks for any help.

hcw3 commented 2 years ago

(boost) Please let me know if this is the wrong place to get this problem figured out... I'm not sure how your github system works...

I've installed the latest DOSBox v0.83.23 - I've attached the latest logfile.

this_log83-23.txt

Testing I have tried:

set both serial1 and serial2 printers to "disabled" in the DOSBox config file

set both parallel2 and parallel3 printers to "disabled" in the DOSBox config file

slowed the emulation to 8086 mode - ~240 cycles dBase crashed at one point while using the slow CPU setting - with an onscreen error: "Error [35]: Invalid Opcode in DBASE.EXE at 0018:05A4 code=0000 ss=0020 ds=0020 es=0020 ax=0069 bx=0825 cx=2500 dx=0020 sp=1ED8 bp=1F28 si=0400 di=7EB6 " DOSBox also locked up, requiring reboot, after this crash.

thanks for any help.

rderooy commented 2 years ago

The project is currently a bit low on active developers, as such things are a bit slow.

hcw3 commented 2 years ago

@rderooy, Ah. Thanks for explaining. I'm "grasping at straws" a bit, and (perhaps obviously) don't have a clue where to begin, am running short of "things to try". I'm not impatient, I just hope it can be fixed, thus I'll be able to continue to use dBase! Thanks again.

Wengier commented 2 years ago

The printer lockup issue in dBase IV is hopefully fixed in https://github.com/joncampbell123/dosbox-x/pull/3343.

hcw3 commented 2 years ago

Excellent. Thank you @Wengier. (Don't know if 'thank you' is appreciated in this GitHub, but, there it is!)

hcw3 commented 2 years ago

Printing from DBase-IV now works.

Again, thank you @Wengier And thank you @joncampbell123

hcw3 commented 6 months ago

Apologies ( @Wengier ), for needing to revive this thread. I was mistaken, printing from dBase still locks up DOSBox-X. I'm still hoping to solve this lockup problem. I'll list some of the Preferences settings attempts I've made, and results below.

hcw3 commented 6 months ago

I'm running DOSBox-x on MacOS v12 (Monterey), on Apple M1 silicon, DOSBox-X latest version 2024.03.01 64bit SDL2 MacOS ARM64

I'm still unable to output from any print command in dBaseIV. The DOSBox-X system freezes whenever I issue a print command in dBaseIV.

I should confess, I'm 'flailing in the dark' with the print settings in the Preferences settings. Please advise if I'm completely off the mark on how to set these preferences...

dBaseIV has a postscript print driver that I use extensively in my dBaseIV apps. My goal is to output, to a file, the postscript code that dBaseIV creates. (I have an example of the Postscript code that is output by dBaseIV, if it helps anyone to troubleshoot.) If I understand the DOSBox-X preferences in the printer section correctly, the simplest setup would be to set [parallel] parallel1 = file file:output.ps

dBaseIV can also output print directly to a file, so the dBaseIV Postscript driver creates a postscript-code file that can be opened by a postscript capable app. Attempting this in DOXBox-X locks the system up, requiring restart from the DOSBox-X menu.

dBaseIV also has a few other print drivers (IBM-Proprinter, Epson MX). Setting any of these as the driver causes DOXBox-X to freeze when issuing a print command from dBaseIV.

Below are some settings that I've tried (all dBaseIV printing attempts have resulted in a DOSBox-X lockup. However, DOSBox-X outputs print from the DOS command-line just fine. ie: dir > lpt1):

[Parallel} section: parallel1 = file file:output.ps (noted that the DOS command DIR > lpt1 actually creates a TEXT file) Also tried: parallel1 = reallpt realport:colorqube-net-ps (I'm unsure where the MacOS printer name can be found) parallel1 = printer

and when parallel1 is set to "printer": [Printer] section printer = true printoutput = ps (this creates a postscript image file (specifically) when output from DOS, but any printing from dBaseIV, again, locks DOSBox-X up)

I sure appreciate any help. Please let me know what I can do next to figure this out!