3 ms·
I am confused on why the polglot program is required, especially PE files are designed to contain MZ files (the MSDOS format), and Doom is not greater than 2GB
by zinekeller 6y ago
I am confused on why the polglot program is required, especially PE files are designed to contain MZ files (the MSDOS format), and Doom is not greater than 2GB (half the limit of MZ+PE file). Is there an alignment issue on the DOS version of Doom that requires this trickery? Possible licensing issues?
- nneonneo 6y agoAt the very start I actually built the binary using the usual strategy of including a big DOS stub, but it wouldn’t load on Windows 10. I’m not entirely sure why, but I believe it’s because the next_offset value in the MZ header was too big - >= 4096 would make it fail. So I resorted to stuffing the PE header inside the MZ header after suitably expanding it.