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

Instructions on how to compile the code in Dosbox #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

*.OBJ

*.EXE

SRC/U4_MAIN.MAP

SRC/DIFF.TXT

SRC/LOG.TXT
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,58 @@ Very good remakes of the game exist already; this project is not intended to com

I hope you enjoy browsing the code !
ergonomy_joe

# Steps to compile with "Microsoft C Compiler 4.00"

1. Download dosbox https://www.dosbox.com
1. Launch dosbox
1. Use Ctrl+F12 to speed up to ~15k cycles. It speeds up builds.
1. >MOUNT c "[Local-Directory]/SRC"
e.g. MOUNT c "E:\projects\u4-decompiled\SRC"
1. Download tools
1. Go to https://www.pcjs.org/software/pcx86/util/other/unp/4.11/
1. In the dropdown under the command prompt select "UNP (Executable Unpacker) Source"
1. Click "Load" and then "Save"
1. In the dropdown select "MS C 4.00 (Disk 1)"
1. Rename downloaded file to MSC1.img
1. In the dropdown select "MS C 4.00 (Disk 2)"
1. Rename downloaded file to MSC2.img
1. In the dropdown select "MS C 4.00 (Disk 3)"
1. Rename downloaded file to MSC3.img
1. In the dropdown select "MS Macro Assembler 3.00"
1. Rename downloaded file to MASM300.img
1. Go to https://winworldpc.com/product/borland-turbo-c/2x
1. Download "Borland Turbo C 2.0 (3.5)"
1. Extract disk2.img from download and place with other img files
1. Extract tools
1. >mkdir C:\tools
1. >mkdir C:\tools\MSC400
1. >mkdir C:\tools\MASM300
1. >mkdir C:\tools\MASM300\LIB
1. >mkdir C:\tools\MASM300\INCLUDE
1. >mkdir C:\tools\turboc20
1. >mkdir C:\ORIGINAL
1. >MOUNT d "[Local Directory with img files]"
1. >imgmount a D:\UNP411~1.IMG -t floppy
1. >copy A:\UNP.EXE C:\TOOLS
1. >imgmount -u a
1. >imgmount a D:\MSC1.IMG -t floppy
1. >copy A:\*.* C:\tools\MSC400
1. >imgmount -u a
1. >imgmount a D:\MSC2.IMG -t floppy
1. >copy A:\EXEPACK.EXE C:\tools
1. >imgmount -u a
1. >imgmount a D:\MSC3.IMG -t floppy
1. >copy A:\*.* C:\tools\MSC400\LIB
1. >copy A:\LINK.EXE C:\tools\MSC400
1. >imgmount -u a
1. >imgmount a D:\MASM300.IMG -t floppy
1. >copy A:\LINK.EXE C:\tools\MASM300
1. >copy A:\LINK.EXE C:\tools
1. >copy A:\MASM.EXE C:\tools\MASM300
1. >imgmount -u a
1. >imgmount a D:\disk2.img -t floppy
1. >copy A:\MAKE.EXE C:\TOOLS\TURBOC20
1. Build
1. >DOIT

242 changes: 121 additions & 121 deletions SRC/MAKEFILE
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
CFLAGS=/Ox /Zp /Gc
ASM=\tools\masm300 /Mx
OBJS=errmsg.obj \
low.obj \
u4_use.obj \
u4_file.obj \
u4_util.obj \
util2.obj \
u4_main.obj \
u4_sound.obj \
u4_main2.obj \
u4_dos.obj \
u4_graph.obj \
u4_map.obj \
u4_end.obj \
u4_anim.obj \
u4_explo.obj \
u4_z.obj \
u4_cstes.obj \
u4_npc.obj \
u4_comba.obj \
u4_spell.obj \
u4_q_n_v.obj \
u4_get.obj \
u4_locate.obj \
u4_combb.obj \
u4_combc.obj \
u4_dng.obj \
u4_hole.obj \
u4_mix.obj \
u4_srch.obj \
u4_evt.obj \
u4_ai.obj \
u4_talk.obj \
u4_3d.obj \
u4_srch2.obj \
u4_peer.obj \
u4_init.obj \
u4_shops.obj \
u4_lb.obj \
u4_shrin.obj \
u4_var.obj
ASM=\tools\masm300\masm /Mx
OBJS=er.obj \
l.obj \
us.obj \
fi.obj \
ut.obj \
ut2.obj \
m.obj \
so.obj \
ma2.obj \
do.obj \
gr.obj \
ma.obj \
en.obj \
an.obj \
ex.obj \
z.obj \
cs.obj \
np.obj \
coa.obj \
sp.obj \
q.obj \
ge.obj \
lo.obj \
cob.obj \
coc.obj \
dn.obj \
ho.obj \
mi.obj \
sr.obj \
ev.obj \
ai.obj \
ta.obj \
3d.obj \
sr2.obj \
pe.obj \
in.obj \
sh.obj \
lb.obj \
shr.obj \
va.obj


