2017-12-20 17:07:09 +00:00
|
|
|
// From https://github.com/Klaus2m5/6502_65C02_functional_tests
|
|
|
|
|
2019-12-03 02:53:47 +00:00
|
|
|
import fs from 'fs';
|
|
|
|
import path from 'path';
|
|
|
|
|
2019-03-01 05:21:18 +00:00
|
|
|
export default function Test65C02() {
|
2019-12-03 02:53:47 +00:00
|
|
|
var data = fs.readFileSync(path.join(__dirname, '65C02_extended_opcodes_test.bin'));
|
2017-12-20 17:07:09 +00:00
|
|
|
|
|
|
|
return {
|
|
|
|
start: function() {
|
|
|
|
return 0x00;
|
|
|
|
},
|
|
|
|
end: function() {
|
|
|
|
return 0xff;
|
|
|
|
},
|
|
|
|
read: function(page, off) {
|
2019-11-24 03:05:52 +00:00
|
|
|
return data[page << 8 | off];
|
2017-12-20 17:07:09 +00:00
|
|
|
},
|
|
|
|
write: function(page, off, val) {
|
2019-11-24 03:05:52 +00:00
|
|
|
data[page << 8 | off] = val;
|
2017-12-20 17:07:09 +00:00
|
|
|
}
|
2019-01-09 08:51:25 +00:00
|
|
|
};
|
2017-12-20 17:07:09 +00:00
|
|
|
}
|