continue fixing inputs
This commit is contained in:
+2
-2
@@ -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)}),
|
||||
|
||||
Reference in New Issue
Block a user