A82: Game Wizard v2.0 bug discovered!!!


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

A82: Game Wizard v2.0 bug discovered!!!




As I was sitting in class today I thought of Game Wizard and why it crashed
when it was the first program listed in the ASH menu but didn't ever crash
when it was the last.  Finally it dawned on me that it had to do with
relocation in ASH.  For those of you who don't understand relocation, let
me show you how ASH implements it (as far as I can tell):

1)  User selects a program in memory starting at a specific address and
having a specific size.
2)  The relocation routine is done by starting at the relocated address and
swapping bytes with the start of the program that is to be run.  This
process continues until the entire program is moved.
3)  The program is called.

This method is okay except when Game Wizard is located at any point of the
relocation.  This happens most when Game Wizard is before any other ASM
program and that program is run.  What happens is Game Wizard is torn apart
during the relocation process and the interrupt checksum function assumes
that it is in one piece and not two.  So, when it calls the routine to
enter Game Wizard, unpredictable things can happen which will ultimately
result in a crash.  So, in reality the bug isn't my fault but Dines
Justesen's for using a faulty relocation routine.

HINT:  If you really want to use Game Wizard v2.0, just reload it back onto
your calc whenever you wish to use a game so that it will appear as the
last item on the ASH menu.

HINT to Dines:  Use the block relocation method that I previously have
mentioned which will preserve programs such as Game Wizard and will allow
for other programs like Dying Eyes (which also has a problem with
relocation due to it's size of over 13K).


                 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.