Short: Patches SetFunction() to new better one - V2.1 Author: mc6489@mclink.it (N. Salmoria), merlin@thule.no (E. Sauvageau) Uploader: Marco Lugo (hacking iol it) Type: util/boot Version: 2.1 Architecture: m68k-amigaos Distribution: CD and Aminet (Marco Lugo: This is the last version of SetMan made by Eric. He left the Amiga a few months ago. Thanks Eric for sending me the sources so I could do some work on it.) SetFunction Manager SetMan / SetManager V2.0 V1.0 : Copyright © 1991,1992 by Nicola Salmoria Via Piemonte 11 53100 Siena ITALY Internet: mc6489@mclink.it V2.1 : Copyright © 1998 by Eric Sauvageau 5338 10th Avenue Montreal, QC H1Y-2G6 CANADA (Snail address valid until late spring '98) Internet: merlin@thule.no http://www.thule.no/~merlin/ This program is FREEWARE. It is NOT, and will never be, public domain. Copy it as much as you can (provided no charge is made and the archive is left intact). It cannot be included in any commercial program without the written permission of the author. REQUIREMENTS ------------ Since V2.0, SetMan requires Kickstart 2.04 or better to run. SetManager will also require ClassAct 2.0 for its GUI (latest classes can be found on the Internet at ftp.warped.com /pub/amiga/classact or ftp.thule.no /pub/classact/). SetManList only requires Kickstart 2.04. NOVICE USERS ------------ The program 'SetMan' should be put in C: and executed as the first command in the startup-sequence. When I say first, I mean FIRST!! Run it even before SetPatch. If you're not expert with the Amiga operating system, all you need to know about SetMan is that it will, under certain circumstances, avoid GURUs. Read on for more infos. EXPERT USERS ------------ Let's go into details. There's a function in exec.library, whose name is SetFunction(). You know that Amiga libraries contain a 'jump table', where are stored the addresses of every function in the library. Library functions are always executed via the jump table, and NEVER through absolute addressing. SetFunction() allows the user to modify the jump table, in order to insert a custom routine in place of the standard one. For example, one could modify the DisplayBeep() vector to play a sound instead of flashing the screen. SetFunction() is a very useful feature of the Amiga operating system, but it has the major drawback that there's no system supervising of concurrent use of the same vector by different tasks. Under certain circumstances, that can be deadly. Before removing its custom vector, a program should check that it was not modified again. However, very few do that, and so if you do not terminate such program in REVERSE order of when you executed them, you'll probably get a system crash. SetMan modifies the SetFunction() vector, and inserts a custom routine which solves the previous problems. It keeps a linked list of all changes to the jump tables, and allows any program to remove its vector at any time. In this archive you will find two additional tools: SetManager - it is a Commodity that will allow you to view the list of all modified vectors, with the name of the program which inserted a custom routine, the address of that routine, and the current status. Status will usually be 'active'; if you double-click on the function name, you can disable it, thus removing the custom function. The third possible state is 'removed', which only occurs when you don't quit programs in the correct order I explained later. It's there for your information, but is absolutely no problem. When you exit the other program which uses the same vector, both will disappear from the list. NOTE: modified vectors are shown as 'offset' 'library name'. However, SetManager is able to read the standard 'xxx_lib.fd' files, provided by Commodore. Just specify the path where those files are located by using the FDPATH argument (by default, FD: will be scanned). With the help of these files, SetManager will display the true function names, instead of offsets. SetManList - a CLI command that lets you list the list of all modified vectors in a CLI, just like SetManager does. It supports two arguments: NOFD (do not parse .fd files) and FDPATH (location of your .fd files, FD: being the default). You can break the output by pressing Ctrl-C. PROGRAMMERS ----------- To know if SetMan is running, all you have to do is search for a public MsgPort named "SetMan". When running, you can safely install and remove patches at any time through SetFunction(), SetMan will take care of ensuring that any patches applied over yours is properly installed instead of the former one. BUGS AND INCOMPATIBILITIES -------------------------- There are no known bugs in this version of SetMan. A few more words should be spent on compatibility problems. Due to the very different procedures followed by the original SetFunction() and by SetMan, it's not possible to guarantee a 100% compatibility with every program around. Every effort has been made to avoid every possible problem; SetMan handles correctly every strange behaviour I could think about; the only way to confuse SetMan should be using two diffrent programs communicating through a message port and doing very strange things. I'm almost sure such things things should never happen. I've encountered a problem with a program called 'TurboTopaz', which refuses to quit saying that 'Vector has been changed'. That's true, 'cos SetMan puts a function of its own ahead of the custom one; if TurboTopaz used SetFunction(), it would receive in return the value it expects, but it reads directly the jump table, something I believe is not supported by Commodore. I use a lot of programs which call SetFunction(), and none of them has problems with SetMan. ACKNOWLEDGEMENT --------------- I'd like to thank Marco Ciuchini who pointed out an important incompatibility problem which I have been able to completely remove. (Eric: I'd like to thank Nicola for writing SetMan, and for sending me the sources so I could do some work on it. He's the real man behind SetMan, I merely updated it, especialy SetManager which I rewrote to offer some modern features it was missing like turning it into a Commodity and giving it a more advanced GUI.) ''' (o o) +------oOOO--(_)------------+ | | | INTEL OUTSIDE! | | | +------------------oOOO-----+ |__|__| || || ooO Ooo