Generic STOS Fixer v1.4

Click here to download the 27k .ZIP file


Contents:


Introduction:

When STOS was written, it was decided that to improve the speed of some commands the addresses of certain routines in the Operating System could be stored in a table at the beginning of the program to prevent them having to be looked up each time it is run. However, as these addresses change with every new release of the Operating System STOS had to be updated. While Mandarin still supported STOS this was OK, as they simply released a new version with the updated table, along with any bug fixes. However, as Mandarin no longer support STOS there have been no official releases containing new tables for any version of TOS greater than TOS 1.62. To get around this problem, any compiled STOS program can be 'fixed' which simply means replacing the table with a suitable table for the OS version - this is essentially what Mandarin would have done.

At this time, there are two STOS fixers available (with numorous versions), the latest version of each is called STOS Fix 3. However, neither of these is perfect. One, by Robert Quezada, only fixes the STOS program for the CURRENT version of TOS, thus making it necessary for the end user of the program, not the author to fix the program - this seems rather unprofessional. The other (so I am told - I don't have it), from Goodmans PDL, is only available from Goodmans, and is not available via FTP on the internet. Also, it places an advert for Goodmans PDL on any STOS program fixed with it -again, not very professional.

So, the solution is the Generic STOS Fixer. This fixes a STOS program for any 8 versions of TOS (unfortunately, at this time there are 14 versions, not including MagiC). Which versions are used is determined by the DEFxxxx.DAT files in the same directory as GENFIX.PRG, where xxxx is the TOS version number, and also the settings if you have used the GEM interface.

Supplied with this program are DEFxxxx.DAT files for all existing TOS versions from TOS 1.0 through to 4.92 except TOS 3.05 (if anyone has this version, and has a joystick, please get in touch - I would like to obtain this versions.) Which files are omitted is up to the person fixing the program.

It is no longer necessary for authors to fix their programs with this or any other fixer before release - they should simply install my new patched loaders for the interpreter and compiler (BASIC207.TOS and COMP_207.PRG) before they compile their software. Generic STOS Fixer is now only needed if the author did not do this before releasing their software.

One interesting point is that if a STOS program is fixed for TOS 2.06, then it appears to work under GEMulator - the ST emulator for the PC made by BraSoft. I am currently in the process of trying to establish if STOS will run under STonX - the ST emulator for Unix machines (eg Linux, SGI's, Sun's etc.) After the success under GEMulator, I suspect that it will work.


Usage instructions:

This program will work in a number of ways -

After fixing has taken place (if successful) there will be two files - one the fixed program, and also a second (.123) which will be the original unfixed program. This is so that should anything go wrong, you still have a backup.

You CAN use this program to fix the BASIC206.PRG program which launches the STOS editor - simply fix in exactly the same way as any other STOS program. Also, if you fix the COMP207.PRG file in the compiler folder, all programs compiled will be fixed for this set of TOS versions.


Limitations.

This program will not necessarily fix a program which has already been fixed by either this fixer, or either of the other two fixers available - always fix straight after compilation to solve problems of this kind. (This is dependent on the 'default' file selected previously.)

Also, programs which have been packed will not be fixable - use NewDepack from Sinister Developments to decompress the program. (this program is no longer in development as SD. have left the Atari scene. However, Mike Watson of Sinister Developments is prepared to try and answer any questions via email. at the address mike@sindev.co.uk)

Programs which use extensions may still not work after being fixed - check the Falcon compatibility section below for more details.

I cannot guarantee that all programs can be fixed. However, if after fixing it successfully works on your machine, it probably works under all OS versions that you have specified. If STOS Fix 3 by R.Quezada does not fix a program, it is highly unlikely that this program will have any more luck.


Falcon Compatibility.

The Falcon has a number of major changes from the ST - this causes programs which have been writen without considering these changes likely to cause a crash. However, it is possible to write a program in STOS that will work without problems on the Falcon.

The things to consider with regard to the Falcon are:

If at all possible you should try and get your STOS programs tested on a Falcon before releasing it. However, if you cannot it is still worth doing the above so that you have a higher chance of it working correctly.

Dont forget that your program will run faster on a Falcon, so just because it works doesn't mean that it is playable. This is a problem which I have no answer to. All I can say is if speed makes a difference, it should definately be playtested on a Falcon.


Screen shot...

Here is a screen shot of two copies of the fixer v1.0 running... one of them has been iconified... The documentation is also being viewed in a window... Oh, this is running under MiNT 1.12, AES 4.1 on my TOS 4.04 Falcon in 640x480x16 mode. This program is usable under XaAES beta 6, N.AES, Magic 4 and MultiTOS. However both oAESis 0.76 has problems with the non-modal dialogues, and so will not work with v1.3 and above.


Known bugs/problems:

The entire program is loaded into memory - thus making it difficult to fix BIG programs on a 520 (or maybe even 1040). [Thats fine with me - I have 8Mb in my Falcon. :-)]

