home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / reference / amiga_mail_vol1 / bootexpcon / bytewiderom < prev    next >
Text File  |  1990-01-26  |  3KB  |  74 lines

  1. (c)  Copyright 1989 Commodore-Amiga, Inc.   All rights reserved.
  2. The information contained herein is subject to change without notice, and 
  3. is provided "as is" without warranty of any kind, either expressed or implied.  
  4. The entire risk as to the use of this information is assumed by the user.
  5.  
  6.  
  7.  
  8.                      Using Byte-Wide Autoboot ROMs
  9.                          Under Amiga OS V1.3
  10.  
  11.                            by Steve Beats
  12.  
  13.  
  14. With V1.3 of the Amiga operating system, an expansion board can autoboot 
  15. the Amiga if it has autoboot ROMs.  Autoboot ROMs can be configured in 
  16. one of three ways - word-wide, byte-wide or nybble-wide - however, ROMs 
  17. configured as byte-wide will NOT function correctly. 
  18.  
  19. This is due to a bug in the expansion library that causes memory corruption
  20. while copying the DiagArea to RAM from the expansion ROM.  Specifically, 
  21. an RTS instruction was omitted which allows the code to drop through to the 
  22. nybble-wide copy routine after the byte-wide copy has completed.  Because of 
  23. this, system lists that have been established prior to the expansion 
  24. initialization are overwritten.
  25.  
  26. There is a work-around which you can implement for this problem.  Instead of 
  27. marking your ROM as DAC_BYTEWIDE, set the da_Config field to DAC_NYBBLEWIDE.  
  28. Burn the ROM such that the DiagArea structure, Resident structure and the 
  29. initialization code are stored in nybbles at the beginning of the ROM.  The 
  30. remainder of the code should follow this information and can be stored in 
  31. the normal byte-wide format (ie. just burn the code "as is").
  32.  
  33. The code that is normally used to relocate the Resident structure will now 
  34. be required to copy the rest of the code from the ROM into an appropriately 
  35. allocated area of memory.  Of course, Resident will still have to be 
  36. relocated in the normal manner, but the pointers will be adjusted to point at 
  37. the RAM copy of your driver.  The following figure should clarify this point.
  38. It represents a block diagram of how a byte-wide expansion ROM should be
  39. burned.
  40.  
  41.  
  42. +---------------------------------+    The first three blocks should be
  43. |                  |    burned such that the data is only
  44. |     DiagArea marking the ROM    |    stored in the UPPER nybble of each
  45. |     as being DAC_NYBBLEWIDE     |    BYTE in the ROM.  This will appear
  46. |                  |    in the Amiga memory space as data
  47. +---------------------------------+    in the UPPER nybble of consecutive
  48. |                  |    WORD addresses.  Note: all addresses
  49. |  DiagArea initialization code   |    will be relative to the boards base
  50. |  to allocate memory, copy ROM   |    address.
  51. |  code into it and relocate all  |
  52. |  absolute references in the     |
  53. |  Resident structure.            |
  54. +---------------------------------+
  55. |                  |
  56. |  Resident structure describing  |
  57. |  device name and location of    |
  58. |  the initialization code.       |
  59. |                  |
  60. +---------------------------------+    The rest of the code can be burned
  61. |                  |    straight into the ROM.  This data
  62. .   The rest of the driver code      .    will appear in the memory map as
  63. .                  .    the upper BYTE of consecutive WORD
  64. .                  .    addresses.  The ROM copy code should
  65. |                  |    take this into account.
  66. +---------------------------------+
  67.  
  68.  
  69. This bug has already been fixed for 1.4 ROMs but your code will function in
  70. exactly the same manner on both 1.3 and 1.4 systems in the future if you use
  71. this method.
  72.  
  73.  
  74.