diff options
author | B. Watson <yalhcru@gmail.com> | 2016-02-16 02:08:05 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-02-16 02:08:05 -0500 |
commit | 3a22a9af57b8b564301cd86e8e933eb1a22981ce (patch) | |
tree | 44eb7abac4ea5f3add959e30f86ed7a9441510e9 /Makefile | |
parent | 3988e55f135d6328d16ce95fe363acf2d2e07f56 (diff) | |
download | taipan-3a22a9af57b8b564301cd86e8e933eb1a22981ce.tar.gz |
keep RODATA in ROM for cart build
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 18 insertions, 15 deletions
@@ -305,11 +305,16 @@ mkcart: mkcart.c # 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 +#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 + +romable_taimain.raw: $(TAIMAIN_C_SRC) $(TAIMAIN_ASM_SRC) $(TAIMAIN_HDRS) $(BIGNUM_SRC) $(BIGNUM_HDRS) + 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) + tail -c+2 romable_taimain.raw.in > romable_taimain.raw + rm -f romable_taimain.raw.in # 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 @@ -323,18 +328,16 @@ fill256: blankbank: $(PERL) -Mbytes -e 'print chr(0xff) x 8192' > blankbank -splitrom.raw.0: splitrom.raw.3 - -splitrom.raw.1: splitrom.raw.3 +splitrom.raw.0: splitrom.raw.2 -splitrom.raw.2: splitrom.raw.3 +splitrom.raw.1: splitrom.raw.2 # split romable_taimain.raw into bank-sized chunks. if we end up -# with 4 chunks, the cart won't work correctly, so stop the build here +# with 3 chunks, the cart won't work correctly, so stop the build here # in that case. -splitrom.raw.3: romable_taimain.raw +splitrom.raw.2: romable_taimain.raw split -b 7936 -a 1 -d romable_taimain.raw splitrom.raw. - [ -e splitrom.raw.4 ] && echo "*** romable_taimain.raw too big" && rm -f splitrom.raw.* && exit 1 || exit 0 + [ -e splitrom.raw.3 ] && echo "*** romable_taimain.raw too big" && rm -f splitrom.raw.* && exit 1 || exit 0 bank0: splitrom.raw.0 fill256 cat splitrom.raw.0 fill256 > bank0 @@ -343,13 +346,13 @@ bank1: splitrom.raw.1 fill256 cat splitrom.raw.1 fill256 > bank1 bank2: splitrom.raw.2 fill256 - cat splitrom.raw.2 fill256 > bank2 + cl65 -l bank2.lst -m bank2.map -t none -o bank2 bank2.s -bank3: splitrom.raw.3 bank3.s taifont +bank3: rodata.8000 bank3.s taifont romable_taimain.raw cl65 -l bank3.lst -m bank3.map -t none -o bank3 bank3.s bank7: bank7.s titledata.dat ver.dat help.dat newtitle.s - cl65 --asm-define BANK3SIZE=`$(PERL) -e 'print -s "splitrom.raw.3"'` -l bank7.lst -m bank7.map -t none -o bank7 bank7.s + cl65 --asm-define BANK2SIZE=`$(PERL) -e 'print -s "splitrom.raw.2"'` -l bank7.lst -m bank7.map -t none -o bank7 bank7.s # raw ROM, for burning to EPROM/flash. taipan.rom: bank0 bank1 bank2 bank3 bank7 blankbank |