home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / TERMS / ZMP15SRC.LBR / ZMP-OVL.UZD / ZMP-OVL.UPD
Text File  |  1989-03-26  |  9KB  |  256 lines

  1.                  ZMP Overlay Update Information
  2.  
  3.     This file contains information on updating ZMP overlays designed for
  4. previous versions to the current version. Newer versions appear first in 
  5. this file.
  6.  
  7. Updates to ZMP14 Overlays for use with ZMP15.
  8. ---------------------------------------------
  9.  
  10.    The changes required here are associated with ZMP15's ability to access
  11. either of two UART ports, if available on the specific machine. One entry
  12. needs to be added to the jump table, and an extra routine needs to be added
  13. to set which port is in use. Lines which must be added to the overlay have
  14. an asterisk at the beginning.
  15.  
  16. 1. Add an entry to the jump table.
  17.  
  18.    Add the following instruction at the end of the jump table, after the
  19. 'jp getvars' instruction and before the spare jumps:
  20.  
  21. *    jp    setport            ; Set the modem port being used
  22.  
  23. 2. Add the setport routine.
  24.  
  25.    The following routine should be added into the code. A good place is
  26. immediately following the UART init code.
  27.  
  28. *;
  29. *; Set the port. ZMP supplies either 0 or 1 as a parameter. You're on your
  30. *; own here -- your system is bound to be different from any other! You may
  31. *; implement a software switch on all the modem-dependent routines, or perhaps
  32. *; you can have one or two centralised routines for accessing the UARTs and
  33. *; modify the code from this routine to select one or the other. (Who said
  34. *; there was anything wrong with self-modifying code?). If you have only one
  35. *; UART port, or if you don't want to go through all the hassles, just have
  36. *; this routine returning with no changes made. Note that ZMP calls this
  37. *; routine twice -- once for each port value -- on initialisation.
  38. *;
  39. *setport:
  40. *    ld    hl,2        ; get port number
  41. *    add    hl,sp
  42. *    ex    de,hl
  43. *    call    getparm        ; in HL (values are 0 and 1)
  44. *
  45. *                ; <== Insert your own code here
  46. *
  47. *                ; <== End of your own code
  48. *    ret
  49. *
  50. *port:    ds    1
  51. *
  52.  
  53. End of changes ZMP14 --> ZMP15.
  54.  
  55.         -- Ron Murray
  56.            25/3/89
  57.  
  58. ===============================================================================
  59.  
  60. Updates to ZMP13 Overlays for use with ZMP14.
  61. ---------------------------------------------
  62.  
  63.    Some changes need to be made to accommodate the user-specification
  64. of drive/user area for the .OVR files. Changes need to be made in three
  65. places in your overlay (asterisks at the start of lines indicate which lines
  66. should be added):
  67.  
  68. 1. Specify the required drive/user area.
  69.  
  70.    Add the following section after the mspeed equate:
  71.  
  72. *;Set the following two equates to the drive and user area which will contain
  73. *;   ZMP's .OVR files, .CFG file, .FON file and .HLP file. Set both to zero
  74. *;   (null) to locate them on the drive from which ZMP was invoked.
  75. *
  76. *overdrive    equ    'A'    ; Drive to find overlay files on ('A'-'P')
  77. *overuser    equ    0    ; User area to find files
  78.  
  79. 2. Add to the jump table
  80.  
  81.    Add the following instruction at the end of the jump table, after the
  82. 'jp userout' instruction and before the spare jumps:
  83.  
  84. *    jp    getvars        ; get system variables
  85.  
  86.  
  87. 3. Add code at the end to get the system variables:
  88.  
  89.    Add the following code just in front of the overlay size test:
  90.  
  91. *;Get address of user-defined variables
  92. *
  93. *getvars:
  94. *    ld    hl,uservars
  95. *    ret
  96. *
  97. *uservars:
  98. *    dw    overdrive    ; .OVR etc. drive/user
  99. *    dw    overuser
  100. *
  101.  
  102. End of ZMP14 overlay modifications.
  103.  
  104.     -- Ron Murray, 20/11/88
  105.  
  106. ===============================================================================
  107.  
  108. Updates to ZMP12 Overlays for use with ZMP13.
  109. ---------------------------------------------
  110.  
  111.    There have been very few changes made to the overlay structure in ZMP13.
  112. Some shuffling of module orders has allowed the origin to be set at 0145 hex,
  113. and here it should stay (unless I fiddle with the startup code -- MOST
  114. unlikely!). So, set your 'userdef' equate to 0145h and you should be able to
  115. leave it there.
  116.    There is also a bug fix which should be installed in all overlays.
  117.  
  118. 1. Fix a bug in the wait routines
  119.  
  120.    Two routines in the user overlays are misnamed. You would expect wait1s
  121. to pause for one second, and wait1ms to pause for one millisecond, wouldn't
  122. you? Well they don't. Blame it on a lack of sleep on my part. They actually
  123. pause for a number of seconds (milliseconds) in hl. I suggest renaming them
  124. to waithls amd waithlms. The main consequence of this has been the pause in
  125. the middle of the 'send break' routine: there was originally a ld hl, 1 before
  126. the call to wait1s, but it got lost somewhere along the way. In any case, one
  127. second is probably too long for this, and I suggest you change it to
  128.  
  129.     ld hl,    300        ; wait 300 mS
  130.     call    waithlms
  131.  
  132.   There are two faults in the waithls (formerly wait1s) routine. The first
  133. is a misplaced jr instruction that caused waits of more than 1 second to be
  134. much longer than intended. The other concerns z80 machines with a clock speed
  135. greater than 9 MHz: these will cause 16-bit overflow in the ld de,6667
  136. instruction. (It had never occurred to me that anyone would have a z80 running
  137. at this speed!). Both these faults can be solved by replacing the whole
  138. waithls routine with the following:
  139.  
  140. ;Wait seconds in HL
  141. waithls:
  142.     push    bc        ; save bc
  143.     push    de        ; de
  144.     push    ix        ; and ix
  145.     ld    ix,0        ; then point ix to 0
  146.                 ; so we don't upset memory-mapped i/o
  147.  
  148. ;Calculate values for loop constants. Need to have two loops to avoid
  149. ;   16-bit overflow with clock speeds above 9 MHz.
  150.  
  151. outerval    equ    (clkspd / 10) + 1
  152. innerval    equ    (6667 / outerval) * clkspd
  153.  
  154. wait10:
  155.     ld    b,outerval
  156.  
  157. wait11:
  158.     ld    de,innerval
  159.  
  160. wait12:
  161.     bit    0,(ix)        ; time-wasters
  162.     bit    0,(ix)
  163.     bit    0,(ix)        ; 20 T-states each
  164.     bit    0,(ix)
  165.     bit    0,(ix)
  166.     bit    0,(ix)
  167.     dec    de
  168.     ld    a,e
  169.     ld    a,d
  170.     or    e
  171.     jr    nz,wait12    ; 150 T-states per inner loop
  172.     djnz    wait11        ; decrement outer loop
  173.     dec    hl        ; ok, decrement count in hl
  174.     ld    a,h
  175.     or    l
  176.     jr    nz,wait10
  177.     pop    ix        ; done -- restore ix
  178.     pop    de        ; de
  179.     pop    bc        ; and bc
  180.     ret
  181.  
  182. ; End of changes to waithls routine
  183.  
  184.    The remaining changes concern baud rates. Firstly, ZMP13 will reject a
  185. selected baud rate if the machine is not capable of it. It does this by
  186. determining if the value in mspeed (location 3c hex) has changed. Thus if
  187. you modify your overlay to only change 003ch (mspeed) if the new baud rate
  188. is valid, then incorrect baud rates cannot be selected. No code is given for
  189. this as all overlays are different. Note that the only penalty for not making
  190. this change is that all baud rates are accepted, whether valid or not. Older
  191. overlays always set mspeed to the new value.
  192.    In response to numerous requests (well, actually, two), ZMP13 will accept
  193. speeds of 38400, 57600 and 76800 baud. This means that it accepts the numbers
  194. for these -- mspeed values are 10, 11 and 12 respectively. If you think that
  195. you can get your machine to actually work at these speeds, then go ahead. But
  196. don't blame me if it doesn't work. (Personally, I doubt if successful
  197. transfers in both directions with a 4 MHz machine can be done at much over
  198. 4800 baud. But don't let me stop you.)
  199.  
  200.             -- Ron Murray
  201.                11/10/88
  202.  
  203.  
  204. End of changes ZMP12 --> ZMP13
  205. ===============================================================================
  206.  
  207. Updates to ZMP11 Overlays for ZMP12.
  208. ------------------------------------
  209.  
  210.    Some additions to the jump table have been made to allow for user-defined
  211. routines to be executed on entry/exit from ZMP. Modify your overlay as
  212. follows:
  213.  
  214. 1. Adding to the jump table
  215.  
  216.     Add the following code to the end of the jump table after the line:
  217.  
  218.     jp    mswait        ; wait milliseconds (Last entry of old table)
  219.  
  220. ==> Insert this stuff
  221.     jp    userin        ; user-defined entry routine
  222.     jp    userout        ; user-defined exit routine
  223.  
  224. ;Spare jumps for compatibility with future versions
  225.     jp    spare        ; spares for later use
  226.     jp    spare        ; spares for later use
  227.     jp    spare        ; spares for later use
  228.     jp    spare        ; spares for later use
  229.     jp    spare        ; spares for later use
  230. ==> End of inserted jump codes
  231.  
  232. 2. Adding the 'spare' code
  233.  
  234.      The following code can be added anywhere. A good idea is to put the
  235. 'spare:' label in front of an existing ret instruction.
  236.  
  237. spare:
  238.     ret
  239.  
  240. 3. Adding the user routines
  241.  
  242.      Add the following code to your overlay. Anywhere will do. The code
  243. you put in here depends on what you want to do.
  244.  
  245. ;User-defined entry routine: leave empty if not used
  246. userin:
  247.     ret
  248.  
  249. ;User-defined exit routine: leave empty if not used
  250. userout:
  251.     ret
  252.  
  253. End of changes ZMP11 --> ZMP12
  254. ===============================================================================
  255.  
  256.