Embed DOS4G/W or DOS32 within a normal EXE DOS file

Getting old DOS games working on modern hardware. (DOSBox topics belong in DOSBox areas below, not here).

Embed DOS4G/W or DOS32 within a normal EXE DOS file

Postby aries-mu » 2018-7-26 @ 13:43

Hi all,

here's something that, as a kid, I've always dreamed to do and had no idea who to ask.

I noticed that, all of the sudden, games started using this DOS4G/W thing, which was loaded before the game itself. I figured that it was to overcome the 640 KB memory limit.
I remember I even tried to guess, in the EXE file, where would the DOS4G/W "stuff" (all those ascii codes) finished and where the actual game started, copying it, and pasting it on top of another non-DOS4G/W file and see what happened. Nothing useful happened of course.
That was the best I could try (hey I was about 15 yo!).

But now there's the internet lol!

Do you know if it's possible to take any DOS executable file of app or game, kind of de-compile and "blend" it with a DOS4G/W or DOS32 code, and re-compile it, to have that program or game use the extended memory too?

Thanks!
They said therefore to him: Who are you?
Jesus said to them: The beginning, who also speak unto you
aries-mu
Member
 
Posts: 421
Joined: 2016-7-11 @ 00:23

Re: Embed DOS4G/W or DOS32 within a normal EXE DOS file

Postby dr_st » 2018-7-26 @ 13:48

What would be the point?

If the DOS executable works, it means that it figured out its own way around the 640K memory limit. Maybe it's enough for the program, maybe they implemented their own routines to use extended/expanded memory.
User avatar
dr_st
Oldbie
 
Posts: 1982
Joined: 2015-4-09 @ 07:18

Re: Embed DOS4G/W or DOS32 within a normal EXE DOS file

Postby aries-mu » 2018-7-26 @ 13:49

dr_st wrote:What would be the point?

If the DOS executable works, it means that it figured out its own way around the 640K memory limit. Maybe it's enough for the program, maybe they implemented their own routines to use extended/expanded memory.


Thanks.
I'm not referring to any exe in particular.
Just for the sake of doing it I mean.
They said therefore to him: Who are you?
Jesus said to them: The beginning, who also speak unto you
aries-mu
Member
 
Posts: 421
Joined: 2016-7-11 @ 00:23

Re: Embed DOS4G/W or DOS32 within a normal EXE DOS file

Postby dr_st » 2018-7-26 @ 13:54

Then I believe the answer is "no".

You will need to modify the memory usage model of your program, which for DOS applications is often a very fundamental thing. If you have the source code of the program, you can study it and modify it to use a DOS extender, then use Watcom to build it and bind it with DOS4GW, or the equivalent for DOS32A.

In the case you describe - you don't have the source, and working around bare assembly instructions will only take you so far.
User avatar
dr_st
Oldbie
 
Posts: 1982
Joined: 2015-4-09 @ 07:18

Re: Embed DOS4G/W or DOS32 within a normal EXE DOS file

Postby aries-mu » 2018-7-26 @ 14:02

dr_st wrote:Then I believe the answer is "no".

You will need to modify the memory usage model of your program, which for DOS applications is often a very fundamental thing. If you have the source code of the program, you can study it and modify it to use a DOS extender, then use Watcom to build it and bind it with DOS4GW, or the equivalent for DOS32A.

In the case you describe - you don't have the source, and working around bare assembly instructions will only take you so far.



Thanks! I got the answer I was looking for!!
They said therefore to him: Who are you?
Jesus said to them: The beginning, who also speak unto you
aries-mu
Member
 
Posts: 421
Joined: 2016-7-11 @ 00:23


Return to DOS

Who is online

Users browsing this forum: No registered users and 1 guest