11

My family still runs their business with an accounting package from 1984. The computer running it is old enough to drink. I’m trying to move it to a virtual machine. I’ve purchased a System 76 running Pop! OS tower and installed a PCIe parallel card. In VirtualBox I’ve installed a FreeDOS guest and passed the parallel port in via

VBoxManage modifyvm "FreeDOS" —lpt1 "0x378" 5

and can print from the command prompt.

The accounting package, BPI System’s General Accounting program version C.13 can print to the screen, a file, or to the printer. Screen and file printing work fine. Printer printing is the problem. It is doubling up each character. So “McMaster Carr” prints as “MMCCMMAASSTTEERR CCAARR” and 314.33 prints as 331144..33. I have no idea how to troubleshoot. During the printing session it starts with “Error! Printer not ready!” which can be cleared by pressing the spacebar but the same error returns every couple of printed lines and can be cleared by the spacebar again.

If I print the file from the command line I do not get the double letters.

To test the setup I bought a reconditioned Okidata Microline 320 Turbo printer off ebay. I’m using the cable that came with it.

Any ideas? Better solutions? I’m not against booting to DOS directly, but I kind of want the easy backup of the entire “computer” that running it as a virtual machine gives me.

21
  • 3
    I think the problem is not in the retro software if it has worked so far in the retro system. So the problem might be in the modern Linux distro, modern printer adapter, modern VM machine or modern FreeDOS. Or the second hand bought printer or cable. Test individually which is or is not the problem.
    – Justme
    Feb 14 at 21:23
  • 8
    Is McMaster Carr supposed to be bold?
    – RonJohn
    Feb 14 at 23:26
  • 5
    ' “McMaster Carr” prints as “MMCCMMAASSTTEERR CCAARR” ' looks more like it's trying to print bold by adding Backspaces, and that Backspace doesn't work. "C<backspace>C" would print a 'C' twice on the same position, if that backspace is wrongly configured, it'll print 'CC' instead
    – Tommylee2k
    Feb 15 at 8:36
  • 3
    I can understand why it might bold MCMASTER CARR but not a value like 314.33, unless it's a total of some sort. So my two questions would be (1) can you tell if the space in MCMASTER CARR is also doubled? (2) Are all numbers doubled (better yet, is everything doubled)?. The first would be useful if not doubled as it could isolate the problem to the guest rather than the infrastructure (it's possibly unlikely to bold spaces). The second would almost certainly put the problem in the guest if only some things are doubled.
    – paxdiablo
    Feb 15 at 11:43
  • 5
    Actually, can you create a text file containing C<bs>C<cr><lf> and print it using the methods that don't double characters? If that comes out as CC, you've isolated (but not yet solved) the problem.
    – paxdiablo
    Feb 15 at 11:49

2 Answers 2

10

Back in the 1970s, as a college project, I wrote an emulator for a minicomputer (in Fortran (!!)). When my professor ran a program written for the minicomputer, the teletype output was doubled, character by character. It turns out that the problem was my emulator always returned Ready when the program polled the (emulated) UART transmitter (since the output was buffered by the host OS). However, in the real mini, the transmitter was never fast enough to do this and always returned Not-Ready at least once. The program was coded to assume that it would get Not-Ready at least once per transmitted character and this bug (which was hidden on the real hardware) was exposed by my emulator.

I can’t help but wonder if something similar is happening with the old accounting software. Unfortunately, assuming this is correct, I don’t have an solution for you.

2
  • I honestly can’t believe my answer has gotten so many upvotes. It’s really just an anecdote and is probably not reverent to the question.
    – DoxyLover
    Feb 23 at 23:17
  • 2
    Take the money and run! Feb 26 at 11:24
9

Back in the early 1980s, some applications would operate the printer port hardware directly, not going through DOS or BIOS.

I'm suspicious that Virtual Box is emulating the hardware, but being fooled by the way this package operates it. If it was collecting a byte each time one was written to the correct I/O port, and then doing it again when the control signals were operated, that could look like this.

I'd look really carefully at Virtual Box's printer port emulation controls.

4
  • It sounds possible to me that the process is trying to write directly to RAM for printing and that location is different in virtual environment Feb 20 at 6:58
  • 1
    @NiklasRosencrantz Why should writing to some specific RAM address trigger printing? And why do you think will a virtual environment allow a guest access memory in the host directly? Feb 20 at 7:46
  • @thebusybee Not a good question to ask why but writing to a RAM address to trigger output is a convention and it's called memory-mapped output. Writing to a RAM address would write to the parallel port that is the printer port on old systems. So writing to the parallel port would be the idea to write to the printer. Then whether or not it's virtual or native does not necessarily make a total difference. I don't believe it is far fetched. Basically "WRITE TO THE PARALLEL PORT TO WRITE TO THE PRINTER" is not like a far fetched idea. I don't promise it works in this case. It's convention though yesterday
  • @NiklasRosencrantz I'm well aware of memory-mapped input/output. But printer ports of compatible PCs in the DOS era are not such devices. -- And I'm afraid that you are missing the 2nd point: Qemu is an emulator, and as such it does not allow a guest system to write (or read) to a random (memory or IO) address of the host system without control or translation. 16 hours ago

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .