leecher1337 / ntvdmx64

Run Microsoft Windows NTVDM (DOS) on 64bit Editions
805 stars 81 forks source link

Differences in autobuild-ccpu-chk.cmd and autobuild-ccpu-fre.cmd (The build-fre gives the wrong date!) #127

Closed TheGeneral007 closed 3 years ago

TheGeneral007 commented 3 years ago

Great work by the way, real nice !!

I bumped into these two errors. The date which is wrong in the build-fre, makes it unusable for me. I wanted to see if the build-fre was indeed faster, because compiling something in DOS (w. chk) was noticable slower than with the NTVDM on Win10/x86 .
But even when it is slower, it is still a great solution to have it working on Win10/x64!!

There is a difference in how the date works in building it with the Autobuild-scripts.

Correct date with autobuild-ccpu-chk.cmd (=7 Apr. 2021) : image

Wrong date with autobuild-ccpu-fre.cmd (= ??) : image

Missing with autobuild-ccpu-fre.cmd: image So I had to copy it from a built, which was done by autobuild-ccpu-chk.cmd

leecher1337 commented 3 years ago

Thank you for the report! There are various ways to get date/time in DOS, so as you seem to have a working example that demonstrates the bug, would you mind to share an .exe for testing?

Seems like regedt16.exe didn't get built when you were building free build (interestingsy, I don't have this problem here). Can you check if you have a w\minnt\base\buildfre.err file after building? Normally, the autobuild script will ask you to press a key after it compiled everything and put together the releases-directory. Do not press the key (as it would delete the w build folder) and check for mentioned file. If you just have buildfre.log, you can search it for the line where it builds regedt16.exe, maybe you can see which error you are running into.

TheGeneral007 commented 3 years ago

I have created a small test-programm to test the date. It contains 2x .exe's Faktrug.exe with a Date shown in Dutch-format. Faktrug_EN.exe with a Date shown in EN-format.

Faktrug_Testdate.zip

Regedt16.exe: There was no buildfre.err file. Well, there was but it was probably removed because it was 0 bytes.

Buildfre.log-partly: 2> cd ....\regedit

2> nmake

2>

2>Microsoft (R) Program Maintenance Utility Version 7.00.8882

2>Copyright (C) Microsoft Corp 1988-2000. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\regmain.obj .\regmain.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\regedit.obj .\regedit.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\filename.obj .\filename.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\sdkreged.obj .\sdkreged.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\sdbase.obj .\sdbase.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\virt.obj .\virt.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\cutils1.obj .\cutils1.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\merge.obj .\merge.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\dbase.obj .\dbase.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\utils1.obj .\utils1.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\regporte.obj .\regporte.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> cl16 -c -W3 -AS -G2sw -Zlp -Os -I..\inc -IC:\NTVDMBL2\w\minnt\public\sdk\inc /Fo.\regthunk.obj .\regthunk.c

2>Microsoft (R) C/C++ Optimizing Compiler Version 8.00x

2>Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

2>

2> link16 /ALIGN:16/NOE/LI/MAP @C:\Users\MARCEL~1\AppData\Local\Temp\nm8F98.tmp

2>

2>Microsoft (R) Segmented Executable Linker NTGroup Version 5.60.220 Dec 28 1999

2>Copyright (C) Microsoft Corp 1984-1993. All rights reserved.

2>

2>Object Modules [.obj]: /ALIGN:16/NOE/LI/MAP .\regmain.obj .\regedit.obj .\filename.obj +

2>Object Modules [.obj]: .\sdkreged.obj .\sdbase.obj .\virt.obj +

2>Object Modules [.obj]: .\cutils1.obj .\merge.obj .\dbase.obj +

2>Object Modules [.obj]: .\utils1.obj .\regporte.obj .\regthunk.obj,

2>Run File [regmain.exe]: .\regedt16.exe,

2>List File [c:regedt16.map]: .\regedt16,

2>Libraries [.lib]: ..\lib\libw ..\lib\slibcew ..\lib\snocrt ..\lib\commdlg ..\lib\shell,

