This commit is contained in:
Will Scullin 2019-11-23 15:18:26 -08:00
parent df5cea2482
commit 3d1ce767e0
No known key found for this signature in database
GPG Key ID: 9092A5C0A673416B
1 changed files with 38 additions and 36 deletions

View File

@ -79,45 +79,47 @@ export default function ACI(cpu, cb) {
} }
} }
} else { } else {
switch (off) { if (cpu.sync()) {
case 0x00: switch (off) {
_recording = false; case 0x00:
_beKind = true;
debug('Entering ACI CLI');
break;
case 0x63:
if (_recording) {
this.buffer.push(5000000);
_recording = false; _recording = false;
} _beKind = true;
debug('Exiting ACI CLI'); debug('Entering ACI CLI');
break; break;
case 0x70: // WRITE case 0x63:
_recording = true; if (_recording) {
if (_beKind) { this.buffer.push(5000000);
_beKind = false; _recording = false;
this.buffer = []; }
} debug('Exiting ACI CLI');
debug('Start write'); break;
_last = now; case 0x70: // WRITE
break; _recording = true;
//case 0x7c: // WBITLOOP: if (_beKind) {
// _debug = true; _beKind = false;
// debug("Write bit loop"); this.buffer = [];
// break; }
case 0x8d: // READ debug('Start write');
_recording = false; _last = now;
debug('Start read'); break;
if (_beKind) { //case 0x7c: // WBITLOOP:
_readOffset = 0; // _debug = true;
_next = now + 5000000; // debug("Write bit loop");
_beKind = false; // break;
case 0x8d: // READ
_recording = false;
debug('Start read');
if (_beKind) {
_readOffset = 0;
_next = now + 5000000;
_beKind = false;
cb.progress(0); cb.progress(0);
}
break;
default:
break;
} }
break;
default:
break;
} }
} }
return result; return result;