Help getting DOS application to run

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.
Post Reply
Jeff51
Posts: 3
Joined: 22. Nov 2019, 22:36

Help getting DOS application to run

Post by Jeff51 »

Hi all,

I’m trying to get a DOS application to run. The system it came from is an MS-DOS 6.22, that also had Windows 3.1 on it.

A friend brought this to me. The Pentium motherboard has apparently died and I’m trying to get the app to run in a VM. That way he would not be dependent on old hardware to keep the app going.

I’ve made VMs with DOS 6.22 and FreeDOS. Everything runs fine from the old system in the VM except this one DOS application.

I start the app and I get an error message from the app (I assume):
Division by zero in module LTWDISP at address 20705:059A
Hit any key to return to system.
In different VMs I’ve tried with different CONFIG.SYS and Autoexec files. I get the same error except the address might be 2B63:059A or 26FE:059A.

Since the error seems to be related to a video call of some sort, I’ve tried the 3 different monitor options in V-Box. No joy.

I get the same error trying the app in VMPlayer.

Win10 64b Host systems.

I made a boot floppy and put the app on it. The only thing in the CONFIG and Autoexec are the CD drivers. No HIMEM or Load High, or Files Etc.

It will run on a Pentium MMX system. On a PIII, I get the same error message. On a P4, same error message. I’ve tried a few other semi-vintage systems with no joy. I suspect it will run on a 486, but I haven’t got something that old.

The application looks like a compiled database program. It’s some sort of Lottery program that runs from a text screen. It turns the screen blue with the commands in a different color. The app dies just as the first screen is being displayed. It never quite makes it.

Any help would be greatly appreciated.
Thank You,
All the Best,
Jeff
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help getting DOS application to run

Post by socratis »

The only thing I can think of that might potentially help you, is to change the CPU profile that's presented to the VM. You could do this by issuing the command (with the VM shutdown, not paused or saved-state):
  • 
    VBoxManage modifyvm "<VM name>" --cpu-profile "Intel 8086"
    VBoxManage modifyvm "<VM name>" --cpu-profile "Intel 80286"
    VBoxManage modifyvm "<VM name>" --cpu-profile "Intel 80386"
    VBoxManage modifyvm "<VM name>" --cpu-profile "Intel 80486"
    
Only one command at a time, obviously! ;)

I don't know if that will work, but it never hurts to try. I don't know if there's a similar option for a Pentium, or a Pentium II, I'll have to browse/search through the source code...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Help getting DOS application to run

Post by mpack »

I'm going to guess that this was a timing function, i.e. it's calculating fps or bps or somesuch, and it got a time of 0 for whatever it was measuring. You could try slowing down the CPU using the execution cap in Settings|System|Processor, but I have no idea what granularity that will work at. This may not be fixable without a physically slower CPU.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Help getting DOS application to run

Post by fth0 »

The list of CPU profiles is subject to change at any time. In VirtualBox 6.0.14, the following profiles should exist for Intel Pentium processor variants:

"Intel Pentium 4 3.00GHz"
"Intel Pentium M processor 2.00GHz"
"Intel Pentium N3530 2.16GHz"
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help getting DOS application to run

Post by socratis »

fth0 wrote:the following profiles should exist for Intel Pentium processor variants
If you went with the contents of https://www.virtualbox.org/browser/vbox ... VMMR3/cpus, not all of these are actually accepted. For example choosing the 'Hygon C86 7185 32-core' option gives you a:
Info on guest CPU 'Hygon C86 7185 32-core' could not be found. Please, select a different CPU. (VERR_CPUM_DB_CPU_NOT_FOUND).
But... if you dug in https://www.virtualbox.org/browser/vbox ... 81605#L188, then you can see the available and working profiles. Mind you, that's the trunk as of 2019-10-31, not necessarily what's in the releases. Officially though, from the 'VBoxManage' help, only the following CPUs are supported:
[--cpu-profile "host|Intel 80[86|286|386]"]
The rest of the profiles are for source code diggers. ;)

In the process of writing this, I discovered something interesting. Setting the CPU profile as an "Intel 8086", "Intel 80186" or "Intel 80286" for a 'FreeDOS 1.1', DOS-type VM, got me this:
Failed to open a session for the virtual machine 1. Cannot disable the APIC for a 64-bit guest. (VERR_INVALID_PARAMETER).
:shock:

