Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling with "Microsoft C Compiler 4.00" #5

Open
Fenyx4 opened this issue Aug 6, 2020 · 7 comments
Open

Compiling with "Microsoft C Compiler 4.00" #5

Fenyx4 opened this issue Aug 6, 2020 · 7 comments

Comments

@Fenyx4
Copy link

Fenyx4 commented Aug 6, 2020

Could you provide some guidance on how to compile it?
I'm just throwin' stuff at the wall right now.

I'm running the compile in dosbox.
I've got disk images for "Microsoft C Compiler 4.00". I've grabbed what I think are relevant files from disk 1, disk 2 and disk 3. (Note: disk 3 has a link.exe)
I found a MASM300.EXE in a zip which also includes a link.exe.
I ran "make makefile" and get a stack of errors but the key one appears to be;

Cannot open response file: "U4.RSP"
makefile(181) : make : 'link /MAP @u4.rsp'  - error 1

But it is also erroring on the commented lines like;

#----create the exe file

So I'm not sure if I'm even using the right version of make.

@Fenyx4
Copy link
Author

Fenyx4 commented Aug 6, 2020

P.S. When I run make /v I get

Microsoft (R) Program Maintenance Utility  Version 4.02
Copyright (C) Microsoft Corp 1984, 1985, 1986.  All rights reserved.

@cambragol
Copy link

If you look in my old ultima-IV-trinity repository, which has a remnant that you forked from, you can simply grab the "Ultima IV Trinity Project Build Environment.boxer" folder, which is just a gamebox for Boxer, which is just the osx version of dosbox. In there is a make/build environment that is ready to go. Give that a shot maybe.

@Fenyx4
Copy link
Author

Fenyx4 commented Aug 7, 2020

Thank you @cambragol! That helped immensely.

I've created a PR to give those that come later directions on how to compile.

#6

@Fenyx4
Copy link
Author

Fenyx4 commented Aug 7, 2020

P.S. the exe I compiled works and I was able to find what I needed. But the actual bytes had a lot of differences in them from the original. So I am still worried I am doing something wrong.

@cambragol
Copy link

Glad you got it working! You might want to fiddle with the compile flags, as I tweaked them a bit to reduce my exe size. Perhaps a more standard set would yield an exe closer to the original. Though, if you found the bytes in question...

@Fenyx4
Copy link
Author

Fenyx4 commented Aug 7, 2020

Good call on the flags but it didn't end up changing much. :(

But I did find the bytes I needed so I'm good.

I did fix a couple mistakes I made in the instructions though.

@ergonomy-joe
Copy link
Owner

Hi there, I am a little late on this one. sorry.
to build the executables, I use a batch file, called DOIT.BAT (in the SRC folder for instance).
Inside the batch file you must modify the MSC variable to make it point to your current installation of the Microsoft C compiler.

There is still a strange thing going on in this batch file: I am using the "make.exe" from borland (the one shipped with Turbo C 2.0). Maybe I thought that their makefile where better .... I can't remember. Anyway, you may have to do something around here too.

When everything is set, you should just have to ChangeDir to the SRC folder and launch the command DOIT (it works with DosBox).

Concerning the differences you have with the original EXEs, it may come from the fact that they are packed. So you may have to unpack them before doing the file compare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants