FrenkelS / Doom8088

Doom for 16-bit DOS computers
GNU General Public License v2.0
140 stars 5 forks source link

other compilers #17

Closed FrenkelS closed 9 months ago

FrenkelS commented 10 months ago

According to https://github.com/leikareipa/dccb Microsoft C/C++ v8 and Digital Mars C/C++ v8 produce faster code than Open Watcom,

https://github.com/tkchia/gcc-ia16 is also a contender.

FrenkelS commented 10 months ago

Right now the code uses the large memory model. I don't think gcc-ia16 supports that memory model. So I first have to make it compile with the medium memory model.

FrenkelS commented 10 months ago

Digital Mars doesn't support int64_t :(

FrenkelS commented 9 months ago

gcc-ia16 can compile Doom8088, but linking doesn't work. See https://github.com/FrenkelS/Doom8088/pull/24

Compiling p_mobj.c and p_spec.c with anything other than -O0 results in internal compiler errors:

p_mobj.c: In function ‘P_SpawnMobj’:
p_mobj.c:655:15: internal compiler error: in immed_wide_int_const, at emit-rtl.c:606
 mobj_t __far* P_SpawnMobj(fixed_t x,fixed_t y,fixed_t z,mobjtype_t type)

p_spec.c: In function ‘P_FindNextHighestFloor’:
p_spec.c:232:9: internal compiler error: in immed_wide_int_const, at emit-rtl.c:606
 fixed_t P_FindNextHighestFloor(sector_t __far* sec)
FrenkelS commented 9 months ago

Watcom can compile it with the medium memory model. See https://github.com/FrenkelS/Doom8088/pull/23

gcc-ia16 produces an executable that bombs with the message "Can't open DOOM1.WAD"

FrenkelS commented 9 months ago

gcc-ia16 can produce a working executable See https://github.com/FrenkelS/Doom8088/pull/24