- Continued refactoring of address decoding.
- Device read and write may now throw MemoryAccessException, and appropriate throws clauses have been added throughout the code.
This commit is contained in:
1 parent
a01090a16e
commit
ac88786df7
21 files changed
+465
-446
No files matched your search
@@ -29,13 +29,17 @@ public abstract class Device implements Comparable<Device> {
|
||||
}
|
||||
|
||||
/* Methods required to be implemented by inheriting classes. */
|
||||
public abstract void write(int address, int data);
|
||||
public abstract int read(int address);
|
||||
public abstract void write(int address, int data) throws MemoryAccessException;
|
||||
public abstract int read(int address) throws MemoryAccessException;
|
||||
public abstract String toString();
|
||||
|
||||
public void setBus(Bus bus) {
|
||||
this.bus = bus;
|
||||
}
|
||||
|
||||
public Bus getBus() {
|
||||
return this.bus;
|
||||
}
|
||||
|
||||
public MemoryRange getMemoryRange() {
|
||||
return memoryRange;
|
||||
|
||||
Reference in new issue
Block a user