annotate level1/modules/boot_ide.asm @ 2590:17d43fd29ee2

Integration of SuperDriver
author boisy
date Thu, 22 Dec 2011 18:23:47 +0000
parents
children c0bb75b72339
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2590
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
1 ********************************************************************
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
2 * Boot - IDE Boot Module
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
3 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
4 * $Id$
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
5 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
7 * Comment
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
9 * ? 1994/06/25 Alan DeKok
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
10 * Diassembled.
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
11 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
12 * 6 1999/08/17 Paul T. Barton
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
13 * Redone for IDE.
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
14 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
15 * 7 2002/06/27 Boisy G. Pitre
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
16 * Added use of LSN bits 23-16.
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
17 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
18 * 7r1 2004/05/12 Boisy G. Pitre
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
19 * Optimized, made toG wait on !BUSY and DRDY, added slowdown POKE
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
20 * for Fujitsu 128MB CF (may be temporary)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
21 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
22 * 8 2004/07/29 Boisy G. Pitre
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
23 * Now detects CHS/LBA mode to work with ALL IDE drives.
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
24 *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
25 * 9 2005/10/13 Boisy G. Pitre
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
26 * Support for fragmented bootfiles added.
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
27
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
28 NAM Boot
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
29 TTL IDE Boot Module
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
30
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
31 IFP1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
32 USE defsfile
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
33 USE ide.d
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
34 ENDC
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
35
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
36 tylg SET Systm+Objct
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
37 atrv SET ReEnt+rev
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
38 rev SET $00
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
39 edition SET 9
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
40
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
41 * Disassembled 94/06/25 11:37:47 by Alan DeKok
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
42 * ReDone by Paul T. Barton 99/08/17, for IDE
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
43
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
44 MOD eom,name,tylg,atrv,start,size
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
45
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
46 * on-stack static storage
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
47 ORG 0
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
48 cyls RMB 2
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
49 sides RMB 1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
50 sects RMB 2
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
51 mode RMB 1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
52 seglist RMB 2 pointer to segment list
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
53 blockloc RMB 2 pointer to memory requested
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
54 blockimg RMB 2 duplicate of the above
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
55 bootloc RMB 3 sector pointer; not byte pointer
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
56 bootsize RMB 2 size in bytes
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
57 LSN0Ptr RMB 2 LSN0 pointer (used by boot_common.asm)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
58 size EQU .
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
59
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
60 name FCS /Boot/
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
61 FCB edition
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
62
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
63 * Common booter-required defines
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
64 LSN24BIT EQU 1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
65 FLOPPY EQU 0
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
66
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
67 USE boot_common.asm
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
68
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
69 * HWInit - Initialize the device
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
70 * Entry: Y = hardware address
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
71 * Exit: Carry Clear = OK, Set = Error
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
72 * B = error (Carry Set)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
73 HWInit ldb Address+2,pcr
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
74 bne slave@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
75 lda #%10100000
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
76 FCB $8C
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
77 slave@ lda #%10110000
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
78 sta mode,u
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
79 stb DevHead,y select device
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
80 a@ tst Status,y wait for BSY to clear
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
81 bmi a@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
82 lda #$EC
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
83 sta Command,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
84 b@ tst Status,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
85 bmi b@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
86 * Harvest C/H/S values.
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
87 ldb DataReg,y ignore bytes 0-1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
88 ldb DataReg,y bytes 2-3 = no. of cylinders
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
89 lda Latch,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
90 std cyls,u save cylinders in our private static area
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
91 ldb DataReg,y ignore bytes 4-5
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
92 ldb DataReg,y bytes 6-7 = no. of heads
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
93 stb sides,u save sides on stack (B)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
94 ldb DataReg,y ignore bytes 8-9
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
95 ldb DataReg,y ignore bytes 10-11
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
96 ldb DataReg,y bytes 12-13 = no. of sectors/track
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
97 lda Latch,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
98 std sects,u save sectors/track on stack (Y)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
99 * Throw away the next 42 (48-7) words
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
100 ldb #43
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
101 l@ tst DataReg,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
102 lda Latch,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
103 decb
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
104 bne l@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
105 * A holds byte with LBA bit
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
106 anda #%00000010 LBA drive?
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
107 beq nope@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
108 ldb mode,u
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
109 orb #%01000000
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
110 stb mode,u
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
111 nope@ ldb #256-50
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
112 o@ tst DataReg,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
113 decb
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
114 bne o@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
115 HWTerm clrb
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
116 rts
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
117
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
118 * HWRead - Read a 256 byte sector from the device
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
119 * Entry: Y = hardware address
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
120 * B = bits 23-16 of LSN
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
121 * X = bits 15-0 of LSN
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
122 * blockloc,u = ptr to 256 byte sector
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
123 * Exit: X = ptr to data (i.e. ptr in blockloc,u)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
124 HWRead
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
125 pshs x,b
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
126 b@ tst Status,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
127 bmi b@ if =1 then loop
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
128 lda mode,u
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
129 sta DevHead,y 0L0d/0hhh device=CHS
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
130 r@ ldb Status,y is IDE ready for commands?
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
131 andb #BusyBit+DrdyBit ready ?
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
132 cmpb #DrdyBit
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
133 bne r@ loop until Drdy=1 and Busy=0
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
134 ldb #$01 only one at a time
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
135 stb SectCnt,y only one at a time
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
136 anda #%01000000
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
137 beq chs@ branch if mode
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
138 lda ,s get bits 23-16
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
139 sta CylHigh,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
140 ldd 1,s get bits 15-0
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
141 stb SectNum,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
142 sta CylLow,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
143 bra DoCmd
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
144 chs@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
145 * Compute proper C:H:S value
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
146 lda sides,u get device's head
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
147 ldb sects+1,u and sector
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
148 mul multiply H*S
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
149 * Note, there is a chance here that if the product is zero, we could loop forever
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
150 * beq ZeroProd
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
151 pshs d save product of H*S
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
152 ldd 1+2,s get bits 15-0 of LSN
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
153 ldx #-1 start Y at -1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
154 inc 0+2,s increment physical sector
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
155 * Here we are doing physLSN/(H*S) to get cylinder for physLSN
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
156 a@ leax 1,x increment count to compensate
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
157 subd ,s subtract (H*S) from physLSN
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
158 bhs a@ if D>=0 then continue
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
159 dec 0+2,s decrement phys sector bits 23-16
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
160 bne a@ if not zero, continue divide
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
161 addd ,s++ add in (H*S) to make non-negative
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
162 pshs d X now holds cylinder, save D on stack
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
163 tfr x,d
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
164 exg a,b swap
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
165 std CylLow,y store computed cylinder in HW
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
166 puls d restore saved cylinder
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
167 * Now we will compute the sector/head value
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
168 ldx #-1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
169 c@ leax 1,x
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
170 subb sects+1,u
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
171 sbca #0
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
172 bcc c@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
173 addb sects+1,u
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
174 incb add 1 to B, which is sector
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
175 stb SectNum,y store computed sector in HW
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
176 tfr x,d
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
177 orb DevHead,y OR in with value written earlier
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
178 stb DevHead,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
179 DoCmd lda #S$READ read one sector
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
180 sta Command,y finish process
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
181
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
182 Blk2 lda Status,y is IDE ready to send?
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
183 anda #DrqBit DRQ, data request
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
184 beq Blk2 loop while DRQ =0
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
185
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
186 ldx blockloc,u
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
187 clr ,s
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
188 BlkLp
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
189 lda DataReg,y A <- IDE
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
190 ldb Latch,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
191 std ,x++ into RAM
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
192 inc ,s
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
193 bpl BlkLp go get the rest
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
194 b@ lda DataReg,y read remaining 256 bytes
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
195 dec ,s
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
196 bne b@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
197
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
198 leax -256,x
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
199 stx 1,s
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
200 lda Status,y check for error-bit
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
201 clrb
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
202 puls b,x,pc
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
203
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
204
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
205
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
206 * ------------------------------------------
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
207
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
208 *Init
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
209 * pshs d,y
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
210 * ldy <Address,pcr
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
211 * bsr ChkBusy could be spinning up...
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
212 * lda #Diagnos hits all drives
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
213 * sta Command,y ./
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
214 * bsr ChkBusy wait 'til both done
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
215 * clrb no errors
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
216 * puls d,y,pc
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
217
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
218 * Entry: A = number to show
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
219 * Destroys D
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
220 *Num
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
221 * tfr a,b
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
222 * lsra
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
223 * lsra
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
224 * lsra
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
225 * lsra
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
226 * bsr x@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
227 * andb #$0F
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
228 * tfr b,a
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
229 *x@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
230 * adda #'0
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
231 * cmpa #'9
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
232 * ble s@
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
233 * adda #$7
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
234 *s@ jsr <D.BtBug
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
235 * rts
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
236
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
237 IFGT Level-1
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
238 Pad FILL $39,$1D0-3-2-1-*
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
239 ENDC
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
240
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
241 Address FDB SDAddr
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
242 WhchDriv FCB 0 Drive to use (0 = master, 1 = slave)
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
243
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
244
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
245 EMOD
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
246 eom EQU *
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
247 END
17d43fd29ee2 Integration of SuperDriver
boisy
parents:
diff changeset
248