leecher1337 / ntvdmx64

Run Microsoft Windows NTVDM (DOS) on 64bit Editions
780 stars 80 forks source link

dbase iii plus does not store variables #159

Closed jefinsd closed 2 years ago

jefinsd commented 2 years ago

when running dbaseiii plus under ntvdmx64, any variable returns a value of 0 vs the real value. e.g. store 10 to test returns 0 as test vs 10.

under windows 32 bit store 10 to test ( enter) 10

under windows 64 bit with running ntvdmx64 store 10 to test ( enter) 0

leecher1337 commented 2 years ago

Indeed, I was able to verify the bug. It doesn't happen with strings, only with numbers. My guess is, that it is related to the CCPU's FPU emulation. DBASE seems to use FPU even for normal integer storage. When parsing a string, it checks, whether this is a number or not:

1378:0753 9a07006f20      call  206f:7  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00000008 ecx=00000031 edx=00000000 esi=00000012 edi=000089e9
eip=00000007 esp=000033fc ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:0007 59              pop   cx  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00000008 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=00000008 esp=000033fe ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:0008 5b              pop   bx  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=00000009 esp=00003400 ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:0009 58              pop   ax  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=0000000a esp=00003402 ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:000a 50              push  ax  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=0000000b esp=00003400 ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:000b 53              push  bx  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=0000000c esp=000033fe ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:000c 51              push  cx  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=0000000d esp=000033fc ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:000d 3d3000          cmp   ax, 30  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=00000010 esp=000033fc ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:0010 7c09            jl    1b  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=00000012 esp=000033fc ebp=00003508                nv up di pl nz na pe nc 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000000
206f:0012 3d3900          cmp   ax, 39  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=00000015 esp=000033fc ebp=00003508                nv up di pl nz na pe cy 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000001
206f:0015 7704            ja    1b  
*** Trace point *** : Instruction Trace
eax=00000031 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=00000017 esp=000033fc ebp=00003508                nv up di pl nz na pe cy 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000001
206f:0017 b80100          mov   ax, 1   
*** Trace point *** : Instruction Trace
eax=00000001 ebx=00001378 ecx=00000758 edx=00000000 esi=00000012 edi=000089e9
eip=0000001a esp=000033fc ebp=00003508                nv up di pl nz na pe cy 
cs=206f  ss=30c3  ds=256d  es=3a35  fs=0000  gs=0000             efl=00000001
206f:001a cb              retf  

Afterwards it calls a few routines that seem to be using FPU:

