diff --git a/samples/common/Makefile b/samples/common/Makefile index 196fd98..5ddd040 100644 --- a/samples/common/Makefile +++ b/samples/common/Makefile @@ -33,4 +33,4 @@ run_bas: $(NAME).assembled.bas all: OBJS_$(NAME) clean: - rm -rf ./output *.o *.prg *.map *.av *.log *.assembled.bas *.img + rm -rf ./output *.o *.prg *.map *.av *.log *.assembled.bas *.img *.BIN *.meta diff --git a/samples/sd_card/Makefile b/samples/sd_card/Makefile index fe3cfca..08edb38 100644 --- a/samples/sd_card/Makefile +++ b/samples/sd_card/Makefile @@ -12,11 +12,17 @@ project.av: $(RESOURCES) $(ALOEVERA) -p project.av bitmap init kq5_bmp kq5_screen $(ALOEVERA) create sd_image kq5.img $(ALOEVERA) -p project.av asm -s kq5.img -f bin . select -a 0x0000 kq5_bmp KQ5.BIN - $(ALOEVERA) -p project.av asm -f bin . select -a 0x0000 kq5_bmp KQ5.BIN $(ALOEVERA) -p project.av asm -s kq5.img -f bin . select -a 0x0000 kq5_pal KQ5PAL.BIN + $(ALOEVERA) -p project.av asm -f bin . select -a 0x0000 kq5_bmp KQ5.BIN + $(ALOEVERA) -p project.av asm -f bin . select -a 0x0000 kq5_pal KQ5PAL.BIN generate_resources: project.av -SD_CARD = -sdcard kq5.img +#SD_CARD = -sdcard kq5.img + +generate_basic: generate_resources + cat $(NAME).bas > $(NAME).assembled.bas + +$(NAME).assembled.bas: generate_basic include ../common/Makefile diff --git a/samples/sd_card/sd_card.bas b/samples/sd_card/sd_card.bas new file mode 100644 index 0000000..28330b4 --- /dev/null +++ b/samples/sd_card/sd_card.bas @@ -0,0 +1,23 @@ +1 REM POKE MODE INTO LAYER 1 +2 REM TILED, 4BPP, ON +3 REM IMAGESET ADDRESS $1A800 +4 REM TILEMAP ADDRESS $10000 +10 VPOKE $F,$2000,$61:VPOKE $F,$2001,$31 +11 VPOKE $F,$2002,$00:VPOKE $F,$2003,$40 +12 VPOKE $F,$2004,$00:VPOKE $F,$2005,$6A +13 PRINT "POKING PALETTE" +14 REM POKE PALETTE DATA +20 VLOAD "KQ5PAL.BIN",8,$0F,$1000 +30 REM POKE MODE +31 VPOKE $F,$2000,$E1:VPOKE $F,$2001,$0 +32 VPOKE $F,$2002,$00:VPOKE $F,$2003,$0 +33 VPOKE $F,$2004,$00:VPOKE $F,$2005,$0 +34 VPOKE $F,$2006,$00:VPOKE $F,$2007,$0 +35 VPOKE $F,$0001,$40:VPOKE $F,$0002,$40 + +36 VLOAD "KQ5PAL.BIN",8,$0F,$1000 +37 VLOAD "KQ5.BIN",8,$0,$0000 + +40 VPOKE $F,$3000,0 + +1000 REM DATA WILL BE APPENDED HERE diff --git a/src/cmd/asm/command.rs b/src/cmd/asm/command.rs index 75b76c9..77ec02c 100644 --- a/src/cmd/asm/command.rs +++ b/src/cmd/asm/command.rs @@ -165,12 +165,12 @@ pub struct AsmSelectArgs { pub fn asm_select( g_args: &GlobalArgs, - mut asm_args: AsmArgs, + asm_args: AsmArgs, args: &AsmSelectArgs, ) -> Result<(), Error> { let proj = common::load_project(g_args.project_file.clone())?; let mut line_start = 10000; - asm_args.out_dir = ".".into(); + common::create_dir(&asm_args.out_dir)?; // now look for the ID if proj.palettes.contains_key(&args.asset_id) { perform_assemble(