|
Post by barley on Sept 3, 2020 2:50:42 GMT 1
Hello, we are trying to switch from DosBox (working) to vDos because we hope to achieve less database corruption.
Unfortunately, I get the following error right away when starting the clipper program:
run-time error R6003 - integer divide by 0
Could somebody please advise me what to do.
Thank you so much.
|
|
|
Post by Jos on Sept 3, 2020 6:50:33 GMT 1
|
|
|
Post by barley on Sept 3, 2020 11:33:01 GMT 1
Thank you very much, I will try it, since I don't have the source. I thought it may be related to a too fast cpu. But what surprises me, is that I can run it under DosBox. I use DfendRel, so I thought maybe I post my configuration and you can get something more out of why DosBox works and vDos doesn't, because may be it is just an advanced parameter that I need to set in vDos so that I can get it too run. I thought particularly the cpu section may be relevant, which is: [cpu] core=dynamic cycles=20000 cyclesup=10 cyclesdown=20 type=auto Here is the full config:
[Extra] NrOfMounts=1 Exe=.\VirtualHD\Medicom\MC100.EXE ExeMD5=B455ED4A4E414A519FC8D398B118DDFB SetupMD5= LastModification=43685-11428 ScreenshotListScreenshot= 0=.\VirtualHD\;Drive;C;false; autoexec=C:[13][10]echo.[13][10][13][10]If exist C:\FREEDOS\COMMAND.COM goto AddFreeDos[13][10]Goto Next1[13][10]:AddFreeDos[13][10]set path=%PATH%;C:\FREEDOS[13][10]:Next1[13][10][13][10]If exist C:\NC55\NC.EXE goto AddNC55[13][10]Goto Next2[13][10]:AddNC55[13][10]set path=%PATH%;C:\NC55[13][10]echo You can start Norton Commander (file manager) by typing "NC".[13][10]Goto Next3[13][10]:Next2[13][10][13][10]If exist C:\NC551\NC.EXE goto AddNC551[13][10]Goto Next3[13][10]:AddNC551[13][10]set path=%PATH%;C:\NC551[13][10]echo You can start Norton Commander (file manager) by typing "NC".[13][10]:Next3[13][10][13][10]If exist C:\NDN\NDN.COM goto AddNDN[13][10]Goto Next4[13][10]:AddNDN[13][10]set path=%PATH%;C:\NDN[13][10]echo You can start Necromancer's Dos Navigator (file manager) by typing "NDN".[13][10]:Next4[13][10][13][10]If exist C:\DOSZIP\DZ.EXE goto AddDZ[13][10]Goto Next5[13][10]:AddDZ[13][10]set path=%PATH%;C:\DOSZIP[13][10]echo You can start Doszip Commander (file manager) by typing "DZ".[13][10]:Next5[13][10][13][10]If exist C:\FREEDOS\DOSSHELL.EXE goto AddDosshell[13][10]Goto Next6[13][10]:AddDosshell[13][10]echo You can start FreeDOS Shell (file manager) by typing "DOSSHELL".[13][10]:Next6[13][10] CustomSettings=[parallel][13][10]parallel1=file append:e:\OneDrive\winprint\prnspl.txt[13][10]parallel2=disabled[13][10]parallel3=disabled[13][10][13][10] Environment=PATH[61]Z:\[13][10] Loadhigh=0 CloseOnExit=1 AutoMountCDs=0 SecureMode=1 Overridegamestart=0 OverrideMount=0 LoadFixVal=64 Tab=0 Tab2=-1 Setup= GameParameters= SetupParameters= ExtraDirs= ExtraFiles= ExtraExe0= ExtraExe1= ExtraExe2= ExtraExe3= ExtraExe4= ExtraExe5= ExtraExe6= ExtraExe7= ExtraExe8= ExtraExe9= ExtraParameter0= ExtraParameter1= ExtraParameter2= ExtraParameter3= ExtraParameter4= ExtraParameter5= ExtraParameter6= ExtraParameter7= ExtraParameter8= ExtraParameter9= DataDir= 1= 2= 3= 4= 5= 6= 7= 8= 9= BootImage= Finalization= ProfileMode=DOSBox
[Extras] IgnoreWindowsFileWarnings=0 NoDOSBoxFailedDialog=0
[ExtraInfo] Favorite=1 Icon=dosbox.ico Genre=Program Developer=Medicom Publisher=Hubertus Brinkmann Year=1997 Language=German UserInfo=License=Commercial[13][10] WWWName=www.dosbox.com Name=MedicompWinPrint Notes= WWW= WWW2Name= WWW2= WWW3Name= WWW3= WWW4Name= WWW4= WWW5Name= WWW5= WWW6Name= WWW6= WWW7Name= WWW7= WWW8Name= WWW8= WWW9Name= WWW9=
[sdl] fullscreen=0 usecancodes=1 ConsoleWindow=0 output=overlay windowresolution=1366x768 fullresolution=1366x768 autolock=1 fulldouble=0 usescancodes=1 sensitivity=100 priority=higher,normal mapperfile=default DOSBoxlanguage=default
[dos] Force2ButtonMouseMode=0 SwapMouseButtons=0 xms=1 ems=1 umb=1 4DOS=0 DOS32A=0 keyboardlayout=default codepage=default ReportedDOSVersion=default NumLockStatus= CapsLockStatus= ScrollLockStatus=
[render] TextModeLines=25 aspect=0 frameskip=0 scaler=normal2x
[ipx] ipx=0 type=none address= port=213
[printer] printer=0 multipage=0 dpi=360 width=85 height=110 printoutput=ps
[mixer] nosound=1 rate=44100 blocksize=1024 prebuffer=10 VolumeMasterLeft=100 VolumeMasterRight=100 VolumeDisneyLeft=100 VolumeDisneyRight=100 VolumeSpeakerLeft=100 VolumeSpeakerRight=100 VolumeGUSLeft=100 VolumeGUSRight=100 VolumeSBLeft=100 VolumeSBRight=100 VolumeFMLeft=100 VolumeFMRight=100 VolumeCDLeft=100 VolumeCDRight=100
[sblaster] mixer=1 irq=7 dma=1 hdma=5 oplrate=44100 sbtype=sb16 sbbase=220 oplmode=auto oplemu=default
[gus] gus=0 gusrate=44100 irq1=5 dma1=1 gusbase=240 ultradir=C:\ULTRASND
[speaker] pcspeaker=0 disney=0 tandy=off pcrate=44100 tandyrate=44100
[joystick] timed=1 autofire=0 swap34=0 buttonwrap=0 joysticktype=none
[ne2000] ne2000=0 ne2000irq=3 ne2000base=300 macaddress=AC:DE:48:88:99:AA realinterface=
[Innova] Innova=0 rate=22050 quality=0 base=280
[ScummVM] NativeMT32=0 EnableGS=0 MultiMIDI=0 SpeechMute=0 Subtitles=1 ConfirmExit=0 AltIntro=0 MusicMute=0 ObjectLabels=0 ReverseStereo=0 SFXMute=0 AutosavePeriod=300 MusicVolume=192 SpeechVolume=192 SFXVolume=192 MIDIGain=100 SampleRate=22050 TalkSpeed=60 CDROM=0 JoystickNum=0 GFXDetails=3 Walkspeed=2 GameName= GamePath= GameZipFile= Filter=2x RenderMode= Language= MusicDriver=auto Savepath= ExtraPath= Platform= AdditionalParameters=
[ExtraCommands] BeforeExecution.Wait=0 BeforeExecution.Minimized=1 BeforeExecution=e:\OneDrive\WinPrint\WinPrint.exe[13][10] AfterExecution.Minimized=0 BeforeExecution.Parallel=0 AfterExecution.Parallel=0 AfterExecution=
[dosbox] memsize=34 captures=.\Capture\DOSBox DOS\ DOSBoxDirectory=Default machine=svga_s3
[cpu] core=dynamic cycles=20000 cyclesup=10 cyclesdown=20 type=auto
[vga] videoram=2048 svgachipset=3s PixelShader=none
[glide] glide=false port=600 LFB=full
|
|
|
Post by Jos on Sept 3, 2020 13:58:10 GMT 1
That solution was for if you don’t have the sources. You would need a binary editor to search for and edit the instruction sequence, replacing the DIV instruction by 2 NOP’s.
With the set configuration, core=dynamic and cycles=20000, the DOSBox CPU will be 4-5 times slower than that of vDos. But no idea if it’s actually the speed of the CPU causing this error.
Jos
|
|
|
Post by barley on Sept 3, 2020 15:16:55 GMT 1
So I assume then that I cannot slow down vDos like I can DosBox.
Then I will have to do it the hex way.
Thanks for your advice.
|
|
|
Post by Jos on Sept 3, 2020 15:23:43 GMT 1
vDos’ CPU always runs at full speed, it makes little (no) sense to slow down a non-gaming application.
If patching the program doesn’t work, I would need a copy of your program.
Jos
|
|
|
Post by barley on Sept 5, 2020 2:10:05 GMT 1
Hello Jos,
Patching didn't work, since the software didn't have the suggested code to be patched.
So I am very grateful that you allow me to send you the program so that you have a chance to reproduce the error run-time error R6003 - integer divide by 0
Here is the link to the program: *Removed*
Be well and have a great weekend.
Kind Regards, Barley
|
|
|
Post by Jos on Sept 6, 2020 9:01:53 GMT 1
MC100.EXE indeed had another code sequence. Though the ‘logic’ would mostly be the same:
- Wait for the BIOS timer tick to change. - Perform 5 times 65536 dummy loops. - Get the elapsed timer ticks and divide that into a set value (5,970).
In vDos the elapsed timer ticks are zero. So the divide by zero error. In all an example of bad programming, not considering hardware that will perform those dummy loops within one timer tick. It should for instance add 1 to the number of timer ticks before division. I just set the elapsed number of timer ticks to 1 and forgo the silly timer tick calculation completely. Assuming that calculated performance ‘index’ actually serves a purpose for the program.
I’ll send you the link of the patched MC100.EXE by a PM.
Jos
|
|
|
Post by barley on Sept 6, 2020 13:07:56 GMT 1
Wow, thank you so much!
This is great!
vDos works so much smoother with this program than DosBox and it looks so much better too!
Now I just have to get the printing worked out. We were using winprint to print to an HP inkjet. I wonder if we should continue using winprint or if vDos can do it directly.
Again thanks! I am totally amazed!
|
|
|
Post by Jos on Sept 6, 2020 13:51:11 GMT 1
Just start w/o WinPrint and see if the internal print processor suffices. At least it should produce printouts faster with more options printing to different (DOS) ports.
Jos
|
|
|
Post by barley on Sept 7, 2020 0:54:24 GMT 1
I tried printing, and vDos prints beautifully.
I don't think I will need WinPrint any more.
|
|