浏览代码

Finished coding all opcodes.

master
Bryan Miller 5 年前
父节点
当前提交
e92b54db8a
共有 1 个文件被更改,包括 18 次插入3 次删除
  1. +18
    -3
      src/chip/MOS6502/cpu.js

+ 18
- 3
src/chip/MOS6502/cpu.js 查看文件

@@ -572,7 +572,12 @@ function SBC(cpu){
}

function STA(cpu){

let pmode = [null, 0x85, 0x95, null, 0x8D, 0x9D, 0x99, 0x81, 0x91, null].indexOf(cpu.__op);
if (ProcessOp(cpu, pmode) === true){
cpu.__op = -1;
cpu.__mem.address = cpu.__opv;
cpu.__mem.byte = cpu.__AR;
}
}

function STACK(cpu){
@@ -630,11 +635,21 @@ function STACK(cpu){
}

function STX(cpu){

let pmode = [null, 0x86, null, 0x96, 0x8E, null, null, null, null, null].indexOf(cpu.__op);
if (ProcessOp(cpu, pmode) === true){
cpu.__op = -1;
cpu.__mem.address = cpu.__opv;
cpu.__mem.byte = cpu.__XR;
}
}

function STY(cpu){

let pmode = [null, 0x84, 0x94, null, 0x8C, null, null, null, null, null].indexOf(cpu.__op);
if (ProcessOp(cpu, pmode) === true){
cpu.__op = -1;
cpu.__mem.address = cpu.__opv;
cpu.__mem.byte = cpu.__YR;
}
}



正在加载...
取消
保存