mirror of
https://github.com/whscullin/apple1js.git
synced 2024-06-01 10:41:28 +00:00
commit
acfc295b9b
|
@ -40,6 +40,7 @@
|
||||||
}, {
|
}, {
|
||||||
"files": [ "test/*"],
|
"files": [ "test/*"],
|
||||||
"env": {
|
"env": {
|
||||||
|
"node": true,
|
||||||
"jest": true
|
"jest": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
|
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [8.x, 10.x, 12.x]
|
node-version: [12.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
|
@ -79,6 +79,7 @@ export default function ACI(cpu, cb) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (cpu.sync()) {
|
||||||
switch (off) {
|
switch (off) {
|
||||||
case 0x00:
|
case 0x00:
|
||||||
_recording = false;
|
_recording = false;
|
||||||
|
@ -120,6 +121,7 @@ export default function ACI(cpu, cb) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
write: function aci_write() {},
|
write: function aci_write() {},
|
||||||
|
|
555
js/cpu6502.js
555
js/cpu6502.js
File diff suppressed because it is too large
Load Diff
48
test/cpu.spec.js
Normal file
48
test/cpu.spec.js
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
|
||||||
|
import CPU6502 from '../js/cpu6502';
|
||||||
|
import Test6502 from './roms/6502test';
|
||||||
|
import Test65C02 from './roms/65C02test';
|
||||||
|
|
||||||
|
import { toHex } from '../js/util';
|
||||||
|
|
||||||
|
describe.skip('CPU', function () {
|
||||||
|
var cpu;
|
||||||
|
var lastPC = 0;
|
||||||
|
var done = false;
|
||||||
|
|
||||||
|
function traceCB() {
|
||||||
|
var pc = cpu.getPC();
|
||||||
|
done = lastPC == pc;
|
||||||
|
lastPC = pc;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('6502', function () {
|
||||||
|
it('completes the test ROM', function () {
|
||||||
|
cpu = new CPU6502();
|
||||||
|
var test = new Test6502();
|
||||||
|
cpu.addPageHandler(test);
|
||||||
|
cpu.setPC(0x400);
|
||||||
|
|
||||||
|
do {
|
||||||
|
cpu.stepCyclesDebug(1000, traceCB);
|
||||||
|
} while (!done);
|
||||||
|
|
||||||
|
expect(toHex(lastPC)).toEqual(toHex(0x3469));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('65C02', function () {
|
||||||
|
it('completes the test ROM', function () {
|
||||||
|
cpu = new CPU6502({'65C02': true});
|
||||||
|
var test = new Test65C02();
|
||||||
|
cpu.addPageHandler(test);
|
||||||
|
cpu.setPC(0x400);
|
||||||
|
|
||||||
|
do {
|
||||||
|
cpu.stepCyclesDebug(1000, traceCB);
|
||||||
|
} while (!done);
|
||||||
|
|
||||||
|
expect(toHex(lastPC)).toEqual(toHex(0x24f1));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
2240
test/cpu6502.spec.js
Normal file
2240
test/cpu6502.spec.js
Normal file
File diff suppressed because it is too large
Load Diff
8213
test/roms/6502test.js
Normal file
8213
test/roms/6502test.js
Normal file
File diff suppressed because it is too large
Load Diff
8213
test/roms/65C02test.js
Normal file
8213
test/roms/65C02test.js
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user