As mentioned above, you cannot fix a program twice. This is due to the method which is used to identify a STOS program - it will patch the wrong part of the file of a program already fixed. This may be changed in later versions (but I think this is unlikely).

Under MagiC GenFIX will not get a correct name under the desk-menu like MultiTOS - this is because I am following Atari's documentation and checking for AES 4.0 for this functionality - not AES 3.99. As I do not have MagiC (and do not intend to buy it) I refuse to gaurantee that this program will work under MagiC, as the programmers are not following Atari's documented functionality (to quote Andreas Kroeme in a recent usenet discussion - "Atari didn't always do things the best way". So? They set the standard for the OS on *Atari* computers, so if you are writing a *compatible* OS then FOLLOW THE STANDARD. [rant off])


Legal stuff:

This program is released as FREEWARE. As such, this program may be distributed in any form (PD libaries, electronic file transfer, coverdisks etc.) so long as none of the files enclosed are modified, or omitted.

Also, there is no waranty that this program will work - explicit or implied. This program directly modifies program files - thus there is a potential for programs to be damaged - you fix programs AT YOUR OWN RISK. Always run this program on a backup.

Although this program is Freeware, any donations are welcome, and would be gratefully received. :-)


Credits:

Original fixer code (in STOS) Les Greenhalgh
C implementation Anthony Jacques
DEFxxxx.DAT files created by STOS Fix 3, by Robert Quezada

Thanks to everyone who sent me the DEFxxxx.DAT files so that I could build up a complete collection... (excluding 3.05).

Contact info:

Anthony Jacques:

      70 West Avenue,
      Oldfield Park
      Bath
      Bath and North East Somerset (or simply BaNES)
      BA2 3QD
      England
email: jacquesa@zetnet.co.uk WWW: http://www.users.zetnet.co.uk/jacquesa/

Les Greenhalgh:

      24 Park Avenue
      Rudloe Manor
      Corsham
      Wiltshire
      SN13 0JT
      England

Robert Quezada:

I have no contact address for Robert - the email address in his STOS Fix 3 documentation is no longer valid.


Well, thats about all you need to know....

Anthony Jacques, 11/2/96


Revision History

Version 1.4
Added DEF files for 3.01 and 3.06 after a little rant on comp.sys.atari.programmer. :)
Updated doc files to reflect my work on the STOS loader.
Version 1.3
Fixed the various GEM bugs.
Speeded up file read/write functions.
Added non-modal dialogues.
Re-organised code - more elegent, and much smaller! (binary size dropped by 10k - thats about 20%)
Version 1.2
Improved the documentation in response to user questions.
Removed the STUPID debugging aid that I left in the previous release. (the 'error' message. Why did knowone tell me about this BEFORE I sent it to STF?)
Version 1.1
The version released on ST Format coverdisk 83.
Full functionality, just a little slow with a 'fake' error message and a few redrawing bugs on AES versions < 3.30 (Falcon).

Back to the index page...