diff --git a/examples/asm/elmer/cd-core-1stage/Makefile b/examples/asm/elmer/cd-core-1stage/Makefile index 856f3f70..2707f781 100644 --- a/examples/asm/elmer/cd-core-1stage/Makefile +++ b/examples/asm/elmer/cd-core-1stage/Makefile @@ -2,7 +2,7 @@ all: core-1stage.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gL SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm SRC_OVL = stage1.asm core-config.inc @@ -10,7 +10,7 @@ SRC_OVL = stage1.asm core-config.inc SRC_ISO = stage1.ovl core-1stage.iso: $(SRC_ISO) - $(IL) core-1stage.iso -ipl="1-Stage CD",0x4000,0x4000,0,1,2,3,4 -asm $(SRC_ISO) + $(IL) core-1stage.iso --ipl="1-Stage CD" $(SRC_ISO) stage1.ovl: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -cd stage1.asm + $(AS) $(AFLAGS) --cd stage1.asm diff --git a/examples/asm/elmer/cd-core-2stage/Makefile b/examples/asm/elmer/cd-core-2stage/Makefile index 0da819fb..3dc0ade2 100644 --- a/examples/asm/elmer/cd-core-2stage/Makefile +++ b/examples/asm/elmer/cd-core-2stage/Makefile @@ -2,7 +2,7 @@ all: core-2stage.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gA SRC1_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm SRC1_OVL = core-stage1.asm core-config.inc @@ -13,13 +13,13 @@ SRC2_OVL = stage2.asm core-config.inc SRC_ISO = core-stage1.bin stage2.ovl core-2stage.iso: $(SRC_ISO) - $(IL) core-2stage.iso -ipl="2-Stage CD",0x4000,0x4000,0,1,2,3,4 -asm $(SRC_ISO) + $(IL) core-2stage.iso --ipl="2-Stage CD" $(SRC_ISO) core-stage1.bin core-stage1.sym: $(SRC1_OVL) $(SRC1_INC) - $(AS) $(AFLAGS) -cd -trim core-stage1.asm + $(AS) --cd --overlay --trim core-stage1.asm core-stage1.s: core-stage1.s2i core-stage1.sym $(S2I) core-stage1.s2i stage2.ovl: $(SRC2_OVL) $(SRC2_INC) core-stage1.s - $(AS) $(AFLAGS) -cd stage2.asm + $(AS) $(AFLAGS) --cd stage2.asm diff --git a/examples/asm/elmer/cd-core-scsitest/Makefile b/examples/asm/elmer/cd-core-scsitest/Makefile index 08a4b661..8adec72d 100644 --- a/examples/asm/elmer/cd-core-scsitest/Makefile +++ b/examples/asm/elmer/cd-core-scsitest/Makefile @@ -2,7 +2,7 @@ all: core-scsitest.iso scsitest.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm adpcm.asm cdrom.asm SRC_OVL = scsitest.asm core-config.inc @@ -10,10 +10,10 @@ SRC_OVL = scsitest.asm core-config.inc SRC_ISO = scsitest.ovl ../data/alice.vdc ../data/alice.ram ../data/umbrella-16k.vox core-scsitest.iso: $(SRC_ISO) - $(IL) core-scsitest.iso -ipl="test-CD CD-ROM2",0x4000,0x4000,0,1,2,3,4 -asm $(SRC_ISO) - -scsitest.ovl: $(SRC_OVL) $(SRC_INC) scsitest.pce - $(AS) $(AFLAGS) -cd -overlay scsitest.asm cdrom.asm + $(IL) core-scsitest.iso --ipl="test-CD CD-ROM2" $(SRC_ISO) scsitest.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw scsitest.asm cdrom.asm + $(AS) $(AFLAGS) --raw scsitest.asm cdrom.asm + +scsitest.ovl: $(SRC_OVL) $(SRC_INC) scsitest.pce + $(AS) $(AFLAGS) --cd --overlay scsitest.asm cdrom.asm diff --git a/examples/asm/elmer/ipl-scd/Makefile b/examples/asm/elmer/ipl-scd/Makefile index e6a2f51e..28c1b55b 100644 --- a/examples/asm/elmer/ipl-scd/Makefile +++ b/examples/asm/elmer/ipl-scd/Makefile @@ -4,10 +4,10 @@ include ../Make_ex.inc SRC = ipl-scd.asm ../font/font8x8-ascii-exos.dat -AFLAGS ?= -raw -m -l 2 -S +AFLAGS ?= --raw -m -l 2 -S ipl-scd.out: $(SRC) - $(AS) $(AFLAGS) -ipl ipl-scd.asm -o ipl-scd.out + $(AS) $(AFLAGS) --ipl ipl-scd.asm -o ipl-scd.out ../include/ipl-scd.dat: ipl-scd.out ifeq ($(CP),copy) diff --git a/examples/asm/elmer/ipl-scd/ipl-scd.asm b/examples/asm/elmer/ipl-scd/ipl-scd.asm index ce232da4..83cb7ba7 100644 --- a/examples/asm/elmer/ipl-scd/ipl-scd.asm +++ b/examples/asm/elmer/ipl-scd/ipl-scd.asm @@ -187,7 +187,7 @@ ex_memopen = $00:E0DE, FUNC ; *************************************************************************** ; *************************************************************************** ; -; ipl_scd - Replacement IPL file loader using ISOlink diectory information. +; ipl_scd - Replacement IPL file loader using ISOlink directory information. ; .org $3090 ; First free memory in IPL. @@ -495,7 +495,7 @@ upload_font8x8: ldx #$14 ; Upload solid version to ; *************************************************************************** ; *************************************************************************** ; -; write_string - Upload an 8x8 font with a drop-shadow generated by the CPU. +; write_string - Write a text string to the screen. ; write_string: sta <_al ; String address. diff --git a/examples/asm/elmer/rom-bare-buftest/Makefile b/examples/asm/elmer/rom-bare-buftest/Makefile index 7b419c8d..95c6e5e5 100644 --- a/examples/asm/elmer/rom-bare-buftest/Makefile +++ b/examples/asm/elmer/rom-bare-buftest/Makefile @@ -2,10 +2,10 @@ all: buftest.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc joypad.asm tty.asm vce.asm vdc.asm SRC_OVL = buftest.asm buftest.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw buftest.asm + $(AS) $(AFLAGS) --raw buftest.asm diff --git a/examples/asm/elmer/rom-bare-mwrtest/Makefile b/examples/asm/elmer/rom-bare-mwrtest/Makefile index 482ac3d7..b7060159 100644 --- a/examples/asm/elmer/rom-bare-mwrtest/Makefile +++ b/examples/asm/elmer/rom-bare-mwrtest/Makefile @@ -2,10 +2,10 @@ all: mwrtest.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc joypad.asm tty.asm vce.asm vdc.asm SRC_OVL = mwrtest.asm mwrtest.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw mwrtest.asm + $(AS) $(AFLAGS) --raw mwrtest.asm diff --git a/examples/asm/elmer/rom-bare-rcrtest/Makefile b/examples/asm/elmer/rom-bare-rcrtest/Makefile index 2fcf586e..f05c78d1 100644 --- a/examples/asm/elmer/rom-bare-rcrtest/Makefile +++ b/examples/asm/elmer/rom-bare-rcrtest/Makefile @@ -2,10 +2,10 @@ all: rcrtest.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc joypad.asm tty.asm vce.asm vdc.asm SRC_OVL = rcrtest.asm rcrtest.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw rcrtest.asm + $(AS) $(AFLAGS) --raw rcrtest.asm diff --git a/examples/asm/elmer/rom-bare-tiatest/Makefile b/examples/asm/elmer/rom-bare-tiatest/Makefile index f83c51e5..160b40e3 100644 --- a/examples/asm/elmer/rom-bare-tiatest/Makefile +++ b/examples/asm/elmer/rom-bare-tiatest/Makefile @@ -2,10 +2,10 @@ all: tiatest.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc joypad.asm tty.asm vce.asm vdc.asm SRC_OVL = tiatest.asm tiatest.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw tiatest.asm + $(AS) $(AFLAGS) --raw tiatest.asm diff --git a/examples/asm/elmer/rom-core-hello/Makefile b/examples/asm/elmer/rom-core-hello/Makefile index ff770ab5..b686f1eb 100644 --- a/examples/asm/elmer/rom-core-hello/Makefile +++ b/examples/asm/elmer/rom-core-hello/Makefile @@ -2,10 +2,10 @@ all: hello.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm SRC_OVL = hello.asm core-config.inc hello.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw hello.asm + $(AS) $(AFLAGS) --raw hello.asm diff --git a/examples/asm/elmer/rom-core-hugerom/Makefile b/examples/asm/elmer/rom-core-hugerom/Makefile index 36205cd8..2634de36 100644 --- a/examples/asm/elmer/rom-core-hugerom/Makefile +++ b/examples/asm/elmer/rom-core-hugerom/Makefile @@ -2,13 +2,15 @@ all: hugerom.pce hugerom.s include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm common.asm vdc.asm unpack-zx0.asm SRC_OVL = hugerom.asm core-config.inc hugerom.pce hugerom.sym: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -sf2 -raw hugerom.asm + $(AS) $(AFLAGS) --sf2 --raw hugerom.asm hugerom.s: hugerom.s2i hugerom.sym - $(S2I) hugerom.s2i + $(CP) hugerom.sym hugerom.s + +# $(S2I) hugerom.s2i ... currently broken, sym2inc needs to understand mesen format diff --git a/examples/asm/elmer/rom-core-okitest/Makefile b/examples/asm/elmer/rom-core-okitest/Makefile index b0d2991e..4d6f4564 100644 --- a/examples/asm/elmer/rom-core-okitest/Makefile +++ b/examples/asm/elmer/rom-core-okitest/Makefile @@ -2,7 +2,7 @@ all: okitest.pce okitest.ovl core-okitest.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm tty.asm vce.asm vdc.asm adpcm.asm SRC_OVL = okitest.asm core-config.inc @@ -10,10 +10,10 @@ SRC_OVL = okitest.asm core-config.inc SRC_ISO = okitest.ovl okitest.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw okitest.asm + $(AS) $(AFLAGS) --raw okitest.asm okitest.ovl: $(SRC_OVL) $(SRC_INC) okitest.pce - $(AS) $(AFLAGS) -cd -overlay okitest.asm + $(AS) $(AFLAGS) --cd --overlay okitest.asm core-okitest.iso: $(SRC_ISO) - $(IL) core-okitest.iso -ipl="OKI Test CD",0x4000,0x4000,0,1,2,3,4 -asm $(SRC_ISO) + $(IL) core-okitest.iso -ipl="OKI Test CD" $(SRC_ISO) diff --git a/examples/asm/elmer/rom-kickc-hello/Makefile b/examples/asm/elmer/rom-kickc-hello/Makefile index 3da6c145..f52934bc 100644 --- a/examples/asm/elmer/rom-kickc-hello/Makefile +++ b/examples/asm/elmer/rom-kickc-hello/Makefile @@ -2,10 +2,10 @@ all: hello.pce include ../Make_ex.inc -AFLAGS ?= -kc -newproc -strip -m -l 2 -S +AFLAGS ?= --kc --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm kickc.asm kickc-final.asm SRC_OVL = hello.asm core-config.inc hello.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw hello.asm + $(AS) $(AFLAGS) --raw hello.asm diff --git a/examples/asm/elmer/rom-kickc-shmup/Makefile b/examples/asm/elmer/rom-kickc-shmup/Makefile index 72b8d2af..fbbc9d03 100644 --- a/examples/asm/elmer/rom-kickc-shmup/Makefile +++ b/examples/asm/elmer/rom-kickc-shmup/Makefile @@ -2,10 +2,10 @@ all: shmup.pce include ../Make_ex.inc -AFLAGS ?= -kc -newproc -strip -m -l 2 -S +AFLAGS ?= --kc --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm kickc.asm kickc-final.asm SRC_OVL = shmup.asm core-config.inc shmup.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw shmup.asm + $(AS) $(AFLAGS) --raw shmup.asm diff --git a/examples/asm/elmer/scd-bios-hello-error/Makefile b/examples/asm/elmer/scd-bios-hello-error/Makefile index 661f1c31..f6efdd63 100644 --- a/examples/asm/elmer/scd-bios-hello-error/Makefile +++ b/examples/asm/elmer/scd-bios-hello-error/Makefile @@ -2,7 +2,7 @@ all: bios-hello-error.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc SRC_OVL = hello.asm @@ -13,12 +13,12 @@ ERR_OVL = error.asm SRC_ISO = hello.ovl bios-hello-error.iso: $(SRC_ISO) error.ovl - $(IL) bios-hello-error.iso -boot="../include/ipl-scd.dat" -ipl="SuperCD Error" -asm $(SRC_ISO) -cderr error.ovl + $(IL) bios-hello-error.iso --boot="../include/ipl-scd.dat" --ipl="SuperCD Error" $(SRC_ISO) --cderr error.ovl hello.ovl: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -scd hello.asm + $(AS) $(AFLAGS) --scd hello.asm -# Note that the error overlay is assembled as "-cd" and NOT "-scd"! +# Note that the error overlay is assembled as "--cd" and NOT "--scd"! error.ovl: $(ERR_OVL) $(ERR_INC) - $(AS) $(AFLAGS) -cd error.asm + $(AS) $(AFLAGS) --cd error.asm diff --git a/examples/asm/elmer/scd-bios-hello/Makefile b/examples/asm/elmer/scd-bios-hello/Makefile index 0400e561..54a19515 100644 --- a/examples/asm/elmer/scd-bios-hello/Makefile +++ b/examples/asm/elmer/scd-bios-hello/Makefile @@ -2,7 +2,7 @@ all: bios-hello.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc SRC_OVL = hello.asm @@ -10,7 +10,7 @@ SRC_OVL = hello.asm SRC_ISO = hello.ovl bios-hello.iso: $(SRC_ISO) - $(IL) bios-hello.iso -boot="../include/ipl-scd.dat" -ipl="Hello SuperCD" -asm $(SRC_ISO) + $(IL) bios-hello.iso --boot="../include/ipl-scd.dat" --ipl="Hello SuperCD" $(SRC_ISO) hello.ovl: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -scd hello.asm + $(AS) $(AFLAGS) --scd hello.asm diff --git a/examples/asm/elmer/scd-core-1stage-error/Makefile b/examples/asm/elmer/scd-core-1stage-error/Makefile index 208bb25a..0fbb98c7 100644 --- a/examples/asm/elmer/scd-core-1stage-error/Makefile +++ b/examples/asm/elmer/scd-core-1stage-error/Makefile @@ -2,7 +2,7 @@ all: core-1stage-error.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm SRC_OVL = stage1.asm core-config.inc @@ -13,12 +13,12 @@ ERR_OVL = error.asm core-config.inc saz_vdc.zx0 saz_vce.zx0 SRC_ISO = stage1.ovl core-1stage-error.iso: $(SRC_ISO) error.ovl - $(IL) core-1stage-error.iso -boot="../include/ipl-scd.dat" -ipl="1-Stage-cderr CD" -asm $(SRC_ISO) -cderr error.ovl + $(IL) core-1stage-error.iso --ipl="1-Stage-cderr CD" $(SRC_ISO) --cderr error.ovl stage1.ovl: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -scd stage1.asm + $(AS) $(AFLAGS) --scd stage1.asm -# Note that the error overlay is assembled as "-cd" and NOT "-scd"! +# Note that the error overlay is assembled as "--cd" and NOT "--scd"! error.ovl: $(ERR_OVL) $(ERR_INC) - $(AS) $(AFLAGS) -cd error.asm + $(AS) $(AFLAGS) --cd error.asm diff --git a/examples/asm/elmer/scd-core-1stage/Makefile b/examples/asm/elmer/scd-core-1stage/Makefile index 5255da7f..d84e0456 100644 --- a/examples/asm/elmer/scd-core-1stage/Makefile +++ b/examples/asm/elmer/scd-core-1stage/Makefile @@ -2,7 +2,7 @@ all: core-1stage.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm SRC_OVL = stage1.asm core-config.inc @@ -10,7 +10,7 @@ SRC_OVL = stage1.asm core-config.inc SRC_ISO = stage1.ovl core-1stage.iso: $(SRC_ISO) - $(IL) core-1stage.iso -boot="../include/ipl-scd.dat" -ipl="1-Stage SuperCD" -asm $(SRC_ISO) + $(IL) core-1stage.iso --ipl="1-Stage SuperCD" $(SRC_ISO) stage1.ovl: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -scd stage1.asm + $(AS) $(AFLAGS) --scd stage1.asm diff --git a/examples/asm/elmer/scd-core-2stage-error/Makefile b/examples/asm/elmer/scd-core-2stage-error/Makefile index 584b020b..ec1515e8 100644 --- a/examples/asm/elmer/scd-core-2stage-error/Makefile +++ b/examples/asm/elmer/scd-core-2stage-error/Makefile @@ -2,7 +2,7 @@ all: core-2stage-error.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gA SRC1_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm SRC1_OVL = core-stage1.asm core-config.inc @@ -16,18 +16,18 @@ ERR_OVL = error.asm core-config.inc saz_vdc.zx0 saz_vce.zx0 SRC_ISO = core-stage1.bin stage2.ovl core-2stage-error.iso: $(SRC_ISO) error.ovl - $(IL) core-2stage-error.iso -ipl="2-Stage cderr CD",0x4000,0x4000,0,1,2,3,4 -asm $(SRC_ISO) -cderr error.ovl + $(IL) core-2stage-error.iso --ipl="2-Stage cderr CD" $(SRC_ISO) --cderr error.ovl core-stage1.bin core-stage1.sym: $(SRC1_OVL) $(SRC1_INC) - $(AS) $(AFLAGS) -scd -trim core-stage1.asm + $(AS) --scd --overlay --trim core-stage1.asm core-stage1.s: core-stage1.s2i core-stage1.sym $(S2I) core-stage1.s2i stage2.ovl: $(SRC2_OVL) $(SRC2_INC) core-stage1.s - $(AS) $(AFLAGS) -scd stage2.asm + $(AS) $(AFLAGS) --scd stage2.asm -# Note that the error overlay is assembled as "-cd" and NOT "-scd"! +# Note that the error overlay is assembled as "--cd" and NOT "--scd"! error.ovl: $(ERR_OVL) $(ERR_INC) core-stage1.s - $(AS) $(AFLAGS) -cd error.asm + $(AS) $(AFLAGS) --cd error.asm diff --git a/examples/asm/elmer/scd-core-2stage/Makefile b/examples/asm/elmer/scd-core-2stage/Makefile index 3d792186..606725aa 100644 --- a/examples/asm/elmer/scd-core-2stage/Makefile +++ b/examples/asm/elmer/scd-core-2stage/Makefile @@ -2,7 +2,7 @@ all: core-2stage.iso include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S -overlay +AFLAGS ?= --overlay --newproc --strip -m -l 2 -S -gA SRC1_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm SRC1_OVL = core-stage1.asm core-config.inc @@ -13,13 +13,13 @@ SRC2_OVL = stage2.asm core-config.inc SRC_ISO = core-stage1.bin stage2.ovl core-2stage.iso: $(SRC_ISO) - $(IL) core-2stage.iso -ipl="2-Stage SuperCD",0x4000,0x4000,0,1,2,3,4 -asm $(SRC_ISO) + $(IL) core-2stage.iso --ipl="2-Stage SuperCD" $(SRC_ISO) core-stage1.bin core-stage1.sym: $(SRC1_OVL) $(SRC1_INC) - $(AS) $(AFLAGS) -scd -trim core-stage1.asm + $(AS) --scd --overlay --trim core-stage1.asm core-stage1.s: core-stage1.s2i core-stage1.sym $(S2I) core-stage1.s2i stage2.ovl: $(SRC2_OVL) $(SRC2_INC) core-stage1.s - $(AS) $(AFLAGS) -scd stage2.asm + $(AS) $(AFLAGS) --scd stage2.asm diff --git a/examples/asm/elmer/scd-core-fastcd/Makefile b/examples/asm/elmer/scd-core-fastcd/Makefile index d4b170e5..c7975b8c 100644 --- a/examples/asm/elmer/scd-core-fastcd/Makefile +++ b/examples/asm/elmer/scd-core-fastcd/Makefile @@ -2,7 +2,7 @@ all: core-fastcd.iso fastcd.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm adpcm.asm cdrom.asm SRC_OVL = fastcd.asm core-config.inc @@ -10,10 +10,10 @@ SRC_OVL = fastcd.asm core-config.inc SRC_ISO = fastcd.ovl ../data/alice.vdc ../data/alice.ram ../data/umbrella-16k.vox core-fastcd.iso: $(SRC_ISO) - $(IL) core-fastcd.iso -boot="../include/ipl-scd.dat" -ipl="Fast-CD SuperCD" -asm $(SRC_ISO) - -fastcd.ovl: $(SRC_OVL) $(SRC_INC) fastcd.pce - $(AS) $(AFLAGS) -scd -overlay fastcd.asm + $(IL) core-fastcd.iso --ipl="Fast-CD SuperCD" $(SRC_ISO) fastcd.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) fastcd.asm + $(AS) $(AFLAGS) --raw fastcd.asm + +fastcd.ovl: $(SRC_OVL) $(SRC_INC) fastcd.pce + $(AS) $(AFLAGS) --scd --overlay fastcd.asm diff --git a/examples/asm/elmer/ted2-bios-romcd/Makefile b/examples/asm/elmer/ted2-bios-romcd/Makefile index 8511c95d..8d444dbe 100644 --- a/examples/asm/elmer/ted2-bios-romcd/Makefile +++ b/examples/asm/elmer/ted2-bios-romcd/Makefile @@ -4,7 +4,7 @@ include ../Make_ex.inc SRC = ted2romcd.asm syscard3-ted2.inc -AFLAGS ?= -raw -m -l 2 -S +AFLAGS ?= --raw -m -l 2 -S ted2romcd.pce: $(SRC) $(AS) $(AFLAGS) ted2romcd.asm diff --git a/examples/asm/elmer/ted2-bios-usbcd/Makefile b/examples/asm/elmer/ted2-bios-usbcd/Makefile index be1f9b35..4642cbd9 100644 --- a/examples/asm/elmer/ted2-bios-usbcd/Makefile +++ b/examples/asm/elmer/ted2-bios-usbcd/Makefile @@ -4,7 +4,7 @@ include ../Make_ex.inc SRC = ted2usbcd.asm ../ted2-bios-romcd/syscard3-ted2.inc -AFLAGS ?= -raw -m -l 2 -S +AFLAGS ?= --raw -m -l 2 -S ted2usbcd.pce: $(SRC) $(AS) $(AFLAGS) ted2usbcd.asm diff --git a/examples/asm/elmer/ted2-core-hwdetect/Makefile b/examples/asm/elmer/ted2-core-hwdetect/Makefile index 8d35369c..24afa87a 100644 --- a/examples/asm/elmer/ted2-core-hwdetect/Makefile +++ b/examples/asm/elmer/ted2-core-hwdetect/Makefile @@ -1,14 +1,11 @@ -all: hwdetect.pce hwdetect.sgx +all: hwdetect.sgx include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S -gA SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm tty.asm SRC_OVL = hwdetect.asm core-config.inc -hwdetect.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw hwdetect.asm - -hwdetect.sgx: hwdetect.pce - $(CP) hwdetect.pce hwdetect.sgx +hwdetect.sgx: $(SRC_OVL) $(SRC_INC) + $(AS) $(AFLAGS) --sgx --raw hwdetect.asm diff --git a/examples/asm/elmer/ted2-core-sdcard/Makefile b/examples/asm/elmer/ted2-core-sdcard/Makefile index 9aa8d3c4..15a75ef9 100644 --- a/examples/asm/elmer/ted2-core-sdcard/Makefile +++ b/examples/asm/elmer/ted2-core-sdcard/Makefile @@ -2,10 +2,10 @@ all: sdcard.pce include ../Make_ex.inc -AFLAGS ?= -newproc -strip -m -l 2 -S +AFLAGS ?= --newproc --strip -m -l 2 -S SRC_INC = pceas.inc pcengine.inc core.inc core-startup.asm core-kernel.asm joypad.asm tty.asm crc32.asm ted2.asm ted2-sd.asm ted2-fat32.asm SRC_OVL = sdcard.asm core-config.inc sdcard.pce: $(SRC_OVL) $(SRC_INC) - $(AS) $(AFLAGS) -raw sdcard.asm + $(AS) $(AFLAGS) --raw sdcard.asm diff --git a/examples/asm/elmer/ted2-test-sherlock/Makefile b/examples/asm/elmer/ted2-test-sherlock/Makefile index 59597a72..b1add32b 100644 --- a/examples/asm/elmer/ted2-test-sherlock/Makefile +++ b/examples/asm/elmer/ted2-test-sherlock/Makefile @@ -9,11 +9,11 @@ TARGETS += dat2csv endif sherlock-hack.ovl: sherlock-hack.asm sherlock-boot.bin - $(AS) -raw -m -l 2 -S -trim sherlock-hack.asm -o sherlock-hack.ovl + $(AS) --raw -m -l 2 -S --trim sherlock-hack.asm -o sherlock-hack.ovl cp sherlock-hack.ovl /d/retrogamedev/tools/sherlock/ sherlock-ted2.ovl: sherlock-ted2.asm sherlock-hack.ovl - $(AS) -newproc -strip -m -l 2 -S -scd -overlay sherlock-ted2.asm + $(AS) --newproc --strip -m -l 2 -S --scd --overlay sherlock-ted2.asm cp sherlock-ted2.ovl /d/retrogamedev/tools/sherlock/ dat2csv: dat2csv.c diff --git a/src/hucc/optimize.c b/src/hucc/optimize.c index b7e88cea..c63243cc 100644 --- a/src/hucc/optimize.c +++ b/src/hucc/optimize.c @@ -462,7 +462,7 @@ inline bool is_usepr (INS *i) return (icode_flags[i->ins_code] & IS_USEPR); } -inline bool is_small_array (SYMBOL *sym) +bool is_small_array (SYMBOL *sym) { return (sym->identity == ARRAY && sym->alloc_size > 0 && sym->alloc_size <= 256); } @@ -504,7 +504,7 @@ void push_ins (INS *ins) q_ins[q_wr] = *ins; - /* can't optimize a comment */ + /* can't optimize debug information */ if (ins->ins_code == I_DEBUG) return; diff --git a/src/hucc/optimize.h b/src/hucc/optimize.h index 41ae43eb..53570947 100644 --- a/src/hucc/optimize.h +++ b/src/hucc/optimize.h @@ -26,6 +26,7 @@ extern int q_rd; extern int q_wr; extern int q_nb; +bool is_small_array (SYMBOL *sym); void push_ins (INS *ins); void flush_ins (void); void flush_ins_label (int nextlabel); diff --git a/src/hucc/preproc.c b/src/hucc/preproc.c index 9004ff1c..21625dbf 100644 --- a/src/hucc/preproc.c +++ b/src/hucc/preproc.c @@ -10,9 +10,13 @@ #include #include #include -#include #include +#include +#ifdef _MSC_VER +#include +#else #include +#endif #include "code.h" #include "defs.h" #include "data.h" diff --git a/src/isolink/main.c b/src/isolink/main.c index 9fd5d4e5..d9fecfaf 100644 --- a/src/isolink/main.c +++ b/src/isolink/main.c @@ -36,7 +36,7 @@ int file_count = 0; int cderr_flag = 0; int cderr_ovl = 0; int pcfx_flag = 0; -int asm_flag = 0; +int asm_flag = 1; int sgx_flag = 0; char prj_type[8]; char incpath[10][256]; @@ -44,7 +44,7 @@ int debug; int ipl_flag = 0; int ipl_load = 0x4000; -int ipl_exec = BOOT_ENTRY_POINT; +int ipl_exec = 0x4000; int ipl_mpr2 = 0x00; int ipl_mpr3 = 0x01; int ipl_mpr4 = 0x02; @@ -580,19 +580,16 @@ ipl_write(FILE *outfile) if (memcmp(" CD", prj_type + 3, 3) == 0) { /* HuCC or CORE asm-library CD */ use_ipl_scd = 0; - asm_flag = 1; } else if (memcmp("SCD", prj_type + 3, 3) == 0) { /* HuCC or CORE asm-library SuperCD */ use_ipl_scd = 1; - asm_flag = 1; } else if (memcmp("SGX", prj_type + 3, 3) == 0) { /* HuCC or CORE asm-library SuperGRAFX SuperCD */ use_ipl_scd = 1; - asm_flag = 1; sgx_flag = 1; } else @@ -601,7 +598,6 @@ ipl_write(FILE *outfile) /* If use_ipl_scd then the kernel won't be loaded */ /* when running on the wrong System Card! */ use_ipl_scd = 0; - asm_flag = 1; } else if (memcmp("SG1", prj_type + 3, 3) == 0) { @@ -609,7 +605,6 @@ ipl_write(FILE *outfile) /* If use_ipl_scd then the kernel won't be loaded */ /* when running on the wrong System Card! */ use_ipl_scd = 0; - asm_flag = 1; sgx_flag = 1; } } @@ -976,9 +971,8 @@ main(int argc, char *argv[]) continue; } else - if ((strcmp(argv[i], "-asm") == 0) && - (asm_flag == 0)) { /* only valid once on line */ - asm_flag = 1; + if ((strcmp(argv[i], "-asm") == 0)) { + /* ignore this now that HuC programs are identified by signature */ continue; } else diff --git a/src/mkit/as/command.c b/src/mkit/as/command.c index af1cc46f..bd453fa0 100644 --- a/src/mkit/as/command.c +++ b/src/mkit/as/command.c @@ -2640,7 +2640,7 @@ do_phase(int *ip) } /* get the .phase value */ - if (!evaluate(ip, ';', 0)) + if (!evaluate(ip, ';', 1)) return; /* check for undefined symbols - they are only allowed in the FIRST_PASS */ @@ -2682,6 +2682,10 @@ do_phase(int *ip) /* set the phase_offset to add to subsequent location labels */ phase_offset = value - (loccnt + (page << 13)); + if (expr_mprbank == UNDEFINED_BANK) + phase_bank = bank2mprbank(bank, section); + else + phase_bank = expr_mprbank; } diff --git a/src/mkit/as/expr.c b/src/mkit/as/expr.c index c95893d2..1fd1eee8 100644 --- a/src/mkit/as/expr.c +++ b/src/mkit/as/expr.c @@ -622,7 +622,10 @@ push_val(int type) pc_symbol.value = data_loccnt; pc_symbol.rombank = bank + (pc_symbol.value >> 13); - pc_symbol.mprbank = bank2mprbank(pc_symbol.rombank, section); + if (phase_offset) + pc_symbol.mprbank = phase_bank; + else + pc_symbol.mprbank = bank2mprbank(pc_symbol.rombank, section); pc_symbol.overlay = bank2overlay(pc_symbol.rombank, section); pc_symbol.section = section; diff --git a/src/mkit/as/externs.h b/src/mkit/as/externs.h index 1e09bb0f..b88c43a8 100644 --- a/src/mkit/as/externs.h +++ b/src/mkit/as/externs.h @@ -16,6 +16,7 @@ extern int data_loccnt; /* data location counter */ extern int data_size; /* size of binary output (in bytes) */ extern int data_level; /* data output level, must be <= listlevel to be outputed */ extern int phase_offset; /* location counter offset for .phase */ +extern int phase_bank; /* location counter bank for .phase */ extern int loccnt; /* location counter */ extern int bank; /* current bank */ extern int bank_base; /* bank base index */ diff --git a/src/mkit/as/input.c b/src/mkit/as/input.c index 9e54f937..b66fe471 100644 --- a/src/mkit/as/input.c +++ b/src/mkit/as/input.c @@ -3,8 +3,13 @@ #include #include #include -#include #include +#ifdef _MSC_VER +#include +#else +#include +#endif + #include "defs.h" #include "externs.h" #include "protos.h" diff --git a/src/mkit/as/output.c b/src/mkit/as/output.c index 0f7b1f69..18d30006 100644 --- a/src/mkit/as/output.c +++ b/src/mkit/as/output.c @@ -147,7 +147,10 @@ loadlc(int offset, int pos) } else { prlnbuf[i++] = ' '; prlnbuf[i++] = ' '; - hexcon(2, bank); + if (phase_offset) + hexcon(2, phase_bank); + else + hexcon(2, bank); prlnbuf[i++] = hex[1]; prlnbuf[i++] = hex[2]; } diff --git a/src/mkit/as/symbol.c b/src/mkit/as/symbol.c index 0e29c0d4..b070b865 100644 --- a/src/mkit/as/symbol.c +++ b/src/mkit/as/symbol.c @@ -397,7 +397,10 @@ labldef(unsigned char reason) labl_value = (loccnt + (page << 13) + phase_offset) & 0xFFFF; labl_rombank = bank; - labl_mprbank = bank2mprbank(bank, section); + if (phase_offset) + labl_mprbank = phase_bank; + else + labl_mprbank = bank2mprbank(bank, section); labl_overlay = bank2overlay(bank, section); labl_section = section; } else { @@ -893,11 +896,9 @@ debugdump(FILE *fp) /* start SFII mapper banks at bank $100 */ if (bank < 0x80) { - bank += bank_base; - fprintf(fp, "%2.2x:%4.4x ", bank, ((map[bank][addr] >> 5) << 13) + addr); + fprintf(fp, "%2.2x:%4.4x ", bank + bank_base, ((map[bank][addr] >> 5) << 13) + addr); } else { - bank += 0x80; - fprintf(fp, "%3.3x:%4.4x ", bank, ((map[bank][addr] >> 5) << 13) + addr); + fprintf(fp, "%3.3x:%4.4x ", bank + 0x80, ((map[bank][addr] >> 5) << 13) + addr); } fprintf(fp, "%8.8x ", (code << 30) + size); diff --git a/src/mkit/as/vars.h b/src/mkit/as/vars.h index 4216d880..3dd632e4 100644 --- a/src/mkit/as/vars.h +++ b/src/mkit/as/vars.h @@ -15,6 +15,7 @@ int data_loccnt; /* data location counter */ int data_size; /* size of binary output (in bytes) */ int data_level; /* data output level, must be <= listlevel to be outputed */ int phase_offset; /* location counter offset for .phase */ +int phase_bank; /* location counter bank for .phase */ int loccnt; /* location counter */ int bank; /* current bank */ int bank_base; /* bank base index */