-
Notifications
You must be signed in to change notification settings - Fork 1
/
rt68mx.inc
142 lines (124 loc) · 3.96 KB
/
rt68mx.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
ifndef RT68MX_INC
RT68MX_INC EQU 1
include "asl.inc"
;*
;* I'll clean this up later
;* For now I want RAM to $AFFF, IO at $E000, ROM start at $E100
;*
;* -----------------------------------------------------------------------------
ifdef ROMORIG
;*
;* Original locations except for Interrupt verstion @FFF8
;*
if mompass = 2
message "###"
message "### Built for MP-2 with IO @$F000"
message "###"
endif
LOWRAM EQU $0000
RAM EQU $A000
ROM EQU $E000
IO EQU $F000 ;* MP02 & sim6800 (I think)
INTVECT EQU $FFF8
;* DEFINE PERIPHERIAL REGISTERS
ORG IO ;*
;* ACIA $F000
ACIACS RMB 1 ;* 0
ACIADB RMB 1 ;* 1
RMB 2 ;* filler
;* PIA $F004
PIADA RMB 1 ;* 4
PIACA RMB 1 ;* 5
PIADB RMB 1 ;* 6
PIACB RMB 1 ;* 7
MFILL macro
;; Fill up to FFD0 with FF
dc.b [(*+(INTVECT-*))&INTVECT-*]$ff
ORG INTVECT
endm
;* -----------------------------------------------------------------------------
else ;* -----------------------------------------------------
;* -----------------------------------------------------------------------------
ifdef EXP
;*
;* Original locations except for Interrupt verstion @FFF8
;*
if mompass = 2
message "###"
message "### Built for MP-2 with IO @$F000 EXP"
message "###"
endif
LOWRAM EQU $0000
RAM EQU $A000
ROM EQU $E000
IO EQU $F000 ;* MP02 & sim6800 (I think)
INTVECT EQU $FFF8
;* DEFINE PERIPHERIAL REGISTERS
ORG IO ;*
;* ACIA $F000
ACIACS RMB 1 ;* 0
ACIADB RMB 1 ;* 1
RMB 2 ;* filler
;* PIA $F004
PIADA RMB 1 ;* 4
PIACA RMB 1 ;* 5
PIADB RMB 1 ;* 6
PIACB RMB 1 ;* 7
MFILL macro
;; Fill up to FFD0 with FF
dc.b [(*+(INTVECT-*))&INTVECT-*]$ff
ORG INTVECT
endm
;* -----------------------------------------------------------------------------
else ;* -[ Default ]-----------------------------------------
;* -----------------------------------------------------------------------------
if mompass = 2
message "###"
message "### Built for MP-2 with IO @$E000 @FIXME"
message "###"
endif
LOWRAM EQU $0000
RAM EQU $A000
IO EQU $E000
IFDEF NOMIKBUG
;; Move ROM up and replace MIKBUG
ROM EQU $E000+$1C00 ; $FC00
ELSE
;; Keep funky ROM layout
;ROM EQU $E000
ROM EQU $E000+$0100 ;* IO at $E000, ROM at $E100
ENDIF ;* NOMIKBUG
INTVECT EQU "undefined" ;*
MFILL macro
message "No Fill"
endm
;* DEFINE PERIPHERIAL REGISTERS
; ORG $8004 ;* I don't know where $8004 comes from
; ORG $E000 ;*
ORG IO ;*
PIADA RMB 1 ;*
PIACA RMB 1 ;*
PIADB RMB 1 ;*
PIACB RMB 1 ;*
ACIACS RMB 1 ;*
ACIADB RMB 1 ;*
endif ;* EXP (there is no elseifdef)
endif ;* ROMORG
;* -----------------------------------------------------------------------------
if mompass = 2
message "LOWRAM: $\{LOWRAM}"
message "RAM: $\{RAM}"
message "ROM: $\{ROM}"
message "I/O: $\{IO}"
message "VCT: $\{INTVECT}"
endif ;* mompass = 2
PROMPT EQU '$'
_8N1x16 EQU $15 ;* 8-N-1 9600
_7E2x16 EQU $11
ACIARST EQU $03
USRDEF EQU $7000 ;*
endif ;* if RT68MX_INC
;*[ Fini ]**********************************************************************
;/* Local Variables: */
;/* mode: asm */
;/* End: */