Renamed AddressDecoder to Bus
This commit is contained in:
1 parent
0e212e71e5
commit
6f678af3df
5 files changed
+137
-135
No files matched your search
+5
-4
@@ -1,8 +1,9 @@
|
||||
package com.loomcom.lm6502;
|
||||
|
||||
import java.util.*;
|
||||
import com.loomcom.lm6502.devices.*;
|
||||
|
||||
public class AddressDecoder {
|
||||
public class Bus {
|
||||
|
||||
private int bottom = 0x0000;
|
||||
private int top = 0xffff;
|
||||
@@ -12,11 +13,11 @@ public class AddressDecoder {
|
||||
*/
|
||||
private List<Device> devices;
|
||||
|
||||
public AddressDecoder(int size) {
|
||||
public Bus(int size) {
|
||||
this(0, size - 1);
|
||||
}
|
||||
|
||||
public AddressDecoder(int bottom, int top) {
|
||||
public Bus(int bottom, int top) {
|
||||
this.devices = new ArrayList(8);
|
||||
this.bottom = bottom;
|
||||
this.top = top;
|
||||
@@ -90,4 +91,4 @@ public class AddressDecoder {
|
||||
// Expose a copy of the device list, not the original
|
||||
return new ArrayList(devices);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,10 +18,10 @@ public class Simulator {
|
||||
Cpu m_cpu;
|
||||
|
||||
/**
|
||||
* The Address Decoder responsible for routing memory
|
||||
* read/write requests to the correct IO devices.
|
||||
* The Bus responsible for routing memory read/write requests to the
|
||||
* correct IO devices.
|
||||
*/
|
||||
AddressDecoder m_adc;
|
||||
Bus m_bus;
|
||||
|
||||
public Simulator() {
|
||||
m_cpu = new Cpu(this);
|
||||
@@ -45,4 +45,4 @@ public class Simulator {
|
||||
|
||||
public void write(int address, int value) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -1,4 +1,6 @@
|
||||
package com.loomcom.lm6502;
|
||||
package com.loomcom.lm6502.devices;
|
||||
|
||||
import com.loomcom.lm6502.*;
|
||||
|
||||
/**
|
||||
* A memory-mapped IO Device.
|
||||
@@ -45,4 +47,4 @@ public abstract class Device {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user