And here's the full VBox.log for people that might be interested:
00:00:01.022577 VirtualBox VM 6.0.14 r133895 darwin.amd64 (Oct 11 2019 15:26:11) release log
00:00:01.022581 Log opened 2019-11-23T20:40:13.289242000Z
00:00:01.022582 Build Type: release
00:00:01.022596 OS Product: Darwin
00:00:01.022603 OS Release: 15.6.0
00:00:01.022610 OS Version: Darwin Kernel Version 15.6.0: Thu Jun 21 20:07:40 PDT 2018; root:xnu-3248.73.11~1/RELEASE_X86_64
00:00:01.022683 DMI Product Name: MacBookPro11,5
00:00:01.022727 DMI Product Version: 1.0
00:00:01.022735 Host RAM: 16384MB (16.0GB) total, 5320MB (5.1GB) available
00:00:01.022738 Executable: /Applications/VirtualBox.app/Contents/MacOS/VirtualBoxVM
00:00:01.022738 Process ID: 13790
00:00:01.022739 Package type: DARWIN_64BITS_GENERIC
00:00:01.025149 Installed Extension Packs:
00:00:01.025157   Oracle VM VirtualBox Extension Pack (Version: 6.0.14 r133895; VRDE Module: VBoxVRDP)
00:00:01.037306 Console: Machine state changed to 'Starting'
00:00:01.040083 Qt version: 5.6.3
00:00:01.079582 SUP: Loaded VMMR0.r0 (/Applications/VirtualBox.app/Contents/MacOS/VMMR0.r0) at 0xXXXXXXXXXXXXXXXX - ModuleInit at XXXXXXXXXXXXXXXX and ModuleTerm at XXXXXXXXXXXXXXXX using the native ring-0 loader
00:00:01.079599 SUP: VMMR0EntryEx located at XXXXXXXXXXXXXXXX and VMMR0EntryFast at XXXXXXXXXXXXXXXX
00:00:01.083958 Guest OS type: 'DOS'
00:00:01.088894 Limiting the firmware APIC level from APIC to Disabled
00:00:01.090686 VMSetError: /Users/vbox/tinderbox/6.0-mac-rel/src/VBox/Main/src-client/ConsoleImpl2.cpp(1066) int Console::i_configConstructorInner(PUVM, PVM, util::AutoWriteLock *); rc=VERR_INVALID_PARAMETER
00:00:01.090692 VMSetError: Cannot disable the APIC for a 64-bit guest.
00:00:01.091421 Constructor failed with rc=VERR_INVALID_PARAMETER pfnCFGMConstructor=000000010c771b00
00:00:01.091737 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Cannot disable the APIC for a 64-bit guest. (VERR_INVALID_PARAMETER)}, preserve=false aResultDetail=-2
00:00:01.091838 Console: Machine state changed to 'PoweredOff'
00:00:01.093233 Power up failed (vrc=VERR_INVALID_PARAMETER, rc=NS_ERROR_FAILURE (0X80004005))
Same exact error and log on a Linux Mint 19 Host with 6.1.0_RC1 r134917, so it's not a Host/VirtualBox-version issue...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Help getting DOS application to run

Post by fth0 »

socratis wrote:The rest of the profiles are for source code diggers. ;)
Yes, I looked at the source files you named, but inside the VirtualBox 6.0.14 (zipped) sources. The Intel Pentium processor variants are equal in both files, including a comment regarding missing variants: "@todo: pentium, pentium mmx, pentium pro, pentium II, pentium III". I didn't try them out though, that's why I wrote 'should'. ;)

Regarding the I/O APIC, on real hardware it was available starting with the Intel 80486 processor, and it is a requirement for 64-bit processors (see Advanced Programmable Interrupt Controller). This should explain the error message you saw (besides the problem executing 64-bit code on virtual 32-bit hardware).
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Help getting DOS application to run

Post by socratis »

Regarding the I/O APIC, I'm trying to run a 16-bit DOS on an 80286 CPU, with no "I/O APIC" enabled in the VM Settings. It shouldn't complain. But... we're digressing, better leave this discussion for another thread... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Help getting DOS application to run

Post by mpack »

What do these CPU profiles do? I thought all they did was lie using the CPUID, in which case I suspect they would do nothing for the OPs problem.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Help getting DOS application to run

Post by fth0 »

mpack wrote:I thought all they did was lie using the CPUID
Yes, you can probably describe it like that (although looking at the CPUID dump section in the VBox.log file, the wording 'all' sounds like a big understatement ;)).

The CPU profiles influence which CPU features and which MSRs are provided to the guest OS. Combine that with software from the old days that tries to recognize the CPU, and maybe doesn't correctly ignore bits that were reserved at that time.
Jeff51
Posts: 3
Joined: 22. Nov 2019, 22:36

Re: Help getting DOS application to run

Post by Jeff51 »

Thank you all for the replys.

Mpack, I think you are on to something with it being a timing issue.

As I would get closer (or not) to getting the first screen to load depending on the physical hardware I was trying. Slowing down the CPU to 50% got me into the software before it took a dump. Slowing it down to 40% I got play with a few functions before crapped out.

Unfortunately I think I corrupted the app when it eventually locked up at 40%. Now I can’t get it to work at all. And naturally, I don’t have a backup at home and will need to get to the office where the other copies are.

Socratis, I’m such a VBox noob, I didn’t even know.
VBoxManage modifyvm "<VM name>" --cpu-profile
Options existed. I’ve been looking at that in the documents to see if I can give it a try.

And a last thanks to fth0 for the additional comments. I feel like I may be able to get this thing running eventually.

Thanks again,

All the Best,
Jeff
jvidal
Posts: 25
Joined: 12. Oct 2022, 17:25

Re: Help getting DOS application to run

Post by jvidal »

this is interesting, my only doubt is if setting a specific CPU type does have any real effect in terms of performance or compatibility or is it just a "cosmetic" thing.
Post Reply