annotate defs/atari.d @ 3167:33f8afc79af2

Create new clock mc09clock_91hz for Carsten's over-clocked mc09
author Neal Crook <foofoobedoo@gmail.com>
date Sat, 08 Apr 2017 20:26:29 +0100
parents ca65720ee373
children 1c75a05d3304
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
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
92 HW.Page set $FF Device descriptor hardware page
2624
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
93
b8c7b7fbf3c9 Major changes:
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2621
diff changeset
94
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
95 ********************************************************************
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
96 * 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
97 *
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
98 * 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
99 * 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
100 * 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
101 *
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
102 * 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
103 * 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
104 * ANTIC's Display List
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
105 G.Cols equ 40
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
106 G.Rows equ 24
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
107 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
108 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
109
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
110 * 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
111 * 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
112 * 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
113 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
114
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
115 * 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
116 * (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
117 * 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
118 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
119 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
120
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
121 * 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
122 * 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
123 * 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
124 * 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
125 * command to the server.
2ebf5e737ceb Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2650
diff changeset
126 DWIOSEMA equ %10000000
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
127
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
128
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
129 ********************************************************************
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
130 * 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
131 *
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
132 * 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
133 * 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
134 *
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
135
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
136
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
137 *************************************************
2621
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
138 ** CTIA/GTIA Address Equates
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
139 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
140
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
141 * Read/Write Addresses
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
142 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
143
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
144 * Read Addresses
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
145 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
146 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
147 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
148 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
149
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
150 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
151 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
152 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
153 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
154
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
155 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
156 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
157 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
158 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
159
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
160 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
161 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
162 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
163 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
164
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
165 TRIG0 equ CTIA+$10 ;joystick trigger 0
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
166 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
167
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
168 TRIG2 equ CTIA+$12 ;cartridge interlock
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
169 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
170
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
171 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
172
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
173 * Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
174 HPOSP0 equ CTIA+$00 ;player 0 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
175 HPOSP1 equ CTIA+$01 ;player 1 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
176 HPOSP2 equ CTIA+$02 ;player 2 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
177 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
178
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
179 HPOSM0 equ CTIA+$04 ;missle 0 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
180 HPOSM1 equ CTIA+$05 ;missle 1 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
181 HPOSM2 equ CTIA+$06 ;missle 2 horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
182 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
183
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
184 SIZEP0 equ CTIA+$08 ;player 0 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
185 SIZEP1 equ CTIA+$09 ;player 1 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
186 SIZEP2 equ CTIA+$0A ;player 2 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
187 SIZEP3 equ CTIA+$0B ;player 3 size
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
188
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
189 SIZEM equ CTIA+$0C ;missle sizes
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
190
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
191 GRAFP0 equ CTIA+$0D ;player 0 graphics
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
192 GRAFP1 equ CTIA+$0E ;player 1 graphics
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
193 GRAFP2 equ CTIA+$0F ;player 2 graphics
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
194 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
195
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
196 GRAFM equ CTIA+$11 ;missle graphics
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 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
199 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
200 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
201 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
202
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
203 COLPF0 equ CTIA+$16 ;playfield 0 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
204 COLPF1 equ CTIA+$17 ;playfield 1 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
205 COLPF2 equ CTIA+$18 ;playfield 2 color/luminance
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
206 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
207
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
208 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
209
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
210 PRIOR equ CTIA+$1B ;priority select
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
211 VDELAY equ CTIA+$1C ;vertical delay
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
212 GRACTL equ CTIA+$1D ;graphic control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
213 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
214
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
215
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
216 *************************************************
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
217 ** POKEY Address Equates
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
218 POKEY equ $D200 ;POKEY area
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
219
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
220 *Read Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
221 POT0 equ POKEY+$00 ;potentiometer 0
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
222 POT1 equ POKEY+$01 ;potentiometer 1
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
223 POT2 equ POKEY+$02 ;potentiometer 2
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
224 POT3 equ POKEY+$03 ;potentiometer 3
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
225 POT4 equ POKEY+$04 ;potentiometer 4
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
226 POT5 equ POKEY+$05 ;potentiometer 5
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
227 POT6 equ POKEY+$06 ;potentiometer 6
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
228 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
229
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
230 ALLPOT equ POKEY+$08 ;potentiometer port state
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
231 KBCODE equ POKEY+$09 ;keyboard code
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
232 RANDOM equ POKEY+$0A ;random number generator
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
233 SERIN equ POKEY+$0D ;serial port input
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
234 IRQST equ POKEY+$0E ;IRQ interrupt status
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
235 IRQST.BREAKDOWN equ %10000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
236 IRQST.KEYDOWN equ %01000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
237 IRQST.SERINRDY equ %00100000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
238 IRQST.SEROUTNEEDED equ %00010000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
239 IRQST.SEROUTDONE equ %00001000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
240 IRQST.TIMER4 equ %00000100
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
241 IRQST.TIMER2 equ %00000010
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
242 IRQST.TIMER1 equ %00000001
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
243
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
244 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
245
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
246 * Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
247 AUDF1 equ POKEY+$00 ;channel 1 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
248 AUDC1 equ POKEY+$01 ;channel 1 audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
249
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
250 AUDF2 equ POKEY+$02 ;channel 2 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
251 AUDC2 equ POKEY+$03 ;channel 2 audio control
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 AUDF3 equ POKEY+$04 ;channel 3 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
254 AUDC3 equ POKEY+$05 ;channel 3 audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
255
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
256 AUDF4 equ POKEY+$06 ;channel 4 audio frequency
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
257 AUDC4 equ POKEY+$07 ;channel 4 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 AUDCTL equ POKEY+$08 ;audio control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
260 STIMER equ POKEY+$09 ;start timers
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
261 SKRES equ POKEY+$0A ;reset SKSTAT status
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
262 POTGO equ POKEY+$0B ;start potentiometer scan sequence
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
263 SEROUT equ POKEY+$0D ;serial port output
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
264 IRQEN equ POKEY+$0E ;IRQ interrupt enable
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
265 IRQEN.BREAKDOWN equ %10000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
266 IRQEN.KEYDOWN equ %01000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
267 IRQEN.SERINRDY equ %00100000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
268 IRQEN.SEROUTNEEDED equ %00010000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
269 IRQEN.SEROUTDONE equ %00001000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
270 IRQEN.TIMER4 equ %00000100
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
271 IRQEN.TIMER2 equ %00000010
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
272 IRQEN.TIMER1 equ %00000001
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
273
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
274 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
275 SKCTL.FORECEBREAK equ %10000000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
276 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
277 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
278 SKCTL.SERMODEIN equ %00010000
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
279 SKCTL.TWOTONEMODE equ %00001000
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
280 SKCTL.FASTPOTSCAN equ %00000100
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
281 SKCTL.KEYBRDSCAN equ %00000010
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
282 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
283
f27161fc2926 Added atari.d... new defs file for all things Atari
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
284
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
285 *************************************************
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
286 ** PIA Address Equates
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
287 PIA equ $D300 ;PIA area
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
288
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
289 * Read/Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
290 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
291 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
292
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
293 PACTL equ PIA+$02 ;port A control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
294 PBCTL equ PIA+$03 ;port B control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
295
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
296 * PIA bit assignments for XEGS:
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
297 * 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
298 * 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
299 *
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
300 * bit 1 0 = Basic switched in
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
301 * 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
302
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
303
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 ** ANTIC Address Equates
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
306 ANTIC equ $D400 ;ANTIC area
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
307
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
308 * Read Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
309 VCOUNT equ ANTIC+$0B ;vertical line counter
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
310 PENH equ ANTIC+$0C ;light pen horizontal position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
311 PENV equ ANTIC+$0D ;light pen vertical position
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
312 NMIST equ ANTIC+$0F ;NMI interrupt status
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 * Write Addresses
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
315 DMACTL equ ANTIC+$00 ;DMA control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
316 CHACTL equ ANTIC+$01 ;character control
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
317 DLISTL equ ANTIC+$02 ;low display list address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
318 DLISTH equ ANTIC+$03 ;high disply list address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
319 HSCROL equ ANTIC+$04 ;horizontal scroll
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
320 VSCROL equ ANTIC+$05 ;vertical scroll
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
321 PMBASE equ ANTIC+$07 ;player-missle base address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
322 CHBASE equ ANTIC+$09 ;character base address
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
323 WSYNC equ ANTIC+$0A ;wait for HBLANK synchronization
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
324 NMIEN equ ANTIC+$0E ;NMI enable
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
325 NMIRES equ ANTIC+$0F ;NMI interrupt status reset
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
326
2650
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
327
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
328 *************************************************
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
329 ** Display List Equates
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
330 ADLI equ $80 ;display list interrupt
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
331 AVB equ $40 ;vertical blank
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
332 ALMS equ $40 ;set screen data address
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
333 AVSCR equ $20
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
334 AHSCR equ $10
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
335 AJMP equ $01 ;jump
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
336 AEMPTY1 equ $00
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
337 AEMPTY2 equ $10
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
338 AEMPTY3 equ $20
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
339 AEMPTY4 equ $30
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
340 AEMPTY5 equ $40
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
341 AEMPTY6 equ $50
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
342 AEMPTY7 equ $60
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
343 AEMPTY8 equ $70
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
344 AMODE2 equ $02
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
345 AMODE3 equ $03
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
346 AMODE4 equ $04
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
347 AMODE5 equ $05
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
348 AMODE6 equ $06
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
349 AMODE7 equ $07
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
350 AMODE8 equ $08
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
351 AMODE9 equ $09
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
352 AMODEA equ $0A
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
353 AMODEB equ $0B
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
354 AMODEC equ $0C
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
355 AMODED equ $0D
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
356 AMODEE equ $0E
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
357 AMODEF equ $0F
538d8fdbaeba Added fuji and ataridemo.dsk
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2649
diff changeset
358
2639
283433fa565c Added notes to atari.d
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
359 endc