home *** CD-ROM | disk | FTP | other *** search
/ Secret Service 56b / SSERVCD_56B.bin / Sinclair / Games / information / InvasionOfTheBodySnatchers.txt < prev    next >
Text File  |  1998-02-02  |  5KB  |  185 lines

  1.  
  2. Invasion of the Body Snatchas  11/18/1996
  3. -----------------------------
  4.  
  5. This is Crystal's Defender clone and it doesn't seem to be too bad.
  6. I've included two versions here:  one for the TS2068 and one for
  7. the 128K Spectrum.  The original was written to work with the
  8. Fuller box and its built in joystick and AY chip.  I just modified
  9. it a bit to use the correct joystick and sound chip port addresses
  10. for each machine.
  11.  
  12. Thanks to Rob <rjfm2> for suggesting the conversion.  See below for
  13. details of the changes made to the original snap.
  14.  
  15. Alvin <albrecht@freenet.calgary.ab.ca>
  16.  
  17. PS.  It doesn't matter whether you answer yes or no when the game
  18.      asks if you have a Fuller box connected - it's been modified
  19.      to have the same result.
  20.  
  21. *******************************************************************
  22.  
  23. After some snooping around in the snap, I gathered that the Fuller
  24. box has a single joystick port and a built in AY-3-8912 sound chip
  25. responding to the following port addresses:
  26.  
  27. AY SOUND CHIP      Fuller       128K Spectrum      TS2068
  28.   register          #3F             #FFFD             #F5
  29.   data              #5F             #BFFD             #F6
  30.  
  31. FULLER JOYSTICK
  32.   port #7F, byte read looks like   F ? ? ? R L D U, active low
  33.  
  34. ********************************************************************
  35.  
  36. TS2068 VERSION
  37.  
  38. - Fuller sound chip addresses changed to ts2068 chip addresses
  39. - Fuller joystick changed to either ts2068 joystick
  40.  
  41.  
  42. ORG 40497
  43. JP Z,40502        ; Ignore Fuller box question at start of game
  44.  
  45. ORG 44941
  46. DEFM /TS2068 Version Selected/  ; Change message after answering question
  47. DEFS 20*space,0,40*space
  48.  
  49. ORG 40700                       ; Change Fuller joystick read
  50. LD A,4                          ; to bit mask, then jump to ts2068
  51. JP 40656                        ; joystick read
  52. LD A,8
  53. JP 40656
  54. LD A,1
  55. JP 40656
  56. LD A,2
  57. JP 40656
  58. LD A,128
  59. JP 40656
  60.  
  61. ORG 40656
  62. PUSH BC
  63. LD B,A                         ; Save bit mask
  64. LD A,7                         ; Prepare to read ts2068 joysticks
  65. OUT (#F5),A
  66. IN A,(#F6)
  67. AND #BF
  68. OUT (#F6),A
  69. LD A,14
  70. OUT (#F5),A
  71. LD A,3                         ; Read both joysticks at once
  72. IN A,(#F6)
  73. AND B                          ; Bit mask
  74. POP BC
  75. RET
  76.  
  77. ; Replace all instances of OUT (#3F),A with OUT (#F5),A and
  78. ; all instances of OUT (#5f),A with OUT (#f6),A
  79.  
  80. ************************************************************************
  81.  
  82. SPECTRUM 128K VERSION
  83.  
  84. - Fuller sound chip addresses changed to 128K chip addresses
  85. - Fuller joystick changed to Kempston joystick
  86.  
  87.  
  88. ORG 40497
  89. JP Z,40502                     ; Ignore Fuller question
  90.  
  91. ORG 44941
  92. DEFM /Spectrum 128 Version Selected/  ; Change message after question
  93. DEFS 14*space,0,40*space
  94.  
  95. ORG 40700                      ; Change Fuller joystick read
  96. LD A,2                         ; to mask and jump to Kempston read
  97. JP 40656
  98. LD A,1
  99. JP 40656
  100. LD A,8
  101. JP 40656
  102. LD A,4
  103. JP 40656
  104. LD A,16
  105. JP 40656
  106.  
  107. ORG 40656                      ; Kempston joystick read
  108. PUSH BC
  109. LD B,A                         ; Save bit mask
  110. IN A,(31)                      ; Read Kempston
  111. CPL                            ; Change to active low
  112. AND B                          ; Do mask
  113. POP BC
  114. RET
  115.  
  116.  
  117. ORG 40664                      ; AY chip output subroutine
  118. PUSH BC                        ; D=AY register, E=AY data
  119. LD BC,#FFFD
  120. OUT (C),D
  121. LD B,#BF
  122. OUT (C),E
  123. POP BC
  124. RET
  125.  
  126. ORG 40676                      ; See comments following
  127. PUSH DE
  128. LD D,A
  129. LD E,(HL)
  130. CALL 40664
  131. POP DE
  132. RET
  133.  
  134. ; The instruction sequence 'OUT (#3F),A; LD A,(HL); OUT (#5F),A' is
  135. ; found at 43188,43232,43240,43259,43267,43307,43315 and is replaced
  136. ; with 'CALL 40676; NOP; NOP'
  137.  
  138. ; The following replace some simple sound register writes
  139.  
  140. ORG 43297
  141. PUSH DE
  142. LD DE,#0501
  143. CALL 40664
  144. POP DE
  145.  
  146. ORG 43326                      ; Replaces a command setting AY
  147. NOP                            ; register to 15 (not present on
  148. NOP                            ; AY-3-8912 chip - probably used to 
  149.                                ; protect contents of other AY
  150.                                ; registers???)
  151.  
  152. ORG 43338
  153. PUSH DE
  154. LD DE,#0800
  155. CALL 40664
  156. INC D
  157. CALL 40664
  158. INC D
  159. CALL 40664
  160. POP DE
  161. RET
  162.  
  163. ORG 43379
  164. PUSH DE
  165. LD DE,#0D09
  166. CALL 40664
  167. LD DE,#07E1
  168. CALL 40664
  169. POP DE
  170. RET
  171.  
  172. ORG 43361
  173. PUSH DE
  174. LD DE,#0D09
  175. CALL 40664
  176. LD DE,#07E0
  177. CALL 40664
  178. POP DE
  179. RET
  180.  
  181. **********************************************************************
  182.  
  183. the end :-)
  184.  
  185.