Implement RTC #1
| @@ -6,6 +6,8 @@ const Bit = @import("bitfield").Bit; | ||||
| const Bitfield = @import("bitfield").Bitfield; | ||||
| const Backup = @import("backup.zig").Backup; | ||||
| const Allocator = std.mem.Allocator; | ||||
|  | ||||
| const force_rtc = @import("../emu.zig").force_rtc; | ||||
| const log = std.log.scoped(.GamePak); | ||||
|  | ||||
| const Self = @This(); | ||||
| @@ -23,7 +25,7 @@ pub fn init(allocator: Allocator, cpu: *Arm7tdmi, rom_path: []const u8, save_pat | ||||
|     const file_buf = try file.readToEndAlloc(allocator, try file.getEndPos()); | ||||
|     const title = file_buf[0xA0..0xAC].*; | ||||
|     const kind = Backup.guessKind(file_buf); | ||||
|     const device = guessDevice(file_buf); | ||||
|     const device = if (force_rtc) .Rtc else guessDevice(file_buf); | ||||
|  | ||||
|     logHeader(file_buf, &title); | ||||
|  | ||||
|   | ||||
| @@ -18,6 +18,7 @@ const sync_video: RunKind = .LimitedFPS; // Configure Video Sync | ||||
| pub const win_scale = 3; // 1x, 2x, 3x, etc. Window Scaling | ||||
| pub const cpu_logging = false; // Enable detailed CPU logging | ||||
| pub const allow_unhandled_io = true; // Only relevant in Debug Builds | ||||
| pub const force_rtc = false; | ||||
|  | ||||
| // 228 Lines which consist of 308 dots (which are 4 cycles long) | ||||
| const cycles_per_frame: u64 = 228 * (308 * 4); //280896 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user