annotate 3rdparty/booters/boot_ide.asm @ 786:e0f2a9928c72

Adjusted shell and utilpak1 contents due to change in size of copy
author boisy
date Sat, 11 Jan 2003 20:58:51 +0000
parents 3e3f1f79ba00
children 3be7fce1a56b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
1 ********************************************************************
392
df43967d6a46 Minor source changes, added boot_burke
boisy
parents: 93
diff changeset
2 * Boot - IDE Boot Module (LBA Mode)
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
3 *
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
4 * $Id$
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
5 *
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
8 * ? Disassembled AD 94/06/25
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
9 * 6 Redone for IDE PTB 99/08/17
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
10 * 7 Added use of LSN bits 23-16 BGP 02/06/27
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
11
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
12 nam Boot
392
df43967d6a46 Minor source changes, added boot_burke
boisy
parents: 93
diff changeset
13 ttl IDE Boot Module (LBA Mode)
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
14
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
15 ifp1
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
16 use defsfile
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
17 endc
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
18
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
19 tylg set Systm+Objct
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
20 atrv set ReEnt+rev
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
21 rev set 2
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
22 edition set 7
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
23
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
24 * Disassembled 94/06/25 11:37:47 by Alan DeKok
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
25 * ReDone by Paul T. Barton 99/08/17, for IDE
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
26 *
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
27 Port equ $FF70 still leaves room for SSPak & SSP & MPI
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
28 RData equ 0 data 0..7
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
29 WData equ 0 data 0..7
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
30 ErrReg equ 1 Has the errors
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
31 SecCnt equ 2 always =1
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
32 SecNum equ 3
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
33 CylLow equ 4
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
34 CylHigh equ 5
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
35 DevHead equ 6 0,1,0,DEV,0,0,0,0
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
36 Status equ 7 Results of read/write
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
37 CmdIde equ 7 Commands
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
38 Latch equ 8 Latch
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
39
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
40 ReadCmd equ $20
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
41 Diagnos equ $90
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
42
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
43 BusyBit equ %10000000 BUSY=1
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
44 DrdyBit equ %01000000 drive ready=1
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
45 DscBit equ %00010000 seek finished=1
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
46 DrqBit equ %00001000 data requested=1
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
47 ErrBit equ %00000001 error_reg has it
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
48 RdyTrk equ %01010000 ready & over track
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
49 RdyDrq equ %01011000 ready w/ data
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
50 Master equ %11100000 LBA MODE
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
51 Slave equ %11110000 LBA MODE
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
52
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
53
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
54 WhchDriv equ Master Drive to use (Master or Slave)
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
55
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
56 mod eom,name,tylg,atrv,start,size
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
57
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
58 * on-stack buffer to use
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
59 org 0
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
60 btmem rmb 2
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
61 btsiz rmb 2
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
62 btloc rmb 3
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
63 size equ .
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
64
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
65 name fcs /Boot/
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
66 fcb edition
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
67
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
68 start
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
69 orcc #IntMasks ensure IRQ's are off.
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
70 leas -size,s
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
71
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
72 clr >$FF40 stop the disk
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
73 lbsr Init
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
74
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
75 ldd #$0001 request one byte (will round up to 1 page)
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
76 os9 F$SRqMem request the memory
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
77 bcs L00B0 exit on error
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
78
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
79 * U is implicitely the buffer address to use
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
80
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
81 clrb
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
82 ldx #$0000 X=0: got to sector #$0000
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
83 bsr GetSect load in LSN0, U = buffer start
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
84 bcs L00B0
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
85
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
86 ifne NitrOS9
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
87 lda #'0 --- loaded in LSN0
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
88 jsr <D.BtBug ---
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
89 endc
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
90
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
91 ldd <DD.BSZ,u size of the bootstrap file
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
92 std btsiz,s save it on the stack (0,s is junk)
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
93 lda <DD.BT,u get starting sector bits 23-16
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
94 ldx <DD.BT+1,u get starting sector of the bootstrap file
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
95 sta btloc,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
96 stx btloc+1,s
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
97
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
98 ldd #256 one page of memory
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
99 os9 F$SRtMem return the copy of LSN0 to free memory
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
100
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
101 ldd btsiz,s get size of boot memory to request
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
102 ifeq Level-2
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
103 os9 F$BtMem ask for the boot memory
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
104 else
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
105 os9 F$SRqMem ask for the boot memory
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
106 endc
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
107 bcs L00AE no memory: exit with error
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
108
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
109 std btsiz,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
110 stu btmem,s save start address of memory allocated
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
111 ldd btsiz,s and the size of the boot memory
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
112 beq L00B0 if no memory allocated, exit
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
113 pshs d save off temp size
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
114 SectLp
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
115 ldb btloc+2,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
116 bsr GetSect read one sector
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
117 bcs L00AE if there's an error, exit
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
118
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
119 ifne NitrOS9
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
120 lda #'. dump out a period for boot debugging
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
121 jsr <D.BtBug do the debug stuff
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
122 endc
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
123
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
124 leau 256,u
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
125 leax 1,x go to the next sector
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
126 bne Sect2
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
127 incb
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
128 stb btloc+2,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
129 Sect2
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
130 ldd ,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
131 subd #256 take out one sector, need value in B, too.
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
132 std ,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
133 bhi SectLp loop until all sectors are read
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
134
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
135 L00A7 clrb clear carry
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
136 ldd btsiz+2,s
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
137
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
138 L00AE leas $02,s kill D off of the stack
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
139 ldx btmem,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
140 L00B0 leas size,s remove the on-stack buffer
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
141 L00BA rts
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
142
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
143 Address fdb Port
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
144
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
145 * GetSect: read a sector off of the disk
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
146 * Entry: B,X = sector number to read
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
147 * Memory: U = where to put it
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
148
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
149 GetSect
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
150 pshs b,x,y
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
151 ldy <Address,pcr grab the device address
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
152 bsr ChkBusy
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
153
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
154 RdyHuh1
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
155 lda Status,y is IDE ready for commands?
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
156 anda #DrdyBit ready ?
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
157 beq RdyHuh1 loop until Drdy =1
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
158
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
159 lda #WhchDriv
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
160 sta DevHead,y 0L0d/0hhh device=LBA
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
161 lda #$01 only one at a time
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
162 sta SecCnt,y only one at a time
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
163 stb CylHigh,y bits 23-16
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
164 tfr x,d sector number to read
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
165 sta CylLow,y hi-byte
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
166 stb SecNum,y
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
167 leax ,u where to put the sector
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
168 lda #ReadCmd read one sector
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
169 sta CmdIde,y finish process
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
170
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
171 Blk2
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
172 lda Status,y is IDE ready to send?
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
173 anda #DrqBit DRQ, data request
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
174 beq Blk2 loop while DRQ =0
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
175
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
176 clr ,-s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
177 BlkLp
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
178 lda RData,y A <- IDE
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
179 ldb Latch,y
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
180 std ,x++ into RAM
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
181 inc ,s
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
182 bpl BlkLp go get the rest
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
183 puls b
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
184
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
185 lda Status,y check for error-bit
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
186 clrb
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
187 puls b,x,y,pc
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
188 * ------------------------------------------
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
189
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
190 ChkBusy
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
191 lda Status,y
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
192 anda #BusyBit 1xxx-xxxx
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
193 bne ChkBusy if =1 then loop
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
194 rts exit when BUSY =0
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
195
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
196 Init
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
197 pshs d,y
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
198 ldy <Address,pcr
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
199 bsr ChkBusy could be spinning up...
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
200 lda #Diagnos hits all drives
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
201 sta CmdIde,y ./
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
202 bsr ChkBusy wait 'til both done
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
203 clrb no errors
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
204 puls d,y,pc
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
205
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
206 ifeq Level-2
459
3e3f1f79ba00 Sources now use 'fill' pseudo-op to fill out for L2 modules
boisy
parents: 392
diff changeset
207 Pad fill $39,$1D0-3-*
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
208 endc
45
2ce754e62499 Moved booters to 3rdparty directory
boisy
parents:
diff changeset
209
93
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
210
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
211 emod
0c12245b7bdc Fixed NitrOS-9 and OS-9 Level Two bug where Address was too far off the
boisy
parents: 45
diff changeset
212 eom equ *
392
df43967d6a46 Minor source changes, added boot_burke
boisy
parents: 93
diff changeset
213 end