| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| | 2 | const log = std.log.scoped(.SPU_2_Interpreter); |
| 2 | usingnamespace @import("defines.zig"); | 3 | usingnamespace @import("defines.zig"); |
| 3 | | 4 | |
| 4 | pub fn Interpreter(comptime Bus: type) type { | 5 | pub fn Interpreter(comptime Bus: type) type { |
| ... | @@ -18,7 +19,7 @@ pub fn Interpreter(comptime Bus: type) type { | ... | @@ -18,7 +19,7 @@ pub fn Interpreter(comptime Bus: type) type { |
| 18 | count += 1; | 19 | count += 1; |
| 19 | var instruction = @bitCast(Instruction, self.bus.read16(self.ip)); | 20 | var instruction = @bitCast(Instruction, self.bus.read16(self.ip)); |
| 20 | | 21 | |
| 21 | std.log.debug(.SPU_2_Interpreter, "Executing {}\n", .{instruction}); | 22 | log.debug("Executing {}\n", .{instruction}); |
| 22 | | 23 | |
| 23 | self.ip +%= 2; | 24 | self.ip +%= 2; |
| 24 | | 25 | |
| ... | @@ -137,10 +138,6 @@ pub fn Interpreter(comptime Bus: type) type { | ... | @@ -137,10 +138,6 @@ pub fn Interpreter(comptime Bus: type) type { |
| 137 | }, | 138 | }, |
| 138 | .jump => { | 139 | .jump => { |
| 139 | self.ip = output; | 140 | self.ip = output; |
| 140 | if (!(instruction.command == .copy and instruction.input0 == .immediate)) { | | |
| 141 | // Not absolute. Break, for compatibility with JIT. | | |
| 142 | break; | | |
| 143 | } | | |
| 144 | }, | 141 | }, |
| 145 | else => return error.unimplemented, | 142 | else => return error.unimplemented, |
| 146 | } | 143 | } |