Simulator is just about ready for real-world testing now. Added a simulated
MOS6551 ACIA at address $C000 which does buffered input and output via the console. Updated the README with a bit more documentation, and bumped the version number to 0.1 because I'm impatient.
This commit is contained in:
1 parent
596d05e398
commit
00ab8cd9ff
10 files changed
+749
-124
No files matched your search
@@ -9,17 +9,18 @@ public class Memory extends Device {
|
||||
private boolean readOnly;
|
||||
private int[] mem;
|
||||
|
||||
/* Initialize all locations to 0x00 (BRK) */
|
||||
private static final int DEFAULT_FILL = 0x00;
|
||||
|
||||
public Memory(int address, int size, boolean readOnly)
|
||||
throws MemoryRangeException {
|
||||
super(address, size, "RW Memory");
|
||||
throws MemoryRangeException {
|
||||
super(address, size, (readOnly ? "RO Memory" : "RW Memory"));
|
||||
this.readOnly = readOnly;
|
||||
this.mem = new int[size];
|
||||
// Initialize all locations to 0x00 (BRK)
|
||||
Arrays.fill(this.mem, 0x00);
|
||||
Arrays.fill(this.mem, DEFAULT_FILL);
|
||||
}
|
||||
|
||||
public Memory(int address, int size)
|
||||
throws MemoryRangeException {
|
||||
public Memory(int address, int size) throws MemoryRangeException {
|
||||
this(address, size, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user