all: install
Expand All @@ -60,122 +60,122 @@ u4_main.exe: $(OBJS)
#u4_var.obj: u4_var.c
# msc $(CFLAGS) /J u4_var;

u4_var.obj: u4_var.asm
$(ASM) u4_var;
va.obj: u4_var.asm
$(ASM) u4_var,va;

errmsg.obj: errmsg.c
msc $(CFLAGS) errmsg;
er.obj: errmsg.c
msc $(CFLAGS) errmsg,er;

low.obj: low.asm
$(ASM) low;
l.obj: low.asm
$(ASM) low,l;

u4_use.obj: u4_use.c
msc $(CFLAGS) /J u4_use;
us.obj: u4_use.c
msc $(CFLAGS) /J u4_use,us;

u4_file.obj: u4_file.c
msc $(CFLAGS) /J u4_file;
fi.obj: u4_file.c
msc $(CFLAGS) /J u4_file,fi;

u4_util.obj: u4_util.c
msc $(CFLAGS) u4_util;
ut.obj: u4_util.c
msc $(CFLAGS) u4_util,ut;

util2.obj: util2.asm
$(ASM) util2;
ut2.obj: util2.asm
$(ASM) util2,ut2;

u4_main.obj: u4_main.c
msc $(CFLAGS) /J u4_main;
m.obj: u4_main.c
msc $(CFLAGS) /J u4_main,m;

u4_sound.obj: u4_sound.asm
$(ASM) u4_sound;
so.obj: u4_sound.asm
$(ASM) u4_sound,so;

u4_main2.obj: u4_main2.c
msc $(CFLAGS) /J u4_main2;
ma2.obj: u4_main2.c
msc $(CFLAGS) /J u4_main2,ma2;

u4_dos.obj: u4_dos.asm
$(ASM) u4_dos;
do.obj: u4_dos.asm
$(ASM) u4_dos,do;

u4_graph.obj: u4_graph.asm
$(ASM) u4_graph;
gr.obj: u4_graph.asm
$(ASM) u4_graph,gr;

u4_map.obj: u4_map.c
msc $(CFLAGS) /J u4_map;
ma.obj: u4_map.c
msc $(CFLAGS) /J u4_map,ma;

u4_end.obj: u4_end.c
msc $(CFLAGS) /J u4_end;
en.obj: u4_end.c
msc $(CFLAGS) /J u4_end,en;

u4_anim.obj: u4_anim.c
msc $(CFLAGS) /J u4_anim;
an.obj: u4_anim.c
msc $(CFLAGS) /J u4_anim,an;

u4_explo.obj: u4_explo.c
msc $(CFLAGS) u4_explo;
ex.obj: u4_explo.c
msc $(CFLAGS) u4_explo,ex;

u4_z.obj: u4_z.c
msc $(CFLAGS) u4_z;
z.obj: u4_z.c
msc $(CFLAGS) u4_z,z;

u4_cstes.obj: u4_cstes.c
msc $(CFLAGS) u4_cstes;
cs.obj: u4_cstes.c
msc $(CFLAGS) u4_cstes,cs;

u4_npc.obj: u4_npc.c
msc $(CFLAGS) u4_npc;
np.obj: u4_npc.c
msc $(CFLAGS) u4_npc,np;

