diff options
| author | Patrick Kingston <patrick@pkingston.xyz> | 2026-02-07 01:25:35 -0500 |
|---|---|---|
| committer | Patrick Kingston <patrick@pkingston.xyz> | 2026-02-07 01:25:35 -0500 |
| commit | 80a1f6aa01bcff47bbe6c4273233997da0d3c271 (patch) | |
| tree | b9e419c70204113850de324c36f67d685f22c15d | |
| parent | 91ab1e7b87b7d2e19f815e4dccaa57a8d47963a1 (diff) | |
Create build system with babashka
| -rw-r--r-- | bb.edn | 13 | ||||
| -rw-r--r-- | main.fab | 20 | ||||
| -rw-r--r-- | nEs.cfg | 5 | ||||
| -rw-r--r-- | nEs.cfg.bak | 5 | ||||
| -rw-r--r-- | nEs.nes | bin | 0 -> 40976 bytes | |||
| -rw-r--r-- | tiles.png | bin | 0 -> 1650 bytes |
6 files changed, 43 insertions, 0 deletions
@@ -0,0 +1,13 @@ +{:pods {org.babashka/fswatcher {:version "0.0.7"}} + :tasks + {build + {:doc "Builds the nesfab project" + :task (shell "../nesfab/nesfab nEs.cfg")} + watch + {:doc "Automatically build the nesfab project on file writes" + :requires ([pod.babashka.fswatcher :as fw]) + :task (do (fw/watch "main.fab" + (fn [event] + (prn event) + (shell "../nesfab/nesfab nEs.cfg"))) + (deref (promise)))}}} diff --git a/main.fab b/main.fab new file mode 100644 index 0000000..ebbb2a4 --- /dev/null +++ b/main.fab @@ -0,0 +1,20 @@ +fn load_level() + ppu_reset_addr($2000) + + for UU i = 0; i < 1024; i += 1 + {PPUDATA}(1) + +mode main() + // Set the palette: + palette = example_palette + ppu_upload_palette() + + // Load the background + {PPUMASK}(PPUMASK_BG_ON | PPUMASK_NO_CLIP) + + // Loop forever: + while true + +// Define the tileset (commonly called CHR): +chrrom + file(fmt, "tiles.png") @@ -0,0 +1,5 @@ +mapper = NROM +nesfab-dir = ../nesfab/ +input = main.fab +input = lib/nes.fab +output = nEs.nes diff --git a/nEs.cfg.bak b/nEs.cfg.bak new file mode 100644 index 0000000..cf96c4e --- /dev/null +++ b/nEs.cfg.bak @@ -0,0 +1,5 @@ +mapper = NROM +nesfab-dir = ../nesfab/ +input = main.fab +input = lib/nes.fab +output = nEs.nes Binary files differdiff --git a/tiles.png b/tiles.png Binary files differnew file mode 100644 index 0000000..7045dda --- /dev/null +++ b/tiles.png |
