Refactor for Java 1.8

- Clean up and refactor code

- Add 1.8 features

- Clean up IntelliJ inspector warnings
This commit is contained in:
Seth Morabito committed 2015-12-29 17:55:41 -08:00
1 parent a4a110dcef
commit 6e8fd40014
28 files changed
+366 -503

No files matched your search

@@ -35,27 +35,27 @@ import com.loomcom.symon.exceptions.MemoryRangeException;
public interface Machine {
public Bus getBus();
Bus getBus();
Cpu getCpu();
public Cpu getCpu();
Memory getRam();
public Memory getRam();
Acia getAcia();
public Acia getAcia();
Pia getPia();
public Pia getPia();
Crtc getCrtc();
public Crtc getCrtc();
Memory getRom();
public Memory getRom();
void setRom(Memory rom) throws MemoryRangeException;
public void setRom(Memory rom) throws MemoryRangeException;
int getRomBase();
public int getRomBase();
int getRomSize();
public int getRomSize();
public int getMemorySize();
int getMemorySize();
String getName();
}
@@ -65,7 +65,6 @@ public class MulticompMachine implements Machine {
private final Cpu cpu;
private final Acia acia;
private final Memory ram;
private final SdController sdController;
private Memory rom;
@@ -75,12 +74,11 @@ public class MulticompMachine implements Machine {
this.ram = new Memory(MEMORY_BASE, MEMORY_BASE + MEMORY_SIZE - 1, false);
this.acia = new Acia6850(ACIA_BASE);
this.acia.setBaudRate(0);
this.sdController = new SdController(SD_BASE);
bus.addCpu(cpu);
bus.addDevice(ram);
bus.addDevice(acia, 1);
bus.addDevice(sdController, 1);
bus.addDevice(new SdController(SD_BASE), 1);
// TODO: Make this configurable, of course.
File romImage = new File("rom.bin");