u4_comba.obj: u4_comba.c
msc $(CFLAGS) /J u4_comba;
coa.obj: u4_comba.c
msc $(CFLAGS) /J u4_comba,coa;

u4_spell.obj: u4_spell.c
msc $(CFLAGS) /J u4_spell;
sp.obj: u4_spell.c
msc $(CFLAGS) /J u4_spell,sp;

u4_q_n_v.obj: u4_q_n_v.c
msc $(CFLAGS) /J u4_q_n_v;
q.obj: u4_q_n_v.c
msc $(CFLAGS) /J u4_q_n_v,q;

u4_get.obj: u4_get.c
msc $(CFLAGS) u4_get;
ge.obj: u4_get.c
msc $(CFLAGS) u4_get,ge;

u4_locate.obj: u4_locate.c
msc $(CFLAGS) u4_locate;
lo.obj: u4_locate.c
msc $(CFLAGS) u4_locate,lo;

u4_combb.obj: u4_combb.c
msc $(CFLAGS) /J u4_combb;
cob.obj: u4_combb.c
msc $(CFLAGS) /J u4_combb,cob;

u4_combc.obj: u4_combc.c
msc $(CFLAGS) u4_combc;
coc.obj: u4_combc.c
msc $(CFLAGS) u4_combc,coc;

u4_dng.obj: u4_dng.c
msc $(CFLAGS) u4_dng;
dn.obj: u4_dng.c
msc $(CFLAGS) u4_dng,dn;

u4_hole.obj: u4_hole.c
msc $(CFLAGS) u4_hole;
ho.obj: u4_hole.c
msc $(CFLAGS) u4_hole,ho;

u4_mix.obj: u4_mix.c
msc $(CFLAGS) u4_mix;
mi.obj: u4_mix.c
msc $(CFLAGS) u4_mix,mi;

u4_srch.obj: u4_srch.c
msc $(CFLAGS) u4_srch;
sr.obj: u4_srch.c
msc $(CFLAGS) u4_srch,sr;

u4_evt.obj: u4_evt.c
msc $(CFLAGS) u4_evt;
ev.obj: u4_evt.c
msc $(CFLAGS) u4_evt,ev;

u4_ai.obj: u4_ai.c
msc $(CFLAGS) u4_ai;
ai.obj: u4_ai.c
msc $(CFLAGS) u4_ai,ai;

u4_talk.obj: u4_talk.c
msc $(CFLAGS) u4_talk;
ta.obj: u4_talk.c
msc $(CFLAGS) u4_talk,ta;

u4_3d.obj: u4_3d.c
msc $(CFLAGS) u4_3d;
3d.obj: u4_3d.c
msc $(CFLAGS) u4_3d,3d;

u4_srch2.obj: u4_srch2.c
msc $(CFLAGS) u4_srch2;
sr2.obj: u4_srch2.c
msc $(CFLAGS) u4_srch2,sr2;

u4_peer.obj: u4_peer.c
msc $(CFLAGS) u4_peer;
pe.obj: u4_peer.c
msc $(CFLAGS) u4_peer,pe;

u4_init.obj: u4_init.c
msc $(CFLAGS) u4_init;
in.obj: u4_init.c
msc $(CFLAGS) u4_init,in;

u4_shops.obj: u4_shops.c
msc $(CFLAGS) u4_shops;
sh.obj: u4_shops.c
msc $(CFLAGS) u4_shops,sh;

u4_lb.obj: u4_lb.c
msc $(CFLAGS) u4_lb;
lb.obj: u4_lb.c
msc $(CFLAGS) u4_lb,lb;

u4_shrin.obj: u4_shrin.c
msc $(CFLAGS) u4_shrin;
shr.obj: u4_shrin.c
msc $(CFLAGS) u4_shrin,shr;
4 changes: 4 additions & 0 deletions SRC/u4.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
va er l us fi ut ut2 m so ma2 do gr ma en an ex z cs np coa sp q ge lo cob coc dn ho mi sr ev ai ta 3d sr2 pe in sh lb shr
u4_main