home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / www / makecd / ftp / nsdpatch.readme < prev    next >
Text File  |  1997-09-26  |  14KB  |  366 lines

  1.  
  2.     $Id: README.FIRST 1.16 1997/09/20 17:20:56 heinz Exp $
  3.  
  4. NSDPatch
  5. ========
  6.  
  7. What is NSDPatch?
  8. -----------------
  9.  
  10. NSDPatch will hook into the OS (V37+, 2.04+) and patch almost
  11. arbitrary types of devices to make them look like NSD compliant
  12. devices. With a configuration file, you can set up NSD like
  13. behaviour even for most devices that were not known to the authors
  14. of NSDPatch.
  15.  
  16. NSDPatch also includes some support for trackdisk like devices to
  17. emulate the NSD 64 bit access commands on top of old devices. With
  18. NSDPatch and the AI V43 FFS, you can use partitions >4GB on disks
  19. >4GB.
  20.  
  21. NSDPatch also includes RDB mount functionality to support special
  22. configurations.
  23.  
  24. NSDPatch also fixes some bugs with certain devices like the V40
  25. mfm.device or incompatibilities of, e.g., a JAZ drive and V40
  26. scsi.device.
  27.  
  28. NSDPatch will allow you to turn on correct command rejection via
  29. IOERR_NOCMD for devices that would crash otherwise.
  30.  
  31. NSDPatch will optionally try to do some magic for broken SANA2
  32. devices, too.
  33.  
  34. NSDPatch may also be useful for developers of NSD using SW to
  35. simulate different and possibly incomplete or buggy NSD
  36. environments for testing.
  37.  
  38. NSDPatch makes it possible to install device/unit mappings to
  39. virtually rename device units to support broken software that
  40. test only the device name for assumed functionality.
  41.  
  42. NSDPatch is not intended to replace an NSD upgrade for old devices
  43. forever. It is also not intended to provide for every single NSD
  44. bell and whistle in the specs. It is intended to ease the migration
  45. path and to give some basic NSD capabilities and convenient fixes
  46. to those who otherwise couldn't have it at all.
  47.  
  48.  
  49. What is NSD?
  50. ------------
  51.  
  52. NSD is referring to the New Style Device standard as documented on
  53. the Amiga Technologies Amiga Developer CD in the
  54.  
  55.     Amiga_Dev_CD_v1.1:DevInfo/DeviceDevelopment
  56.  
  57. directory. It is intended to provide for clean device usage in the
  58. future.
  59.  
  60. Updates to this standard are available on ftp.amiga.de and it is
  61. probably a good idea to check for them once in a while.
  62.  
  63. If you want more information about NSD, you can also contact the
  64. author of this document at the address mentioned below.
  65.  
  66.  
  67. WARRANTY AND LEGALES
  68. --------------------
  69.  
  70. WARRANTY: None whatsoever. Standard disclaimer applies.
  71.  
  72. LEGALESE: FREELY REDISTRIBUTABLE, NOT PD! CHANGES NOT ALLOWED!
  73.  
  74.  
  75. Installation
  76. ------------
  77.  
  78. There is an Installer-Script "Install" included, that does a quick
  79. installation and setup of NSDPatch, including its configuration. If
  80. you don't want that automatic installation, you can read below
  81. about the details of a custom installation.
  82.  
  83. First, take a look at the demonstration configuration file
  84. NSDPatch.cfg. It describes in detail all the available
  85. configuration options and contains all the entries for a basic OS
  86. 3.1 based system. When you have looked it over and want to boldly
  87. go where (almost) no one has gone before, proceed like this:
  88.  
  89.   A. BASIC INSTALLATION
  90.  
  91.     1. Make a copy of the file NSDPatch.cfg, and and place it
  92.        preferrably into SYS:DEVS, with SYS: referring to your boot
  93.        volume.
  94.  
  95.     2. Copy NSDPatch into SYS:C.
  96.  
  97.     3. Check the configuration file in SYS:DEVS for any devices
  98.        that you don't want to have patched and comment out these
  99.        lines. Add entries for any special devices. Please report
  100.        configuration lines for 3rd party devices to the author.
  101.        Keep another copy of your changes in case of future
  102.        automatic updates. Use NSDQuery to check if a device already
  103.        supports NSD.
  104.  
  105.     4. Place a line like this into your SYS:S/Startup-Sequence
  106.        immediately after SetPatch is called:
  107.  
  108.         NSDPatch
  109.  
  110.        It is very important that this line is added immediately
  111.        after SetPatch. That is why NSDPatch must be placed into
  112.        SYS:S/Startup-Sequence and not in User-Startup.
  113.  
  114.        Alternatively, you can run the included Installer-Script
  115.        "Install", which does a quick installation of NSDPatch.
  116.  
  117.        SPECIAL NOTE: If you map trackdisk.device units, you must
  118.        start any "noclick" hack after SetPatch but before NSDPatch.
  119.  
  120.     5. Reboot and watch the messages that are output by NSDPatch.
  121.        These messages tell you what NSDPatch does. If you can't
  122.        agree with them in some way, go back to 3.
  123.  
  124.     6. Try NSDQuery on patched devices to check if everything was
  125.        successful. If you encounter problems that can't be fixed
  126.        by going back to 3., check B and C.
  127.        Please report all problems to the author with the device
  128.        names and versions that cause the problems!
  129.  
  130.     7. Assuming there were no problems, add the "QUIET" option to
  131.        the NSDPatch line in your startup.
  132.  
  133.     8. That's it. This is the end of a successful installation.
  134.  
  135.  
  136.   B. SPECIAL INSTALLATIONS
  137.  
  138.     1. You may have 3rd party devices which don't support
  139.        IOERR_NOCMD correctly. This means that the driver will not
  140.        reject unknown commands with IOERR_NOCMD, but either crash
  141.        or do very strange things instead. In that case, use the
  142.        IOERRNOCMD option for the respective patch configuration. No
  143.        devices of this type can be named at this time. If you want
  144.        to boot from such a device, read the description of the
  145.        RDBUNIT option carefully. If you encounter such a device,
  146.        please report it to the author.
  147.  
  148.     2. You may have a trackdisk like device supporting the 3rd
  149.        party TD64 command set. In that case, use the TD64 option
  150.        for the respective patch configuration. By using the
  151.        TD64 option, the general NSD 64 bit commands will be
  152.        rerouted to the already existing TD64 functionality instead
  153.        of being emulated via HD_SCSICMD. Current Guru-ROM's and
  154.        Phase 5 SCSI devices may support TD64. No exact versions can
  155.        be named at this time.
  156.  
  157.     3. NSDPatch can be invoked multiple times to install more
  158.        patches. Installed patches cannot be changed without a
  159.        reboot.
  160.  
  161.     4. You can invoke NSDPatch with a config file that doesn't
  162.        actually patch anything but only uses the ACTIVATE and
  163.        RDBUNIT features of NSDPatch. This is considered a positive
  164.        side effect of the NSDPatch design.
  165.  
  166.     5. You may have a SANA2 device that can't handle a NULL
  167.        ios2_BufferManagement pointer on startup. If you have one of
  168.        those, you'll get enforcer hits with most likely an access
  169.        to address 0 first on a check with NSDQuery. In that case,
  170.        specify the SANA2MAGIC option in the configuration.
  171.  
  172.  
  173.   C. TROUBLE SHOOTING
  174.  
  175.     1. In the unlikely case that NSDPatch crashes your machine on
  176.        the first invocation, you may want to
  177.  
  178.         - reduce the configuration file to a single line, e.g. for
  179.           parallel.device to make testing easier.
  180.  
  181.         - check your system for any virus
  182.  
  183.     2. If you are not sure if a patch was successful, use the
  184.        NSDQuery tool to check up on that device.
  185.  
  186.     3. If multiple calls to NSDQuery while a device is in memory
  187.        reveal that the reported io_Device value changes for every
  188.        invocation, NSDPatch will not be able to patch this device
  189.        for any openers that opened the device before NSDPatch was
  190.        installed. This is not a bug in NSDPatch.
  191.  
  192.     4. If NSDQuery behaves strangely on any device, patched or not,
  193.        please report the exact circumstances, including all
  194.        configuration and version information for your Amiga.
  195.  
  196.     5. The NSDPatch 64 bit disk emulation capabilities or the
  197.        FIXSCSIUPDATE option may not work as expected on an IDE
  198.        scsi.device that has been patched by atapi.device. This is
  199.        not a bug in NSDPatch.
  200.  
  201.   D. ADDING NEW PATCH LINES
  202.  
  203.     1. The safe solution is emailing a copy of the device in
  204.        question to the author. He will generate a suitable patch
  205.        line to be placed into NSDPatch.cfg. The quick and dirty
  206.        solution is outlined below.
  207.  
  208.     2. First make sure that everything important is saved because
  209.        the tests for what you need may crash the system. If
  210.        possible, run Enforcer.
  211.  
  212.     3. Try NSDQuery on the device. If your Amiga crashes or severly
  213.        misbehaves, you will need the IOERRNOCMD option! If you get
  214.        a report that the device is NSD, you don't need to patch it.
  215.  
  216.     4. Check NSDPatch.cfg for an existing similar line and make
  217.        a copy, changing the name appropriately. If you have, e.g.,
  218.        magicscsi.device, you may want to use the line
  219.        for scsi.device as first approximation and put the name
  220.        magicscsi.device into the copied line. For, e.g.,
  221.        mynewaudio.device, you would take the line for audio.device
  222.        as example.
  223.  
  224.     5. Put the new line with the device's name into NSDPatch.cfg.
  225.        If needed according to 3., add the IOERRNOCMD option if it
  226.        isn't already there.
  227.  
  228.     6. Start NSDPatch and try NSDQuery again. Now, the device
  229.        should respond as NSD device, based on the new config line.
  230.  
  231.     7. Never change too many patch options at once. After changing
  232.        a patch option, you must reboot for it to take effect.
  233.        Read the descriptions in NSDPatch.cfg before using options.
  234.  
  235.     8. In case of any more problems, contact the author.
  236.  
  237.     9. If the patch line works well and solves your problems,
  238.        please forward it to the  author.
  239.  
  240. Contact
  241. -------
  242.  
  243. If you have any comments on NSDPatch, please send them to:
  244.  
  245.     Heinz Wrobel
  246.     Karlstr.16
  247.     82131 Gauting
  248.     Germany
  249.     <heinz@hwg.muc.de>
  250.  
  251.  
  252. Implementation
  253. --------------
  254.  
  255. This may not be very interesting to most readers as it hints at
  256. some technical details. NSDPatch hooks itself into the exec.library
  257. OpenDevice() function. It will patch any opened device that should
  258. be patched and "preprocess" requests sent to it. This way, the user
  259. software sees an NSD device and the device itself will not have to be
  260. reworked in strange device specific ways. Devices patched like this
  261. can still be expunged and reloaded freely. The permanent NSDPatch
  262. footprint in memory is about 3KB plus memory for configuration data
  263. for each device to be patched. NSDPatch does not need to be started
  264. in the background and it does not use any ugly SegList splitting
  265. hacks or similar stunts. NSDPatch should also be compatible to all
  266. debugging tools.
  267.  
  268.  
  269. History
  270. -------
  271. 43.14
  272.     - Cleanup for FIXSCSIUPDATE option. Will ignore an error on
  273.       internal handling now just like scsi.device. This keeps
  274.       FORMAT happy.
  275.  
  276. 43.13
  277.     - Cleaned up some of the 64 bit emulation code. A few SCSI
  278.       CDB's are set up better now. Added FIXSCSIUPDATE option. It
  279.       will turn CMD_UPDATE for scsi.device into something that does
  280.       no longer conflict with JAZ drive behaviour even though it
  281.       should still work as expected for other devices. NSDPatch
  282.       will use significantly less stack in its BeginIO patch for
  283.       patched devices in the general case now.
  284.  
  285. 43.12
  286.     - NSDPatch no longer pops up requesters when activating DOS
  287.       devices. Whenever you specify QUIET as option, NSDPatch will
  288.       no longer complain about already mounted entries when using
  289.       the RDB functionality. More updates to the config file.
  290.       SINLEPATCHONLY is now the default option as it tends to be
  291.       a lot more compatible to many debug tools commonly used with
  292.       AmigaOS. To get the the old behaviour back where the device
  293.       specific patch is reinstalled for each and every OpenDevice,
  294.       you can use the new TRYMULTIPATCH option. Note that with
  295.       other tools patching into the same vectors you may cause
  296.       infinite loops when using this option!
  297.  
  298. 43.11
  299.     - Added MOUNTANY option for RDB support. This facilitates RDB
  300.       mount magic by allowing access to any partition, not just
  301.       partitions not marked as automount. It is meant for the
  302.       advanced user. Added PATCHCONFIGLINE command line option. You
  303.       can use NSDPatch with a single simple config line. It will
  304.       not read in a config file then unless you also specify one.
  305.       The default DEVS:NSDPatch.cfg will now only be read if no
  306.       command line options have been used. Updated the
  307.       configuration file a little.
  308.  
  309. 43.10
  310.     - Added SINGLEPATCHONLY option for device patch lines. With this
  311.       option, a device will only patched for its initial open call.
  312.       This fixes interaction with CMD, which will hang in an endless
  313.       loop without SINGLEPATCHONLY. This again shows how dangerous
  314.       the use of the exec.library SetFunction() call is.
  315.  
  316. 43.9
  317.     - Should work with >=V37 now.
  318.     - Supports device mapping now. Implementation of this feature
  319.       has been funded by ATL, Inc.
  320.  
  321. 43.8
  322.     - Reduced stack usage during OpenDevice() patch by about 32
  323.       bytes. The patch needs about 68 bytes now during OpenDevice().
  324.     - The SANA2MAGIC did not work very well. There was a problem in
  325.       handling paths. So it often did not even get activated.
  326.  
  327. 43.7
  328.     - There was a bug in the Version/Revision recognition.
  329.       NSDPatch patched too much at times. This should not have
  330.       hurt, though.
  331.     - Reduced processing time in OpenDevice() a little.
  332.     - Mixing different versions of NSDPatch should not cause any
  333.       harm now.
  334.     - Added new PatchInfo option that tells you about NSDPatch
  335.       activities. Note: This option is more of a debugging hack!
  336.     - More patch lines.
  337.  
  338. 43.6
  339.     - Now supports LVO's that can't normally be SetFunction()'ed.
  340.     - Now supports version specific patches correctly. The override
  341.       general patches.
  342.     - Now supports special SANA2MAGIC for callback handling of old
  343.       devices.
  344.     - Now checks the default patch file DEVS:NSDPatch.cfg
  345.       automatically, if none has been specified.
  346.     - The config file is no longer named v40.nsdpatchcfg. It now
  347.       already has the default name and also has a C= version
  348.       string.
  349.  
  350. Acknowledgements
  351. ----------------
  352.  
  353. Some were very directly involved in thinking up and testing
  354. NSDPatch. Here is a list in no particular order:
  355.  
  356.     Olaf Barthel
  357.     Bernhard Möllemann
  358.     Michael van Elst
  359.     Angela Schmidt
  360.     Klaus Burkert
  361.     Joanne Dow
  362.  
  363. Thank you.
  364.  
  365. Heinz Wrobel
  366.