complete the readport code

This commit is contained in:
wixette 2020-03-07 01:40:17 +08:00
parent c4b4e5d06d
commit c907eaac39

View File

@ -248,8 +248,10 @@ class Sim8800 {
var self = this; var self = this;
return function(address) { return function(address) {
var value = 0; var value = 0;
if (address == 0xff) { // We only care about the port 0xff.
// We only care about port 0xff. if (address == 0xff && this.getInputAddressCallback) {
var word = this.getInputAddressCallback();
return word >> 8;
} }
return value; return value;
}; };