mirror of
https://github.com/sethm/symon.git
synced 2025-08-08 20:25:01 +00:00
make use of the MulticompMachine in the simulator. This should be an option, not hardcoded.
This commit is contained in:
@@ -29,6 +29,7 @@ import com.loomcom.symon.exceptions.MemoryAccessException;
|
|||||||
import com.loomcom.symon.exceptions.MemoryRangeException;
|
import com.loomcom.symon.exceptions.MemoryRangeException;
|
||||||
import com.loomcom.symon.exceptions.SymonException;
|
import com.loomcom.symon.exceptions.SymonException;
|
||||||
import com.loomcom.symon.machines.Machine;
|
import com.loomcom.symon.machines.Machine;
|
||||||
|
import com.loomcom.symon.machines.MulticompMachine;
|
||||||
import com.loomcom.symon.machines.SymonMachine;
|
import com.loomcom.symon.machines.SymonMachine;
|
||||||
import com.loomcom.symon.ui.*;
|
import com.loomcom.symon.ui.*;
|
||||||
import com.loomcom.symon.ui.Console;
|
import com.loomcom.symon.ui.Console;
|
||||||
@@ -123,7 +124,7 @@ public class Simulator {
|
|||||||
private static final String[] STEPS = {"1", "5", "10", "20", "50", "100"};
|
private static final String[] STEPS = {"1", "5", "10", "20", "50", "100"};
|
||||||
|
|
||||||
public Simulator() throws Exception {
|
public Simulator() throws Exception {
|
||||||
this.machine = new SymonMachine();
|
this.machine = new MulticompMachine();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -214,7 +215,9 @@ public class Simulator {
|
|||||||
memoryWindow = new MemoryWindow(machine.getBus());
|
memoryWindow = new MemoryWindow(machine.getBus());
|
||||||
|
|
||||||
// Composite Video and 6545 CRTC
|
// Composite Video and 6545 CRTC
|
||||||
videoWindow = new VideoWindow(machine.getCrtc(), 2, 2);
|
if(machine.getCrtc() != null) {
|
||||||
|
videoWindow = new VideoWindow(machine.getCrtc(), 2, 2);
|
||||||
|
}
|
||||||
|
|
||||||
mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
@@ -324,8 +327,7 @@ public class Simulator {
|
|||||||
logger.severe("Console type-ahead buffer underrun!");
|
logger.severe("Console type-ahead buffer underrun!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stepsSinceLastCrtcRefresh++ > stepsBetweenCrtcRefreshes) {
|
if (videoWindow != null && stepsSinceLastCrtcRefresh++ > stepsBetweenCrtcRefreshes) {
|
||||||
videoWindow.refreshDisplay();
|
|
||||||
stepsSinceLastCrtcRefresh = 0;
|
stepsSinceLastCrtcRefresh = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -739,14 +741,16 @@ public class Simulator {
|
|||||||
});
|
});
|
||||||
viewMenu.add(showMemoryTable);
|
viewMenu.add(showMemoryTable);
|
||||||
|
|
||||||
final JCheckBoxMenuItem showVideoWindow = new JCheckBoxMenuItem(new ToggleVideoWindowAction());
|
if(videoWindow != null) {
|
||||||
videoWindow.addWindowListener(new WindowAdapter() {
|
final JCheckBoxMenuItem showVideoWindow = new JCheckBoxMenuItem(new ToggleVideoWindowAction());
|
||||||
@Override
|
videoWindow.addWindowListener(new WindowAdapter() {
|
||||||
public void windowClosing(WindowEvent e) {
|
@Override
|
||||||
showVideoWindow.setSelected(false);
|
public void windowClosing(WindowEvent e) {
|
||||||
}
|
showVideoWindow.setSelected(false);
|
||||||
});
|
}
|
||||||
viewMenu.add(showVideoWindow);
|
});
|
||||||
|
viewMenu.add(showVideoWindow);
|
||||||
|
}
|
||||||
|
|
||||||
add(viewMenu);
|
add(viewMenu);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user