diff --git a/.gitignore b/.gitignore index 64e6269..45eb591 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ zig-out/ zig-cache/ **/*.s -**/*.asm \ No newline at end of file +**/*.asm +**/*.bin \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 8c1664e..ec9fcb3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ + [submodule "lib/ZigGBA"] path = lib/ZigGBA - url = https://github.com/wendigojaeger/ZigGBA + url = https://github.com/paoda/ZigGBA diff --git a/build.zig b/build.zig index cfb1656..85c2680 100644 --- a/build.zig +++ b/build.zig @@ -4,5 +4,10 @@ const GBABuilder = @import("lib/ZigGBA/GBA/builder.zig"); pub fn build(b: *std.build.Builder) void { const exe = GBABuilder.addGBAExecutable(b, "first", "src/first.zig"); exe.emit_asm = if (b.option(bool, "asm", "emit assembly") orelse false) .emit else .default; - _ = exe; + + const run_cmd = b.addSystemCommand(&.{"zba"}); + if (b.args) |args| run_cmd.addArgs(args); + + const run_step = b.step("run", "Run test ROM in ZBA"); + run_step.dependOn(&run_cmd.step); } diff --git a/lib/ZigGBA b/lib/ZigGBA index 713a22f..672aae0 160000 --- a/lib/ZigGBA +++ b/lib/ZigGBA @@ -1 +1 @@ -Subproject commit 713a22f6d0613052be932ec768f763d36830dcd9 +Subproject commit 672aae039b2696f7ce6911b29820cb38efc3c759