VOGONS


First post, by jez

User metadata
Rank Member
Rank
Member

I'm trying to work through the disassembly of Pizza Tycoon (PT.EXE) and I think I got to the bit where it's about to switch to protected mode because it does a far jump and IDA loses track of the sub. As it spits out the DOS/4GW banner upon loading, I naturally assumed it was reading the contents of DOS4GW.EXE into memory and jumping to that to execute the extender...

The attachment screenie1.png is no longer available

I thought I'd just prove that by deleting DOS4GW.EXE and making sure it didn't work, so I ran it again...

The attachment screenie2.png is no longer available

Erm... the game runs and plays fine, just with a different banner, now DOS/4G.

What's going on here? The main EXE apparently has all the DOS/4G code embedded in it to run fine, yet there's a 248KB DOS4GW.EXE file in the directory that exists just to... cause a different startup banner? Is it really completely superfluous? If it finds DOS4GW.EXE it is definitely loading and running it because when I hex edit the banner in DOS4GW.EXE to be different it outputs the different banner and when I put nonsense bytes in DOS4GW.EXE it crashes.

My guess is that the file was typically bundled in case DOS/4G wasn't embedded in the EXE, but companies would sometimes embed it and then bundle DOS4GW.EXE anyway even though it was completely unnecessary. Am I missing something?

== Jez ==

Reply 1 of 2, by Grzyb

User metadata
Rank l33t
Rank
l33t

Make sure there's no DOS4GW.EXE in PATH.

Nie rzucim ziemi, skąd nasz root!

Reply 2 of 2, by jez

User metadata
Rank Member
Rank
Member

Hah, you're right. There was one in PATH. Remove that and I get a stub loader error msg.

== Jez ==