Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   adding more space to linear executable dos games (https://forum.exetools.com/showthread.php?t=20671)

dion 10-08-2023 21:44

adding more space to linear executable dos games
 
Hi,
i am working on an old LE exe dos game, and would like to change some opcodes. the problem is, i need more space on the code segment to make my changes. i have search the internet for tools, but i don't find any. Does anyone know something like that?

Rufflito 10-09-2023 04:00

Quote:

Originally Posted by dion (Post 128657)
Hi,
i am working on an old LE exe dos game, and would like to change some opcodes. the problem is, i need more space on the code segment to make my changes. i have search the internet for tools, but i don't find any. Does anyone know something like that?

Creating code caves is trivial for PEs but if it's for a native DOS app I need to see the executable first (some very old ones impose the 640 kb limit for RAM). Consider posting it?
Or for a start you can do a google search for "code caves" if you didn't already do so.

dion 10-09-2023 09:50

Yes, i have search for code cave, but nothing for LE file.
The game was compiled with watcom c++ with dos4gw stub. It was mix of 16 and 32 bit program. The program itself is 32 bit, the loader is 16 bit.

For a reason, i would not post the file here, but there seems to be many dos4gw games out there. There is a github that make program to edit LE, but it is not implemented yet. I also see a wiki that have tutorial's title the same with this thread, but it was empty, unfortunately.

chants 10-09-2023 16:05

Is there padding between functions? Often single byte padding of 0s, int3s, nops will pad functions to align them, not sure in the old LE exes if this was common. The only key is to jump there and back making sure to not interfere with any code containing relocated addresses.

NON 10-09-2023 16:22

Quote:

Originally Posted by chants (Post 128669)
Is there padding between functions? Often single byte padding of 0s, int3s, nops will pad functions to align them, not sure in the old LE exes if this was common. The only key is to jump there and back making sure to not interfere with any code containing relocated addresses.

It's much better to add another new section. Then no major limits to the bytes you can add.

sendersu 10-11-2023 00:47

Quote:

Originally Posted by dion (Post 128657)
Hi,
i am working on an old LE exe dos game, and would like to change some opcodes. the problem is, i need more space on the code segment to make my changes. i have search the internet for tools, but i don't find any. Does anyone know something like that?

I"m wondering how did you manage to debug this kind of ancient stuff?
what kind of tools are you using

dion 10-11-2023 09:47

Quote:

Originally Posted by sendersu (Post 128702)
I"m wondering how did you manage to debug this kind of ancient stuff?
what kind of tools are you using

Using dosbox debugger.

OldieHans 10-11-2023 13:48

Quote:

Originally Posted by sendersu (Post 128702)
I"m wondering how did you manage to debug this kind of ancient stuff?
what kind of tools are you using

That is not the most important question here...
The most shocking question that is staring at me is, how someone (user @dion) with just 2... That is right... Someone with just TWO freaking reps can gain the VIP status in this forum while many a genuine users need to wait for a day to get their posts 'approved' by the admins... :rolleyes:

What a huge disparity...

dion 11-02-2023 21:14

for anyone need, i put my own tool here here :)


All times are GMT +8. The time now is 21:49.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX