Re: A82: Dying Eyes demo for ASH 3.0 releas


[Prev][Next][Index][Thread]

Re: A82: Dying Eyes demo for ASH 3.0 releas




At 11:12 PM 12/8/97 -0600, you wrote:
>So Thomas, with this relocation thing you think will work. How could 
>somebody, lets say ANYBODY, who needs to use a relocation method to make 
>his/her game work that is over 14k use this relocation method.  Please 
>explain further how this will work. Like type some code with it that I 
>could try!!!!! Or just write some simple relocation routine that could 
>be cut and pasted into a program.
>~Ilya

Okay, I think you know pretty much how to search for the start of the
program (I tend to use a 15-20 byte checksum containing the first few bytes
of the program, however, searching the VAT would be faster and more
efficient).  So, once you have found the program, pick some place in memory
(most likely the byte right after the relocator program...difficult, but
possible to do) to move the program to (make sure START_ADDR points to this
location or the game will be screwed up).  Now take the first, let's say 20
bytes, and copy it into the TEXT_MEM.  Now move everything, starting from
the START_ADDR of the game, down 20 bytes and move the 20 bytes in the
TEXT_MEM into the START_ADDR location.  Keep doing this until you have the
entire program copied.  To restore everything, just reverse the process
before returning to ASH, or OS-82 (which would do the same thing if you
wanted relocation in that shell also).  Also, if you wanted to move memory
faster, just copy more bytes at a time to/from the TEXT_MEM.  I'm too busy
right now to make some code for this, but you can pretty much figure out
how to do it.  I must warn you that you have to determine where the file
ends (to the byte) since seperating programs such as Game Wizard v2.0 could
be devastating.  BTW, I had to use a checksum in Game Wizard v2.0 because
ASH relocates memory without updating the VAT.

Hope that helps a bit,

                 Thomas J. Hruska -- thruska@tir.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
         http://www.geocities.com/SiliconValley/Heights/8504
                    http://shinelight.home.ml.org

  Spam-Fighter code is:  14806560   (New technique to fighting spam)
  Enter "Spam-Fighter:  XXXXXXXX" in the body of a personal message
  to thruska@tir.com.  Otherwise the message will be filtered as spam.


References: