Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-08-2023, 21:44
dion dion is offline
game tech
 
Join Date: Jan 2002
Posts: 173
Rept. Given: 16
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 9
Thanks Rcvd at 13 Times in 8 Posts
dion Reputation: 2
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?
Reply With Quote
  #2  
Old 10-09-2023, 04:00
Rufflito Rufflito is offline
Friend
 
Join Date: Sep 2023
Posts: 8
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
Rufflito Reputation: 0
Quote:
Originally Posted by dion View Post
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.
Reply With Quote
  #3  
Old 10-09-2023, 09:50
dion dion is offline
game tech
 
Join Date: Jan 2002
Posts: 173
Rept. Given: 16
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 9
Thanks Rcvd at 13 Times in 8 Posts
dion Reputation: 2
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.
Reply With Quote
  #4  
Old 10-09-2023, 16:05
chants chants is offline
VIP
 
Join Date: Jul 2016
Posts: 807
Rept. Given: 43
Rept. Rcvd 50 Times in 31 Posts
Thanks Given: 719
Thanks Rcvd at 1,114 Times in 515 Posts
chants Reputation: 51
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.
Reply With Quote
  #5  
Old 10-09-2023, 16:22
NON NON is offline
Banned User
 
Join Date: Sep 2023
Posts: 77
Rept. Given: 3
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 33
Thanks Rcvd at 21 Times in 16 Posts
NON Reputation: 2
Quote:
Originally Posted by chants View Post
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.
Reply With Quote
  #6  
Old 10-11-2023, 00:47
sendersu sendersu is offline
VIP
 
Join Date: Oct 2010
Posts: 1,172
Rept. Given: 334
Rept. Rcvd 233 Times in 123 Posts
Thanks Given: 276
Thanks Rcvd at 566 Times in 314 Posts
sendersu Reputation: 200-299 sendersu Reputation: 200-299 sendersu Reputation: 200-299
Quote:
Originally Posted by dion View Post
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
Reply With Quote
  #7  
Old 10-11-2023, 09:47
dion dion is offline
game tech
 
Join Date: Jan 2002
Posts: 173
Rept. Given: 16
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 9
Thanks Rcvd at 13 Times in 8 Posts
dion Reputation: 2
Quote:
Originally Posted by sendersu View Post
I"m wondering how did you manage to debug this kind of ancient stuff?
what kind of tools are you using
Using dosbox debugger.
Reply With Quote
The Following User Says Thank You to dion For This Useful Post:
sendersu (10-12-2023)
  #8  
Old 10-11-2023, 13:48
OldieHans OldieHans is offline
Friend
 
Join Date: Sep 2023
Posts: 8
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 3
Thanks Rcvd at 5 Times in 2 Posts
OldieHans Reputation: 1
Quote:
Originally Posted by sendersu View Post
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...

What a huge disparity...
Reply With Quote
  #9  
Old 11-02-2023, 21:14
dion dion is offline
game tech
 
Join Date: Jan 2002
Posts: 173
Rept. Given: 16
Rept. Rcvd 2 Times in 2 Posts
Thanks Given: 9
Thanks Rcvd at 13 Times in 8 Posts
dion Reputation: 2
for anyone need, i put my own tool here here
Reply With Quote
The Following 4 Users Say Thank You to dion For This Useful Post:
BlackWhite (11-02-2023), blue_devil (11-03-2023), darkBLACK (11-04-2023), LordGarfio (11-04-2023)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 07:24.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )