Fix detection of network card in openbsd

This commit is contained in:
copy 2016-07-18 04:38:22 +02:00
parent 243d3caa8e
commit 3e54bcba6b

View file

@ -125,6 +125,8 @@ function Ne2k(cpu, bus)
this.memory[i << 1] = this.memory[i << 1 | 1] = mac[i];
}
this.memory[14] = this.memory[15] = 0x57;
dbg_log("Mac: " + h(mac[0], 2) + ":" +
h(mac[1], 2) + ":" +
h(mac[2], 2) + ":" +
@ -550,6 +552,12 @@ Ne2k.prototype.data_port_write = function(data_byte)
" rsar=" + h(this.rsar, 4) +
" rcnt=" + h(this.rcnt, 4), LOG_NET);
if(this.rsar > 0x10 && this.rsar < (START_PAGE << 8))
{
// unmapped
return;
}
this.rcnt--;
this.memory[this.rsar++] = data_byte;