-
Notifications
You must be signed in to change notification settings - Fork 88
/
mega65_config.inc
323 lines (266 loc) · 9.02 KB
/
mega65_config.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
;===============================================================================
;Option list definitions
;-----------------------
;
;Configuration option lists definitions.
;
;
;Using the option lists
;----------------------
;
;The input options are defined by a type and a list of details for that type.
;They usually have an offset and flag byte followed by a set of pascal-style
;strings. The option is defined in the type byte high nybble and the low nybble
;used to set the current value (except for string and button input types, see
;below). Pascal strings are used to speed up various operations (list
;traversal, on-screen manipulation). Use .defPStr to declare a Pascal string.
;
;The options are defined in a list for each page and grouped under six tabs.
;Each list is therefore an on-screen page worth of options and can be navigated
;by the user. Each list must be a maximum of 256 bytes due to a limitation in
;the current implementation. This limitation is checked with compile asserts.
;
;Each page (or list) is defined to belong to one of six tabs, as already
;mentioned. These tabs are: System, Disk, Video, Audio, Network and Save.
;The Save tab options must not be changed as the code relies on them being
;defined in a particular way (although the text of the buttons can be changed).
;
;The number of screen lines used to display a page's options must not exceed 20.
;
;The pages are listed in an index for each tab such that the code can traverse
;the lists as defined here. The number of pages in a tab must also be defined.
;
;Furthermore, two magic bytes are defined here to determine the system version
;compatibility.
;
;
;The input types are:
; 00 - end of list, no data bytes
; 10 - button, requires 1 string: label
; 20 - option (on/off, one of two enabled)
; followed by word offset and byte flags
; requires 3 strings: label, option unset, option set.
; 30 - string input.
; followed by word offset and byte for string
; length requires 1 string: label
; requires data area of string length for storage.
; input string will be null or length terminated.
; 40 - Blank line, no data
; 50 - MAC Address input. requires 1 string (label), word
; offset and data area of 6 bytes for storage of address.
;
;===============================================================================
;-------------------------------------------------------------------------------
configMagicByte0 = $01
configMagicByte1 = $01
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
;Input tab
;-------------------------------------------------------------------------------
inputPageCnt = 1
inputOptions0:
.byte $20 ;option input type
.word $0005 ;offset into config table
.byte $02 ;bits for testing/setting
.defPStr "joystick 1 amiga mouse mode:" ;label
.defPStr 'normal' ;option unset
.defPStr "1351 emulation" ;option set
.byte $20 ;option input type
.word $0005 ;offset into config table
.byte $08 ;bits for testing/setting
.defPStr "joystick 1 amiga mouse detection:" ;label
.defPStr 'conservative' ;option unset
.defPStr "aggressive" ;option set
.byte $20 ;option input type
.word $0005 ;offset into config table
.byte $01 ;bits for testing/setting
.defPStr "joystick 2 amiga mouse mode:" ;label
.defPStr 'normal' ;option unset
.defPStr "1351 emulation" ;option set
.byte $20 ;option input type
.word $0005 ;offset into config table
.byte $04 ;bits for testing/setting
.defPStr "joystick 2 amiga mouse detection:" ;label
.defPStr 'conservative' ;option unset
.defPStr "aggressive" ;option set
.byte $00 ;end of list type
inputOptions0_end:
.assert (inputOptions0_end - inputOptions0) < 256, error, "Input Options too large!"
inputPageIndex:
.word inputOptions0
;-------------------------------------------------------------------------------
;Chipset tab
;-------------------------------------------------------------------------------
chipsetPageCnt = 1
chipsetOptions0:
; Dummy field for RTC values.
; In reality, we read it from the RTC, and write the values
; back there.
.byte $60
.word $01f0
.defPStr "real-time clock:"
rtc_values:
.byte $00, $00, $00, $00, $00, $00
.byte $20 ;option input type
.word $0020 ;offset into config table
.byte $01 ;bits for testing/setting
.defPStr "dmagic revision:" ;label
.defPStr 'f018 (c65 roms < 910523)' ;option unset
.defPStr "f018b" ;option set
.byte $20 ;option input type
.word $0004 ;offset into config table
.byte $01 ;bits for testing/setting
.defPStr "f011 disk controller:" ;label
.defPStr "uses sdcard disk image";option unset
.defPStr 'uses 3.5" floppy drive';option set
.byte $30 ;string input type
.word $0010 ;offset into config table
.byte $10 ;input string length
.defPStr "default disk image:" ;label
.byte $00, $00, $00, $00 ;storage for value
.byte $00, $00, $00, $00
.byte $00, $00, $00, $00
.byte $00, $00, $00, $00
.byte $20 ;option input type
.word $000F ;offset into config table
.byte $80 ;bits for testing/setting
.defPStr "long fn support (experimental):" ;label
.defPStr "disable";option unset
.defPStr 'enable';option set
.byte $00 ;end of list type
chipsetOptions0_end:
.assert (chipsetOptions0_end - chipsetOptions0) < 256, error, "Chipset Options 0 too large!"
chipsetPageIndex:
.word chipsetOptions0
;-------------------------------------------------------------------------------
;Video tab
;-------------------------------------------------------------------------------
videoPageCnt = 1
videoOptions0:
.byte $20
.word $0002
.byte $80
.defPStr "video mode:"
.defPStr "pal 50hz (720*576)"
.defPStr "ntsc 60hz (720*480)"
.byte $20
.word $000D
.byte $02
.defPStr "digital video:"
.defPStr "enhanced (with audio)"
.defPStr "dvi only (no audio)"
.byte $20
.word $000E
.byte $80
.defPStr "onboarding utility on next boot:"
.defPStr "yes"
.defPStr "no"
.byte $00
videoOptions0_end:
.assert (videoOptions0_end - videoOptions0) < 256, error, "Video Options 0 too large!"
videoPageIndex:
.word videoOptions0
;-------------------------------------------------------------------------------
;Audio tab
;-------------------------------------------------------------------------------
audioPageCnt = 1
audioOptions0:
.byte $20
.word $0003
.byte $40
.defPStr "audio output:"
.defPStr "stereo"
.defPStr "mono"
.byte $20
.word $0003
.byte $20
.defPStr "swap stereo channels:"
.defPStr "no"
.defPStr "yes"
.byte $20
.word $0003
.byte $80
.defPStr "dac algorithm:"
.defPStr "pdm"
.defPStr "pwm"
.byte $20
.word $0003
.byte $01
.defPStr "audio amplifier:"
.defPStr "off"
.defPStr "on"
.byte $00
audioOptions0_end:
.assert (audioOptions0_end - audioOptions0) < 256, error, "Audio Options 0 too large!"
audioOptions1:
audioOptions1_end:
.assert (audioOptions1_end - audioOptions1) < 256, error, "Audio Options 1 too large!"
audioPageIndex:
.word audioOptions0
; .word audioOptions1
;-------------------------------------------------------------------------------
;Network tab
;-------------------------------------------------------------------------------
networkPageCnt = 1
networkOptions0:
.byte $50
.word $0006
.defPStr "mac address:"
.byte $00, $00, $00, $00, $00, $00
.byte $00
networkOptions0_end:
.assert (networkOptions0_end - networkOptions0) < 256, error, "Network Options 0 too large!"
networkPageIndex:
.word networkOptions0
;-------------------------------------------------------------------------------
;Save tab
;-------------------------------------------------------------------------------
savePageCnt = 1
;*******************************************************************************
;Do not change the order or number of options in these lists without code change!
;*******************************************************************************
saveOptions0:
.byte $10
.defPStr "exit without saving"
.byte $10
.defPStr "apply and test settings now"
.byte $10
.defPStr "restore factory defaults"
.byte $10
.defPStr "save as defaults and exit"
.byte $00
saveOptions1:
.byte $40
.byte $40
.byte $40
.byte $10
.defPStr "cancel"
.byte $10
.defPStr "ok"
.byte $00
saveOptions2:
.byte $00
savePageIndex:
.word saveOptions0, saveOptions1, saveOptions2
;-------------------------------------------------------------------------------
;Help tab
;-------------------------------------------------------------------------------
helpPageCnt = 1
;*******************************************************************************
;Do not change the order or number of options in these lists!
;*******************************************************************************
helpOptions0:
.byte $40
.byte $40
.byte $40
.byte $40
.byte $40
.byte $40
.byte $40
.byte $40
.byte $40
.byte $10
.defPStr "ok"
.byte $00
helpPageIndex:
.word helpOptions0