working version (flake does not build correctly, should just use make)
This commit is contained in:
parent
83c8ea6a94
commit
856780ccb0
4 changed files with 19 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,5 +5,6 @@ smb.nes
|
||||||
smb.nes.ndx
|
smb.nes.ndx
|
||||||
obj/nes/smbdishl.o
|
obj/nes/smbdishl.o
|
||||||
obj/nes/smb.d
|
obj/nes/smb.d
|
||||||
|
chr/
|
||||||
src/smb_chr.chr
|
src/smb_chr.chr
|
||||||
.direnv
|
.direnv
|
||||||
|
|
|
||||||
15
Makefile
15
Makefile
|
|
@ -8,11 +8,22 @@ debug: OBJ_DEBUG_ARGS = --create-dep obj/nes/smb.d -v -g
|
||||||
debug: ROM_DEBUG_ARGS = -Wl --dbgfile,smb.nes.dbg
|
debug: ROM_DEBUG_ARGS = -Wl --dbgfile,smb.nes.dbg
|
||||||
debug: build
|
debug: build
|
||||||
|
|
||||||
obj/nes/smbdishl.o: src/smbdishl.s
|
obj/nes/smbdishl.o: src/smbdishl.s src/smb_chr.chr
|
||||||
$(cl65) -t none -c $(OBJ_DEBUG_ARGS) --include-dir src -o $@ $<
|
$(cl65) -t none -c $(OBJ_DEBUG_ARGS) --include-dir src -o $@ $<
|
||||||
|
|
||||||
smb.nes smb.map: obj/nes/smbdishl.o src/nes.cfg
|
smb.nes smb.map: obj/nes/smbdishl.o src/nes.cfg
|
||||||
$(cl65) -t none -c --mapfile smb.map $(ROM_DEBUG_ARGS) -o smb.nes -C src/nes.cfg $<
|
$(cl65) -t none --mapfile smb.map $(ROM_DEBUG_ARGS) -o smb.nes -C src/nes.cfg $<
|
||||||
|
|
||||||
|
src/smb_chr.chr:
|
||||||
|
if [ -s chr/smb_chr.chr ]; then \
|
||||||
|
if [ -s src/smb_chr.chr ]; then \
|
||||||
|
cmp -s $@ chr/smb_chr.chr || cp chr/smb_chr.chr $@ \
|
||||||
|
else \
|
||||||
|
cp chr/smb_chr.chr \
|
||||||
|
fi \
|
||||||
|
else \
|
||||||
|
[ -s src/smb_chr.chr ] || $(error missing chr)\
|
||||||
|
fi
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f smb.nes.dbg smb.map smb.nes smb.nes.ndx obj/nes/smbdishl.o obj/nes/smb.d
|
rm -f smb.nes.dbg smb.map smb.nes smb.nes.ndx obj/nes/smbdishl.o obj/nes/smb.d
|
||||||
|
|
|
||||||
2
README
2
README
|
|
@ -1,6 +1,6 @@
|
||||||
Building:
|
Building:
|
||||||
|
|
||||||
NOTE: "src/smb_chr.chr" is required to assemble. (Not included.)
|
NOTE: "chr/smb_chr.chr" is required to assemble. (Not included.)
|
||||||
|
|
||||||
Run either `make`, or `make debug`
|
Run either `make`, or `make debug`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,10 @@
|
||||||
};
|
};
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
inputsFrom = [ self'.packages.default ];
|
inputsFrom = [ self'.packages.default ];
|
||||||
packages = with pkgs; [ nesrx ];
|
packages = with pkgs; [
|
||||||
|
nesrx
|
||||||
|
fceux
|
||||||
|
];
|
||||||
};
|
};
|
||||||
packages.default = pkgs.stdenvNoCC.mkDerivation {
|
packages.default = pkgs.stdenvNoCC.mkDerivation {
|
||||||
name = "smbOneOne";
|
name = "smbOneOne";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue