aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 4 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 74ec7a5..ddcfa5b 100644
--- a/Makefile
+++ b/Makefile
@@ -303,21 +303,11 @@ mkcart: mkcart.c
$(HOSTCC) $(HOSTCFLAGS) -o mkcart mkcart.c
# cc65 doc atari.html explains how to produce a raw binary file.
-# we build it for $03ff because cc65-produced atari binaries always
-# have an RTS as the first byte (for compatibility with SpartaDOS).
-# the "tail -c+2" stuff removes the first byte, so we end up with
-# a romable_taimain.raw that's ready to be copied to $0400 and run
-# via "JSR $0400".
-#romable_taimain.raw: $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC) $(TAIMAIN_HDRS)
-# rm -f taimain.xex
-# $(MAKE) FONT_ADDR=0x9c00 TAIMAIN_ADDR=0x3ff EXTRACFLAGS="-Wl -D__AUTOSTART__=1 -Wl -D__EXEHDR__=1 -DCART_TARGET=1 --asm-define CART_TARGET=1" taimain.xex
-# tail -c+2 taimain.xex > romable_taimain.raw
-# rm -f taimain.xex
-
+# using a custom crt0 to get rid of the extra RTS cc65 puts there for
+# SpartaDOS compatibility (which has no effect on a cartridge image,
+# except to waste 1 byte).
romable_taimain.raw: $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC) $(TAIMAIN_HDRS) $(BIGNUM_SRC) $(BIGNUM_HDRS) $(TAIMAIN_LIBS) crt0_cart.s
- cl65 --config cartbank3.cfg -m taipan.map -t atari -T -I. -L. -DFONT_ADDR=0x9c00 --start-addr 0x3ff -Wl -D__STACKSIZE__=0x200 -O -Wl -D__SYSTEM_CHECK__=1 -Wl -D__AUTOSTART__=1 -Wl -D__EXEHDR__=1 -DCART_TARGET=1 --asm-define CART_TARGET=1 -DBIGNUM=BIGFLOAT -o romable_taimain.raw.in $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC) $(BIGNUM_SRC) $(TAIMAIN_LIBS) crt0_cart.s
- tail -c+2 romable_taimain.raw.in > romable_taimain.raw
- rm -f romable_taimain.raw.in
+ cl65 --config cartbank3.cfg -m taipan.map -t atari -T -I. -L. -DFONT_ADDR=0x9c00 --start-addr 0x400 -Wl -D__STACKSIZE__=0x200 -O -Wl -D__SYSTEM_CHECK__=1 -Wl -D__AUTOSTART__=1 -Wl -D__EXEHDR__=1 -DCART_TARGET=1 --asm-define CART_TARGET=1 -DBIGNUM=BIGFLOAT -o romable_taimain.raw $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC) $(BIGNUM_SRC) $(TAIMAIN_LIBS) crt0_cart.s
# 256 bytes of $ff filler, for the last page of each code bank. Wasting
# this little bit of space simplifies the copying code in bank7.s (no