2>Definitions File [nul.def]: regedit.def

2> mapsym regedt16.map

2>Microsoft (R) Symbol File Generator NTGroup Version 6.02

2>Copyright (C) Microsoft Corp 1984 - 1996. All rights reserved.

2>Line number support enabled

2>Program entry point at 0001:5613

2>mapsym: regedt16.map(2): Warning: input file uses "REGEDIT" for module name, not "regedt16"

2> type regedit.def > .\regedt16.tmp

2> rc16 -I..\inc -r -fo.\regedit.res .\messages\usa\regedit.rc //end of .log

For what I can see, it looks like it is being created, but perhaps not copied to the proper folder. ?? image

leecher1337 commented 3 years ago

Hopefully the register access patch now fixes the issue with the date. It seems the optimizer went a bit too far when optimizing register access.

Regarding regedit, it seems that it doesn't get binplaced. Here, the logfile reads:

Line number support enabled

Program entry point at 0001:5613

mapsym: regedt16.map(2): Warning: input file uses "REGEDIT" for module name, not "regedt16"

    type regedit.def > .\regedt16.tmp

    rc16 -I..\inc -r  -fo.\regedit.res .\messages\usa\regedit.rc

Microsoft (R) Windows Resource Compiler Version 3.11

Copyright (C) Microsoft Corp. 1985-1992. All rights reserved.

    rc16 -I..\inc -t -30 .\regedit.res .\regedt16.exe

Microsoft (R) Windows Resource Compiler Version 3.11

Copyright (C) Microsoft Corp. 1985-1992. All rights reserved.

    binplace .\regedt16.exe

binplace c:\build\w\minnt\base\mvdm\wow16\regedit\regedt16.exe

    cd ..\lib

    nmake libw.lib 

Why the process gets stuck on your machine is a mystery, I was not able to reproduce this issue on 2 seperate machines.

TheGeneral007 commented 3 years ago

Issue=Date. Yes, thank you for the fix. I tested it and the date has been fixed! I will continue testing, but so far everything is looking good.

Issue=Regedt16.exe This remains unsolved and I have to keep doing it by hand. The process did not get stuck, but finished successfully till the end or so it seems. I uploaded only a part of the .log.

` 2>mapsym: regedt16.map(2): Warning: input file uses "REGEDIT" for module name, not "regedt16"

2> type regedit.def > .\regedt16.tmp

2> rc16 -I..\inc -r -fo.\regedit.res .\messages\usa\regedit.rc

2>Microsoft (R) Windows Resource Compiler Version 3.11

2>Copyright (C) Microsoft Corp. 1985-1992. All rights reserved.

2>

2> cd ..\lib

2> nmake libw.lib

2>

2>Microsoft (R) Program Maintenance Utility Version 7.00.8882

2>Copyright (C) Microsoft Corp 1988-2000. All rights reserved.

2>

2> upd /ne ..\drivers\sound . sound.def

2> c:\ntvdmbl2\w\minnt\base\mvdm\wow16\drivers\sound\sound.def => c:\ntvdmbl2\w\minnt\base\mvdm\wow16\lib\sound.def `

Before I ran it, I have made sure there was no folder "releases"

I have made sure that Windows Defender was disabled. I also tried it on another machine (Win10Pro2004). I opened a cmd-prompt with Administrator-privileges. And on both machines I have the same result. This line is also missing; rc16 -I..\inc -t -30 .\regedit.res .\regedt16.exe Am I doing this different than you are ? This is my folder before I start the Autobuild-script: image

leecher1337 commented 3 years ago

This seems to be a bug in nmake which doesn't execute the commands at the $(NAME1).exe target, just the prerequisites. The reason for this problem is unknown to me, but I now worked around it by executing nmake 2 times in a row. Now really elegant, but seems to work so far on a system where I was finally able to reproduce to problem.

TheGeneral007 commented 3 years ago

It is still a solution. Great, I have checked it and both issues has been resolved. Thank you for finding the solution!