-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
4898 lines (3787 loc) · 472 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
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#/****************************************************************************
#* MIDRES Library - an isomorphic gamelib for retrocomputers *
#*****************************************************************************
#* Copyright 2020 Marco Spedaletti (asimov@mclink.it)
#*
#* Licensed under the Apache License, Version 2.0 (the "License");
#* you may not use this file except in compliance with the License.
#* You may obtain a copy of the License at
#*
#* http://www.apache.org/licenses/LICENSE-2.0
#*
#* Unless required by applicable law or agreed to in writing, software
#* distributed under the License is distributed on an "AS IS" BASIS,
#* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#* See the License for the specific language governing permissions and
#* limitations under the License.
#*----------------------------------------------------------------------------
#* Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
#* (la "Licenza"); è proibito usare questo file se non in conformità alla
#* Licenza. Una copia della Licenza è disponibile all'indirizzo:
#*
#* http://www.apache.org/licenses/LICENSE-2.0
#*
#* Se non richiesto dalla legislazione vigente o concordato per iscritto,
#* il software distribuito nei termini della Licenza è distribuito
#* "COSÌ COM'È", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
#* implicite. Consultare la Licenza per il testo specifico che regola le
#* autorizzazioni e le limitazioni previste dalla medesima.
#****************************************************************************/
###############################################################################
## This makefile was created with the aim of generalizing the compilation of
## a source for different 8-bit environments. It follows that, before you can
## use it, you must indicate which environments you are interested in obtaining
## an executable for.
###############################################################################
# Allowed targets:
# MIDRES LIBRARY (with DEMO, see below)
# - c64: single executable for Commodore 64 (named on disk: "midres-single")
# - c64ovl: overlayed executable for Commodore 64 (named on disk: "midres")
# - vic20: single executable for unexpanded VIC 20 (named on disk: "midres-single")
# - vic20ovl: overlayed executable for Commodore VIC20 (named on disk: "midres")
# - vic2024: single executable for 24K VIC 20 (named on disk: "midres-single")
# - c16: single executable for Commodore 16 (named on disk: "midres-single")
# - plus4: single executable for Plus 4 (named on disk: "midres-single")
# - c128: single executable for Commodore 128 (named on disk: "midres-single")
# - atari: single executable for ATARI
# - atarilo: single executable for ATARI (low res)
ifdef target
LTARGETS ?= $(target)
endif
# Given demonstrations:
# - SLIDESHOW - a slideshow with some images converted using img2midres
# - DRAWING - an animation using drawing primitives (v1.1)
# - BITBLIT - an animation using bit blits primivites (v1.2)
# - TILE - an animation using tiles primivites (v1.3)
# - JOY - joystick feedback (v1.61)
ifdef demo
DEMO := $(demo)
ATARGETS ?= midres.$(demo).$(target)
ifdef target
TARGETS ?= $(target)
endif
endif
# Given tutorials:
# - MCTILE
ifdef tutorial
TUTORIAL := $(tutorial)
ifdef target
TARGETS ?= $(target)
endif
endif
# Given PROGRAMS:
# - totto
# - airattack
# - alienstorm
# - elevator
# - joycheck
ifdef program
ifdef target
ATARGETS ?= $(program).$(target)
LTARGETS ?= $(target)
endif
endif
###############################################################################
###############################################################################
###############################################################################
###############################################################################
## UNIX / WINDOWS ENVIROMENT
###############################################################################
# The "Native Win32" GNU Make contains quite some workarounds to get along with
# cmd.exe as shell. However it does not provide means to determine that it does
# actually activate those workarounds. Especially $(SHELL) does NOT contain the
# value 'cmd.exe'. So the usual way to determine if cmd.exe is being used is to
# execute the command 'echo' without any parameters. Only cmd.exe will return a
# non-empty string - saying 'ECHO is on/off'.
#
# Many "Native Win32" programs accept '/' as directory delimiter just fine. How-
# ever the internal commands of cmd.exe generally require '\' to be used.
#
# cmd.exe has an internal command 'mkdir' that doesn't understand nor require a
# '-p' to create parent directories as needed.
#
# cmd.exe has an internal command 'del' that reports a syntax error if executed
# without any file so make sure to call it only if there's an actual argument.
ifeq ($(shell echo),)
MKDIR = mkdir -p $1
RMDIR = rmdir $1
RMFILES = $(RM) $1
COPYFILES = cp $1 $2
else
MKDIR = mkdir $(subst /,\,$1)
RMDIR = $(if exist $(subst /,\,$1),rmdir $(subst /,\,$1))
RMFILES = $(if exist $(subst /,\,$1), del /f /q $(subst /,\,$1))
COPYFILES = copy $(subst /,\,$1) $(subst /,\,$2)
endif
COMMA := ,
SPACE := $(N/A) $(N/A)
define NEWLINE
endef
# Note: Do not remove any of the two empty lines above !
# On Windows it is mandatory to have CC65_HOME set. So do not unnecessarily
# rely on cl65 being added to the PATH in this scenario.
ifdef CC65_HOME
CC := $(CC65_HOME)/bin/cl65
AR := $(CC65_HOME)/bin/ar65
ASM := $(CC65_HOME)/bin/ca65
else
CC := cl65
AR := ar65
ASM := ca65
endif
# On Windows it is mandatory to have CC1541_HOME set. So do not unnecessarily
# rely on being added to the PATH in this scenario.
ifdef CC1541_HOME
CC1541 := $(CC1541_HOME)/cc1541
else
CC1541 := cc1541
endif
# On Windows it is mandatory to have DIR2ATR_HOME set. So do not unnecessarily
# rely on being added to the PATH in this scenario.
ifdef DIR2ATR_HOME
DIR2ATR := $(DIR2ATR_HOME)/dir2atr
else
DIR2ATR := dir2atr
endif
# On Windows it is mandatory to have ATRAUTORUN_HOME set. So do not unnecessarily
# rely on being added to the PATH in this scenario.
ifdef ATRAUTORUN_HOME
ATRAUTORUN := $(ATRAUTORUN_HOME)/atrautorun
else
ATRAUTORUN := atrautorun
endif
# On Windows it is mandatory to have FILE2INCLUDE_HOME set. So do not unnecessarily
# rely on being added to the PATH in this scenario.
ifdef FILE2INCLUDE_HOME
FILE2INCLUDE := $(FILE2INCLUDE_HOME)/file2include64
else
FILE2INCLUDE := file2include64
endif
# On Windows it is mandatory to have ZCCCFG set. So do not unnecessarily
# rely on z88dk being added to the PATH in this scenario.
ifdef ZCCCFG
CC88 := $(ZCCCFG)/../../bin/zcc
ASM88 := $(ZCCCFG)/../../bin/z80asm
else
CC88 := zcc
ASM88 := z80asm
endif
###############################################################################
## COMPILATION / LINKING OPTIONS
###############################################################################
CFLAGS := -D__DEMO_$(DEMO)__ -D__GAME_$(GAME)__ -D__TUTORIAL_$(TUTORIAL)__ -W -const-comparison
CFLAGS88 := -D__Z80__ -O3
LDFLAGS :=
LDFLAGS88 :=
CRT :=
REMOVES :=
# Compiler flags used to tell the compiler to optimise for SPEED
define _optspeed_
CFLAGS += -Oris
endef
# Compiler flags used to tell the compiler to optimise for SIZE
define _optsize_
CFLAGS += -Or
endef
# Linker flags for generating map file
define _mapfile_
LDFLAGS += --mapfile $$@.map
REMOVES += $(PROGRAM).map
endef
# Linker flags for generating VICE label file
define _labelfile_
LDFLAGS += -Ln $$@.lbl
REMOVES += $(PROGRAM).lbl
endef
# Linker flags for generating a debug file
define _debugfile_
LDFLAGS += -Wl --dbgfile,$$@.dbg
REMOVES += $(PROGRAM).dbg
endef
###############################################################################
## MAKEFILE'S "CORE"
###############################################################################
# This is the set of files that will have to be analyzed. Let's consider, at
# the moment, only the C sources are since he ASM ones are specific for each
# environment.
SOURCES := $(wildcard src/main.c)
SOURCES += $(wildcard src/demo_*.c)
SOURCES += $(wildcard src/game_*.c)
SOURCES += $(wildcard src/tutorial_*.c)
SOURCES += $(wildcard src/utility_*.c)
LIB_SOURCES := $(wildcard src/midres.c)
LIB_SOURCES += $(wildcard src/midres_*.c)
LIB_INCLUDES:= $(wildcard src/midres.h)
LIB_INCLUDES+= $(wildcard src/midres_*.h)
# Let's calculate what the names of the object files could be. Usually, there
# will be one for each source. Object files are stored in a separate location
# for each target environment.
OBJS := $(addsuffix .o,$(basename $(addprefix obj/PLATFORM/,$(SOURCES:src/%=%))))
LIB_OBJS := $(addsuffix .o,$(basename $(addprefix obj/PLATFORM/,$(LIB_SOURCES:src/%=%))))
# Here we expand every single object produced, according to each expected
# environment. In this way you get the complete list of all object files to be
# compiled separately, each according to the compiler suitable for that
# environment.
OBJECTS := $(foreach TARGET,$(TARGETS),$(subst PLATFORM,$(TARGET),$(OBJS)))
OBJECTS += $(foreach ATARGET,$(ATARGETS),$(subst PLATFORM,$(ATARGET),$(OBJS)))
LIB_OBJECTS := $(foreach TARGET,$(TARGETS),$(subst PLATFORM,$(TARGET),$(LIB_OBJS)))
# We generate the list of paths where the object files for each target will
# end, so that we can generate them in advance (as paths).
TARGETOBJDIR := $(foreach TARGET,$(TARGETS),obj/$(TARGET))
TARGETOBJDIR += $(foreach ATARGET,$(ATARGETS),obj/$(ATARGET))
TARGETOBJDIR += $(foreach TARGET,$(LTARGETS),obj/$(TARGET))
# This is the path where all executables will be put.
EXEDIR := exe
# This is the path where all libraries will be put.
LIBDIR := lib
# Similarly, we expand the set of executables that are required.
#EXES := $(foreach TARGET,$(TARGETS),$(EXEDIR)/midres.$(TARGET))
EXES += $(foreach ATARGET,$(ATARGETS),$(EXEDIR)/$(ATARGET))
LIBS := $(foreach TARGET,$(TARGETS),$(LIBDIR)/midres.$(TARGET).lib)
LIBS += $(foreach TARGET,$(LTARGETS),$(LIBDIR)/midres.$(TARGET).lib)
# This is the path where all data will be put.
DATADIR := data
###############################################################################
## TARGETS' RULES
###############################################################################
# Makefile generated for following targets: atari, c128, c16, c64, coleco, gb, lm80c, msx, mtx500, plus4, svi, vic20, vic2024
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR ATARI
# -------------------------------------------------------------------
midres.embedded.atari:
obj/atari/midres_atari_impl.o: src/midres_atari_impl.asm
$(ASM) -t atari -oobj/atari/midres_atari_impl.o src/midres_atari_impl.asm
obj/atari/midres_c64_impl.o: src/midres_c64_impl.asm
$(ASM) -t atari -oobj/atari/midres_c64_impl.o src/midres_c64_impl.asm
obj/atari/midres_plus4_impl.o: src/midres_plus4_impl.asm
$(ASM) -t atari -oobj/atari/midres_plus4_impl.o src/midres_plus4_impl.asm
obj/atari/midres_vic20_impl.o: src/midres_vic20_impl.asm
$(ASM) -t atari -oobj/atari/midres_vic20_impl.o src/midres_vic20_impl.asm
obj/atari/midres_sid_impl.o: src/midres_sid_impl.asm
$(ASM) -t atari -oobj/atari/midres_sid_impl.o src/midres_sid_impl.asm
obj/atari/midres_ted_impl.o: src/midres_ted_impl.asm
$(ASM) -t atari -oobj/atari/midres_ted_impl.o src/midres_ted_impl.asm
obj/atari/midres_pokey_impl.o: src/midres_pokey_impl.asm
$(ASM) -t atari -oobj/atari/midres_pokey_impl.o src/midres_pokey_impl.asm
obj/atari/%.o: $(LIB_INCLUDES) $(LIB_SOURCES)
$(CC) -T -l $(@:.o=.asm) -t atari -c $(CFLAGS) -Osir -Cl -o $@ $(subst obj/atari/,src/,$(@:.o=.c))
$(LIBDIR)/midres.atari.lib: midres.embedded.atari $(LIB_INCLUDES) $(subst PLATFORM,atari,$(LIB_OBJS)) obj/atari/midres_atari_impl.o obj/atari/midres_c64_impl.o obj/atari/midres_vic20_impl.o obj/atari/midres_plus4_impl.o obj/atari/midres_sid_impl.o obj/atari/midres_ted_impl.o obj/atari/midres_pokey_impl.o
$(AR) r $(LIBDIR)/midres.atari.lib $(subst PLATFORM,atari,$(LIB_OBJS)) obj/atari/midres_atari_impl.o obj/atari/midres_c64_impl.o obj/atari/midres_vic20_impl.o obj/atari/midres_plus4_impl.o obj/atari/midres_sid_impl.o obj/atari/midres_ted_impl.o obj/atari/midres_pokey_impl.o
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR ATARI
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.atari midres.MSC1.atari
midres.MSC1.embedded.atari:
$(FILE2INCLUDE) -i $(DATADIR)/slideshowa.dat -n slideshow -i $(DATADIR)/imagea01.pic -n imagea01.mpic -i $(DATADIR)/imagea02.pic -n imagea02.mpic -i $(DATADIR)/imagea03.pic -n imagea03.mpic -i $(DATADIR)/imagea04.pic -n imagea04.mpic -i $(DATADIR)/aaintroa.msc1 -n zzintro.ms1 -i $(DATADIR)/ztiles.bin -n ztiles.bin -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/tutorial_mctile.bin -n mctile.bin -i $(DATADIR)/testcard.bin -n testcard.bin -i $(DATADIR)/zdjtiles.bin -n zdjtiles.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
obj/atari/%.o: $(SOURCES)
$(CC) -T -l $(@:.o=.asm) -t atari -c $(CFLAGS) -Osir -Cl -o $@ $(subst obj/atari/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.atari: midres.MSC1.embedded.atari $(subst PLATFORM,atari,$(OBJS))
$(CC) -Ln demoatari.lbl -t atari -C cfg/atari.cfg $(LDFLAGS) -m $(EXEDIR)/midres.atari.map -o $(EXEDIR)/midres.atari $(subst PLATFORM,atari,$(OBJS)) $(LIBDIR)/midres.atari.lib
$(call RMFILES,$(EXEDIR)/atr/*.*)
$(call COPYFILES,$(DIR2ATR_HOME)/dos25/dos.sys,$(EXEDIR)/atr/dos.sys)
$(call COPYFILES,$(EXEDIR)/midres.atari,$(EXEDIR)/atr/midres.exe)
$(call COPYFILES,$(DATADIR)/slideshowa.dat,$(EXEDIR)/atr/slideshow)
$(call COPYFILES,$(DATADIR)/imagea01.pic,$(EXEDIR)/atr/imagea01.mpic)
$(call COPYFILES,$(DATADIR)/imagea02.pic,$(EXEDIR)/atr/imagea02.mpic)
$(call COPYFILES,$(DATADIR)/imagea03.pic,$(EXEDIR)/atr/imagea03.mpic)
$(call COPYFILES,$(DATADIR)/imagea04.pic,$(EXEDIR)/atr/imagea04.mpic)
$(call COPYFILES,$(DATADIR)/aaintroa.msc1,$(EXEDIR)/atr/zzintro.ms1)
$(call COPYFILES,$(DATADIR)/ztiles.bin,$(EXEDIR)/atr/ztiles.bin)
$(call COPYFILES,$(DATADIR)/tiles.bin,$(EXEDIR)/atr/tiles.bin)
$(call COPYFILES,$(DATADIR)/tutorial_mctile.bin,$(EXEDIR)/atr/mctile.bin)
$(call COPYFILES,$(DATADIR)/testcard.bin,$(EXEDIR)/atr/testcard.bin)
$(call COPYFILES,$(DATADIR)/zdjtiles.bin,$(EXEDIR)/atr/zdjtiles.bin)
$(call COPYFILES,$(DATADIR)/zeltiles.bin,$(EXEDIR)/atr/zeltiles.bin)
$(call COPYFILES,$(DATADIR)/toccatina.imf,$(EXEDIR)/atr/toccatina.imf)
$(call COPYFILES,$(DATADIR)/island.imf,$(EXEDIR)/atr/island.imf)
$(call COPYFILES,$(DATADIR)/tetris.imf,$(EXEDIR)/atr/tetris.imf)
$(DIR2ATR) -S -p -B $(DIR2ATR_HOME)/dos25/bootcode $(EXEDIR)/midres.atari.atr $(EXEDIR)/atr
$(ATRAUTORUN) -i $(EXEDIR)/midres.atari.atr -o $(EXEDIR)/midres.atari.atr -f midres.exe
$(call RMFILES,$(EXEDIR)/atr/*.*)
$(call COPYFILES,$(DIR2ATR_HOME)/dos25/dos.sys,$(EXEDIR)/atr/dos.sys)
$(call COPYFILES,$(EXEDIR)/midres.atari,$(EXEDIR)/atr/midres.exe)
$(call COPYFILES,$(DATADIR)/slideshowa.dat,$(EXEDIR)/atr/slideshow)
$(call COPYFILES,$(DATADIR)/imagea01.pic,$(EXEDIR)/atr/imagea01.mpic)
$(call COPYFILES,$(DATADIR)/imagea02.pic,$(EXEDIR)/atr/imagea02.mpic)
$(call COPYFILES,$(DATADIR)/imagea03.pic,$(EXEDIR)/atr/imagea03.mpic)
$(call COPYFILES,$(DATADIR)/imagea04.pic,$(EXEDIR)/atr/imagea04.mpic)
$(call COPYFILES,$(DATADIR)/aaintroa.msc1,$(EXEDIR)/atr/zzintro.ms1)
$(call COPYFILES,$(DATADIR)/ztiles.bin,$(EXEDIR)/atr/ztiles.bin)
$(call COPYFILES,$(DATADIR)/tiles.bin,$(EXEDIR)/atr/tiles.bin)
$(call COPYFILES,$(DATADIR)/tutorial_mctile.bin,$(EXEDIR)/atr/mctile.bin)
$(call COPYFILES,$(DATADIR)/testcard.bin,$(EXEDIR)/atr/testcard.bin)
$(call COPYFILES,$(DATADIR)/zdjtiles.bin,$(EXEDIR)/atr/zdjtiles.bin)
$(call COPYFILES,$(DATADIR)/zeltiles.bin,$(EXEDIR)/atr/zeltiles.bin)
$(call COPYFILES,$(DATADIR)/toccatina.imf,$(EXEDIR)/atr/toccatina.imf)
$(call COPYFILES,$(DATADIR)/island.imf,$(EXEDIR)/atr/island.imf)
$(call COPYFILES,$(DATADIR)/tetris.imf,$(EXEDIR)/atr/tetris.imf)
$(DIR2ATR) -E -p -B $(DIR2ATR_HOME)/dos25/bootcode $(EXEDIR)/midres.atari.ed.atr $(EXEDIR)/atr
$(ATRAUTORUN) -i $(EXEDIR)/midres.atari.ed.atr -o $(EXEDIR)/midres.atari.ed.atr -f midres.exe
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR C128
# -------------------------------------------------------------------
midres.embedded.c128:
obj/c128/midres_atari_impl.o: src/midres_atari_impl.asm
$(ASM) -t c128 -oobj/c128/midres_atari_impl.o src/midres_atari_impl.asm
obj/c128/midres_c64_impl.o: src/midres_c64_impl.asm
$(ASM) -t c128 -oobj/c128/midres_c64_impl.o src/midres_c64_impl.asm
obj/c128/midres_plus4_impl.o: src/midres_plus4_impl.asm
$(ASM) -t c128 -oobj/c128/midres_plus4_impl.o src/midres_plus4_impl.asm
obj/c128/midres_vic20_impl.o: src/midres_vic20_impl.asm
$(ASM) -t c128 -oobj/c128/midres_vic20_impl.o src/midres_vic20_impl.asm
obj/c128/midres_sid_impl.o: src/midres_sid_impl.asm
$(ASM) -t c128 -oobj/c128/midres_sid_impl.o src/midres_sid_impl.asm
obj/c128/midres_ted_impl.o: src/midres_ted_impl.asm
$(ASM) -t c128 -oobj/c128/midres_ted_impl.o src/midres_ted_impl.asm
obj/c128/midres_pokey_impl.o: src/midres_pokey_impl.asm
$(ASM) -t c128 -oobj/c128/midres_pokey_impl.o src/midres_pokey_impl.asm
obj/c128/%.o: $(LIB_INCLUDES) $(LIB_SOURCES)
$(CC) -T -l $(@:.o=.asm) -t c128 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/c128/,src/,$(@:.o=.c))
$(LIBDIR)/midres.c128.lib: midres.embedded.c128 $(LIB_INCLUDES) $(subst PLATFORM,c128,$(LIB_OBJS)) obj/c128/midres_atari_impl.o obj/c128/midres_c64_impl.o obj/c128/midres_vic20_impl.o obj/c128/midres_plus4_impl.o obj/c128/midres_sid_impl.o obj/c128/midres_ted_impl.o obj/c128/midres_pokey_impl.o
$(AR) r $(LIBDIR)/midres.c128.lib $(subst PLATFORM,c128,$(LIB_OBJS)) obj/c128/midres_atari_impl.o obj/c128/midres_c64_impl.o obj/c128/midres_vic20_impl.o obj/c128/midres_plus4_impl.o obj/c128/midres_sid_impl.o obj/c128/midres_ted_impl.o obj/c128/midres_pokey_impl.o
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR C128
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.c128 midres.MSC1.c128
midres.MSC1.embedded.c128:
$(FILE2INCLUDE) -i $(DATADIR)/slideshow64.dat -n slideshow -i $(DATADIR)/image6401.mpic -n image6401.mpic -i $(DATADIR)/image6402.mpic -n image6402.mpic -i $(DATADIR)/image6403.mpic -n image6403.mpic -i $(DATADIR)/image6404.mpic -n image6404.mpic -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aatiles.bin -n aatiles.bin -i $(DATADIR)/aaintro64.mpic -n aaintro.mpic -i $(DATADIR)/tutorial_mctile.bin -n mctile.bin -i $(DATADIR)/testcard.bin -n testcard.bin -i $(DATADIR)/zdjtiles.bin -n zdjtiles.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
obj/c128/%.o: $(SOURCES)
$(CC) -T -l $(@:.o=.asm) -t c128 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/c128/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.c128: midres.MSC1.embedded.c128 $(subst PLATFORM,c128,$(OBJS))
$(CC) -Ln democ128.lbl -t c128 -C cfg/c128.cfg $(LDFLAGS) -m $(EXEDIR)/midres.c128.map -o $(EXEDIR)/midres.c128 $(subst PLATFORM,c128,$(OBJS)) $(LIBDIR)/midres.c128.lib
$(call RMFILES,$(EXEDIR)/midres.c128.d64)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c128 $(EXEDIR)/midres.c128.d64
$(CC1541) -f slideshow -w $(DATADIR)/slideshow64.dat $(EXEDIR)/midres.c128.d64
$(CC1541) -f image6401.mpic -w $(DATADIR)/image6401.mpic $(EXEDIR)/midres.c128.d64
$(CC1541) -f image6402.mpic -w $(DATADIR)/image6402.mpic $(EXEDIR)/midres.c128.d64
$(CC1541) -f image6403.mpic -w $(DATADIR)/image6403.mpic $(EXEDIR)/midres.c128.d64
$(CC1541) -f image6404.mpic -w $(DATADIR)/image6404.mpic $(EXEDIR)/midres.c128.d64
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro64.msc1 $(EXEDIR)/midres.c128.d64
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c128.d64
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles.bin $(EXEDIR)/midres.c128.d64
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro64.mpic $(EXEDIR)/midres.c128.d64
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c128.d64
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c128.d64
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c128.d64
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c128.d64
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c128.d64
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c128.d64
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c128.d64
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c128.d64
$(call RMFILES,$(EXEDIR)/midres.c128.d71)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c128 $(EXEDIR)/midres.c128.d71
$(CC1541) -f slideshow -w $(DATADIR)/slideshow64.dat $(EXEDIR)/midres.c128.d71
$(CC1541) -f image6401.mpic -w $(DATADIR)/image6401.mpic $(EXEDIR)/midres.c128.d71
$(CC1541) -f image6402.mpic -w $(DATADIR)/image6402.mpic $(EXEDIR)/midres.c128.d71
$(CC1541) -f image6403.mpic -w $(DATADIR)/image6403.mpic $(EXEDIR)/midres.c128.d71
$(CC1541) -f image6404.mpic -w $(DATADIR)/image6404.mpic $(EXEDIR)/midres.c128.d71
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro64.msc1 $(EXEDIR)/midres.c128.d71
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c128.d71
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles.bin $(EXEDIR)/midres.c128.d71
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro64.mpic $(EXEDIR)/midres.c128.d71
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c128.d71
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c128.d71
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c128.d71
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c128.d71
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c128.d71
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c128.d71
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c128.d71
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c128.d71
$(call RMFILES,$(EXEDIR)/midres.c128.d81)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c128 $(EXEDIR)/midres.c128.d81
$(CC1541) -f slideshow -w $(DATADIR)/slideshow64.dat $(EXEDIR)/midres.c128.d81
$(CC1541) -f image6401.mpic -w $(DATADIR)/image6401.mpic $(EXEDIR)/midres.c128.d81
$(CC1541) -f image6402.mpic -w $(DATADIR)/image6402.mpic $(EXEDIR)/midres.c128.d81
$(CC1541) -f image6403.mpic -w $(DATADIR)/image6403.mpic $(EXEDIR)/midres.c128.d81
$(CC1541) -f image6404.mpic -w $(DATADIR)/image6404.mpic $(EXEDIR)/midres.c128.d81
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro64.msc1 $(EXEDIR)/midres.c128.d81
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c128.d81
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles.bin $(EXEDIR)/midres.c128.d81
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro64.mpic $(EXEDIR)/midres.c128.d81
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c128.d81
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c128.d81
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c128.d81
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c128.d81
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c128.d81
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c128.d81
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c128.d81
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c128.d81
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR C16
# -------------------------------------------------------------------
midres.embedded.c16:
obj/c16/midres_atari_impl.o: src/midres_atari_impl.asm
$(ASM) -t c16 -oobj/c16/midres_atari_impl.o src/midres_atari_impl.asm
obj/c16/midres_c64_impl.o: src/midres_c64_impl.asm
$(ASM) -t c16 -oobj/c16/midres_c64_impl.o src/midres_c64_impl.asm
obj/c16/midres_plus4_impl.o: src/midres_plus4_impl.asm
$(ASM) -t c16 -oobj/c16/midres_plus4_impl.o src/midres_plus4_impl.asm
obj/c16/midres_vic20_impl.o: src/midres_vic20_impl.asm
$(ASM) -t c16 -oobj/c16/midres_vic20_impl.o src/midres_vic20_impl.asm
obj/c16/midres_sid_impl.o: src/midres_sid_impl.asm
$(ASM) -t c16 -oobj/c16/midres_sid_impl.o src/midres_sid_impl.asm
obj/c16/midres_ted_impl.o: src/midres_ted_impl.asm
$(ASM) -t c16 -oobj/c16/midres_ted_impl.o src/midres_ted_impl.asm
obj/c16/midres_pokey_impl.o: src/midres_pokey_impl.asm
$(ASM) -t c16 -oobj/c16/midres_pokey_impl.o src/midres_pokey_impl.asm
obj/c16/%.o: $(LIB_INCLUDES) $(LIB_SOURCES)
$(CC) -T -l $(@:.o=.asm) -t c16 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/c16/,src/,$(@:.o=.c))
$(LIBDIR)/midres.c16.lib: midres.embedded.c16 $(LIB_INCLUDES) $(subst PLATFORM,c16,$(LIB_OBJS)) obj/c16/midres_atari_impl.o obj/c16/midres_c64_impl.o obj/c16/midres_vic20_impl.o obj/c16/midres_plus4_impl.o obj/c16/midres_sid_impl.o obj/c16/midres_ted_impl.o obj/c16/midres_pokey_impl.o
$(AR) r $(LIBDIR)/midres.c16.lib $(subst PLATFORM,c16,$(LIB_OBJS)) obj/c16/midres_atari_impl.o obj/c16/midres_c64_impl.o obj/c16/midres_vic20_impl.o obj/c16/midres_plus4_impl.o obj/c16/midres_sid_impl.o obj/c16/midres_ted_impl.o obj/c16/midres_pokey_impl.o
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR C16
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.c16 midres.MSC1.c16
midres.MSC1.embedded.c16:
$(FILE2INCLUDE) -i $(DATADIR)/slideshow16.dat -n slideshow -i $(DATADIR)/image1601.mpic -n image1601.mpic -i $(DATADIR)/image1602.mpic -n image1602.mpic -i $(DATADIR)/image1603.mpic -n image1603.mpic -i $(DATADIR)/image1604.mpic -n image1604.mpic -i $(DATADIR)/aaintro16.msc1 -n zzintro.ms1 -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aatiles4.bin -n aatiles.bin -i $(DATADIR)/aaintro16.mpic -n aaintro.mpic -i $(DATADIR)/tutorial_mctile.bin -n mctile.bin -i $(DATADIR)/testcard.bin -n testcard.bin -i $(DATADIR)/zdjtiles.bin -n zdjtiles.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
obj/c16/%.o: $(SOURCES)
$(CC) -T -l $(@:.o=.asm) -t c16 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/c16/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.c16: midres.MSC1.embedded.c16 $(subst PLATFORM,c16,$(OBJS))
$(CC) -Ln democ16.lbl -t c16 -C cfg/c16.cfg $(LDFLAGS) -m $(EXEDIR)/midres.c16.map -o $(EXEDIR)/midres.c16 $(subst PLATFORM,c16,$(OBJS)) $(LIBDIR)/midres.c16.lib
$(call RMFILES,$(EXEDIR)/midres.c16.d64)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c16 $(EXEDIR)/midres.c16.d64
$(CC1541) -f -w $(EXEDIR)/midres.c16.d64
$(CC1541) -f slideshow -w $(DATADIR)/slideshow16.dat $(EXEDIR)/midres.c16.d64
$(CC1541) -f image1601.mpic -w $(DATADIR)/image1601.mpic $(EXEDIR)/midres.c16.d64
$(CC1541) -f image1602.mpic -w $(DATADIR)/image1602.mpic $(EXEDIR)/midres.c16.d64
$(CC1541) -f image1603.mpic -w $(DATADIR)/image1603.mpic $(EXEDIR)/midres.c16.d64
$(CC1541) -f image1604.mpic -w $(DATADIR)/image1604.mpic $(EXEDIR)/midres.c16.d64
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro16.msc1 $(EXEDIR)/midres.c16.d64
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c16.d64
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles4.bin $(EXEDIR)/midres.c16.d64
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro16.mpic $(EXEDIR)/midres.c16.d64
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c16.d64
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c16.d64
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c16.d64
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c16.d64
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c16.d64
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c16.d64
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c16.d64
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c16.d64
$(call RMFILES,$(EXEDIR)/midres.c16.d71)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c16 $(EXEDIR)/midres.c16.d71
$(CC1541) -f -w $(EXEDIR)/midres.c16.d71
$(CC1541) -f slideshow -w $(DATADIR)/slideshow16.dat $(EXEDIR)/midres.c16.d71
$(CC1541) -f image1601.mpic -w $(DATADIR)/image1601.mpic $(EXEDIR)/midres.c16.d71
$(CC1541) -f image1602.mpic -w $(DATADIR)/image1602.mpic $(EXEDIR)/midres.c16.d71
$(CC1541) -f image1603.mpic -w $(DATADIR)/image1603.mpic $(EXEDIR)/midres.c16.d71
$(CC1541) -f image1604.mpic -w $(DATADIR)/image1604.mpic $(EXEDIR)/midres.c16.d71
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro16.msc1 $(EXEDIR)/midres.c16.d71
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c16.d71
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles4.bin $(EXEDIR)/midres.c16.d71
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro16.mpic $(EXEDIR)/midres.c16.d71
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c16.d71
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c16.d71
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c16.d71
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c16.d71
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c16.d71
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c16.d71
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c16.d71
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c16.d71
$(call RMFILES,$(EXEDIR)/midres.c16.d81)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c16 $(EXEDIR)/midres.c16.d81
$(CC1541) -f -w $(EXEDIR)/midres.c16.d81
$(CC1541) -f slideshow -w $(DATADIR)/slideshow16.dat $(EXEDIR)/midres.c16.d81
$(CC1541) -f image1601.mpic -w $(DATADIR)/image1601.mpic $(EXEDIR)/midres.c16.d81
$(CC1541) -f image1602.mpic -w $(DATADIR)/image1602.mpic $(EXEDIR)/midres.c16.d81
$(CC1541) -f image1603.mpic -w $(DATADIR)/image1603.mpic $(EXEDIR)/midres.c16.d81
$(CC1541) -f image1604.mpic -w $(DATADIR)/image1604.mpic $(EXEDIR)/midres.c16.d81
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro16.msc1 $(EXEDIR)/midres.c16.d81
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c16.d81
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles4.bin $(EXEDIR)/midres.c16.d81
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro16.mpic $(EXEDIR)/midres.c16.d81
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c16.d81
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c16.d81
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c16.d81
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c16.d81
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c16.d81
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c16.d81
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c16.d81
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c16.d81
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR C64
# -------------------------------------------------------------------
midres.embedded.c64:
obj/c64/midres_atari_impl.o: src/midres_atari_impl.asm
$(ASM) -t c64 -oobj/c64/midres_atari_impl.o src/midres_atari_impl.asm
obj/c64/midres_c64_impl.o: src/midres_c64_impl.asm
$(ASM) -t c64 -oobj/c64/midres_c64_impl.o src/midres_c64_impl.asm
obj/c64/midres_plus4_impl.o: src/midres_plus4_impl.asm
$(ASM) -t c64 -oobj/c64/midres_plus4_impl.o src/midres_plus4_impl.asm
obj/c64/midres_vic20_impl.o: src/midres_vic20_impl.asm
$(ASM) -t c64 -oobj/c64/midres_vic20_impl.o src/midres_vic20_impl.asm
obj/c64/midres_sid_impl.o: src/midres_sid_impl.asm
$(ASM) -t c64 -oobj/c64/midres_sid_impl.o src/midres_sid_impl.asm
obj/c64/midres_ted_impl.o: src/midres_ted_impl.asm
$(ASM) -t c64 -oobj/c64/midres_ted_impl.o src/midres_ted_impl.asm
obj/c64/midres_pokey_impl.o: src/midres_pokey_impl.asm
$(ASM) -t c64 -oobj/c64/midres_pokey_impl.o src/midres_pokey_impl.asm
obj/c64/%.o: $(LIB_INCLUDES) $(LIB_SOURCES)
$(CC) -T -l $(@:.o=.asm) -t c64 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/c64/,src/,$(@:.o=.c))
$(LIBDIR)/midres.c64.lib: midres.embedded.c64 $(LIB_INCLUDES) $(subst PLATFORM,c64,$(LIB_OBJS)) obj/c64/midres_atari_impl.o obj/c64/midres_c64_impl.o obj/c64/midres_vic20_impl.o obj/c64/midres_plus4_impl.o obj/c64/midres_sid_impl.o obj/c64/midres_ted_impl.o obj/c64/midres_pokey_impl.o
$(AR) r $(LIBDIR)/midres.c64.lib $(subst PLATFORM,c64,$(LIB_OBJS)) obj/c64/midres_atari_impl.o obj/c64/midres_c64_impl.o obj/c64/midres_vic20_impl.o obj/c64/midres_plus4_impl.o obj/c64/midres_sid_impl.o obj/c64/midres_ted_impl.o obj/c64/midres_pokey_impl.o
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR C64
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.c64 midres.MSC1.c64
midres.MSC1.embedded.c64:
$(FILE2INCLUDE) -i $(DATADIR)/slideshow64.dat -n slideshow -i $(DATADIR)/image6401.mpic -n image6401.mpic -i $(DATADIR)/image6402.mpic -n image6402.mpic -i $(DATADIR)/image6403.mpic -n image6403.mpic -i $(DATADIR)/image6404.mpic -n image6404.mpic -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aatiles.bin -n aatiles.bin -i $(DATADIR)/aaintro64.mpic -n aaintro.mpic -i $(DATADIR)/tutorial_mctile.bin -n mctile.bin -i $(DATADIR)/testcard.bin -n testcard.bin -i $(DATADIR)/zdjtiles.bin -n zdjtiles.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
obj/c64/%.o: $(SOURCES)
$(CC) -T -l $(@:.o=.asm) -t c64 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/c64/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.c64: midres.MSC1.embedded.c64 $(subst PLATFORM,c64,$(OBJS))
$(CC) -Ln democ64.lbl -t c64 -C cfg/c64.cfg $(LDFLAGS) -m $(EXEDIR)/midres.c64.map -o $(EXEDIR)/midres.c64 $(subst PLATFORM,c64,$(OBJS)) $(LIBDIR)/midres.c64.lib
$(call RMFILES,$(EXEDIR)/midres.c64.d64)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c64 $(EXEDIR)/midres.c64.d64
$(CC1541) -f slideshow -w $(DATADIR)/slideshow64.dat $(EXEDIR)/midres.c64.d64
$(CC1541) -f image6401.mpic -w $(DATADIR)/image6401.mpic $(EXEDIR)/midres.c64.d64
$(CC1541) -f image6402.mpic -w $(DATADIR)/image6402.mpic $(EXEDIR)/midres.c64.d64
$(CC1541) -f image6403.mpic -w $(DATADIR)/image6403.mpic $(EXEDIR)/midres.c64.d64
$(CC1541) -f image6404.mpic -w $(DATADIR)/image6404.mpic $(EXEDIR)/midres.c64.d64
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro64.msc1 $(EXEDIR)/midres.c64.d64
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c64.d64
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles.bin $(EXEDIR)/midres.c64.d64
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro64.mpic $(EXEDIR)/midres.c64.d64
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c64.d64
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c64.d64
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c64.d64
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c64.d64
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c64.d64
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c64.d64
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c64.d64
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c64.d64
$(call RMFILES,$(EXEDIR)/midres.c64.d71)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c64 $(EXEDIR)/midres.c64.d71
$(CC1541) -f slideshow -w $(DATADIR)/slideshow64.dat $(EXEDIR)/midres.c64.d71
$(CC1541) -f image6401.mpic -w $(DATADIR)/image6401.mpic $(EXEDIR)/midres.c64.d71
$(CC1541) -f image6402.mpic -w $(DATADIR)/image6402.mpic $(EXEDIR)/midres.c64.d71
$(CC1541) -f image6403.mpic -w $(DATADIR)/image6403.mpic $(EXEDIR)/midres.c64.d71
$(CC1541) -f image6404.mpic -w $(DATADIR)/image6404.mpic $(EXEDIR)/midres.c64.d71
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro64.msc1 $(EXEDIR)/midres.c64.d71
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c64.d71
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles.bin $(EXEDIR)/midres.c64.d71
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro64.mpic $(EXEDIR)/midres.c64.d71
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c64.d71
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c64.d71
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c64.d71
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c64.d71
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c64.d71
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c64.d71
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c64.d71
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c64.d71
$(call RMFILES,$(EXEDIR)/midres.c64.d81)
$(CC1541) -f midres-single -w $(EXEDIR)/midres.c64 $(EXEDIR)/midres.c64.d81
$(CC1541) -f slideshow -w $(DATADIR)/slideshow64.dat $(EXEDIR)/midres.c64.d81
$(CC1541) -f image6401.mpic -w $(DATADIR)/image6401.mpic $(EXEDIR)/midres.c64.d81
$(CC1541) -f image6402.mpic -w $(DATADIR)/image6402.mpic $(EXEDIR)/midres.c64.d81
$(CC1541) -f image6403.mpic -w $(DATADIR)/image6403.mpic $(EXEDIR)/midres.c64.d81
$(CC1541) -f image6404.mpic -w $(DATADIR)/image6404.mpic $(EXEDIR)/midres.c64.d81
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro64.msc1 $(EXEDIR)/midres.c64.d81
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.c64.d81
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles.bin $(EXEDIR)/midres.c64.d81
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro64.mpic $(EXEDIR)/midres.c64.d81
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.c64.d81
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.c64.d81
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.c64.d81
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.c64.d81
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.c64.d81
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.c64.d81
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.c64.d81
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.c64.d81
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR COLECO
# -------------------------------------------------------------------
lib/midres.coleco.lib:
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR COLECO
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.coleco midres.MSC1.coleco
midres.MSC1.embedded.coleco:
$(FILE2INCLUDE) -i $(DATADIR)/mtiles.bin -n mtiles.bin -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -i $(DATADIR)/tutorial_mctile.bin -n tutorial_mctile.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
$(CC88) +coleco $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -o obj/coleco/rawdata.o src/rawdata.c
obj/coleco/midres_vdp_impl.o: src/midres_vdp_impl.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/coleco/midres_vdp_impl.o src/midres_vdp_impl.asm
obj/coleco/midres_io.o: src/midres_io.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/coleco/midres_io.o src/midres_io.asm
obj/coleco/%.o: $(SOURCES)
$(CC88) +coleco $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -o $@ $(subst obj/coleco/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.coleco: midres.MSC1.embedded.coleco $(subst PLATFORM,coleco,$(OBJS)) $(subst PLATFORM,coleco,$(LIB_OBJS)) obj/coleco/rawdata.o obj/coleco/midres_vdp_impl.o obj/coleco/midres_io.o
$(CC88) +coleco -m $(LDFLAGS88) obj/coleco/rawdata.o obj/coleco/midres_io.o obj/coleco/midres_vdp_impl.o obj/coleco/midres_control_011.o obj/coleco/midres_data.o obj/coleco/main.o -create-app
$(call COPYFILES,a.rom,$(EXEDIR)/midres.coleco.rom)
$(call RMFILES,a.*)
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR GB
# -------------------------------------------------------------------
lib/midres.gb.lib:
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR GB
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.gb midres.MSC1.gb
midres.MSC1.embedded.gb:
$(FILE2INCLUDE) -i $(DATADIR)/mtiles.bin -n mtiles.bin -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -i $(DATADIR)/tutorial_mctile.bin -n tutorial_mctile.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
$(CC88) +gb $(CFLAGS) -c $(CFLAGS88) -o obj/gb/rawdata.o src/rawdata.c
obj/gb/midres_vdp_impl.o: src/midres_vdp_impl.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/gb/midres_vdp_impl.o src/midres_vdp_impl.asm
obj/gb/midres_io.o: src/midres_io.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/gb/midres_io.o src/midres_io.asm
obj/gb/%.o: $(SOURCES)
$(CC88) +gb $(CFLAGS) -c $(CFLAGS88) -o $@ $(subst obj/gb/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.gb: midres.MSC1.embedded.gb $(subst PLATFORM,gb,$(OBJS)) $(subst PLATFORM,gb,$(LIB_OBJS)) obj/gb/rawdata.o obj/gb/midres_vdp_impl.o obj/gb/midres_io.o
$(CC88) +gb -m $(LDFLAGS88) obj/gb/rawdata.o obj/gb/midres_io.o obj/gb/midres_vdp_impl.o obj/gb/midres_control_011.o obj/gb/midres_data.o obj/gb/main.o -create-app
$(call COPYFILES,a.gb,$(EXEDIR)/midres.gb.gb)
$(call RMFILES,a.*)
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR LM80C
# -------------------------------------------------------------------
lib/midres.lm80c.lib:
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR LM80C
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.lm80c midres.MSC1.lm80c
midres.MSC1.embedded.lm80c:
$(FILE2INCLUDE) -i $(DATADIR)/tetris.imf -n tetris.imf -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -c src/rawdata.c -h src/rawdata.h
$(CC88) +lm80c $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -DFRAME_BUFFER -o obj/lm80c/rawdata.o src/rawdata.c
obj/lm80c/midres_vdp_impl.o: src/midres_vdp_impl.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/lm80c/midres_vdp_impl.o src/midres_vdp_impl.asm
obj/lm80c/midres_io.o: src/midres_io.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/lm80c/midres_io.o src/midres_io.asm
obj/lm80c/%.o: $(SOURCES)
$(CC88) +lm80c $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -DFRAME_BUFFER -o $@ $(subst obj/lm80c/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.lm80c: midres.MSC1.embedded.lm80c $(subst PLATFORM,lm80c,$(OBJS)) $(subst PLATFORM,lm80c,$(LIB_OBJS)) obj/lm80c/rawdata.o obj/lm80c/midres_vdp_impl.o obj/lm80c/midres_io.o
$(CC88) +lm80c -m $(LDFLAGS88) obj/lm80c/rawdata.o obj/lm80c/midres_io.o obj/lm80c/midres_vdp_impl.o obj/lm80c/midres_control_011.o obj/lm80c/midres_data.o obj/lm80c/main.o -create-app
$(call COPYFILES,a.PRG,$(EXEDIR)/midres.lm80c.prg)
$(call RMFILES,a.*)
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR MSX
# -------------------------------------------------------------------
lib/midres.msx.lib:
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR MSX
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.msx midres.MSC1.msx
midres.MSC1.embedded.msx:
$(FILE2INCLUDE) -i $(DATADIR)/tetris.imf -n tetris.imf -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -c src/rawdata.c -h src/rawdata.h
$(CC88) +msx $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -DFRAME_BUFFER -o obj/msx/rawdata.o src/rawdata.c
obj/msx/midres_vdp_impl.o: src/midres_vdp_impl.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/msx/midres_vdp_impl.o src/midres_vdp_impl.asm
obj/msx/midres_io.o: src/midres_io.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/msx/midres_io.o src/midres_io.asm
obj/msx/%.o: $(SOURCES)
$(CC88) +msx $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -DFRAME_BUFFER -o $@ $(subst obj/msx/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.msx: midres.MSC1.embedded.msx $(subst PLATFORM,msx,$(OBJS)) $(subst PLATFORM,msx,$(LIB_OBJS)) obj/msx/rawdata.o obj/msx/midres_vdp_impl.o obj/msx/midres_io.o
$(CC88) +msx -subtype=rom -m $(LDFLAGS88) obj/msx/rawdata.o obj/msx/midres_io.o obj/msx/midres_vdp_impl.o obj/msx/midres_control_011.o obj/msx/midres_data.o obj/msx/main.o -create-app
$(call COPYFILES,a.rom,$(EXEDIR)/midres.msx.rom)
$(call RMFILES,a.*)
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR MTX500
# -------------------------------------------------------------------
lib/midres.mtx500.lib:
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR MTX500
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.mtx500 midres.MSC1.mtx500
midres.MSC1.embedded.mtx500:
$(FILE2INCLUDE) -i $(DATADIR)/mtiles.bin -n mtiles.bin -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -i $(DATADIR)/tutorial_mctile.bin -n tutorial_mctile.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
$(CC88) +mtx $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -DFRAME_BUFFER -o obj/mtx500/rawdata.o src/rawdata.c
obj/mtx500/midres_vdp_impl.o: src/midres_vdp_impl.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/mtx500/midres_vdp_impl.o src/midres_vdp_impl.asm
obj/mtx500/midres_io.o: src/midres_io.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/mtx500/midres_io.o src/midres_io.asm
obj/mtx500/%.o: $(SOURCES)
$(CC88) +mtx $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -DFRAME_BUFFER -o $@ $(subst obj/mtx500/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.mtx500: midres.MSC1.embedded.mtx500 $(subst PLATFORM,mtx500,$(OBJS)) $(subst PLATFORM,mtx500,$(LIB_OBJS)) obj/mtx500/rawdata.o obj/mtx500/midres_vdp_impl.o obj/mtx500/midres_io.o
$(CC88) +mtx -m $(LDFLAGS88) obj/mtx500/rawdata.o obj/mtx500/midres_io.o obj/mtx500/midres_vdp_impl.o obj/mtx500/midres_control_011.o obj/mtx500/midres_data.o obj/mtx500/main.o -create-app
$(call COPYFILES,a.Array,$(EXEDIR)/midres.mtx500.Array)
$(call RMFILES,a.*)
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR PLUS4
# -------------------------------------------------------------------
midres.embedded.plus4:
obj/plus4/midres_atari_impl.o: src/midres_atari_impl.asm
$(ASM) -t plus4 -oobj/plus4/midres_atari_impl.o src/midres_atari_impl.asm
obj/plus4/midres_c64_impl.o: src/midres_c64_impl.asm
$(ASM) -t plus4 -oobj/plus4/midres_c64_impl.o src/midres_c64_impl.asm
obj/plus4/midres_plus4_impl.o: src/midres_plus4_impl.asm
$(ASM) -t plus4 -oobj/plus4/midres_plus4_impl.o src/midres_plus4_impl.asm
obj/plus4/midres_vic20_impl.o: src/midres_vic20_impl.asm
$(ASM) -t plus4 -oobj/plus4/midres_vic20_impl.o src/midres_vic20_impl.asm
obj/plus4/midres_sid_impl.o: src/midres_sid_impl.asm
$(ASM) -t plus4 -oobj/plus4/midres_sid_impl.o src/midres_sid_impl.asm
obj/plus4/midres_ted_impl.o: src/midres_ted_impl.asm
$(ASM) -t plus4 -oobj/plus4/midres_ted_impl.o src/midres_ted_impl.asm
obj/plus4/midres_pokey_impl.o: src/midres_pokey_impl.asm
$(ASM) -t plus4 -oobj/plus4/midres_pokey_impl.o src/midres_pokey_impl.asm
obj/plus4/%.o: $(LIB_INCLUDES) $(LIB_SOURCES)
$(CC) -T -l $(@:.o=.asm) -t plus4 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/plus4/,src/,$(@:.o=.c))
$(LIBDIR)/midres.plus4.lib: midres.embedded.plus4 $(LIB_INCLUDES) $(subst PLATFORM,plus4,$(LIB_OBJS)) obj/plus4/midres_atari_impl.o obj/plus4/midres_c64_impl.o obj/plus4/midres_vic20_impl.o obj/plus4/midres_plus4_impl.o obj/plus4/midres_sid_impl.o obj/plus4/midres_ted_impl.o obj/plus4/midres_pokey_impl.o
$(AR) r $(LIBDIR)/midres.plus4.lib $(subst PLATFORM,plus4,$(LIB_OBJS)) obj/plus4/midres_atari_impl.o obj/plus4/midres_c64_impl.o obj/plus4/midres_vic20_impl.o obj/plus4/midres_plus4_impl.o obj/plus4/midres_sid_impl.o obj/plus4/midres_ted_impl.o obj/plus4/midres_pokey_impl.o
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR PLUS4
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.plus4 midres.MSC1.plus4
midres.MSC1.embedded.plus4:
$(FILE2INCLUDE) -i $(DATADIR)/slideshow16.dat -n slideshow -i $(DATADIR)/image1601.mpic -n image1601.mpic -i $(DATADIR)/image1602.mpic -n image1602.mpic -i $(DATADIR)/image1603.mpic -n image1603.mpic -i $(DATADIR)/image1604.mpic -n image1604.mpic -i $(DATADIR)/aaintro16.msc1 -n zzintro.ms1 -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aatiles4.bin -n aatiles.bin -i $(DATADIR)/aaintro16.mpic -n aaintro.mpic -i $(DATADIR)/tutorial_mctile.bin -n mctile.bin -i $(DATADIR)/testcard.bin -n testcard.bin -i $(DATADIR)/zdjtiles.bin -n zdjtiles.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
obj/plus4/%.o: $(SOURCES)
$(CC) -T -l $(@:.o=.asm) -t plus4 -c $(CFLAGS) -Osir -Cl -D__CBM__ -o $@ $(subst obj/plus4/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.plus4: midres.MSC1.embedded.plus4 $(subst PLATFORM,plus4,$(OBJS))
$(CC) -Ln demoplus4.lbl -t plus4 -C cfg/plus4.cfg $(LDFLAGS) -m $(EXEDIR)/midres.plus4.map -o $(EXEDIR)/midres.plus4 $(subst PLATFORM,plus4,$(OBJS)) $(LIBDIR)/midres.plus4.lib
$(call RMFILES,$(EXEDIR)/midres.plus4.d64)
$(CC1541) -f loader -w $(DATADIR)/loader4.prg $(EXEDIR)/midres.plus4.d64
$(CC1541) -f midres-single -w $(EXEDIR)/midres.plus4 $(EXEDIR)/midres.plus4.d64
$(CC1541) -f slideshow -w $(DATADIR)/slideshow16.dat $(EXEDIR)/midres.plus4.d64
$(CC1541) -f image1601.mpic -w $(DATADIR)/image1601.mpic $(EXEDIR)/midres.plus4.d64
$(CC1541) -f image1602.mpic -w $(DATADIR)/image1602.mpic $(EXEDIR)/midres.plus4.d64
$(CC1541) -f image1603.mpic -w $(DATADIR)/image1603.mpic $(EXEDIR)/midres.plus4.d64
$(CC1541) -f image1604.mpic -w $(DATADIR)/image1604.mpic $(EXEDIR)/midres.plus4.d64
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro16.msc1 $(EXEDIR)/midres.plus4.d64
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.plus4.d64
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles4.bin $(EXEDIR)/midres.plus4.d64
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro16.mpic $(EXEDIR)/midres.plus4.d64
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.plus4.d64
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.plus4.d64
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.plus4.d64
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.plus4.d64
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.plus4.d64
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.plus4.d64
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.plus4.d64
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.plus4.d64
$(call RMFILES,$(EXEDIR)/midres.plus4.d71)
$(CC1541) -f loader -w $(DATADIR)/loader4.prg $(EXEDIR)/midres.plus4.d71
$(CC1541) -f midres-single -w $(EXEDIR)/midres.plus4 $(EXEDIR)/midres.plus4.d71
$(CC1541) -f slideshow -w $(DATADIR)/slideshow16.dat $(EXEDIR)/midres.plus4.d71
$(CC1541) -f image1601.mpic -w $(DATADIR)/image1601.mpic $(EXEDIR)/midres.plus4.d71
$(CC1541) -f image1602.mpic -w $(DATADIR)/image1602.mpic $(EXEDIR)/midres.plus4.d71
$(CC1541) -f image1603.mpic -w $(DATADIR)/image1603.mpic $(EXEDIR)/midres.plus4.d71
$(CC1541) -f image1604.mpic -w $(DATADIR)/image1604.mpic $(EXEDIR)/midres.plus4.d71
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro16.msc1 $(EXEDIR)/midres.plus4.d71
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.plus4.d71
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles4.bin $(EXEDIR)/midres.plus4.d71
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro16.mpic $(EXEDIR)/midres.plus4.d71
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.plus4.d71
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.plus4.d71
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.plus4.d71
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.plus4.d71
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.plus4.d71
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.plus4.d71
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.plus4.d71
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.plus4.d71
$(call RMFILES,$(EXEDIR)/midres.plus4.d81)
$(CC1541) -f loader -w $(DATADIR)/loader4.prg $(EXEDIR)/midres.plus4.d81
$(CC1541) -f midres-single -w $(EXEDIR)/midres.plus4 $(EXEDIR)/midres.plus4.d81
$(CC1541) -f slideshow -w $(DATADIR)/slideshow16.dat $(EXEDIR)/midres.plus4.d81
$(CC1541) -f image1601.mpic -w $(DATADIR)/image1601.mpic $(EXEDIR)/midres.plus4.d81
$(CC1541) -f image1602.mpic -w $(DATADIR)/image1602.mpic $(EXEDIR)/midres.plus4.d81
$(CC1541) -f image1603.mpic -w $(DATADIR)/image1603.mpic $(EXEDIR)/midres.plus4.d81
$(CC1541) -f image1604.mpic -w $(DATADIR)/image1604.mpic $(EXEDIR)/midres.plus4.d81
$(CC1541) -f zzintro.ms1 -w $(DATADIR)/aaintro16.msc1 $(EXEDIR)/midres.plus4.d81
$(CC1541) -f tiles.bin -w $(DATADIR)/tiles.bin $(EXEDIR)/midres.plus4.d81
$(CC1541) -f aatiles.bin -w $(DATADIR)/aatiles4.bin $(EXEDIR)/midres.plus4.d81
$(CC1541) -f aaintro.mpic -w $(DATADIR)/aaintro16.mpic $(EXEDIR)/midres.plus4.d81
$(CC1541) -f mctile.bin -w $(DATADIR)/tutorial_mctile.bin $(EXEDIR)/midres.plus4.d81
$(CC1541) -f testcard.bin -w $(DATADIR)/testcard.bin $(EXEDIR)/midres.plus4.d81
$(CC1541) -f zdjtiles.bin -w $(DATADIR)/zdjtiles.bin $(EXEDIR)/midres.plus4.d81
$(CC1541) -f zeltiles.bin -w $(DATADIR)/zeltiles.bin $(EXEDIR)/midres.plus4.d81
$(CC1541) -f toccatina.imf -w $(DATADIR)/toccatina.imf $(EXEDIR)/midres.plus4.d81
$(CC1541) -f alice.imf -w $(DATADIR)/alice.imf $(EXEDIR)/midres.plus4.d81
$(CC1541) -f island.imf -w $(DATADIR)/island.imf $(EXEDIR)/midres.plus4.d81
$(CC1541) -f tetris.imf -w $(DATADIR)/tetris.imf $(EXEDIR)/midres.plus4.d81
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR SVI
# -------------------------------------------------------------------
lib/midres.svi.lib:
# -------------------------------------------------------------------
# --- DEMO/TUTORIALS FOR SVI
# -------------------------------------------------------------------
.PHONY: midres.MSC1.embedded.svi midres.MSC1.svi
midres.MSC1.embedded.svi:
$(FILE2INCLUDE) -i $(DATADIR)/mtiles.bin -n mtiles.bin -i $(DATADIR)/tiles.bin -n tiles.bin -i $(DATADIR)/aaintro64.msc1 -n zzintro.ms1 -i $(DATADIR)/tutorial_mctile.bin -n tutorial_mctile.bin -i $(DATADIR)/zeltiles.bin -n zeltiles.bin -i $(DATADIR)/toccatina.imf -n toccatina.imf -i $(DATADIR)/alice.imf -n alice.imf -i $(DATADIR)/island.imf -n island.imf -i $(DATADIR)/tetris.imf -n tetris.imf -c src/rawdata.c -h src/rawdata.h
$(CC88) +svi $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -o obj/svi/rawdata.o src/rawdata.c
obj/svi/midres_vdp_impl.o: src/midres_vdp_impl.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/svi/midres_vdp_impl.o src/midres_vdp_impl.asm
obj/svi/midres_io.o: src/midres_io.asm
$(ASM88) -D__SCCZ80 -m -s -mz80 -oobj/svi/midres_io.o src/midres_io.asm
obj/svi/%.o: $(SOURCES)
$(CC88) +svi $(CFLAGS) -c $(CFLAGS88) -DGRAPHIC_MODE_I -o $@ $(subst obj/svi/,src/,$(@:.o=.c))
$(EXEDIR)/midres.MSC1.svi: midres.MSC1.embedded.svi $(subst PLATFORM,svi,$(OBJS)) $(subst PLATFORM,svi,$(LIB_OBJS)) obj/svi/rawdata.o obj/svi/midres_vdp_impl.o obj/svi/midres_io.o
$(CC88) +svi -m $(LDFLAGS88) obj/svi/rawdata.o obj/svi/midres_io.o obj/svi/midres_vdp_impl.o obj/svi/midres_control_011.o obj/svi/midres_data.o obj/svi/main.o -create-app
$(call COPYFILES,a.cas,$(EXEDIR)/midres.svi.cas)
$(call RMFILES,a.*)
# -------------------------------------------------------------------
# --- MIDRES LIBRARY FOR VIC20
# -------------------------------------------------------------------
midres.embedded.vic20:
obj/vic20/midres_atari_impl.o: src/midres_atari_impl.asm
$(ASM) -t vic20 -oobj/vic20/midres_atari_impl.o src/midres_atari_impl.asm
obj/vic20/midres_c64_impl.o: src/midres_c64_impl.asm
$(ASM) -t vic20 -oobj/vic20/midres_c64_impl.o src/midres_c64_impl.asm
obj/vic20/midres_plus4_impl.o: src/midres_plus4_impl.asm
$(ASM) -t vic20 -oobj/vic20/midres_plus4_impl.o src/midres_plus4_impl.asm
obj/vic20/midres_vic20_impl.o: src/midres_vic20_impl.asm
$(ASM) -t vic20 -oobj/vic20/midres_vic20_impl.o src/midres_vic20_impl.asm
obj/vic20/midres_sid_impl.o: src/midres_sid_impl.asm
$(ASM) -t vic20 -oobj/vic20/midres_sid_impl.o src/midres_sid_impl.asm
obj/vic20/midres_ted_impl.o: src/midres_ted_impl.asm
$(ASM) -t vic20 -oobj/vic20/midres_ted_impl.o src/midres_ted_impl.asm
obj/vic20/midres_pokey_impl.o: src/midres_pokey_impl.asm
$(ASM) -t vic20 -oobj/vic20/midres_pokey_impl.o src/midres_pokey_impl.asm
obj/vic20/%.o: $(LIB_INCLUDES) $(LIB_SOURCES)