fixed plain .prg version

actually it takes a "lot" of space more, but it is not a problem and it works,
anyhow a future version with a "fast" loader is required
This commit is contained in:
giomba 2020-11-14 19:12:10 +01:00
parent 55e0a550ea
commit f81f087a13
3 changed files with 42 additions and 0 deletions

View File

@ -8,6 +8,16 @@ RES=res.bin/amour.sid res.bin/levels.bin res.bin/unlzg.bin
bin/snake.bin: bin/snake.pack.lz bin/snake.bin: bin/snake.pack.lz
dasm src/cart.asm -Isrc/ -DVERBOSE=$(VERBOSE) -f3 -sbuild/cart.symbols.txt -obin/snake.bin 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 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 dasm src/main.asm -Isrc/ -DSYSTEM=64 -DDEBUG=$(DEBUG) -DVERBOSE=$(VERBOSE) -DCARTRIDGE=$(CARTRIDGE) -f3 -sbuild/pack.symbols.txt -obin/snake.pack

View File

@ -13,6 +13,12 @@ You need the GNU compiler collection and the [dasm](https://dasm-assembler.githu
``` ```
$ make $ 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: You can also define the following environment variables:
```$ DEBUG=1 make``` build with debugging artifacts ```$ DEBUG=1 make``` build with debugging artifacts

26
src/prg.asm Normal file
View File

@ -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