Skip to content

Commit

Permalink
65816: add long addressing modes to STA
Browse files Browse the repository at this point in the history
  • Loading branch information
twvd committed Oct 15, 2023
1 parent bdb1795 commit 7a277fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/snes/cpu_65816/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ where
.wrapping_add(self.regs.read(Register::Y).into())
& ADDRESS_MASK
}
AddressingMode::Long => instr.imm::<u32>()? & ADDRESS_MASK,
AddressingMode::LongX => {
instr
.imm::<u32>()?
.wrapping_add(self.regs.read(Register::X).into())
& ADDRESS_MASK
}

_ => todo!(),
})
Expand Down
4 changes: 2 additions & 2 deletions src/test/processortests_65816.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ cpu_test!(instr_8a, 0x8a);
cpu_test!(instr_8c, 0x8c);
cpu_test!(instr_8d, 0x8d);
cpu_test!(instr_8e, 0x8e);
//cpu_test!(instr_8f, 0x8f);
cpu_test!(instr_8f, 0x8f);
//cpu_test!(instr_90, 0x90);
cpu_test!(instr_91, 0x91);
cpu_test!(instr_92, 0x92);
Expand All @@ -296,7 +296,7 @@ cpu_test!(instr_9b, 0x9b);
cpu_test!(instr_9c, 0x9c);
cpu_test!(instr_9d, 0x9d);
cpu_test!(instr_9e, 0x9e);
//cpu_test!(instr_9f, 0x9f);
cpu_test!(instr_9f, 0x9f);
//cpu_test!(instr_a0, 0xa0);
//cpu_test!(instr_a1, 0xa1);
//cpu_test!(instr_a2, 0xa2);
Expand Down

0 comments on commit 7a277fb

Please sign in to comment.