|
@@ -69,23 +69,29 @@ function Ne2k(cpu, bus)
|
|
|
this.receive(data);
|
|
|
}, this);
|
|
|
|
|
|
- this.port = 0xB800;
|
|
|
+ this.port = 0x300;
|
|
|
|
|
|
- this.pci_space = [
|
|
|
- 0xec, 0x10, 0x29, 0x80, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
|
|
|
- this.port & 0xFF | 1, this.port >> 8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x1a, 0x00, 0x11,
|
|
|
- 0x00, 0x00, 0xb8, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x01, 0x00, 0x00,
|
|
|
- ];
|
|
|
- this.pci_id = 0x05 << 3;
|
|
|
- this.pci_bars = [
|
|
|
- {
|
|
|
- size: 32,
|
|
|
- },
|
|
|
- ];
|
|
|
this.name = "ne2k";
|
|
|
|
|
|
- cpu.devices.pci.register_device(this);
|
|
|
+ /** @const */
|
|
|
+ var use_pci = true;
|
|
|
+
|
|
|
+ if(use_pci)
|
|
|
+ {
|
|
|
+ this.pci_space = [
|
|
|
+ 0xec, 0x10, 0x29, 0x80, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
|
|
|
+ this.port & 0xFF | 1, this.port >> 8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x1a, 0x00, 0x11,
|
|
|
+ 0x00, 0x00, 0xb8, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x01, 0x00, 0x00,
|
|
|
+ ];
|
|
|
+ this.pci_id = 0x05 << 3;
|
|
|
+ this.pci_bars = [
|
|
|
+ {
|
|
|
+ size: 32,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ cpu.devices.pci.register_device(this);
|
|
|
+ }
|
|
|
|
|
|
this.isr = 0;
|
|
|
this.imr = 0; // interrupt mask register
|