yoda> u 2099:000f
2099:000f dbe3             FINIT
2099:0011 55               PUSH        BP
2099:0012 33c0             XOR         AX,AX
2099:0014 50               PUSH        AX
2099:0015 50               PUSH        AX
2099:0016 50               PUSH        AX
2099:0017 50               PUSH        AX
2099:0018 50               PUSH        AX
2099:0019 50               PUSH        AX
2099:001a 50               PUSH        AX
2099:001b 50               PUSH        AX
2099:001c 50               PUSH        AX
2099:001d 8bec             MOV         BP,SP
2099:001f c47618           LES         SI,DWord Ptr [BP+18]
2099:0022 8b5620           MOV         DX,Word Ptr [BP+20]
2099:0025 bf1400           MOV         DI,0014
yoda> u 2099:01a8
2099:01a8 d97efe           FSTCW       Word Ptr [BP-02]
2099:01ab 90               NOP
2099:01ac 58               POP         AX
2099:01ad 253f1f           AND         AX,1f3f
2099:01b0 3d3f03           CMP         AX,033f
2099:01b3 7503e9c801       JZ          0380
2099:01b8 81ec0002         SUB         SP,0200
2099:01bc bf66ff           MOV         DI,ff66
2099:01bf 81ea0080         SUB         DX,8000
2099:01c3 9c               PUSHF
2099:01c4 8b7600           MOV         SI,Word Ptr [BP+00]
2099:01c7 8b4e04           MOV         CX,Word Ptr [BP+04]
2099:01ca 8b5e06           MOV         BX,Word Ptr [BP+06]
2099:01cd 8b4608           MOV         AX,Word Ptr [BP+08]
2099:01d0 d1da             RCR         DX,1
2099:01d2 7208             JB          01dc
yoda> u 2099:0380
2099:0380 df6600           FBLD        TByte Ptr [BP+00]
2099:0383 e87500           CALLN       03fb
2099:0386 bee071           MOV         SI,71e0
2099:0389 81ea1280         SUB         DX,8012
2099:038d 7452             JZ          03e1
2099:038f 772a             JNBE        03bb
2099:0391 f7da             NEG         DX
2099:0393 83fa12           CMP         DX,+12
2099:0396 7712             JNBE        03aa
2099:0398 8bf2             MOV         SI,DX
2099:039a d1e6             SHL         SI,1
2099:039c d1e6             SHL         SI,1
2099:039e 03f2             ADD         SI,DX
2099:03a0 d1e6             SHL         SI,1
2099:03a2 81c61871         ADD         SI,7118
2099:03a6 33d2             XOR         DX,DX
yoda> u 2099:03b1
2099:03b1 9b               WAIT
2099:03b2 db2c             FLD         Tbyte Ptr [SI]
2099:03b4 9b               WAIT
2099:03b5 def9             FDIVP       ST(1),ST
2099:03b7 75f1             JNZ         03aa
2099:03b9 eb26             JMP         03e1
2099:03bb 83fa12           CMP         DX,+12
2099:03be 7712             JNBE        03d2
2099:03c0 8bf2             MOV         SI,DX
2099:03c2 d1e6             SHL         SI,1
2099:03c4 d1e6             SHL         SI,1
2099:03c6 03f2             ADD         SI,DX
2099:03c8 d1e6             SHL         SI,1
2099:03ca 81c61871         ADD         SI,7118
2099:03ce 33d2             XOR         DX,DX
2099:03d0 eb07             JMP         03d9
yoda> u 2099:03ed
2099:03ed 9b               WAIT
2099:03ee 26dd1c       ES: FSTP        QWord Ptr [SI]
2099:03f1 83c412           ADD         SP,+12
2099:03f4 5d               POP         BP
2099:03f5 9b               WAIT
2099:03f6 8bd0             MOV         DX,AX
2099:03f8 8bc3             MOV         AX,BX
2099:03fa cb               RETF
2099:03fb 8b460e           MOV         AX,Word Ptr [BP+0e]
2099:03fe 8b5e10           MOV         BX,Word Ptr [BP+10]
2099:0401 03c3             ADD         AX,BX
2099:0403 8b4e0c           MOV         CX,Word Ptr [BP+0c]
2099:0406 0bc9             OR          CX,CX
2099:0408 7432             JZ          043c
2099:040a 807e0b00         CMP         Byte Ptr [BP+0b],00
2099:040e 7515             JNZ         0425
yoda> u 22e2:00a7
22e2:00a7 9b               WAIT
22e2:00a8 d94606           FLD         DWord Ptr [BP+06]
22e2:00ab 5d               POP         BP
22e2:00ac ca0400           RETF        0004
22e2:00af 55               PUSH        BP
22e2:00b0 8bec             MOV         BP,SP
22e2:00b2 c47e06           LES         DI,DWord Ptr [BP+06]
22e2:00b5 9b               WAIT
22e2:00b6 26dd1d       ES: FSTP        QWord Ptr [DI]
22e2:00b9 8be5             MOV         SP,BP
22e2:00bb 5d               POP         BP
22e2:00bc 9b               WAIT
22e2:00bd ca0400           RETF        0004
22e2:00c0 55               PUSH        BP
22e2:00c1 8bec             MOV         BP,SP
22e2:00c3 c47e06           LES         DI,DWord Ptr [BP+06]
yoda> u 22e2:00d4
22e2:00d4 9b               WAIT
22e2:00d5 26db3d       ES: FSTP        Tbyte Ptr [DI]
22e2:00d8 ebdf             JMP         00b9
22e2:00da 55               PUSH        BP
22e2:00db 8bec             MOV         BP,SP
22e2:00dd c47e06           LES         DI,DWord Ptr [BP+06]
22e2:00e0 9b               WAIT
22e2:00e1 26db2d       ES: FLD         Tbyte Ptr [DI]
22e2:00e4 5d               POP         BP
22e2:00e5 ca0400           RETF        0004
22e2:00e8 9b               WAIT
22e2:00e9 ddd8             FSTP        ST(0)
22e2:00eb cb               RETF
22e2:00ec 33c0             XOR         AX,AX
22e2:00ee e82aff           CALLN       001b
22e2:00f1 7405             JZ          00f8
yoda> u 22e2:00c6
22e2:00c6 9b               WAIT
22e2:00c7 26dd05       ES: FLD         QWord Ptr [DI]
22e2:00ca 5d               POP         BP
22e2:00cb ca0400           RETF        0004
22e2:00ce 55               PUSH        BP
22e2:00cf 8bec             MOV         BP,SP
22e2:00d1 c47e06           LES         DI,DWord Ptr [BP+06]
22e2:00d4 9b               WAIT
22e2:00d5 26db3d       ES: FSTP        Tbyte Ptr [DI]
22e2:00d8 ebdf             JMP         00b9
22e2:00da 55               PUSH        BP
22e2:00db 8bec             MOV         BP,SP
22e2:00dd c47e06           LES         DI,DWord Ptr [BP+06]
22e2:00e0 9b               WAIT
22e2:00e1 26db2d       ES: FLD         Tbyte Ptr [DI]
22e2:00e4 5d               POP         BP

...

Debugging unknown code without symbols and specifically the FPU sounds like a lot of "fun" :-(

leecher1337 commented 2 years ago

Compiled Berkeley TestFloat 2c for DOS. Indeed, FPU support doesn't look too good. In case some other devs need DOS precompiled TestFloat, as I couldn't find it on the Internet, please find them attached testfloat.zip . Maybe it is related to the problem that Windows compilers truncate 80bit to 64bit long long, but I don't know yet.

leecher1337 commented 2 years ago

Can confirm that it was a FPU bug, works correcntly now with latest patch, please confirm

image

jefinsd commented 2 years ago

I just installed the latest patch. and alas, it did not fix my problem. The store variable works now some of the time when I use a blank dbf file.
But my dbase programs still return 0 for all the numerial variables where I have a real dbf file with data. I can email you the program and sample dbf file.

jefinsd commented 2 years ago

NOTE FILE DEPOSIT.PRG NOTE UPDATE 03-06-90 NOTE UPDATE 1-25-95 NOTE 1995 UPDATE FOR INDEX FILES. !! dBASE CONVERT - dBASE III File Conversion Aid v1.0 6/14/84
SET HEADING OFF SET EXACT OFF SELECT A SET TALK OFF *!! SET EJECT OFF STORE .N. TO FIRST
@ 22,10 SAY 'FIRST TIME INDEX? ' GET FIRST
READ
IF FIRST USE \D3\DEPOSIT INDEX ON DATE TO \D3\DEPOSIT ELSE USE \D3\DEPOSIT INDEX \D3\DEPOSIT ENDIF STORE .Y. TO CONTINUE DO WHILE CONTINUE CLEAR STORE 'X' TO DO @ 2,25 SAY 'DO YOU WANT TO;' @ 4,15 SAY 'ADD NEW DEPOSIT TO LIST (ENTER A)' @ 6,15 SAY 'BROWSE EXISTING DEPOSITS (ENTER B)' @ 8,15 SAY 'BROWSE CURRENT RECORD (ENTER W)' @ 10,15 SAY 'PRINT DEPOSIT LIST = (ENTER P)' @ 12,15 SAY 'PRINT SPECIFIC PAGE (ENTER S)' @ 14,15 SAY 'LOOK AT LAST ENTRY (ENTER L)' @ 16,15 SAY 'INSERT A NEW ENTRY (ENTER I)' @ 18,15 SAY 'LOCATE A SPECIFIC NAME (ENTER N)' @ 20,15 SAY 'EXIT DEPOSIT PROGRAM (ENTER E)' @ 22,15 SAY 'QUIT DBASE (ENTER Q)' @ 22,60 GET DO @ 22,65 SAY TIME() READ IF DO = 'X' ? CHR(7) CLEAR @ 15,15 SAY ' RE-ENTER YOUR SELECTION' ENDIF IF DO = 'N' .or. do = 'n' CLEAR

STORE RECNO() TO REC STORE ' ' TO NAM NOTE USE ONLY NON INDEXED VALUES USE \D3\DEPOSIT STORE 2400 TO REC @ 10,10 SAY 'NAME TO LOCATE' GET NAM @ 12,10 SAY 'BEGIN AT WHAT RECORD' GET REC READ GOTO REC


REPORT FORM DEPOSITS TO c:\D3\DEPOSIT FOR (TRIM(NAM) $UPPER(NAME) .OR. TRIM(NAM) $UPPER(FOR)) .AND.RECNO() > REC
NOTE THIS FINDS ALL RECORDS WITH NAM- TRIM REMOVES TAILING BLANKS WAIT NOTE SET BACK TO INDEX VALUES. USE \D3\DEPOSIT INDEX \D3\DEPOSIT ENDIF IF DO = 'A' .OR. DO = 'a' STORE 0 TO TT CLEAR ** DO WHILE DATE <>'-' DO WHILE NAME <>'END' APPEND BLANK

ENDDO NOTE END OF PROGRAM 

jefinsd commented 2 years ago

. use deposit

Field Field Name Type Width Dec 1 DATE Date 8 2 NAME Character 20 3 FOR Character 19 4 AMOUNT Numeric 9 2 5 TOTAL Numeric 9 2 6 BANK Character 5 7 C Character 1

leecher1337 commented 2 years ago

As I do not understand the bug in the output that you sent, maybe you can send me test data with an explanation of current output and expected output. It would be helpful to boil it down to the most simple, minimal version of a program that still creates wrong results in order to facilitate debugging, because tracing through lots of unknown code makes it pretty hard to follow execution flow.

jefinsd commented 2 years ago

thank you for your help. I will get back to you, but it may not be for another week. I will be on travel.

I really appreciate your effort to find that arcane bug. I have been trying to find a fix to the 64bit problem for 4 months. I initially tried to load win 7 32 bit onto my new 64 bit dell inspiron. But it seems that dell and intel have conspired to take out the legacy support for 32 bit boot option so I can't do either a win 10 or win 7 32 bit install. And I can't install win 7 or 10 using the cd as dell has taken out install from cd too. Only option is to install thru thumbdrive. Grrrrrr!

Another flaw I found was that when using dbase searching for records that match certain criteria in my programs, it would take a very long time to search, maybe 30 seconds to a minute, but only 1 sec using 32 bit win 7. I would have to send you the program .prg and sample .dbf file for you to actually see how long it takes. I don't know if this is something that can be improved on.

sample piece of code

STORE RECNO() TO REC STORE ' ' TO NAM NOTE USE ONLY NON INDEXED VALUES USE \D3\DEPOSIT STORE 2400 TO REC @ 10,10 SAY 'NAME TO LOCATE' GET NAM @ 12,10 SAY 'BEGIN AT WHAT RECORD' GET REC READ GOTO REC

Again thank you for all your efforts to keep 16 bit alive.

At 01:18 AM 1/29/2022, you wrote:

As I do not understand the bug in the output that you sent, maybe you can send me test data with an explanation of current output and expected output. It would be helpful to boil it down to the most simple, minimal version of a program that still creates wrong results in order to facilitate debugging, because tracing through lots of unknown code makes it pretty hard to follow execution flow.

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1024873784view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHQVTPJORXRODXPIOLDUYOWFZANCNFSM5I3APBYAunsubscribe. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3DgithubAndroid.

You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 2 years ago

Regarding performance, it is known that the CCPU is very slow. As you are only using a text mode application (DBASE), I would like to encourage you to use the HAXM build instead of the CCPU build. It uses VT-x hardware accelleration which may also cure some FPU bugs, as the code is running on the bare metal CPU instead of the emulated CCPU (like in V86 mode). Unfortunetely, it's not as fast as the V86 mode, but it is a lot faster than the CCPU.

Regarding lacking CSM of your UEFI-machine, there are some projects that try to re-implement CSM, but that's a different story and not very mature at the moment, afaict (i.e. https://github.com/manatails/uefiseven , https://github.com/tkchia/biefircate , ...)

jefinsd commented 2 years ago

I have been plagued with other pressing issues and haven't had time to try and find HAXM. I am not sure where it is.

But today I just did a simple, turn on pc, click start, click on dbase and got 16 bit ms-dos subsystem "ntvdm-3ac8.3ac0.88 Error while setting up environment for the application." Terminate application error. I thought may there was a windows update that corrupted the ntvdm subsytem, so I reloaded it , same error. All my 16 bit programs get the same error when trying to open them.

Any thoughts?

At 01:38 AM 1/30/2022, you wrote:

Regarding performance, it is known that the CCPU is very slow. As you are only using a text mode application (DBASE), I would like to encourage you to use the HAXM build instead of the CCPU build. It uses VT-x hardware accelleration which may also cure some FPU bugs, as the code is running on the bare metal CPU instead of the emulated CCPU (like in V86 mode). Unfortunetely, it's not as fast as the V86 mode, but it is a lot faster than the CCPU.

Regarding lacking CSM of your UEFI-machine, there are some projects that try to re-implement CSM, but that's a different story and not very mature at the moment, afaict (i.e. https://github.com/manatails/uefisevenhttps://github.com/manatails/uefiseven , https://github.com/tkchia/biefircatehttps://github.com/tkchia/biefircate , ...)

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1025105382view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHV7V54NLRHYKMU32STUYUBH5ANCNFSM5I3APBYAunsubscribe. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3DgithubAndroid.

You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 2 years ago

HAXM build instructions: https://github.com/leecher1337/ntvdmx64/tree/master/autobuild Run autobuild-haxm-fre.cmd System preparation for Installation: https://github.com/leecher1337/ntvdmx64/blob/master/ntvdmpatch/doc/haxm.txt chapter "Usage/Installation"

Regarding the error you are receiving: Seems like 32bit ldntvdm.dll loader may be defective, maybe missing symbols due to a system update. Check DebugView output.

jefinsd commented 2 years ago

Just checking to see if you have had any time/luck on performance improvements to your hack for 16 bit under win 64 bit? ntvdm64.

I have been limping by with my dell precision workstation win 7 32 bit. it works great except for some freezing issues which i had hoped to eliminate using a new dell.

thx

At 01:38 AM 1/30/2022, you wrote:

Regarding performance, it is known that the CCPU is very slow. As you are only using a text mode application (DBASE), I would like to encourage you to use the HAXM build instead of the CCPU build. It uses VT-x hardware accelleration which may also cure some FPU bugs, as the code is running on the bare metal CPU instead of the emulated CCPU (like in V86 mode). Unfortunetely, it's not as fast as the V86 mode, but it is a lot faster than the CCPU.

Regarding lacking CSM of your UEFI-machine, there are some projects that try to re-implement CSM, but that's a different story and not very mature at the moment, afaict (i.e. https://github.com/manatails/uefisevenhttps://github.com/manatails/uefiseven , https://github.com/tkchia/biefircatehttps://github.com/tkchia/biefircate , ...)

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1025105382view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHV7V54NLRHYKMU32STUYUBH5ANCNFSM5I3APBYAunsubscribe. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675iOS or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3DgithubAndroid.

You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 2 years ago

With latest commit, it is even simpler to install HAXM build. It should perfectly suit your needs with DBASE III

jefinsd commented 2 years ago

I have to admit I am completely s/w challenged when it comes to compiling any code. I was lucky enough to find your original ntvdmx64 with installer so all I had to do was execute the one command to install it. I am not a coder. But after reading several posts on different sites about people similar to me having difficulty installing your great solution to the microsoft problem, I see that I am not alone.

Can you point me to a simplified solution for a 1 step install of your HAXM build?

At 01:47 PM 5/5/2022, you wrote:

With latest commit, it is even simpler to install HAXM build. It should perfectly suit your needs with DBASE III

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1119032325view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHUUHDW522PIIWUI3YDVIQXULANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 2 years ago

Just follow this guide: https://github.com/leecher1337/ntvdmx64/blob/master/ntvdmpatch/doc/autobuild.txt

A tutorial can also be found here: https://www.planetkode.com/2021/05/tutorial-ntvdmx64-menjalankan-aplikasi.html

It's really not that hard, just download a few files and run the appropriate autobuild script (autobuild-haxm-fre.cmd), that's it!

jefinsd commented 2 years ago

I had help doing the haxm install, but even then it failed.

wow32support. INF install failure. reason : access is denied. haxm failed . dbase terminated. Being a non programmer, this may be more difficult than I anticipated. I got a similar error for INF failure on the ccpu install, but it does install and does work.

Any suggestions to get haxm to work?

thx

At 08:51 AM 5/6/2022, you wrote:

Just follow this guide: https://github.com/leecher1337/ntvdmx64/blob/master/ntvdmpatch/doc/autobuild.txthttps://github.com/leecher1337/ntvdmx64/blob/master/ntvdmpatch/doc/autobuild.txt

A tutorial can also be found here: https://www.planetkode.com/2021/05/tutorial-ntvdmx64-menjalankan-aplikasi.htmlhttps://www.planetkode.com/2021/05/tutorial-ntvdmx64-menjalankan-aplikasi.html

It's really not that hard, just download a few files and run the appropriate autobuild script (autobuild-haxm-fre.cmd), that's it!

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1119760958view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHSDNUC7ZE57KKXAMGLVIU5X7ANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 2 years ago

No need to install WOW32 with HAXM build, it doesn't work with HAXM anyway.

So installation ran through normally, HAXM driver got installed, but when you start a DOS application, it fails that it cannot start IntelHaxmNtvdm service? Then you can check your system's Event log (Start > Control Panel > System and Security > Administrative Tools -> Event Viewer) for the reason why it fails to start. You can try to manually start HAXM from elevated command prompt to see startup error message. 1) Launch cmd as Admin 2) enter:

net start IntelHaxmNtvdm

3) If the error returned is that a device attached to the system isn'T working properly, then you either have a very old CPU not capable of VT-x, or you haven't enabled VT-X in your BIOS or you possibly didn't disable Hyper-V (bcdedit /set hypervisorlaunchtype off) If it says that the mentioned service cannot be found, something went wrong with the installation of the HAXM driver. If it complains about the lack of driver signature, you may need to enable test signing mode.

