fix spc700::dp addressing program counter bug
This commit is contained in:
@@ -7,10 +7,6 @@ namespace audio {
|
|||||||
|
|
||||||
// adressing modes
|
// adressing modes
|
||||||
|
|
||||||
// uint16_t adrDp() {
|
|
||||||
// return ReadOpcode() | (PSW.P << 8);
|
|
||||||
// }
|
|
||||||
|
|
||||||
uint16_t Spc700::ind() {
|
uint16_t Spc700::ind() {
|
||||||
read(PC);
|
read(PC);
|
||||||
return X | (PSW.P << 8);
|
return X | (PSW.P << 8);
|
||||||
@@ -53,11 +49,6 @@ uint16_t Spc700::idy() {
|
|||||||
return (adr + Y) & 0xffff;
|
return (adr + Y) & 0xffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
// uint16_t adrDpDp(uint8_t* srcVal) {
|
|
||||||
// *srcVal = read(spc, ReadOpcode() | (PSW.P << 8));
|
|
||||||
// return ReadOpcode() | (PSW.P << 8);
|
|
||||||
// }
|
|
||||||
|
|
||||||
uint16_t Spc700::dp_imm(uint8_t* srcVal) {
|
uint16_t Spc700::dp_imm(uint8_t* srcVal) {
|
||||||
*srcVal = ReadOpcode();
|
*srcVal = ReadOpcode();
|
||||||
return ReadOpcode() | (PSW.P << 8);
|
return ReadOpcode() | (PSW.P << 8);
|
||||||
@@ -91,9 +82,7 @@ uint16_t Spc700::imm() { return PC++; }
|
|||||||
|
|
||||||
// Direct page
|
// Direct page
|
||||||
uint8_t Spc700::dp() {
|
uint8_t Spc700::dp() {
|
||||||
PC++;
|
return ReadOpcode() | (PSW.P << 8);
|
||||||
uint8_t offset = read(PC);
|
|
||||||
return read((PSW.P << 8) + offset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t Spc700::get_dp_addr() {
|
uint8_t Spc700::get_dp_addr() {
|
||||||
|
|||||||
Reference in New Issue
Block a user