Skip to content

Commit 396bb4b

Browse files
committed
fix(tool): romtool to handle nes/snes roms added
1 parent 2485d2a commit 396bb4b

4 files changed

Lines changed: 1776 additions & 283 deletions

File tree

build.zig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,19 @@ pub fn build(b: *std.Build) void {
212212
});
213213
b.installArtifact(svg2chr);
214214

215+
// Host tool: NES / SNES / PRG pack · unpack · disassemble.
216+
const romtool = b.addExecutable(.{
217+
.name = "romtool",
218+
.root_module = b.createModule(.{
219+
.root_source_file = b.path("tools/romtool.zig"),
220+
.target = b.graph.host,
221+
.optimize = .ReleaseSafe,
222+
}),
223+
});
224+
b.installArtifact(romtool);
225+
const romtool_step = b.step("romtool", "Build romtool (NES/SNES/PRG pack·unpack·disasm)");
226+
romtool_step.dependOn(&romtool.step);
227+
215228
// Host tool: 6502 simulator built from llvm-mos-sdk source (no prebuilt binary needed).
216229
const mos_sim = b.addExecutable(.{
217230
.name = "mos-sim",

snes/sneslib.zig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ pub fn set_color_math(cgwsel: u8, cgadsub: u8) void {
225225
hw.CGADSUB.* = cgadsub;
226226
}
227227

228-
229228
/// OR multiple button constants together at comptime.
230229
/// Usage: `sneslib.buttonMask(.{sneslib.KEY_A, sneslib.KEY_B})`
231230
pub fn buttonMask(comptime btns: anytype) u16 {

0 commit comments

Comments
 (0)