Compare commits

..

3 Commits

Author SHA1 Message Date
Rekai Nyangadzayi Musuka f7680cd824 feat(cpu): implement branch and exchange
If I want to continue with armwrestler, I'll have to implement
THUMB instructions now
2022-01-12 07:14:41 -04:00
Rekai Nyangadzayi Musuka 9860294329 fix(cpu): make Data Processing instructions r15-aware 2022-01-12 06:54:22 -04:00
Rekai Nyangadzayi Musuka 22cab0210b fix(cpu): make LDRH and STRH aware of r15 2022-01-12 06:26:10 -04:00
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ pub fn halfAndSignedDataTransfer(comptime P: bool, comptime U: bool, comptime I:
}, },
0b01 => { 0b01 => {
// LDRH // LDRH
const value = bus.read16(address & 0xFFFF_FFFE); const value = bus.read16(address & 0xFFFE);
cpu.r[rd] = std.math.rotr(u32, @as(u32, value), 8 * (address & 1)); cpu.r[rd] = std.math.rotr(u32, @as(u32, value), 8 * (address & 1));
}, },
0b10 => { 0b10 => {