annotate defs/atari.d @ 3276:524cf44d557d

Dragon ports: Replace mb scripts The old ones used shell features that don't work with the standard level 1 shell, so they probably never worked. Replace them with the standard floppy ones used in the other level 1 ports, but rename them since they are for the DECB RB1773-based controllers.
author Tormod Volden <debian.tormod@gmail.com>
date Sat, 07 Mar 2020 23:15:04 +0100
parents 1c75a05d3304
children ea1afb494127
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
1 ifne ATARI.D-1
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
2 ATARI.D set 1
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
3
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
4 ********************************************************************
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
5 * AtariDefs - NitrOS-9 System Definitions for the Atari XE/XL
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6 *
2625
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
7 * This is a high level view of the Atari XE/XL memory map as setup by
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
8 * NitrOS-9.
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
9 *
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
10 * $0000----> ==================================
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
11 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
12 * | NitrOS-9 Globals/Stack |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
13 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
14 * $0500---->|==================================|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
15 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
16 * | Atari |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
17 * $0500-$08BF | Screen Memory |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
18 * | (40x24) |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
19 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
20 * |----------------------------------|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
21 * $08C0-$08FF | ANTIC Display List |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
22 * $9000---->|----------------------------------|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
23 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
24 * . . . . . . . . . . . . . . . . .
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
25 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
26 * | RAM available for allocation |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
27 * | by NitrOS-9 and Apps |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
28 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
29 * . . . . . . . . . . . . . . . . .
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
30 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
31 * $C000---->|==================================|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
32 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
33 * $C000-$CFFF | ROM |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
34 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
35 * $D000---->|==================================|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
36 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
37 * | XEGS Memory Mapped I/O Region |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
38 * |(may differ in location on others)|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
39 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
40 * $D800---->|==================================|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
41 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
42 * $D800-$FFFF | ROM |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
43 * | |
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
44 * |==================================|
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
45 *
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
46 * Note that ROM above becomes RAM if booting from DriveWire.
2625
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
47 *
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
48 * Atari Hardware is documented here:
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
49 * http://user.xmission.com/~trevin/atari/pokey_regs.html
d1ea3dc90082 More progress... now booting with DriveWire
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2624
diff changeset
50 *
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
51 * $Id$
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
52 *
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
53 * Edt/Rev YYYY/MM/DD Modified by
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
54 * Comment
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
55 * ------------------------------------------------------------------
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
56 * 2012/02/23 Boisy G. Pitre
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
57 * Started
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
58
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
59 nam AtariDefs
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
60 ttl NitrOS-9 System Definitions for the Atari XE/XL
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
61
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
62
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
63
2624
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
64 **********************************
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
65 * Power Line Frequency Definitions
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
66 *
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
67 Hz50 equ 1 Assemble clock for 50 hz power
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
68 Hz60 equ 2 Assemble clock for 60 hz power
2834
ca65720ee373 Fix support for 50Hz setting
Tormod Volden <debian.tormod@gmail.com>
parents: 2725
diff changeset
69 IFNDEF PwrLnFrq
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
70 PwrLnFrq set Hz60 Set to Appropriate freq
2834
ca65720ee373 Fix support for 50Hz setting
Tormod Volden <debian.tormod@gmail.com>
parents: 2725
diff changeset
71 ENDC
2624
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
72
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
73
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
74 **********************************
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
75 * Ticks per second
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
76 *
2834
ca65720ee373 Fix support for 50Hz setting
Tormod Volden <debian.tormod@gmail.com>
parents: 2725
diff changeset
77 IFNDEF TkPerSec
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
78 ifeq PwrLnFrq-Hz50
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
79 TkPerSec set 50
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
80 else
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
81 TkPerSec set 60
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
82 endc
2834
ca65720ee373 Fix support for 50Hz setting
Tormod Volden <debian.tormod@gmail.com>
parents: 2725
diff changeset
83 ENDC
2624
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
84
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
85
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
86 *************************************************
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
87 *
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
88 * NitrOS-9 Level 1 Section
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
89 *
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
90 *************************************************
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
91
3180
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
92 ********************************
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
93 * Boot defs for NitrOS-9 Level 1
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
94 *
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
95 * These defs are not strictly for 'Boot', but are for booting the
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
96 * system.
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
97 *
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
98 Bt.Start set $8000
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
99 Bt.Size EQU $1080 Maximum size of bootfile
1c75a05d3304 defs: Move boot track parameters into each port def file
Boisy Pitre <coco@toughmac.com>
parents: 2834
diff changeset
100 Bt.Track EQU $0000
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
101 HW.Page set $FF Device descriptor hardware page
2624
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
102
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
103
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
104 ********************************************************************
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
105 * NitrOS-9 Memory Definitions for the Atari XE/XL
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
106 *
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
107 * The Atari's support chips have certain alignment restrictions for
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
108 * things like screen memory, display lists and character maps. For this
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
109 * reason, we reserve some low memory for the screen.
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
110 *
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
111 * Screen memory range is $0500-$08FF (1K). Of that, 40*24 (960) bytes
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
112 * are for the screen buffer and the remaining 64 bytes are for the
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
113 * ANTIC's Display List
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
114 G.Cols equ 40
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
115 G.Rows equ 24
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
116 G.ScrStart equ $0500
2649
928b4a062979 Atari: Made mods to the kernel to boot with new Liber809 firmware
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2639
diff changeset
117 G.ScrEnd equ G.ScrStart+(G.Cols*G.Rows)
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
118
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
119 * The Character Set must be aligned to a 4K address. We can really only
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
120 * guarnatee that in the Krn module, which is always at the end of RAM. So
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
121 * for now, the character set is located at $F800
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
122 G.CharSetAddr equ $F800
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
123
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
124 * POKEY requires shadow registers. We allocate them in the kernel's DP
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
125 * (Yes, we are stealing an existing variable that is so old it should be
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
126 * removed from os9defs)
2725
c2112f93923a o dwio for Atari now uses routines in ROM, so dwread/dwrite stripped of Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2714
diff changeset
127 D.IRQENShdw equ $02 ; was D.WDBtDr
c2112f93923a o dwio for Atari now uses routines in ROM, so dwread/dwrite stripped of Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2714
diff changeset
128 D.SKCTLShdw equ $03 ; was D.SWPage
2656
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
129
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
130 * The clock interrupt is driven by the unmaskable NMI. Therefore,
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
131 * the rbdw3 driver uses the DWIOSEMA flag in the D.ATARIFLAGS field as
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
132 * a signal, setting it before doing an DW operation and clearing it after.
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
133 * The clock ISR checks if this flag is set, and, if so, defers the OP_TIME
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
134 * command to the server.
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
135 DWIOSEMA equ %10000000
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
136
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
137
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
138 ********************************************************************
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
139 * Atari XE/XL Hardware Definitions
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
140 *
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
141 * These were lifted from the Atari OS disassembly, and represents all
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
142 * of the hardware registers available on the Atari XE/XL
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
143 *
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
144
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
145
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
146 *************************************************
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
147 ** CTIA/GTIA Address Equates
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
148 CTIA equ $D000 ;CTIA/GTIA area
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
149
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
150 * Read/Write Addresses
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
151 CONSOL equ CTIA+$1F ;console switches and speaker control
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
152
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
153 * Read Addresses
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
154 M0PF equ CTIA+$00 ;missle 0 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
155 M1PF equ CTIA+$01 ;missle 1 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
156 M2PF equ CTIA+$02 ;missle 2 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
157 M3PF equ CTIA+$03 ;missle 3 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
158
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
159 P0PF equ CTIA+$04 ;player 0 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
160 P1PF equ CTIA+$05 ;player 1 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
161 P2PF equ CTIA+$06 ;player 2 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
162 P3PF equ CTIA+$07 ;player 3 and playfield collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
163
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
164 M0PL equ CTIA+$08 ;missle 0 and player collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
165 M1PL equ CTIA+$09 ;missle 1 and player collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
166 M2PL equ CTIA+$0A ;missle 2 and player collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
167 M3PL equ CTIA+$0B ;missle 3 and player collision
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
168
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
169 P0PL equ CTIA+$0C ;player 0 and player collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
170 P1PL equ CTIA+$0D ;player 1 and player collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
171 P2PL equ CTIA+$0E ;player 2 and player collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
172 P3PL equ CTIA+$0F ;player 3 and player collision
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
173
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
174 TRIG0 equ CTIA+$10 ;joystick trigger 0
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
175 TRIG1 equ CTIA+$11 ;joystick trigger 1
2634
a34c08cdfcb2 Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2625
diff changeset
176
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
177 TRIG2 equ CTIA+$12 ;cartridge interlock
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
178 TRIG3 equ CTIA+$13 ;ACMI module interlock
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
179
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
180 PAL equ CTIA+$14 ;PAL/NTSC indicator
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
181
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
182 * Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
183 HPOSP0 equ CTIA+$00 ;player 0 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
184 HPOSP1 equ CTIA+$01 ;player 1 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
185 HPOSP2 equ CTIA+$02 ;player 2 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
186 HPOSP3 equ CTIA+$03 ;player 3 horizontal position
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
187
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
188 HPOSM0 equ CTIA+$04 ;missle 0 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
189 HPOSM1 equ CTIA+$05 ;missle 1 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
190 HPOSM2 equ CTIA+$06 ;missle 2 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
191 HPOSM3 equ CTIA+$07 ;missle 3 horizontal position
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
192
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
193 SIZEP0 equ CTIA+$08 ;player 0 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
194 SIZEP1 equ CTIA+$09 ;player 1 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
195 SIZEP2 equ CTIA+$0A ;player 2 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
196 SIZEP3 equ CTIA+$0B ;player 3 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
197
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
198 SIZEM equ CTIA+$0C ;missle sizes
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
199
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
200 GRAFP0 equ CTIA+$0D ;player 0 graphics
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
201 GRAFP1 equ CTIA+$0E ;player 1 graphics
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
202 GRAFP2 equ CTIA+$0F ;player 2 graphics
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
203 GRAFP3 equ CTIA+$10 ;player 3 graphics
2634
a34c08cdfcb2 Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2625
diff changeset
204
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
205 GRAFM equ CTIA+$11 ;missle graphics
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
206
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
207 COLPM0 equ CTIA+$12 ;player-missle 0 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
208 COLPM1 equ CTIA+$13 ;player-missle 1 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
209 COLPM2 equ CTIA+$14 ;player-missle 2 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
210 COLPM3 equ CTIA+$15 ;player-missle 3 color/luminance
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
211
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
212 COLPF0 equ CTIA+$16 ;playfield 0 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
213 COLPF1 equ CTIA+$17 ;playfield 1 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
214 COLPF2 equ CTIA+$18 ;playfield 2 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
215 COLPF3 equ CTIA+$19 ;playfield 3 color/luminance
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
216
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
217 COLBK equ CTIA+$1A ;background color/luminance
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
218
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
219 PRIOR equ CTIA+$1B ;priority select
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
220 VDELAY equ CTIA+$1C ;vertical delay
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
221 GRACTL equ CTIA+$1D ;graphic control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
222 HITCLR equ CTIA+$1E ;collision clear
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
223
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
224
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
225 *************************************************
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
226 ** POKEY Address Equates
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
227 POKEY equ $D200 ;POKEY area
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
228
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
229 *Read Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
230 POT0 equ POKEY+$00 ;potentiometer 0
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
231 POT1 equ POKEY+$01 ;potentiometer 1
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
232 POT2 equ POKEY+$02 ;potentiometer 2
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
233 POT3 equ POKEY+$03 ;potentiometer 3
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
234 POT4 equ POKEY+$04 ;potentiometer 4
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
235 POT5 equ POKEY+$05 ;potentiometer 5
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
236 POT6 equ POKEY+$06 ;potentiometer 6
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
237 POT7 equ POKEY+$07 ;potentiometer 7
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
238
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
239 ALLPOT equ POKEY+$08 ;potentiometer port state
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
240 KBCODE equ POKEY+$09 ;keyboard code
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
241 RANDOM equ POKEY+$0A ;random number generator
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
242 SERIN equ POKEY+$0D ;serial port input
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
243 IRQST equ POKEY+$0E ;IRQ interrupt status
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
244 IRQST.BREAKDOWN equ %10000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
245 IRQST.KEYDOWN equ %01000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
246 IRQST.SERINRDY equ %00100000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
247 IRQST.SEROUTNEEDED equ %00010000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
248 IRQST.SEROUTDONE equ %00001000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
249 IRQST.TIMER4 equ %00000100
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
250 IRQST.TIMER2 equ %00000010
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
251 IRQST.TIMER1 equ %00000001
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
252
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
253 SKSTAT equ POKEY+$0F ;serial port and keyboard status
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
254
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
255 * Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
256 AUDF1 equ POKEY+$00 ;channel 1 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
257 AUDC1 equ POKEY+$01 ;channel 1 audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
258
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
259 AUDF2 equ POKEY+$02 ;channel 2 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
260 AUDC2 equ POKEY+$03 ;channel 2 audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
261
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
262 AUDF3 equ POKEY+$04 ;channel 3 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
263 AUDC3 equ POKEY+$05 ;channel 3 audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
264
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
265 AUDF4 equ POKEY+$06 ;channel 4 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
266 AUDC4 equ POKEY+$07 ;channel 4 audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
267
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
268 AUDCTL equ POKEY+$08 ;audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
269 STIMER equ POKEY+$09 ;start timers
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
270 SKRES equ POKEY+$0A ;reset SKSTAT status
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
271 POTGO equ POKEY+$0B ;start potentiometer scan sequence
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
272 SEROUT equ POKEY+$0D ;serial port output
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
273 IRQEN equ POKEY+$0E ;IRQ interrupt enable
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
274 IRQEN.BREAKDOWN equ %10000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
275 IRQEN.KEYDOWN equ %01000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
276 IRQEN.SERINRDY equ %00100000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
277 IRQEN.SEROUTNEEDED equ %00010000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
278 IRQEN.SEROUTDONE equ %00001000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
279 IRQEN.TIMER4 equ %00000100
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
280 IRQEN.TIMER2 equ %00000010
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
281 IRQEN.TIMER1 equ %00000001
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
282
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
283 SKCTL equ POKEY+$0F ;serial port and keyboard control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
284 SKCTL.FORECEBREAK equ %10000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
285 SKCTL.SERMODECTRLMASK equ %01110000
2714
8399491c0821 Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2656
diff changeset
286 SKCTL.SERMODEOUT equ %00100000
8399491c0821 Reworked sources so that serial polling for the atari works.
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2656
diff changeset
287 SKCTL.SERMODEIN equ %00010000
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
288 SKCTL.TWOTONEMODE equ %00001000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
289 SKCTL.FASTPOTSCAN equ %00000100
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
290 SKCTL.KEYBRDSCAN equ %00000010
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
291 SKCTL.KEYDEBOUNCE equ %00000001
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
292
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
293
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
294 *************************************************
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
295 ** PIA Address Equates
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
296 PIA equ $D300 ;PIA area
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
297
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
298 * Read/Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
299 PORTA equ PIA+$00 ;port A direction register or jacks 0 and 1
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
300 PORTB equ PIA+$01 ;port B direction register or memory control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
301
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
302 PACTL equ PIA+$02 ;port A control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
303 PBCTL equ PIA+$03 ;port B control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
304
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
305 * PIA bit assignments for XEGS:
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
306 * bit 7 0 = Self-Test switched in, but only if OS Rom is also switched in
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
307 * bit 6 0 = Missile Command @ $A000 but ony if Basic Rom is switched out
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
308 *
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
309 * bit 1 0 = Basic switched in
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
310 * bit 0 1 = OS Rom switched in, opposite behaviour for this bit vs all the others relating to Rom.
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
311
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
312
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
313 *************************************************
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
314 ** ANTIC Address Equates
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
315 ANTIC equ $D400 ;ANTIC area
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
316
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
317 * Read Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
318 VCOUNT equ ANTIC+$0B ;vertical line counter
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
319 PENH equ ANTIC+$0C ;light pen horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
320 PENV equ ANTIC+$0D ;light pen vertical position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
321 NMIST equ ANTIC+$0F ;NMI interrupt status
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
322
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
323 * Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
324 DMACTL equ ANTIC+$00 ;DMA control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
325 CHACTL equ ANTIC+$01 ;character control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
326 DLISTL equ ANTIC+$02 ;low display list address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
327 DLISTH equ ANTIC+$03 ;high disply list address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
328 HSCROL equ ANTIC+$04 ;horizontal scroll
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
329 VSCROL equ ANTIC+$05 ;vertical scroll
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
330 PMBASE equ ANTIC+$07 ;player-missle base address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
331 CHBASE equ ANTIC+$09 ;character base address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
332 WSYNC equ ANTIC+$0A ;wait for HBLANK synchronization
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
333 NMIEN equ ANTIC+$0E ;NMI enable
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
334 NMIRES equ ANTIC+$0F ;NMI interrupt status reset
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
335
2650
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
336
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
337 *************************************************
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
338 ** Display List Equates
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
339 ADLI equ $80 ;display list interrupt
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
340 AVB equ $40 ;vertical blank
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
341 ALMS equ $40 ;set screen data address
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
342 AVSCR equ $20
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
343 AHSCR equ $10
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
344 AJMP equ $01 ;jump
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
345 AEMPTY1 equ $00
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
346 AEMPTY2 equ $10
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
347 AEMPTY3 equ $20
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
348 AEMPTY4 equ $30
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
349 AEMPTY5 equ $40
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
350 AEMPTY6 equ $50
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
351 AEMPTY7 equ $60
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
352 AEMPTY8 equ $70
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
353 AMODE2 equ $02
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
354 AMODE3 equ $03
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
355 AMODE4 equ $04
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
356 AMODE5 equ $05
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
357 AMODE6 equ $06
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
358 AMODE7 equ $07
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
359 AMODE8 equ $08
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
360 AMODE9 equ $09
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
361 AMODEA equ $0A
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
362 AMODEB equ $0B
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
363 AMODEC equ $0C
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
364 AMODED equ $0D
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
365 AMODEE equ $0E
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
366 AMODEF equ $0F
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
367
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
368 endc