mirror of
https://github.com/robmcmullen/asmgen.git
synced 2024-06-15 07:29:28 +00:00
More demo refactoring
This commit is contained in:
parent
213a06ad8d
commit
70e2cea056
|
@ -166,7 +166,7 @@ The sample font is modified from Michael Pohoreski's `excellent tutorial on
|
||||||
Apple II fonts <https://github.com/Michaelangel007/apple2_hgr_font_tutorial>`_.
|
Apple II fonts <https://github.com/Michaelangel007/apple2_hgr_font_tutorial>`_.
|
||||||
|
|
||||||
|
|
||||||
Disclaimer
|
License
|
||||||
==========
|
==========
|
||||||
|
|
||||||
AsmGen, the 6502 code generator sponsored by the Player/Missile Podcast
|
AsmGen, the 6502 code generator sponsored by the Player/Missile Podcast
|
||||||
|
|
|
@ -1,43 +1,47 @@
|
||||||
COLORSPRITE = ../sprites/moldy_burger.png
|
COLORSPRITE = ../../sprites/moldy_burger.png
|
||||||
BWSPRITE = ../sprites/apple-sprite9x11.png
|
BWSPRITE = ../../sprites/apple-sprite9x11.png
|
||||||
ASMGEN = python ../../asmgen.py
|
ASMGEN_SRC = ../../asmgen.py
|
||||||
|
ASMGEN = python $(ASMGEN_SRC) -a mac65 -p 6502
|
||||||
|
|
||||||
all: cpbg.dsk fonttest.dsk
|
all: cpbg.dsk fonttest.dsk
|
||||||
|
|
||||||
rowlookup.s: asmgen.py
|
rowlookup.s: $(ASMGEN_SRC)
|
||||||
$(ASMGEN) -a mac65 -p 6502 -r > rowlookup.s
|
$(ASMGEN) -r > rowlookup.s
|
||||||
|
|
||||||
collookupbw.s: asmgen.py
|
collookupbw.s: $(ASMGEN_SRC)
|
||||||
$(ASMGEN) -a mac65 -p 6502 -s hgrbw -c > collookupbw.s
|
$(ASMGEN) -s hgrbw -c > collookupbw.s
|
||||||
|
|
||||||
collookupcolor.s: asmgen.py
|
collookupcolor.s: $(ASMGEN_SRC)
|
||||||
$(ASMGEN) -a mac65 -p 6502 -c > collookupcolor.s
|
$(ASMGEN) -c > collookupcolor.s
|
||||||
|
|
||||||
bwsprite.s: asmgen.py collookupbw.s rowlookup.s $(BWSPRITE)
|
bwsprite.s: $(ASMGEN_SRC) collookupbw.s rowlookup.s $(BWSPRITE)
|
||||||
$(ASMGEN) -a mac65 -p 6502 -s hgrbw $(BWSPRITE) -n bwsprite -m -b > bwsprite.s
|
$(ASMGEN) -s hgrbw $(BWSPRITE) -n bwsprite -m -b > bwsprite.s
|
||||||
|
|
||||||
colorsprite.s: asmgen.py collookupcolor.s rowlookup.s $(COLORSPRITE)
|
colorsprite.s: $(ASMGEN_SRC) collookupcolor.s rowlookup.s $(COLORSPRITE)
|
||||||
$(ASMGEN) -a mac65 -p 6502 -s hgrcolor $(COLORSPRITE) -n colorsprite -m > colorsprite.s
|
$(ASMGEN) -s hgrcolor $(COLORSPRITE) -n colorsprite -m > colorsprite.s
|
||||||
|
|
||||||
bwtest.dsk: asmgen.py bwtest.s bwsprite.s
|
bwtest.dsk: $(ASMGEN_SRC) bwtest.s bwsprite.s
|
||||||
atasm -obwtest.xex bwtest.s -Lbwtest.var -gbwtest.lst
|
atasm -obwtest.xex bwtest.s -Lbwtest.var -gbwtest.lst
|
||||||
atrcopy bwtest.dsk boot -b bwtest.xex --brun 6000 -f
|
atrcopy bwtest.dsk boot -b bwtest.xex --brun 6000 -f
|
||||||
|
|
||||||
colortest.dsk: asmgen.py colortest.s bwsprite.s
|
colortest.dsk: $(ASMGEN_SRC) colortest.s bwsprite.s
|
||||||
atasm -ocolortest.xex colortest.s -Lcolortest.var -gcolortest.lst
|
atasm -ocolortest.xex colortest.s -Lcolortest.var -gcolortest.lst
|
||||||
atrcopy colortest.dsk boot -b colortest.xex --brun 6000 -f
|
atrcopy colortest.dsk boot -b colortest.xex --brun 6000 -f
|
||||||
|
|
||||||
cpbg-asmgen-driver.s: asmgen.py $(BWSPRITE)
|
cpbg-asmgen-driver.s: $(ASMGEN_SRC) $(BWSPRITE)
|
||||||
$(ASMGEN) -a mac65 -p 6502 -s hgrbw -m -k -d -g -f fatfont128.dat -o cpbg $(BWSPRITE) $(COLORSPRITE)
|
$(ASMGEN) -s hgrbw -m -k -d -g -f ../../fonts/fatfont128.dat -o cpbg $(BWSPRITE) $(COLORSPRITE)
|
||||||
|
|
||||||
cpbg.xex: cpbg.s cpbg-asmgen-driver.s
|
cpbg.xex: cpbg.s cpbg-asmgen-driver.s
|
||||||
atasm -mae -ocpbg.xex cpbg.s -Lcpbg.var -gcpbg.lst
|
atasm -mae -ocpbg.xex cpbg.s -Lcpbg.var -gcpbg.lst
|
||||||
|
|
||||||
cpbg.dsk: asmgen.py cpbg.xex
|
cpbg.dsk: $(ASMGEN_SRC) cpbg.xex
|
||||||
atrcopy cpbg.dsk boot -b cpbg.xex --brun 6000 -f
|
atrcopy cpbg.dsk boot -b cpbg.xex --brun 6000 -f
|
||||||
|
|
||||||
fonttest-asmgen-driver.s: asmgen.py fatfont128.dat
|
fonttest-asmgen-driver.s: $(ASMGEN_SRC) ../../fonts/fatfont128.dat
|
||||||
$(ASMGEN) -a mac65 -p 6502 -s hgrbw -f fatfont128.dat -r -o fonttest
|
$(ASMGEN) -s hgrbw -f ../../fonts/fatfont128.dat -r -o fonttest
|
||||||
|
|
||||||
|
fatfont.s:
|
||||||
|
$(ASMGEN) --src ../../fonts/fatfont128.dat > fatfont.s
|
||||||
|
|
||||||
fonttest.dsk: fonttest.s fatfont.s fonttest-asmgen-driver.s slowfont.s
|
fonttest.dsk: fonttest.s fatfont.s fonttest-asmgen-driver.s slowfont.s
|
||||||
atasm -ofonttest.xex fonttest.s -Lfonttest.var -gfonttest.lst
|
atasm -ofonttest.xex fonttest.s -Lfonttest.var -gfonttest.lst
|
||||||
|
|
|
@ -703,5 +703,5 @@ textrows_h
|
||||||
.byte $04, $04, $05, $05, $06, $06, $07, $07
|
.byte $04, $04, $05, $05, $06, $06, $07, $07
|
||||||
|
|
||||||
|
|
||||||
.include cpbg-sprite-driver.s
|
.include cpbg-asmgen-driver.s
|
||||||
.include fatfont.s
|
.include fatfont.s
|
||||||
|
|
|
@ -330,4 +330,4 @@ sprite_diry
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.include multitest-sprite-driver.s
|
.include multitest-asmgen-driver.s
|
||||||
|
|
|
@ -16,10 +16,10 @@ slowfont ; A = character, X = column, Y = row; A is clobbered, X&Y are not
|
||||||
rol font_ptr + 1
|
rol font_ptr + 1
|
||||||
|
|
||||||
clc ; add font table address to get pointer inside font table
|
clc ; add font table address to get pointer inside font table
|
||||||
lda #<fatfont ; would be slightly faster if page aligned because you
|
lda #<FONTS_FATFONT128_START ; would be slightly faster if page aligned because you
|
||||||
adc font_ptr ; could just store the low byte
|
adc font_ptr ; could just store the low byte
|
||||||
sta slowfont_loop_smc+1
|
sta slowfont_loop_smc+1
|
||||||
lda #>fatfont
|
lda #>FONTS_FATFONT128_START
|
||||||
adc font_ptr+1
|
adc font_ptr+1
|
||||||
sta slowfont_loop_smc+2
|
sta slowfont_loop_smc+2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user