diff --git a/Makefile b/Makefile index de33201..a21578a 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,16 @@ RES=res.bin/amour.sid res.bin/levels.bin res.bin/unlzg.bin bin/snake.bin: bin/snake.pack.lz dasm src/cart.asm -Isrc/ -DVERBOSE=$(VERBOSE) -f3 -sbuild/cart.symbols.txt -obin/snake.bin +#bin/tape.prg: bin/snake.pack.lz.file +# dasm src/tape.asm -Isrc/ -DVERBOSE=$(VERBOSE) -f1 -sbuild/tape.sybols.txt -obin/tape.prg + +#bin/snake.pack.lz.file: bin/snake.pack.lz +# echo -e "\x00\x80" > bin/snake.pack.lz.file +# cat bin/snake.pack.lz >> bin/snake.pack.lz.file + +bin/snake.prg: bin/snake.pack + dasm src/prg.asm -Isrc/ -DVERBOSE=$(VERBOSE) -f1 -sbuild/prg.symbols.txt -obin/snake.prg + bin/snake.pack: env $(ASM) $(RES) bin/explodefont dasm src/main.asm -Isrc/ -DSYSTEM=64 -DDEBUG=$(DEBUG) -DVERBOSE=$(VERBOSE) -DCARTRIDGE=$(CARTRIDGE) -f3 -sbuild/pack.symbols.txt -obin/snake.pack diff --git a/README.md b/README.md index 039b6a7..911b719 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,12 @@ You need the GNU compiler collection and the [dasm](https://dasm-assembler.githu ``` $ make ``` +Interesting targets: + +* ```make bin/snake.bin``` produces .bin, ready to be burnt on an 8K EEPROM for making a cartridge (default) +* ```make bin/snake.prg``` produces .prg for the emulator, ready to be used on tape/disk +* ```make tape/disk``` (fastloader, to be done) + You can also define the following environment variables: ```$ DEBUG=1 make``` build with debugging artifacts diff --git a/src/prg.asm b/src/prg.asm new file mode 100644 index 0000000..30aef2b --- /dev/null +++ b/src/prg.asm @@ -0,0 +1,26 @@ + processor 6502 + + SEG.U + org $02 + INCLUDE "zeropage.asm" + + SEG autostart + org $801 +autostartRoutine SUBROUTINE + ; this is at $801 + ; and it MUST be exactly at this location in order to autostart + ; 10 SYS2060 ($80c) BASIC autostart + BYTE #$0b,#$08,#$0a,#$00,#$9e,#$32,#$30,#$36,#$31,#$00,#$00,#$00 + + ; this is at (2061 dec)=($80d) + ; and it MUST be exactly after the above BASIC statement +. = $80d + jmp $2800 + +. = $1000 + INCBIN "../bin/snake.pack" + +#if VERBOSE = 1 + ECHO "PRG SIZE:",(. - $801 + 2),"=",[(. - $801 + 2)d] +#endif +