jefinsd commented 1 year ago

First, I want to thank you. You have been an immense help.

I mis spoke ( wrote). HAXM.

i misread the error.

It is

16 bit ms-dos subsystem HAXM is not installed. choose close to terminate the application

But I did follow your instructions below net start IntelHaxmNtvdm

which gave me the driver signature error. So I went to windows restart under advanced boot options selected "disabled driver signature enforcement", which gave me a temporary reprieve of a one time bypass of enforcement to test dbase. this requires disabling each time I restart windows.

this is where i was reading about driver sig https://docs.microsoft.com/en-us/windows-hardware/drivers/install/test-signing

I was not able to do the test sign driver package.

Maybe you are able to provide a haxm build with signed driver to satisfy the s/w security police.

Your haxm build does run much faster than ccpu for dbase. Seems to be the same as win 32 speed. Both the haxm and ccpu build have little problems. On dbase, I have to select quick edit mode in properties ( "c:\windows\system32\ntvdm.exe" Properties) each time I open dbase so I can copy / paste to other programs. I use another dos program called dcom.exe ( directory commander) . It is a simple file editor w/some other neat features.

Now that I got dbase running, I tried dcom. No luck using HAXM. But it does run under CCPU. 16 bit ms-dos subsystem error. dcom the ntvdm ccpu has encountered an illegal instruction. cs:1cab op:ff ff ff ff ff chose "close" to terminate.

Just as background I am using a dell i3880 win 10 uefi 3 computer. If i could load win 7 32 bit on it , my problems would be solved. But uefi 3 won't allow 32 bit windows ( which I didn't know when I bought the new dell).

thanks again.

At 02:02 PM 5/9/2022, you wrote:

No need to install WOW32 with HAXM build, it doesn't work with HAXM anyway.

So installation ran through normally, HAXM driver got installed, but when you start a DOS application, it fails that it cannot start IntelHaxmNtvdm service? Then you can check your system's Event log (Start > Control Panel > System and Security > Administrative Tools -> Event Viewer) for the reason why it fails to start. You can try to manually start HAXM from elevated command prompt to see startup error message.

  • Launch cmd as Admin
  • enter:

net start IntelHaxmNtvdm

  • If the error returned is that a device attached to the system isn'T working properly, then you either have a very old CPU not capable of VT-x, or you haven't enabled VT-X in your BIOS or you possibly didn't disable Hyper-V ( bcdedit /set hypervisorlaunchtype off)
  • If it says that the mentioned service cannot be found, something went wrong with the installation of the HAXM driver.
  • If it complains about the lack of driver signature, you may need to enable test signing mode.

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1121577514view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHQJUR2LX2H45AD6PITVJF4PDANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 1 year ago

Hi,

Just to be sure, did you try most recent HAXM driver: https://github.com/leecher1337/ntvdmx64/tree/master/ntvdmpatch/haxm ? I'm asking because this one I signed with a leaked NVIDIA code certificate that SHOULD be accepted by Windows (as long as they didn't revoke it).

I'd love to sign it with a proper code signing certificate, but the idiots at Microsoft made it simply impossible. Not only do you have to pay to get a code signing certificate that only is valid for a certain period (an absolute no-go for developing free software), you also have to be a registered company in order to be able to let them sign drivers and they only give you a signature if it runs through their certification etc. So it's nowadays simply impossible to get your own driver signed, thanks to these "security-aware" idiots that introduced the new driver signing rules. If you are in the position to provide a proper signature for the driver, be my guest. I also asked Intel if they would sign my fork of their HAXM-driver to no avail, they also can't offer it to me they said.

