@database "SystemPatch.guide" @author "Sante" @remark "$VER: SystemPatch Guide 1.15 (18 September 2004)" @node MAIN "SystemPatch Guide" SystemPatch 2.4 (18/09/2004) Guide version 1.15 _____________________________________________________________________________________________ Sections of this guide - First be sure to read the @{"disclaimer" link DISC} notice - Look at the @{"what's new" link NEW} page to see what is changed since last public version - If you don't know what we are talking about: @{"what is it" link DESCRIPTION} page - System @{"requirements" link REQS} to run SystemPatch - A list of @{"patches installed" link PATCHES} by SystemPatch - If you want to use my program please read its @{"usage and installation" link INST} - You can spread this around the world: @{"distribution" link DIST} - People I have to @{"thank" link THANKS} - Hoping there are no serious @{"bugs" link BUGS} - A short @{"history" link HISTORY} page remembering all versions - Now take a look at the @{"author" link AUTHOR} - Users considerations and some answer to your @{"questions" link FAQ} All work done by Sante Nocciolino © 2000-2004 @endnode @node DISC "Disclaimer" Disclaimer ********** THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDER AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. @endnode @node FAQ "FAQ" FAQ *** Q: can I use exec patches with OS 3.9+BoingBag2? A: yes, you can use them without problems. Q: can I remove BlazeWCP 1.74? A: yes, SystemPatch uses BlazeWCP 1.74 code. Q: can I remove FText from my user-startup? A: yes, you can. Q: it's your WaitBlit implementation faster than HogWaitBlit in BlizKick? A: no, they operate in the same way but I suggest you do not use HogWaitBlit: replacing functions in ROM is more effective than patches but in some circumstances HogWaitBlit can cause corruptions in serial comunications(I've experimented this on my Amiga). Q: can I use SystemPatch on a system with gfx board? A: no, SystemPatch is for Amiga without gfx board, it works on AGA (I only have my A1200 with 68060 for debugging). Some people reported me that my program works with Picasso gfx boards and Picasso96 software but some bugs appear. Q: need I your exec and vectors pacthes if I have exec 44.1beta4 by Harry Sintonen? A: you don't need a thing until you discover its utility. Harry's exec it's very good so I think that if you don't like having too much patches installed on your OS you can avoid the use of my patches. Q: can I use SystemPatch with NOLAYERS and NOGFX on my CGFX system? A: yes, you can! C: I tested the new SystemPatch and it works on my UAE 0.8.25 PPC, the only problem is the GUI patch so I use NOGUI, I run PowerIcons (It's not displayed correctly) and Workbench3.5 so I use NOUTIL as well, system runs whit boingbag2 installed, I can feel the difference. C: I`m using this on Amithlon, and the system `seems` to go slightly faster now. Used it with NOUTIL and NOGFX. @endnode @node AUTHOR "Author" Author ****** If this program does not crash on your system or you think it is useful let me know about it. Write me! Congratulations and insults are welcome or if you want to send me anything you like you can( comments, sources, progs, other patches...). Sante Nocciolino E-mail: ziosante@libero.it Home-page: http://digilander.iol.it/ziosante @endnode @node NEW "What's new" What's new ********** Changes since last public version: - Added SetRGB32() - Better task exclusion implementation for AllocRaster(), now opening WB windows do not consume chip ram at all but some program don't like it so you have to exclude non tollerant programs editing FAllocRasterExcludeList in ENVARC:. @endnode @node DESCRIPTION "Description" Description *********** ABOUT It's merely a try to implement a patch that could group part of known patches for 68k Amigas, with some implemented by me. A sort of "all in one" patch. USEFUL SystemPatch is intended to be useful on AGA systems. SystemPatch replaces some functions of the operating system with optimized ones, increasing the system efficiency in a multitasking environment. If you don't have OS3.5 or OS3.9, SystemPatch can fix some bugs in exec.library for you because the code of its patches takes care of known bugs of old execs. If you have FBlit running SystemPatch takes care of it, installing appropiate patches that require it and excludes patches that conflict with it. USELESS If you have a MMU and the mmu.library by Thomas Ritcher, SystemPatch can protect the code used by installed patches from being over-written( this is not true for quicklayers.library). FUTURE There are some speedups to quicklayers.library I've in mind but I lack the time to implement them. @endnode @node REQS "Requirements" Requirements ************ MINIMUM: - OS3.0+ - CPU 68020+ - FAST RAM SUGGESTED (for full usage): - OS3.0+ - CPU 68020+ - FAST RAM - AGA - FBlit V3+ - a MMU and the mmu.library V41+ by Thomas Richter @endnode @node PATCHES "Installed patches" Installed patches ***************** It patches these functions: in graphics.library DisownBlitter() @{"WaitBlit()" link waitblit} QBlit() QBSBlit() WaitTOF() RectFill() SetAPen() SetBPen() SetDrMd() SetABPenDrMd() WritePixel() OwnBlitter() DisownBlitter() LockLayerRom() UnLockLayerRom() BltClear() based on QBC 1.1 by Rick Pratt WritePixelLine8() | WritePixelArray8() | based on BlazeWCP 1.74 by Rick Pratt WriteChunkyPixels() | @{"Text()" link text} ReadPixelLine8() based on code written in 1994 by Morten Eriksen ClearRegion() InitArea() corrects a bug of graphics.library(see romfixes modules from BlizKick) GetBitMapAttr() @{"AllocRaster()" link allocraster} requires FBlit FreeRaster() AddBob() Draw() not installed if FBlit is running ClearScreen() ClearEOL() SetFont() TextLength() InitRastPort() BltBitMap() not installed if FBlit is running @{"SetRGB32()" link setrgb32} in exec.library Forbid() Schedule() Reschedule() GetMsg() PutMsg() ReplyMsg() Enqueue() Signal() SetSignal() ExitIntr() DisPatch() Cause() Exception() Wait() InitSemaphore() AddSemaphore() ReleaseSemaphore() AddPort() WaitPort() RemPort() RemSemaphore() RemResource() SetExcept() Insert() AddHead() Remove() RemHead() RemTail() Switch() DoIO() WaitIO() in utility.library (not installed on 040/060) SMult32() UMult32() SMult64() UMult64() SDivMod32() UDivMod32() It loads the @{"quicklayers.library" link quicklayers} to speed up layers.library. It replaces Auto Vector Interrupts routines with faster ones. It replaces BLIT interrupt vector. These patches do not interfere with other programs like: FBlit, SysPatch (best if you run SystemPatch after it), CMQ (and other CopyMem() patches), MCP (you have to disable QuickLayers patch), PoolMem (and other memory allocation patches), Executive, Mult64Patch. NOTE: Routines that could be dangerous on 040/060 systems are not installed. @endnode @node text "Text()" Installed only if FBlit is running, based on FText 1.7 by Rick Pratt @endnode @node waitblit "WaitBlit()" Turns on DMAF_BLITHOG in DMACON write register while the Blitter is busy and it turns off the flag on exit. @endnode @node quicklayers "quicklayers.library" version 0.49 @endnode @node allocraster "AllocRaster()" It redirects memory allocations to MEMF_ANY instead of MEMF_CHIP. Tasks can be excluded from promotion creating the ENV:FAllocRasterExcludeList file which contains a list of tasks; each task name must be separated by a carriage return. If your program start but you can not see anything probably task must be excluded. To determine task name you can use a monitor program like Scout. CLI processes can be listed by typing "status" from shell. Example of dangerous tasks that must be excluded: Quake68k, BloodNet AGA. Requires FBlit by Stephen Brookes. @endnode @node setrgb32 "SetRGB32()" SetRGB32() is patched to use LoadRGB32(). Autodocs says: "LoadRGB32 is faster than SetRGB32, even for one color." @endnode @node INST "Installation" Installation ************ SystemPatch should be copied to your C: directory and the supplied quicklayers.library to your LIBS: directory. You can run it from shell or from your user-startup just typing the program name. If you have not or not enough fast memory or inadeguate processor it exits without installing anything. If you have FBlit you should run SystemPatch after it. If you have Executive, it's best to launch it after SystemPatch. You should disable MCP QuickLayers patch unless you use the NOLAYERS option. Parameters: QUIET it doesn't output any message if everything ok. NOINTS it doesn't install faster Auto Vector Interrupts and Interrupt Vectors. NOEXEC exec.library patches are not installed. NOGFX graphics.library patches are not installed. NOUTIL utility.library patches are not installed (recommended on OS 3.5+). MMU this option needs mmu.library V41+ and a MMU in your processor to work. It marks memory used by patches as ROM memory, so faulty programs can not overwrite them (I mean that code can not be damaged, but functions can always be over-patched by other software). Use this option with care because it is yet experimental. NOLAYERS it doesn't load quicklayers.library. - You can disable single patches by typing the unneeded patch prefixed by minus; type "SystemPatch ?" to see the patches you can disable. @endnode @node DIST "Distribution" Distribution ************ SystemPatch is FREEWARE. You can distribute the original archive around the world as long as no charges are collected. This archive may be included in freeware collections. @endnode @node THANKS "THANKS" Thanks ****** Riccardo Micci (for 68060 testing). Rick Pratt for his FText, QuickBC, BlazeWCP. Morten Eriksen for his planar to chunky code. Thomas Richter for mmu.library. Luca 'Hexaae' Longone for bugs hunting. Simone Bevilacqua, Kev Harrison, Balogh Karoly, Brian Sharman. Everyone who helped me! Last but not least: AMIGA! @endnode @node BUGS "Known bugs" BUGS **** Every new version corrects some bug and introduces new ones, so stay warned. Text() patch is installed only if you have FBlit running, but SystemPatch does not check if FBlit is V3+ (as needed). Some people use my patch on Amiga with Picasso gfx board reporting me only one problem: smart refresh windows hang the system so you have to use simple refreh. Sorry for this, but I've not the possibility to debug my patch on systems with gfx boards. SystemPatch 2.3+ seems to introduce problems with AmIRC, since AmIRC crashes anyway on my system I've not the possibility to find what's the problem; I hope you help me to discover the bug so if you experience problems with AmIRC send me an email. ...normal users have to fill this page. Tested on : A1200 OS3.0 68020+68882 8 Megs Fast Ram A1200 OS3.0 Blizzard IV 16 Megs Fast Ram A1200 OS3.5+BoingBag2a Blizzard IV 16 Megs Fast Ram A1200 OS3.5 68060/50 16 Megs Fast Ram A1200 OS3.9+BoingBag1 68030+68882 16Megs Fast Ram A1200 OS3.9+BoingBag2 68060/66 64Megs Fast Ram WinUAE @endnode @node HISTORY "History" History ******* NOTE: beta versions usually are not released to the public - 2.4 (18/09/2004) Added SetRGB32() patch. AllocRaster() allocs to MEMF_ANY instead of MEMF_FAST. Finally done a better task exclusion system for AllocRaster(). - 2.3 (08/04/2004) fixed bugs in AllocRaster(); some WB games like VChess, MineRunner, ... was saying there was not enough memory(reported by Luca "Hexaae" Longone). - 2.3ß (28/02/2004) a lot of small enhancements, minor speedups to some gfx functions and bugfixes. AllocRaster() patch causes probelms with games like Quake68k and BloodNet AGA, now fixed(reported by Luca "Hexaae" Longone). WritePixel() bug that causes system freezing with Octamed SoundStudio when using its Synthetic Sound Editor(reported by Luca "Hexaae" Longone). ENV:FAllocRasterExcludeList can contain a list of tasks to be excluded from AllocRaster() chip to fast memory promotion. I've to do a better implementation for the task exclusion of AllocRaster() patch. Added patches for non FBlit systems: BltBitMap(), Draw(), BltClear(). Previous BltClear() required FBlit but was installed too when FBlit was not running. Added: ClearScreen(), ClearEOL(), InitRastPort(), TextLength(), SetFont(). Other improvements I don't remember. - 2.2 (10/01/2004) removed RemIBob() because buggy. - 2.1d (12/12/2003) added AllocRaster(), AddBob(), RemIBob() patches. - 2.1b49(26/08/2003) only updated quicklayers.library: ScrollLayer() removed, SwapBitsRastPortClipRect() a little faster. - 2.1b (01/08/2003) streamlined code to gain some little speed. quicklayers.library is now version 0.48 and has new patches: DoHookClipRects(), ScrollLayer(), SwapBitsRastPortClipRect(). - 2.1 (27/04/2003) added possibility to disable single patches. corrected bugs in exec patches. Added WaitIO(), DoIO(), InitArea(), ClearRegion(), GetBitMapAttr(). quicklayers.library is now linked using PhxLnk. - 2.0d (04/04/2003) corrected my mistake in BltClear030() that could cause problems on 68030 processors; removed a problem with Switch() on FPU systems; streamlined code in Reschedule(); added some output strings; corrected bugs in error handling of MMU code. - 2.0c (02/03/2003) updated graphics patches to BlazeWCP 1.74 code; added ReadPixelLine8() patch; corrected a bug in Exception(). - 2.0b (18/01/2002) minor changes to installation code. Streamlined quicklayers.library. - 2.0a (16/01/2002) created the included quicklayers.library. - 2.0 (15/09/2001) introduced new layers.library patches. - 1.9d (08/08/2001) 3rd beta release. Aggressive memory protection is used if MuForce is running. - 1.9d (31/07/2001) 2nd beta release. Cleaned up code a little. Included a little GUI interface. - 1.9d (19/07/2001) Beta release. Added some error strings for MMU code. Added WritePixelLine8(), WritePixelArray8(), WriteChunkyPixels(), BltClear(), Text(). - 1.9c (09/07/2001) Beta release. Cleaned MMU handling code. Added more MMU errors recognition. Now MMU handling code should be nearly complete. - 1.9c This is an alpha release. Added MMU option; now you can protect installed patches from being overwritten by faulty programs. - 1.9b Removed DoHookClipRects() becase was buggy on OS3.9(try to run WBClock with layers.library patch installed). - 1.9a Bugfixed patching code. Now compiled with Phxass (was compiled with Snma before this release). - 1.9 Added gfx patches: RectFill(), SetAPen(), SetBPen(), SetDrMd(), SetABPenDrMd(), WritePixel(), OwnBlitter(), DisownBlitter(), LockLayerRom(), UnLockLayerRom(). - 1.8fß Bug fixed on command line parser. - 1.8f Added command line parameters and some output text. - 1.8e Readded Switch(), GetMsg(). Reworked code a little. Reworked installation code; some patches are not installed on 040/060 systems. - 1.8d Faster WaitBlit(). Added WaitTOF(). - 1.8c Now if you own a 68040/68060 the utility.library patches are no more installed. Re-added Exception(), Wait(), InitSemaphore(), ReleaseSemaphore(), AddSemaphore(), AddPort(), WaitPort(), RemPort(), SetExcept(), Insert(), AddHead(), Remove(), RemHead(), RemTail(), RemResource(), RemSemaphore(). - 1.8b Added DisPatch(), Cause(). - 1.8a Added Signal(), SetSignal(), Enqueue(), ExitIntr(). - 1.8 Totally rewritten. Lot of patches removed because of problems with various Hardware. - 1.7b New UDivMod32() and SDivMod32() patches: these make a control on operands before taking division to avoid divide by zero errors. This fixes problems with programs that call that functions with wrong arguments(causing divide by zero errors). - 1.7 Removed Interrupts Vector patches because of a bug with mfm decoding of trackdisk. - 1.6f General speedup to interrupt vectors and auto vector interrupts. - 1.6e Corrected a bug in SOFTINT. Little speedup to BLIT. - 1.6d Reworked code for a better use of caches. - 1.6c Little speedup to InitRastPort(). - 1.6 Added AreaMove(), EraseRect(), ReleaseSemaphore(). Added Interrupt Vectors patches (see patches list in this doc). - 1.5g Added InitSemaphore(), AddSemaphore(), AddPort(), RemResource(), RemSemaphore(). Little speedup to Switch() and DoHookClipRects(). - 1.5f Little speedup to DoHookClipRects(). Changed the installation code. - 1.5e Nothing changed except the source. Now it uses CopyMemQuick() to install the patches. - 1.5d Added DoHookClipRects() patch. - 1.5c Re-added Switch(), now works perfectly. If Executive is launched this patch is not installed. - 1.5b Speeded up Auto Vector Interrupts. - 1.5a New Wait(). Some misc speedups. Aestetical changes to source. - 1.5 Restored old WaitBlit() patch (version 1.2 of SystemPatch) for safety reasons. Added utility.library patches. Reworked source. New Wait(). - 1.4 Removed a bug in QBlit() patch. Added QBSBlit() patch. - 1.3 Changed WaitBlit() patch (it's a little faster to return if blitter is not busy). Added a QBlit() patch. - 1.2 First public release. Reworked patch installation code to do it more compatible with Executive (this is done by removing Switch() patch). - 1.1 Fixed a bug in Schedule() that made to crash my system sometimes. - 1.0 First internal release. @endnode