chore: add ZigGBA

Also get a ZigGBA implementation of first.gba working
This commit is contained in:
2022-04-14 23:50:02 -03:00
parent 48b48cf009
commit dfec136a86
5 changed files with 25 additions and 39 deletions

18
src/first.zig Normal file
View File

@@ -0,0 +1,18 @@
const GBA = @import("gba").GBA;
const Mode3 = @import("gba").Mode3;
const LCD = @import("gba").LCD;
export var gameHeader linksection(".gbaheader") = GBA.Header.setup("FIRST", "AFSE", "00", 0);
pub fn main() noreturn {
LCD.setupDisplayControl(.{
.mode = .Mode3,
.backgroundLayer2 = .Show,
});
Mode3.setPixel(120, 80, GBA.toNativeColor(31, 0, 0));
Mode3.setPixel(136, 80, GBA.toNativeColor(0, 31, 0));
Mode3.setPixel(120, 96, GBA.toNativeColor(0, 0, 31));
while (true) {}
}

View File

@@ -1,9 +0,0 @@
const std = @import("std");
pub fn main() anyerror!void {
std.log.info("All your codebase are belong to us.", .{});
}
test "basic test" {
try std.testing.expectEqual(10, 3 + 7);
}