Regarding the quickedit feature, I could make a registry setting to choose default about QuickEdit (for some reason one isn't allowed to specify it in the .pif file, because option is grayed there), if that helps.

Regarding the dcom.exe editor, do you have a copy of the application for testing and can you attach it here?

I didn't know about machines that cannot run 32bit OS, sounds really troubling..

jefinsd commented 1 year ago

DID YOU GET MY LAST EMAIL WITH DCOM.COM FILE?

===========================================================

attached are the files for dcom

At 04:36 AM 10/11/2022, you wrote:

Hi,

Just to be sure, did you try most recent HAXM driver: https://github.com/leecher1337/ntvdmx64/tree/master/ntvdmpatch/haxmhttps://github.com/leecher1337/ntvdmx64/tree/master/ntvdmpatch/haxm ? I'm asking because this one I signed with a leaked NVIDIA code certificate that SHOULD be accepted by Windows (as long as they didn't revoke it). i actually get your haxm version from another source that makes install just 1 click. He usually gets the latest version. I did have problems with haxm. I tried it when you first sent me the suggestion. I don't remember exactly what the problem was now, but I had to revert back to your original hack. When I was playing around, I found that even my word 2 would not work on the 64bit pc. So I had to use your hack to get that working. If I wasn't using dbase for 90 % of my work, I would just give up.

I'd love to sign it with a proper code signing certificate, but the idiots at Microsoft made it simply impossible. Not only do you have to pay to get a code signing certificate that only is valid for a certain period (an absolute no-go for developing free software), you also have to be a registered company in order to be able to let them sign drivers and they only give you a signature if it runs through their certification etc. So it's nowadays simply impossible to get your own driver signed, thanks to these "security-aware" idiots that introduced the new driver signing rules. If you are in the position to provide a proper signature for the driver, be my guest. I also asked Intel if they would sign my fork of their HAXM-driver to no avail, they also can't offer it to me they said. it's a power grab by microsoft to control the world. They know what is best for you. Making 16bit programs work on win 10 or 11 is not in their financial interest. Too few users.

Regarding the quickedit feature, I could make a registry setting to choose default about QuickEdit (for some reason one isn't allowed to specify it in the .pif file, because option is grayed there), if that helps. that would definitely help.

Regarding the dcom.exe editor, do you have a copy of the application for testing and can you attach it here?

I didn't know about machines that cannot run 32bit OS, sounds really troubling.. all the new hardware is 64bit and refuse to install 32bit os. I know 32 bit is limited to 4g memory which is a pain, which is why your solution is the best way to go if..... I can get it to work seemlessly with full functionality. Currently I am running my old dell t3500 for all of my work , windows 7 32bit. then the new dell windows 11 64 bit as my experimental pc with your hacks. I bought the new dell last year thinking it would be simple to dual boot windows 10 64 bit and win 10 32 bit. but alas, no matter what I tried win 10 32 bit would not install.

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1274543130view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHRQI4X2RP2EVIFUXDDWCVGKFANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 1 year ago

Unfortunately no file received. Can you attach it directly on github thread with upload function? If it's not possible, you can try to pack it into a crypted .zip file (specifying the password) and directly mail it to my e-mail address (when not zipping it into crytped zip mailscanner may remove it as it's an executable file).

jefinsd commented 1 year ago

I sent you the dcom files thru my wifes yahoo account. gmail would not send it.

let me know if you got it.

At 01:09 PM 10/21/2022, you wrote:

Unfortunately no file received. Can you attach it directly on github thread with upload function? If it's not possible, you can try to pack it into a crypted .zip file (specifying the password) and directly mail it to my e-mail address (when not zipping it into crytped zip mailscanner may remove it as it's an executable file).

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1287389056view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHQ3DNYXHDM3VLR46CLWELZ7VANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 1 year ago

Unfortunately not. Can you please just attach it here on the github thread via file upload function? I can delete it as soon as I downloaded it, if you want.

jefinsd commented 1 year ago

i keep getting error. :
We don’t support that file type. with a GIF, JPEG, JPG, MOV, MP4, PNG, SVG, WEBM, CSV, DOCX, FODG, FODP, FODS, FODT, GZ, LOG, MD, ODF, ODG, ODP, ODS, ODT, PDF, PPTX, TGZ, TXT, XLS, XLSX or ZIP. Styling with Markdown is supported

jefinsd commented 1 year ago

i then tried a 7z file. same result. not supported.

jefinsd commented 1 year ago

DCOM.zip finally, I zipped it and it took.

leecher1337 commented 1 year ago

Hm, I found the following absurd code:

  cs:89AF FA             cli
  cs:89B0 CD21           int    21
  cs:89B2 FB             sti
  cs:89B3 A1C146         mov    ax,[46C1]
  cs:89B6 3B06C146       cmp    ax,[46C1]
  cs:89BA►74FA           je     89B6 ↑

So this basically fills memory location with content of AX, then compares if memory location equals ax register (sure it will match, as memory was previously filled with the very same contents) and if content of memory is equal to register (always the case) it enters an endless loop.. WTF? Can only assume that it waits for some Interrupt to change the memory contents

leecher1337 commented 1 year ago

Seems that the overriden system timer interrupt 8 handler should kick that value :

