Skip to content

Commit

Permalink
change samples to use common var file
Browse files Browse the repository at this point in the history
  • Loading branch information
yeastplume committed Feb 19, 2020
1 parent c2bff1e commit 6f2199e
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 19 deletions.
8 changes: 8 additions & 0 deletions samples/Makefile.vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Common emulator flags and locations
# Ensure the emulator and rom locations are for your system

ALOEVERA = "../../target/debug/aloevera"
X16_EMU = "../../../x16-emulator/x16emu"
X16_ROM = "../../../x16-rom/rom.bin"
X16_EMU_FLAGS = -run -scale 2
#DEBUG = -debug 092B
3 changes: 2 additions & 1 deletion samples/bitmap/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include ../Makefile.vars

NAME = bitmap
ALOEVERA = "../../target/debug/aloevera"
RESOURCES = kq5.png

project.av: $(RESOURCES)
Expand Down
8 changes: 0 additions & 8 deletions samples/common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,8 @@
# Don't run make from this directory, run
# from subdirs

# Common emulator flags and locations
# Ensure the emulator and rom locations are for your system
X16_EMU = "../../../x16-emulator/x16emu"
X16_ROM = "../../../x16-rom/rom.bin"
X16_EMU_FLAGS = -run -scale 2
#DEBUG = -debug 092B

X16_RUN = $(X16_EMU) -rom $(X16_ROM) $(X16_EMU_FLAGS) $(DEBUG)


# Ensure ld65 and ca65 are on your path
# Assembly flags
CPU = 6502
Expand Down
3 changes: 2 additions & 1 deletion samples/palette/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include ../Makefile.vars

NAME = poke_palette
ALOEVERA = "../../target/debug/aloevera"
RESOURCES = nes-palette.png

project.av: $(RESOURCES)
Expand Down
9 changes: 6 additions & 3 deletions samples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ For the time being, sample assembly code is only provided for ca65, the assemble

You'll also need the [x16 Emulator](https://github.com/commanderx16/x16-emulator/releases) and [ROM](https://github.com/commanderx16/x16-rom) available on your path. At the time of this writing, the target release for both is R36.

And of course, you'll need the Aloevera executable somewhere on your machine, either built locally or from a release.

## Configuring the samples

You'll need to configure a few paths in [common/Makefile](common/Makefile) as follows:
You'll need to configure a few paths in [Makefile.vars](Makefile.vars) as follows:

* set X16_EMU to the x16 emulator executable
* set X16_ROM to the x16 rom
* set `ALOEVERA` to the built Aloevera executable (or you can just put Aloevera on your path and use `aloevera[.exe]` here)
* set `X16_EMU` to the x16 emulator executable
* set `X16_ROM` to the x16 rom

The common Makefile provides a few other common flags you can tweak to your liking.

Expand Down
3 changes: 1 addition & 2 deletions samples/scratch/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include ../Makefile.vars
NAME = scratch
ALOEVERA = "../../target/debug/aloevera"
#RESOURCES = pixel-font.png

project.av:
$(ALOEVERA) create project.av
Expand Down
3 changes: 2 additions & 1 deletion samples/sprites/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include ../Makefile.vars

NAME = sprites
ALOEVERA = "../../target/debug/aloevera"
RESOURCES = terra.png

project.av: $(RESOURCES)
Expand Down
4 changes: 2 additions & 2 deletions samples/tile_text/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = poke_font
ALOEVERA = "../../target/debug/aloevera"
include ../Makefile.vars
NAME = tile_text
RESOURCES = pixel-font.png tilemap-banner-1bpp.png

project.av: $(RESOURCES)
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion samples/tile_wall/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include ../Makefile.vars
NAME = tile_wall
ALOEVERA = "../../target/debug/aloevera"
RESOURCES = tile_wall-map.png tile_wall-imageset-4bpp.png

project.av: $(RESOURCES)
Expand Down

0 comments on commit 6f2199e

Please sign in to comment.