continue fixing inputs

This commit is contained in:
Luxferre
2022-07-29 12:55:53 +03:00
parent 6cd8c459bb
commit 66e23c966d
3 changed files with 19 additions and 6 deletions
+2 -2
View File
@@ -120,7 +120,7 @@ function ESOPExtensions() {
var k = e.key
if(k in livemap) {
var keyval = livemap[k],
portnum = keyval>7 ? 3 : 2,
portnum = keyval>7 ? 2 : 3,
bitmask = (~(1<<(keyval&7)))&255
vm.setdev(portnum, vm.getdev(portnum) & bitmask)
}
@@ -175,7 +175,7 @@ function ESOPExtensions() {
function runSyscall(vm, buf) {
var call = buf[0]
if(call === 0x00) //simulate writing a byte to the debug port
console.log(('[DBG] 00' + buf[1].toString(16)).slice(-2))
console.log('[DBG] ' + ('00' + buf[1].toString(16)).slice(-2))
else if(call === 0x06) { //read datetime info into 5 bytes starting from addr
//not very optimal but a future-proof approach for now
var tm = ('00' + (0|(Date.now()/1000)).toString(16)).slice(-10).match(/.{2}/g).map(function(x){return parseInt(x, 16)}),