|
@@ -131,7 +131,10 @@ function Ne2k(cpu, bus, preserve_mac_from_state_image)
|
|
|
this.memory[i << 1] = this.memory[i << 1 | 1] = this.mac[i];
|
|
|
}
|
|
|
|
|
|
- this.memory[14] = this.memory[15] = 0x57;
|
|
|
+ // the PROM signature of 0x57, 0x57 is also doubled
|
|
|
+ // resulting in setting the 4 bytes at the end, 28, 29, 30 and 31 to 0x57
|
|
|
+ this.memory[14 << 1] = this.memory[14 << 1 | 1] = 0x57;
|
|
|
+ this.memory[15 << 1] = this.memory[15 << 1 | 1] = 0x57;
|
|
|
|
|
|
dbg_log("Mac: " + h(this.mac[0], 2) + ":" +
|
|
|
h(this.mac[1], 2) + ":" +
|
|
@@ -158,7 +161,7 @@ function Ne2k(cpu, bus, preserve_mac_from_state_image)
|
|
|
|
|
|
io.register_write(this.port | E8390_CMD, this, function(data_byte)
|
|
|
{
|
|
|
- this.cr = data_byte & ~4;
|
|
|
+ this.cr = data_byte;
|
|
|
dbg_log("Write command: " + h(data_byte, 2) + " newpg=" + (this.cr >> 6) + " txcr=" + h(this.txcr, 2), LOG_NET);
|
|
|
|
|
|
if(this.cr & 1)
|
|
@@ -177,6 +180,7 @@ function Ne2k(cpu, bus, preserve_mac_from_state_image)
|
|
|
var data = this.memory.subarray(start, start + this.tcnt);
|
|
|
this.bus.send("net0-send", data);
|
|
|
this.bus.send("eth-transmit-end", [data.length]);
|
|
|
+ this.cr &= ~4;
|
|
|
this.do_interrupt(ENISR_TX);
|
|
|
|
|
|
dbg_log("Command: Transfer. length=" + h(data.byteLength), LOG_NET);
|