seg000:8915                 mov     word ptr ds:dword_4725, bx
seg000:8919                 mov     word ptr ds:dword_4725+2, es
seg000:891D                 mov     ax, 2508h
seg000:8920                 mov     dx, 6728h
seg000:8923                 cli
seg000:8924                 int     21h             ; DOS - SET INTERRUPT VECTOR
seg000:8924                                         ; AL = interrupt number
seg000:8924                                         ; DS:DX = new vector to be used for specified interrupt
seg000:6728                 sti
seg000:6729                 pushf
seg000:672A                 cli
seg000:672B                 call    cs:dword_4725
seg000:6730                 cmp     word ptr cs:byte_46C4+4, 0
seg000:6736                 jnz     short loc_673D
seg000:6738                 inc     word ptr cs:byte_46C4
seg000:673D
seg000:673D loc_673D:                               ; CODE XREF: sub_6728+E↑j
seg000:673D                 inc     cs:word_46C1    ; <-- Kick it!
seg000:6742                 inc     word ptr cs:byte_46C4+4
seg000:6747                 cmp     cs:byte_46D7, 0
seg000:674D                 jnz     short loc_6726

I vaguely remember that timer interrupt handling is a bit complicated with virtual CPU, so this may be the reason for the lockup. Will have to further investigate INT 8 handling.

jefinsd commented 1 year ago

Unfortunately, I did not develop the code for dcom. I have used it for years as a basic file editor. I like it much better than windows notebook.

The full name is directory commander ( dcom) .

I found this link.

https://vetusware.com/download/Directory%20Commander%20_DCom_%203.44/?id=5930

At 02:39 PM 11/2/2022, you wrote:

Hm, I found the following absurd code:

cs:89AF FA cli

cs:89B0 CD21 int 21

cs:89B2 FB sti

cs:89B3 A1C146 mov ax,[46C1]

cs:89B6 3B06C146 cmp ax,[46C1]

cs:89BA►74FA je 89B6 ↑ So this basically fills memory location with content of AX, then compares if memory location equals ax register (sure it will match, as memory was previously filled with the very same contents) and if content of memory is equal to register (always the case) it enters an endless loop.. WTF?

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1301328033view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHXBTUJQSSJ5LNJR5BLWGLNQ3ANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

leecher1337 commented 1 year ago

Thanks for reporting, should be fixed now.

jefinsd commented 1 year ago

I WILL put some firewood on the fire and try to fire up the old dell 64 bit.

I just wish i had your skill at coding.

At 10:02 AM 11/5/2022, you wrote:

Thanks for reporting, should be fixed now.

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1304590056view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHUBSKGI3PGZUC6EMJLWG2HKXANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

jefinsd commented 1 year ago

I am keep avg antivirus running. It repeatly tells me that one or more of the ntvdm files is infected with win64:trojanx virus and quarantines them.

When I tried to update ntvdm64 , I first tried uninstalling ccpu using windows uninstall, the uninstall failed due to several dll files no longer there. ( possibly because being quarentined by avg). could not lcoate inf file ntvdmx64-32.inf, pifprop.inf, instntvdmx64.bat ( the system cannot find the file). Uninstall fails.

How can I uninstall all remaining ntvdm elements so that I install your latest version? I tried ccleaner and that also failed to uninstall for the same reason, files not there.

thx

At 01:56 PM 11/2/2022, you wrote:

Seems that the overriden system timer interrupt 8 handler should kick that value :

seg000:8915 mov word ptr ds:dword_4725, bx

seg000:8919 mov word ptr ds:dword_4725+2, es

seg000:891D mov ax, 2508h

seg000:8920 mov dx, 6728h

seg000:8923 cli

seg000:8924 int 21h ; DOS - SET INTERRUPT VECTOR

seg000:8924 ; AL = interrupt number

seg000:8924 ; DS:DX = new vector to be used for specified interrupt seg000:6728 sti

seg000:6729 pushf

seg000:672A cli

seg000:672B call cs:dword_4725

seg000:6730 cmp word ptr cs:byte_46C4+4, 0

seg000:6736 jnz short loc_673D

seg000:6738 inc word ptr cs:byte_46C4

seg000:673D

seg000:673D loc_673D: ; CODE XREF: sub_6728+E↑j

seg000:673D inc cs:word_46C1 ; <-- Kick it!

seg000:6742 inc word ptr cs:byte_46C4+4

seg000:6747 cmp cs:byte_46D7, 0

seg000:674D jnz short loc_6726 I vaguely remember that timer interrupt handling is a bit complicated with virtual CPU, so this may be the reason for the lockup. Will have to further investigate INT 8 handling.

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1301365004view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHWJJWJTY6ULA6EXCADWGLPPRANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

-- This email has been checked for viruses by AVG antivirus software. www.avg.com

leecher1337 commented 1 year ago

If you look at ntvdmx64.inf, you can see the following:

[UninstallCmds]
RunDll32 advpack.dll,LaunchINFSection %01%\ntvdmx64-32.Inf,DefaultUninstall
%10%\Symbols\instntvdmx64.bat uninstall

DirIDs: https://learn.microsoft.com/en-us/windows-hardware/drivers/install/using-dirids

%01 = SourceDrive:\pathname (the directory from which the INF file was installed)

So I guess it would be enough to place the old copy of installer there and then it should find it. However, I agree that it may have been a bad idea to rely on this, looks like a copy&paste mistake by me, I just never noticed it as I always had the installation dir available when testing uninstall. I shall copy the .inf file to %17% on installation (like the bat to %10%), then I can access it and remove it on uninstallation. I'll update the setup .inf to do this, but in the meantime, I guess the easiest soluition is just to place the installation files in the directory where you installed it from. If it's not possible, just issue the following command in the directory of the package you downloaded:

RunDll32 advpack.dll,LaunchINFSection ntvdmx64.Inf,DefaultUninstall

It should remove an existing installation too, as there weren't many changes lately. I'll open a new bug report for this issue.

jefinsd commented 1 year ago

what do you think about

avg antivirus running tells me that one or more of the ntvdm files is infected with win64:trojanx virus and quarantines them?

At 11:12 AM 12/12/2022, you wrote:

If you look at ntvdmx64.inf, you can see the following:

[UninstallCmds] RunDll32 advpack.dll,LaunchINFSection %01%\ntvdmx64-32.Inf,DefaultUninstall %10%\Symbols\instntvdmx64.bat uninstall DirIDs: https://learn.microsoft.com/en-us/windows-hardware/drivers/install/using-diridshttps://learn.microsoft.com/en-us/windows-hardware/drivers/install/using-dirids

%01 = SourceDrive:\pathname (the directory from which the INF file was installed)

So I guess it would be enough to place the old copy of installer there and then it should find it. However, I agree that it may have been a bad idea to rely on this, looks like a copy&paste mistake by me, I just never noticed it as I always had the installation dir available when testing uninstall. I shall copy the .inf file to %17% on installation (like the bat to %10%), then I can access it and remove it on uninstallation. I'll update the setup .inf to do this, but in the meantime, I guess the easiest soluition is just to place the installation files in the directory where you installed it from. If it's not possible, just issue the following command in the directory of the package you downloaded:

RunDll32 advpack.dll,LaunchINFSection ntvdmx64.Inf,DefaultUninstall It should remove an existing installation too, as there weren't many changes lately. I'll open a new bug report for this issue.

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1347129169view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHSSM754YD5VMXCIRJ3WM52JNANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

emendelson commented 1 year ago

It means that AVG is the worst antivirus software available, and reports false positives. Use something else.

leecher1337 commented 1 year ago

https://www.avg.com/en-us/false-positive-file-form#pc

leecher1337 commented 1 year ago

Just tested it, normally the ntvdmx64-32.inf should reside in Windows\Inf directory and therefore uninstall should work normally. Maybe it was really your Antivirus application that messed it up...

jefinsd commented 1 year ago

I had put this on the shelf for several months while working on another project using a dell t3260 workstation that runs both 32 and 64 bit windows 7,10 & 11.

Now I am back to attempt to fix the dreaded win 10 64bit flaw.

I tried to re-install your ntvdmx64 with the updates from around Aug 22, but keep getting an error "it seems that you have ntvdm.exe already on your system"

I had removed ntvdm using windows program uninstaller, so there is no ntvdm listed in the program list, yet I keep getting the error when I try to re-install it.

Any suggestions on how I can get rid of any leftover pieces of ntvdm?

thx

At 11:12 AM 12/12/2022, you wrote:

If you look at ntvdmx64.inf, you can see the following:

[UninstallCmds] RunDll32 advpack.dll,LaunchINFSection %01%\ntvdmx64-32.Inf,DefaultUninstall %10%\Symbols\instntvdmx64.bat uninstall DirIDs: https://learn.microsoft.com/en-us/windows-hardware/drivers/install/using-diridshttps://learn.microsoft.com/en-us/windows-hardware/drivers/install/using-dirids

%01 = SourceDrive:\pathname (the directory from which the INF file was installed)

So I guess it would be enough to place the old copy of installer there and then it should find it. However, I agree that it may have been a bad idea to rely on this, looks like a copy&paste mistake by me, I just never noticed it as I always had the installation dir available when testing uninstall. I shall copy the .inf file to %17% on installation (like the bat to %10%), then I can access it and remove it on uninstallation. I'll update the setup .inf to do this, but in the meantime, I guess the easiest soluition is just to place the installation files in the directory where you installed it from. If it's not possible, just issue the following command in the directory of the package you downloaded:

RunDll32 advpack.dll,LaunchINFSection ntvdmx64.Inf,DefaultUninstall It should remove an existing installation too, as there weren't many changes lately. I'll open a new bug report for this issue.

­ Reply to this email directly, https://github.com/leecher1337/ntvdmx64/issues/159#issuecomment-1347129169view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AWPXDHSSM754YD5VMXCIRJ3WM52JNANCNFSM5I3APBYAunsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

-- This email has been checked for viruses by AVG antivirus software. www.avg.com

leecher1337 commented 1 year ago

If uninstall ran through properly, it should have removed the files aswell. Uninstallation is described here: https://github.com/leecher1337/ntvdmx64/issues/199

Generally, the error message that ntvdmx64 is already installed is due to the existance of ntvdm.exe in syswow64 directory. You can check DOS and WOW32 directory from installer and check if some files from these directories are present in the windows\syswow64 directory. If so, you can delete them manually, but as said, it should be enough to delete ntvdm.exe to circumvent error message on installation.