Compare commits

..

10 Commits

Author SHA1 Message Date
a17d7e6d41 fix(window): proper inRange impl for window
window wrap now works (it's pretty slow though?)
2022-11-11 00:26:10 -04:00
c73966135c chore: improve readability of sprite drawing code a bit 2022-11-11 00:26:10 -04:00
be4396fb0d style: remove unused imports 2022-11-11 00:26:10 -04:00
5c7cd72bbb chore: dont allocate not-small ?Sprite array on stack
use memset like most other allocations in this emu
2022-11-11 00:26:10 -04:00
628b7688cc chore: move FrameBuffer struct to util.zig 2022-11-11 00:26:10 -04:00
56029c5a1e chore: move OAM, PALRAM and VRAM structs to separate files 2022-11-11 00:26:10 -04:00
a156a8763d fix: 8-bit writes to WIN PPU registers
Advance Wars depends on these registers similar to Mario Kart's 8-bit
writes to Affine Background registers:
2022-11-11 00:26:09 -04:00
131d3fd6bd chore: refactor window 2022-11-11 00:26:09 -04:00
9992acfb55 chore: crude background window impl (no affine) 2022-11-11 00:26:09 -04:00
a2e93b98ce chore: rename function (misspelt until now somehow) 2022-11-11 00:26:09 -04:00
2 changed files with 4 additions and 2 deletions

View File

@ -63,7 +63,7 @@ Finally it's worth noting that ZBA uses a TOML config file it'll store in your O
## Compiling ## Compiling
Most recently built on Zig [v0.11.0-dev.144+892fb0fc8](https://github.com/ziglang/zig/tree/892fb0fc8) Most recently built on Zig [v0.10.0](https://github.com/ziglang/zig/tree/0.10.0)
### Dependencies ### Dependencies

View File

@ -652,7 +652,9 @@ const Pipeline = struct {
pub fn step(self: *Self, cpu: *Arm7tdmi, comptime T: type) ?u32 { pub fn step(self: *Self, cpu: *Arm7tdmi, comptime T: type) ?u32 {
comptime std.debug.assert(T == u32 or T == u16); comptime std.debug.assert(T == u32 or T == u16);
const opcode = self.stage[0]; // FIXME: https://github.com/ziglang/zig/issues/12642
var opcode = self.stage[0];
self.stage[0] = self.stage[1]; self.stage[0] = self.stage[1];
self.stage[1] = cpu.fetch(T, cpu.r[15]); self.stage[1] = cpu.fetch(T, cpu.r[15]);