mirror of https://github.com/zxdos/zxuno.git
Merge pull request #84 from ivan-tat/master
firmware/scroll: used sources of `playstc.bin` to compile
This commit is contained in:
commit
36a82bf441
|
|
@ -13,16 +13,18 @@
|
|||
|
||||
include ../../sdk/common.mk
|
||||
|
||||
INCLUDEDIR = ../../sdk/include
|
||||
FUENTEABIN = tools/build/FuenteABin$(EXESUFFIX)
|
||||
AS = sjasmplus
|
||||
ifeq ($(USE_SJASMPLUS_VERSION),sjasmplus)
|
||||
$(error Original SJAsmPlus is not supported for now - use version by `z00m128')
|
||||
AFLAGS = --nobanner
|
||||
else ifeq ($(USE_SJASMPLUS_VERSION),z00m128)
|
||||
AFLAGS = --nologo
|
||||
else
|
||||
AFLAGS =
|
||||
endif
|
||||
AFLAGS += -I../../sdk/include
|
||||
AFLAGS += -I$(INCLUDEDIR)
|
||||
|
||||
.PHONY: all
|
||||
all: scroll.tap
|
||||
|
|
@ -33,17 +35,24 @@ scroll.tap: scrolldesc.bin
|
|||
scrolldesc.bin: scrolldesc.asm define.asm scroll.bin.zx7b
|
||||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
define.asm: scroll.bin
|
||||
define.asm: scroll.bin scroll.exp
|
||||
echo ' define filesize $(shell stat -c %s $<)' >$@
|
||||
cat scroll.exp >>$@
|
||||
|
||||
scroll.bin.zx7b: scroll.bin
|
||||
zx7b $< $@
|
||||
|
||||
scroll.bin: scroll.asm string.asm music.bin fuente6x8.bin lineas.asm fondo.rcs
|
||||
$(AS) $(AFLAGS) --raw=$@ $<
|
||||
|
||||
music.bin: playstc.bin music.stc
|
||||
cat $^ >$@
|
||||
scroll.bin scroll.exp:\
|
||||
scroll.asm\
|
||||
string.asm\
|
||||
$(INCLUDEDIR)/playstc.inc\
|
||||
$(INCLUDEDIR)/filestc.def\
|
||||
$(INCLUDEDIR)/ay.def\
|
||||
music.stc\
|
||||
fuente6x8.bin\
|
||||
lineas.asm\
|
||||
fondo.rcs
|
||||
$(AS) $(AFLAGS) --raw=scroll.bin --exp=scroll.exp $<
|
||||
|
||||
fuente6x8.bin: fuente6x8.png | $(FUENTEABIN)
|
||||
$(FUENTEABIN) $< $@
|
||||
|
|
@ -67,7 +76,7 @@ uninstall:;
|
|||
.PHONY: clean
|
||||
clean: | tools
|
||||
$(MAKE) -w -C $| $@
|
||||
rm -f music.bin fuente6x8.bin fondo.rcs scroll.bin scroll.bin.zx7b define.asm scrolldesc.bin scroll.tap
|
||||
rm -f fuente6x8.bin fondo.rcs scroll.bin scroll.exp scroll.bin.zx7b define.asm scrolldesc.bin scroll.tap
|
||||
|
||||
.PHONY: distclean
|
||||
distclean:;
|
||||
|
|
|
|||
|
|
@ -27,12 +27,26 @@
|
|||
; SJAsmPlus, <https://github.com/sjasmplus/sjasmplus/>
|
||||
|
||||
output scroll.bin
|
||||
|
||||
org $5e6d
|
||||
display $6d35+string-music
|
||||
|
||||
export filestart
|
||||
export start
|
||||
|
||||
filestart
|
||||
string include string.asm
|
||||
music ld (vari+2), ix
|
||||
incbin music.bin
|
||||
|
||||
music ld (vari), ix
|
||||
jp PlaySTC.Play
|
||||
|
||||
define PLAYSTC_AY_FREQUENCY ay_freq_Spectrum
|
||||
define PLAYSTC_USER_DEFINED_FILE 0
|
||||
include playstc.inc
|
||||
|
||||
track incbin music.stc
|
||||
|
||||
fuente incbin fuente6x8.bin
|
||||
|
||||
start ld hl, $c000
|
||||
ld de, $c001
|
||||
ld bc, $017f
|
||||
|
|
@ -116,9 +130,9 @@ start2 ld a, (hl)
|
|||
jr nc, start1
|
||||
ld a, $c9
|
||||
ld ($c006), a
|
||||
ld hl, $716f
|
||||
call music+7
|
||||
start3 call $6e77
|
||||
ld hl, track
|
||||
call PlaySTC.Init
|
||||
start3 call PlaySTC.Play
|
||||
ei
|
||||
halt
|
||||
di
|
||||
|
|
@ -141,7 +155,8 @@ start4 djnz start4
|
|||
push hl
|
||||
push hl
|
||||
ld sp, hl
|
||||
vari ld ix, string
|
||||
ld ix, string
|
||||
vari: equ $-2
|
||||
ld hl, start3
|
||||
push hl
|
||||
ld hl, music
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
include define.asm
|
||||
output scrolldesc.bin
|
||||
org $5ccb
|
||||
ld de, $5e6d+filesize-1
|
||||
ld de, filestart+filesize-1
|
||||
di
|
||||
defb $de, $c0, $37, $0e, $8f, $39, $96
|
||||
jr aqui
|
||||
|
|
@ -63,6 +63,6 @@ offend rr e
|
|||
lddr
|
||||
exitdz pop hl
|
||||
jr nc, mainlo
|
||||
jp $7be4
|
||||
jp start
|
||||
incbin scroll.bin.zx7b
|
||||
fin
|
||||
|
|
|
|||
Loading…
Reference in New Issue