Compare commits
No commits in common. "ed8155139a4be65fb2aecc30f412c698c78e19c3" and "ddc54e297741edf61cd24013a896e390d21eb52a" have entirely different histories.
ed8155139a
...
ddc54e2977
|
@ -39,7 +39,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: build
|
||||
run: zig build -Doptimize=ReleaseSafe
|
||||
run: zig build -Drelease-safe
|
||||
- name: upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"augusterame.zls-vscode",
|
||||
"usernamehw.errorlens",
|
||||
"vadimcn.vscode-lldb",
|
||||
"dan-c-underwood.arm"
|
||||
]
|
||||
}
|
|
@ -77,7 +77,7 @@ arm7wrestler GBA Fixed | [destoer](https://github.com/destoer)
|
|||
|
||||
## Compiling
|
||||
|
||||
Most recently built on Zig [v0.11.0-dev.1557+03cdb4fb5](https://github.com/ziglang/zig/tree/03cdb4fb5)
|
||||
Most recently built on Zig [v0.11.0-dev.987+a1d82352d](https://github.com/ziglang/zig/tree/a1d82352d)
|
||||
|
||||
### Dependencies
|
||||
|
||||
|
|
29
build.zig
29
build.zig
|
@ -4,23 +4,25 @@ const Sdk = @import("lib/SDL.zig/Sdk.zig");
|
|||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
// Minimum Zig Version
|
||||
const min_ver = std.SemanticVersion.parse("0.11.0-dev.1557+03cdb4fb5") catch return; // https://github.com/ziglang/zig/commit/03cdb4fb5
|
||||
const min_ver = std.SemanticVersion.parse("0.11.0-dev.987+a1d82352d") catch return; // https://github.com/ziglang/zig/commit/19056cb68
|
||||
if (builtin.zig_version.order(min_ver).compare(.lt)) {
|
||||
std.log.err("{s}", .{b.fmt("Zig v{} does not meet the minimum version requirement. (Zig v{})", .{ builtin.zig_version, min_ver })});
|
||||
std.os.exit(1);
|
||||
}
|
||||
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
// for restricting supported target set are available.
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "zba",
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
const mode = b.standardReleaseOptions();
|
||||
|
||||
const exe = b.addExecutable("zba", "src/main.zig");
|
||||
exe.setMainPkgPath("."); // Necessary so that src/main.zig can embed example.toml
|
||||
exe.setTarget(target);
|
||||
|
||||
// Known Folders (%APPDATA%, XDG, etc.)
|
||||
exe.addPackagePath("known_folders", "lib/known-folders/known-folders.zig");
|
||||
|
@ -42,10 +44,11 @@ pub fn build(b: *std.build.Builder) void {
|
|||
exe.addPackagePath("gl", "lib/gl.zig");
|
||||
|
||||
// Zig SDL Bindings: https://github.com/MasterQ32/SDL.zig
|
||||
const sdk = Sdk.init(b, null);
|
||||
const sdk = Sdk.init(b);
|
||||
sdk.link(exe, .dynamic);
|
||||
exe.addPackage(sdk.getNativePackage("sdl2"));
|
||||
|
||||
exe.setBuildMode(mode);
|
||||
exe.install();
|
||||
|
||||
const run_cmd = exe.run();
|
||||
|
@ -57,11 +60,9 @@ pub fn build(b: *std.build.Builder) void {
|
|||
const run_step = b.step("run", "Run the app");
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
|
||||
const exe_tests = b.addTest(.{
|
||||
.root_source_file = .{ .path = "src/main.zig" },
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
const exe_tests = b.addTest("src/main.zig");
|
||||
exe_tests.setTarget(target);
|
||||
exe_tests.setBuildMode(mode);
|
||||
|
||||
const test_step = b.step("test", "Run unit tests");
|
||||
test_step.dependOn(&exe_tests.step);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 59a458abd9220703ca4d8b7f99080780c61c2f8c
|
||||
Subproject commit 2fbd4b228516bf08348a3173f1446c7e8d75540a
|
|
@ -1 +1 @@
|
|||
Subproject commit 6b37490ac7285133bf09441850b8102c9728a776
|
||||
Subproject commit 24845b0103e611c108d6bc334231c464e699742c
|
|
@ -1 +1 @@
|
|||
Subproject commit 6c9ca9025199b145c42a75d10cadb3f97879ee6d
|
||||
Subproject commit 88edafd00ec25dcc01deb8fc69e9864a16f8717c
|
|
@ -11,7 +11,9 @@ pub fn singleDataTransfer(comptime I: bool, comptime P: bool, comptime U: bool,
|
|||
const rn = opcode >> 16 & 0xF;
|
||||
const rd = opcode >> 12 & 0xF;
|
||||
|
||||
const base = cpu.r[rn];
|
||||
// rn is r15 and L is not set, the PC is 12 ahead
|
||||
const base = cpu.r[rn] + if (!L and rn == 0xF) 4 else @as(u32, 0);
|
||||
|
||||
const offset = if (I) shifter.immediate(false, cpu, opcode) else opcode & 0xFFF;
|
||||
|
||||
const modified_base = if (U) base +% offset else base -% offset;
|
||||
|
|
|
@ -843,12 +843,7 @@ pub const Ppu = struct {
|
|||
const is_top_layer = (top_layer >> layer) & 1 == 1;
|
||||
|
||||
if (is_top_layer) {
|
||||
const pixel = self.scanline.btm()[i];
|
||||
|
||||
// FIXME: Can't I do this check ealier? Test Amazing Mirror File Select, bld_demo.gba
|
||||
if (!pixel.isSet())
|
||||
self.scanline.btm()[i] = Scanline.Pixel.from(.Background, bgr555); // this is intentional
|
||||
|
||||
self.scanline.btm()[i] = Scanline.Pixel.from(.Background, bgr555); // this is intentional
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue