tmp: implement mechanisms for a emu reset fn (currently crashes)

This commit is contained in:
2023-02-23 22:12:06 -06:00
parent 3fff4fd742
commit d985eac0fc
15 changed files with 131 additions and 30 deletions

View File

@@ -77,6 +77,10 @@ pub fn init(allocator: Allocator, maybe_path: ?[]const u8) !Self {
return Self{ .buf = buf, .allocator = allocator };
}
pub fn reset(self: *Self) void {
self.addr_latch = 0;
}
pub fn deinit(self: *Self) void {
if (self.buf) |buf| self.allocator.free(buf);
self.* = undefined;