aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 27 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index d1d8410..583498d 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@
CC=cl65
# System cl65 will compile for. Don't expect this to work if you change it
-# (though possibly atarixl might work, with newer cc65s)
+# (though possibly atarixl might work someday, with newer cc65s)
SYS=atari
# Optimization flags for cc65.
@@ -28,27 +28,30 @@ VERSION="v$(VER)-$(TODAY)-$(REV)"
# hardcoded addresses in various scripts. These are in hex. If any
# of them are changed, you *must* run 'make clean'.
-# Font.
+# Font. Default is for the xex build. Cartridge build changes this.
FONT_ADDR=0x2000
-# Title screen data will be decompressed to this address.
+# Title screen data will be decompressed to this address. XEX only,
+# cartridge doesn't use compressed title.
TITLE_DATA_ADDR=0x2400
# Title display list, decompression code, and menu code. Should be
-# TITLE_DATA_ADDR plus 0x1744.
+# TITLE_DATA_ADDR plus 0x1744. XEX only.
TITLE_CODE_ADDR=0x3b44
# Main game start address. All the code in TAIMAIN_C_SRC and
# TAIMAIN_ASM_SRC loads here. We get this address by looking for
# 'C code can load at' message when making newtitle.xex. It's the
-# next byte after the end of the display list.
+# next byte after the end of the display list. Default is for the
+# XEX, the cart changes it.
#TAIMAIN_ADDR=0x3d00
TAIMAIN_ADDR=0x3cc7
-# Size of cc65 parameter stack in bytes.
+# Size of cc65 parameter stack in bytes. Default is 0x200, which is
+# much bigger than actually necessary.
STACK_SIZE=0x200
-# for older cc65, we need a custom linker file.
+# for older cc65, we needed a custom linker file.
#CFLAGS=-t $(SYS) -C custom.cfg -I. -L. $(COPT)
# for recent git cc65, we can reserve memory on the command line.
@@ -65,6 +68,7 @@ STACK_SIZE=0x200
CFLAGS=-t $(SYS) -T -I. -L. -Wl -D__SYSTEM_CHECK__=1 -DFONT_ADDR=$(FONT_ADDR) --start-addr $(TAIMAIN_ADDR) -Wl -D__STACKSIZE__=$(STACK_SIZE) $(COPT) $(EXTRACFLAGS)
+# These aren't really used:
AS=ca65
ASFLAGS=
AR=ar65
@@ -103,7 +107,8 @@ BIGNUM_SRC=bigfloat.s
BIGNUM_HDRS=bignum.h bigfloat.h
BIGNUM_CFLAGS=-DBIGNUM=BIGFLOAT
-# Uncomment these for experimental int48 big numbers
+# Uncomment these for experimental int48 big numbers. Support
+# hasn't been added, so leave these commented for now.
#BIGNUM_SRC=bigint48.c
#BIGNUM_HDRS=bignum.h bigint48.h
#BIGNUM_CFLAGS=-DBIGNUM=BIGINT48
@@ -136,13 +141,16 @@ help:
@echo "make - builds taipan.xex (disk version)"
@echo "make cart - builds taipan.rom and taipan.cart (cartridge version)"
@echo "make test - builds & runs taipan.xex in atari800 emulator"
+ @echo "make testcart - builds & runs taipan.cart in atari800 emulator"
@echo "make dos2 - builds & runs taipan.xex in atari800 on a "; \
- echo " DOS 2.0S floppy image"
+ echo " DOS 2.0S floppy image [*]"
@echo "make mydos - builds & runs taipan.xex in atari800 on a "; \
- echo " MyDOS 4.50 floppy image"
+ echo " MyDOS 4.50 floppy image [*]"
@echo "make fenders - builds & runs taipan.xex in atari800 on a "; \
- echo " Fenders 3-sector Loader floppy image"
- @echo "make testcart - builds & runs taipan.cart in atari800 emulator"
+ echo " Fenders 3-sector Loader floppy image [*]"
+ @echo
+ @echo "[*] floppy image targets require 'axe' utility, from:"
+ @echo " http://urchlay.naptime.net/~urchlay/src/axe-0.2.0.tar.gz"
@echo
@echo "Useful variables to add to the make command:"
@echo " CC - path to cl65 binary (default: cl65, searches PATH)"
@@ -176,7 +184,10 @@ mydos: all
# The game binary is a multi-part binary load file. This rule
-# depends on all the pieces, and just concatenates them.
+# depends on all the pieces, and just concatenates them. We used
+# to just use cat, but reportedly some (dumb, broken) xex loaders
+# have trouble with $FFFF markers at the start of the second and
+# further segments, so multixex.pl skips them.
$(XEX): checkmem.xex taimain.xex taifont.xex newtitle.xex comptitle.xex
$(PERL) multixex.pl checkmem.xex comptitle.xex newtitle.xex taifont.xex taimain.xex > $(XEX)
$(PERL) size.pl $(TAIMAIN_ADDR) $(STACK_SIZE)
@@ -187,8 +198,9 @@ $(XEX): checkmem.xex taimain.xex taifont.xex newtitle.xex comptitle.xex
# is a 280x192 bitmap with a few blank lines at the top & bottom. I
# squished it horizontally to 256 pixels and got rid of the blank lines,
# to save load time. Note that titledata.dat is not built into
-# the game binary as-is: it's now used as input for creating
-# comptitle.xex, the compressed title screen.
+# the xex binary as-is: it's now used as input for creating
+# comptitle.xex, the compressed title screen. For the cartridge,
+# titledata.dat is included as-is.
titledata.dat: newtitle.pl newtitle.png
$(PERL) newtitle.pl > titledata.dat