You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vector.src 6.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. .page vector
  2. echksm .byte $79 ; $e-$f checksum
  3. nmi jmp (vnmi)
  4. ;---------------------------------------------------
  5. pea7a sta ledprt ; patch for power-on errors
  6. sta ledout ; turn ddrb to output
  7. jmp rea7d ; return to led blink code
  8. ;
  9. ;---------------------------------------------------
  10. ; patch area for 1541 disk with slow serial receive
  11. ;
  12. slowd txa ; only affect .a
  13. ldx #5 ; insert 40us of delay with this routine
  14. slowe dex
  15. bne slowe
  16. tax
  17. rts
  18. ;---------------------------------------------------
  19. ;
  20. clkdat jsr clklow ; new clock low and...
  21. jmp dathi ; data hi for patch area
  22. ;
  23. ;---------------------------------------------------
  24. nnmi lda cmdbuf+2 ; new nmi routine check for
  25. cmp #'-'
  26. beq nnmi10 ; if ui- then no delay
  27. sec
  28. sbc #'+'
  29. bne nmi ; if not ui+ then must be a real ui command
  30. nnmi10 sta drvtrk+1
  31. rts
  32. ;---------------------------------------------------
  33. ; patch 5 *rom-05 8/18/83*
  34. ;---------------------------------------------------
  35. ;clock line hi on pwr on
  36. ;
  37. patch5 stx ddra1 ; set direction
  38. lda #$02 ; set clock high
  39. sta pb
  40. lda #$1a ; set ddra reg b
  41. sta ddrb1
  42. jmp dkit10 ; return
  43. ;---------------------------------------------------
  44. ; patch 6 *rom-05 8/18/83*
  45. ;---------------------------------------------------
  46. ;fix eoi timing to wait all devices
  47. ;
  48. patch6 lda pb ; test data line
  49. and #$01 ; every one rdy ?
  50. bne patch6
  51. lda #$01 ; wait 255 usec
  52. sta t1hc1 ; set timer
  53. jmp acp00 ; return
  54. ;---------------------------------------------------
  55. ; patch 7 *rom-05bc 09/12/84*
  56. ;----------------------------------------------------
  57. patch7 lda #$ff ; clear format flags
  58. sta ftnum ;
  59. jmp format ; transfer format to ram
  60. ;----------------------------------------------------
  61. ; patch 9 *rom-05bc 09/12/84*
  62. ;----------------------------------------------------
  63. patch9 txa
  64. pha ; save
  65. tya
  66. pha
  67. ldx #1 ; timer (1*100*16us=1.6ms)
  68. 1$ ldy #100
  69. 2$ lda pota1 ; check photo
  70. cmp pota1
  71. bne 4$ ; nfg
  72. dey
  73. bne 2$ ; wait
  74. dex
  75. bne 1$ ; wait
  76. 3$ and #$01 ; pa0=high ?
  77. beq 4$ ; no, not yet
  78. lda dskcnt ; yes, check motor phase
  79. and #$03 ; phase a ?
  80. bne 4$ ; no, not yet
  81. ;
  82. ;----------------------------------------------------
  83. ; patch retry *ds 01/21/85*
  84. ;
  85. ; disables track 0 sense during 'micro-stepping'
  86. ;
  87. lda adrsed ; chk micro-stepping flag
  88. bne 4$
  89. ;----------------------------------------------------
  90. ;
  91. pla ; restore
  92. tay ;
  93. pla ;
  94. tax ;
  95. lda #$00 ; yes, clear # of steps
  96. sta steps ;
  97. jmp end33 ; go back to end
  98. 4$ pla ;
  99. tay ; restore
  100. pla ;
  101. tax ;
  102. inc steps ; update # of steps
  103. ldx dskcnt ; update motor phase
  104. dex ;
  105. jmp pppppp ; return to main
  106. ;----------------------------------------------------
  107. ; patch 10 *rom-05bc 09/12/84*
  108. ;----------------------------------------------------
  109. ptch10 jsr cntint ; controller init.
  110. lda #$01 ; set job header
  111. sta $06
  112. lda #$c0 ; set job code(bump)
  113. sta $00
  114. rts
  115. ;----------------------------------------------------
  116. ; patch 11 *ds 01/21/85*
  117. ;
  118. ; format after error fix
  119. ;
  120. ptch11 sta nodrv ; clr nodrv
  121. jmp setlds ; set leds
  122. ;----------------------------------------------------
  123. ; patch 12 *ds 01/21/85*
  124. ;
  125. ; set 'micro-stepping' flag
  126. ;
  127. ptch12 sta adrsed ; set micro-stepping flag
  128. jmp hedoff ; move head now
  129. ;----------------------------------------------------
  130. ; patch 13 *ds 01/21/85*
  131. ;
  132. ; clr 'micro-stepping' flag
  133. ;
  134. ptch13 jsr hedoff ; restore head
  135. lda #$00
  136. sta adrsed ; clear micro-stepping flag
  137. rts
  138. ;----------------------------------------------------
  139. ; patch 14 *ds 09/03/85*
  140. ;
  141. ; allow buffer to be taken
  142. ;
  143. ptch14 cmp #2 ; error ?
  144. bcc 1$
  145. cmp #15 ; nodrv condition
  146. beq 1$
  147. jmp rtch14 ; ret, bad
  148. 1$ jmp stl50 ; ok, steal buffer back!!!
  149. ;----------------------------------------------------
  150. ; patch 15 *ds 09/03/85*
  151. ;
  152. ; disable irq's
  153. ;
  154. ptch15 sei
  155. ldx #topwrt ; setup stack pointer
  156. txs
  157. jmp rtch15 ; go back
  158. ;----------------------------------------------------
  159. ; patch 16 *ds 09/03/85*
  160. ;
  161. ; clr '22 atn occurred
  162. ;
  163. ptch16 bit pa1 ; clr atn
  164. jmp atnsrv ; service the attention now
  165. ;----------------------------------------------------
  166. ; patch 17 *ds 09/03/85*
  167. ;
  168. ; fix zero page instructions for nodrv
  169. ;
  170. ptch17 nodrrd
  171. rts
  172. ;----------------------------------------------------
  173. ; patch 18 *ds 09/03/85*
  174. ;
  175. ; fix zero page instructions for nodrv
  176. ;
  177. ptch18 ldx drvnum
  178. nodrrd
  179. jmp rtch18 ; return
  180. ;----------------------------------------------------
  181. ; patch 19 *ds 09/03/85*
  182. ;
  183. ; fix zero page instructions for nodrv
  184. ;
  185. ptch19 lda #0
  186. nodrwr
  187. jmp rtch19 ; return
  188. ;----------------------------------------------------
  189. ; patch 20 *ds 09/03/85*
  190. ;
  191. ; fix zero page instructions for nodrv
  192. ;
  193. ptch20 tya
  194. nodrwr
  195. jmp rtch20 ; return
  196. ;----------------------------------------------------
  197. ; patch 21 *ds 09/03/85*
  198. ;
  199. ; fix zero page instructions for nodrv
  200. ;
  201. ptch21 sta wpsw,x ; clr wp switch
  202. nodrwr
  203. jmp rtch21 ; return
  204. ;----------------------------------------------------
  205. ;
  206. ;default table for user command
  207. ;
  208. *= $ffe5
  209. ;----------------------------------------------------
  210. ;
  211. adjsm0 .byte $ca ; pseudo check-sum
  212. ;
  213. ;----------------------------------------------------
  214. .word format
  215. .word trnoff
  216. ublock .word ublkrd
  217. .word ublkwt
  218. .word $0500 ; links to buffer #2
  219. .word $0503
  220. .word $0506
  221. .word $0509
  222. .word $050c
  223. .word $050f
  224. *= $fffa
  225. .word nnmi ; goto new nmi routine
  226. .word dskint
  227. .word sysirq
  228. ; .end