annotate level2/modules/rominfo.asm @ 556:28a203bbd2cc

findstr and signal finished.
author roug
date Tue, 22 Oct 2002 19:09:04 +0000
parents 1b329bae6f60
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * ROMInfo - OS-9 Level Two ROM Relocation Code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * Executed at $8015 from ROM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * Additional annotation Robert Gault 6/9/98
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 * ------------------------------------------------------------------
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 * 1 Created BGP 98/05/03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 nam ROMInfo
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 ttl OS-9 Level Two ROM boot module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 tylg set Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 rev set $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 edition set 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
37
1b329bae6f60 Modified rominfo to also boot from ROM Pak
boisy
parents: 0
diff changeset
26 ifne ROMPak
1b329bae6f60 Modified rominfo to also boot from ROM Pak
boisy
parents: 0
diff changeset
27 jmp $C000+start
1b329bae6f60 Modified rominfo to also boot from ROM Pak
boisy
parents: 0
diff changeset
28 endc
1b329bae6f60 Modified rominfo to also boot from ROM Pak
boisy
parents: 0
diff changeset
29
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 name fcs /ROMInfo/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 start equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 * Bring the CoCo 3 to sanity
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 orcc #IntMasks disable FIRQ, IRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 clr $FFD9 go into fast mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 lda #$0A CC3 Mode, No MMU, 32K Int. ROM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 sta $FF90
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 clr $FFDE RAM/ROM mode (upper 16K ROM at $C000)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 * Setup MMU
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 ldx #DAT.Regs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 leay MMUTbl,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 ldb #16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 MMULoop lda ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 bne MMULoop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 * Set up CoCo 3 Video Registers at $FF98-$FF9F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 ldd #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 std $FF98
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 std $FF9A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 std $FF9E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 ldd #$0FE0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 std $FF9C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 * Initialize PIAs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 ldx #PIA1Base RG - Initialize the PIA 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 ldd #$FF34
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 clr 1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 clr 3,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 lda #$F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 sta 2,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 stb 1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 stb 3,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 clr 2,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 lda #$FF RG - Initialize the PIA 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 ldx #PIA0Base
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 clr 1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 clr 3,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 clr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 sta 2,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 stb 1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 stb 3,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 tfr b,dp
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 clr 2,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 lda #$CA RG - CC2 mode, MMU, constant DRAM, 32K internal ROM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 sta $FF90
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 bra RelROM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 * MMU
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 MMUTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 fcb $38,$39,$3A,$3B,$3C,$3D,$3E,$3F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 fcb $38,$39,$3A,$3B,$3C,$3D,$3E,$3F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 * ROM relocation code -- copies the boot track into $2600 and JMPs to it
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 RelROM ldx #$EC00 src address (boot track in ROM)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 ldy #$2600 dst address (RAM)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 copyloop ldd ,x++ get 2 bytes from src
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 std ,y++ put 2 bytes to dst
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 cmpx #$EC00+$1200 at end?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 blo copyloop nope, copy more...
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 jmp $2602 jump to OS rel code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 end