-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
345 lines (259 loc) · 10.4 KB
/
Makefile
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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
#
# MyPicoDos Makefile (c) 2003-2017 by Matthias Reichl <[email protected]>
#
ATASM ?= atasm
MYINIT_COMS = MYINIT.COM MYINITR.COM MYINITB.COM MYINITS.COM \
MYPDOS.COM MYPDOSN.COM \
MYPDOSR.COM MYPDOSRN.COM \
MYPDOSB.COM PICOBOOT.COM
all: $(MYINIT_COMS) \
MYPDOS.COM MYPDOSN.COM \
MYPDOSR.COM MYPDOSRN.COM \
MYPDOSB.COM PICOBOOT.COM \
MYPDOSS.COM \
mypdos.atr mypdosn.atr \
mypdosr.atr mypdosrn.atr \
mypdoss0.atr mypdoss1.atr \
mypdosb.atr \
myinit.atr
.PHONY: thecart
thecart: \
mypdost.atr mypdostn.atr \
MYPDOST.COM MYPDOSTN.COM \
MYINITT.COM
.PHONY: freezer
freezer: \
mypdosf.atr mypdosfn.atr \
MYPDOSF.COM MYPDOSFN.COM \
MYINITF.COM
# version string for naming atarisio include files
CFILE_VERSION=406
#all: MYPDOS.COM mypdos.atr mypdoshs.atr myinit2.atr
ASMFLAGS= -Ihisio
#ASMFLAGS= -Ihisio -v
#ASMFLAGS = -Ihisio -s
#ASMFLAGS = -Ihisio -v -s
#ASMFLAGS = -Ihisio -s -dHWDEBUG
MYPDOSSRC = mypdos.src common.inc version.inc getdens.src longname.src \
rreadcode.src comloadcode.src basloadcode.src \
rread.bin comload.bin basload.bin
MYINITSRC = myinit.src getdens.src longname.src qsort.src cio.inc version.inc
HISIOINC = hisio/hisio.inc hisio/hisiocode.src hisio/hisiodet.src \
hisio/hisiocode-break.src hisio/hisiocode-cleanup.src \
hisio/hisiocode-main.src hisio/hisiocode-send.src \
hisio/hisiocode-check.src hisio/hisiocode-diag.src \
hisio/hisiocode-receive.src hisio/hisiocode-vbi.src
rread.bin: rread.src rreadcode.src common.inc
$(ATASM) $(ASMFLAGS) -r -o$@ $<
basload.bin: basload.src basloadcode.src common.inc rreadcode.src
$(ATASM) $(ASMFLAGS) -r -o$@ $<
comload.bin: comload.src comloadcode.src common.inc rreadcode.src
$(ATASM) $(ASMFLAGS) -r -o$@ $<
highspeed.bin: highspeed.src highspeedcode.src $(HISIOINC) \
common.inc rreadcode.src comloadcode.src
$(ATASM) $(ASMFLAGS) -r -o$@ $<
mypdos.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dHIGHSPEED=1 -r -o$@ $<
mypdosr.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dHIGHSPEED=1 -dREMOTE=1 -r -o$@ $<
mypdost.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src thecart.inc
$(ATASM) $(ASMFLAGS) -dHIGHSPEED=1 -dTHECART=1 -r -o$@ $<
mypdosf.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src freezer.inc
$(ATASM) $(ASMFLAGS) -dHIGHSPEED=1 -dFREEZER=1 -dREMOTE=1 -r -o$@ $<
mypdoss.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dHIGHSPEED=1 -dSDRIVE=1 -r -o$@ $<
mypdosb.bin: $(MYPDOSSRC)
$(ATASM) $(ASMFLAGS) -dBAREBONE=1 -r -o$@ $<
mypdos.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -r -o$@ $<
mypdosn.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -dHIDEF=0 -r -o$@ $<
mypdoss0.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -dSDRIVE=1 -dSDDEF=0 -r -o$@ $<
mypdoss1.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -dSDRIVE=1 -dSDDEF=1 -r -o$@ $<
mypdosr.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dREMOTE=1 -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -r -o$@ $<
mypdosrn.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dREMOTE=1 -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -dHIDEF=0 -r -o$@ $<
mypdost.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src thecart.inc
$(ATASM) $(ASMFLAGS) -dTHECART=1 -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -r -o$@ $<
mypdostn.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src thecart.inc
$(ATASM) $(ASMFLAGS) -dTHECART=1 -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -dHIDEF=0 -r -o$@ $<
mypdosf.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src freezer.inc
$(ATASM) $(ASMFLAGS) -dFREEZER=1 -dREMOTE=1 -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -r -o$@ $<
mypdosfn.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src freezer.inc
$(ATASM) $(ASMFLAGS) -dFREEZER=1 -dREMOTE=1 -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dHIGHSPEED=1 -dHIDEF=0 -r -o$@ $<
mypdosb.atr: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dMYPDOSATR=1 -dMYPDOSBIN=1 -dDEFDRIVE=2 -dBAREBONE=1 -r -o$@ $<
mypdos-code.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -r -o$@ $<
mypdos-code-hioff.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dHIDEF=0 -r -o$@ $<
mypdos-code-r.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dREMOTE=1 -r -o$@ $<
mypdos-code-r-hioff.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dREMOTE=1 -dHIDEF=0 -r -o$@ $<
mypdos-code-t.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src thecart.inc
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dTHECART=1 -r -o$@ $<
mypdos-code-t-hioff.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src thecart.inc
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dTHECART=1 -dHIDEF=0 -r -o$@ $<
mypdos-code-f.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src freezer.inc
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dFREEZER=1 -dREMOTE=1 -r -o$@ $<
mypdos-code-f-hioff.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
carloadcode.src freezer.inc
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dFREEZER=1 -dREMOTE=1 -dHIDEF=0 -r -o$@ $<
mypdos-code-s.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dHIGHSPEED=1 -dSDRIVE=1 -r -o$@ $<
mypdos-code-b.bin: $(MYPDOSSRC)
$(ATASM) $(ASMFLAGS) -dMYPDOSROM=1 -dBAREBONE=1 -r -o$@ $<
atarisio-mypdos.bin: $(MYPDOSSRC) \
highspeedcode.src $(HISIOINC) highspeed.bin \
remote.src
$(ATASM) $(ASMFLAGS) -dMYPDOSBIN=1 -dHIGHSPEED=1 -dREMOTE=1 -r -o$@ $<
MYINIT.COM: $(MYINITSRC) \
mypdos.bin
$(ATASM) $(ASMFLAGS) -o$@ $<
MYINITR.COM: $(MYINITSRC) \
mypdosr.bin
$(ATASM) $(ASMFLAGS) -dREMOTE=1 -o$@ $<
MYINITT.COM: $(MYINITSRC) \
mypdost.bin
$(ATASM) $(ASMFLAGS) -dTHECART=1 -o$@ $<
MYINITF.COM: $(MYINITSRC) \
mypdosf.bin
$(ATASM) $(ASMFLAGS) -dFREEZER=1 -o$@ $<
MYINITS.COM: $(MYINITSRC) \
mypdoss.bin
$(ATASM) $(ASMFLAGS) -dSDRIVE=1 -o$@ $<
MYINITB.COM: $(MYINITSRC) \
mypdosb.bin
$(ATASM) $(ASMFLAGS) -dBAREBONE=1 -o$@ $<
MYPDOS.COM: mypdos-com.src mypdos-code.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=1 -o$@ $<
MYPDOSN.COM: mypdos-com.src mypdos-code-hioff.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=0 -o$@ $<
MYPDOSR.COM: mypdos-com.src mypdos-code-r.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=1 -dREMOTE=1 -o$@ $<
MYPDOSRN.COM: mypdos-com.src mypdos-code-r-hioff.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=0 -dREMOTE=1 -o$@ $<
MYPDOSS.COM: mypdos-com.src mypdos-code-s.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=1 -dREMOTE=1 -o$@ $<
MYPDOSB.COM: mypdos-com.src mypdos-code-b.bin
$(ATASM) $(ASMFLAGS) -dBAREBONE=1 -o$@ $<
MYPDOST.COM: mypdos-com.src mypdos-code-t.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=1 -dTHECART=1 -o$@ $<
MYPDOSTN.COM: mypdos-com.src mypdos-code-t-hioff.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=0 -dTHECART=1 -o$@ $<
MYPDOSF.COM: mypdos-com.src mypdos-code-f.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=1 -dFREEZER=1 -o$@ $<
MYPDOSFN.COM: mypdos-com.src mypdos-code-f-hioff.bin
$(ATASM) $(ASMFLAGS) -dHIDEF=0 -dFREEZER=1 -o$@ $<
# myide flashcart
MYPDIDE.ROM: mypdrom.src mypdos-code-hioff.bin
$(ATASM) $(ASMFLAGS) -dMYIDEROM -r -o$@ $<
# Megamax 1MB/8k cart / atarimax 8mbit cart
MYPDOSM8.ROM: mypdrom.src mypdos-code-r.bin
$(ATASM) $(ASMFLAGS) -dMEGAMAXROM -r -o$@ $<
picostd$(CFILE_VERSION).c: mypdos.bin
dd if=$< bs=1 skip=384 | xxd -i > $@
picosd$(CFILE_VERSION).c: mypdoss.bin
dd if=$< bs=1 skip=384 | xxd -i > $@
picorem$(CFILE_VERSION).c: mypdosr.bin
dd if=$< bs=1 skip=384 | xxd -i > $@
picobare$(CFILE_VERSION).c: mypdosb.bin
dd if=$< bs=1 skip=384 | xxd -i > $@
bootstd$(CFILE_VERSION).c: mypdos.bin
dd if=$< bs=1 count=384 | xxd -i > $@
bootsd$(CFILE_VERSION).c: mypdoss.bin
dd if=$< bs=1 count=384 | xxd -i > $@
bootrem$(CFILE_VERSION).c: mypdosr.bin
dd if=$< bs=1 count=384 | xxd -i > $@
bootbare$(CFILE_VERSION).c: mypdosb.bin
dd if=$< bs=1 count=384 | xxd -i > $@
# picoboot mini COM loader
picobootcode.bin: picobootcode.src common.inc rreadcode.src comloadcode.src
$(ATASM) $(ASMFLAGS) -r -o$@ $<
PICOBOOT.COM: picobootinit.src picobootcode.bin getdens.src version.inc cio.inc
$(ATASM) $(ASMFLAGS) -o$@ $<
picoboot$(CFILE_VERSION).c: picobootcode.bin
dd if=$< bs=1 count=384 | xxd -i > $@
atarisio: atarisio-mypdos.bin \
bootstd$(CFILE_VERSION).c picostd$(CFILE_VERSION).c \
bootrem$(CFILE_VERSION).c picorem$(CFILE_VERSION).c \
bootbare$(CFILE_VERSION).c picobare$(CFILE_VERSION).c \
bootsd$(CFILE_VERSION).c picosd$(CFILE_VERSION).c \
picoboot$(CFILE_VERSION).c
initdisk/AUTOEXEC.BAT: autoexec.bat
tr '\012' '\233' < $< > $@
myinit.atr: $(MYINIT_COMS)
mkdir -p initdisk
tr '\012' '\233' < autoexec.bat > initdisk/AUTOEXEC.BAT
cp -f mydos-dos.sys initdisk/DOS.SYS
cp -f mydos-dup.sys initdisk/DUP.SYS
cp -f mydos-bfe.ar0 initdisk/BFE.AR0
cp -f $(MYINIT_COMS) initdisk
dir2atr -b MyDos4534 1040 myinit.atr initdisk
myinit3:
mkdir myinit3
myinit3.atr: MYPDOS.COM myinit3
cp MYPDOS.COM myinit3/MYDOS.AR0
unix2atr -m 720 myinit3.atr myinit3
disk:
mkdir disk
mytest.atr: MYPDOS.COM mypdos.atr mypdoshs.atr disk
if test ! -d disk ; then mkdir disk ; fi
cp MYPDOS.COM disk
dd if=mypdos.atr of=disk/MYPDOS.BIN bs=1 skip=16
dd if=mypdoshs.atr of=disk/MYPDOSHS.BIN bs=1 skip=16
unix2atr 720 mytest.atr disk/
clean:
rm -f *.65o *.bin *.COM *.atr *.ROM *.SYS \
bootstd*.c bootrem*.c bootbare*.c bootsd*.c \
picostd*.c picorem*.c picobare*.c picosd*.c \
picoboot*.c
rm -rf initdisk
backup:
tar zcf bak/mypdos-`date '+%y%m%d-%H%M'`.tgz *.src *.inc \
Makefile README* LICENSE autoexec.bat mkdist