diff --git a/src/com/modsim/gui/HelpWindow.java b/src/com/modsim/gui/HelpWindow.java index b0547c5..36113a8 100644 --- a/src/com/modsim/gui/HelpWindow.java +++ b/src/com/modsim/gui/HelpWindow.java @@ -19,11 +19,10 @@ public HelpWindow(){ text.setText("

ModuleSim Help

General Operations

You can zoom in and out by scrolling or pinching on a multi-touch touch pad. You can pan around using the right mouse key.

Dragging the left mouse key enables you to select all modules in a region.Standard operations like saving to and loading from file, undo and redo and copy and paste are available through menu bar and keyboard shortcuts.

Note to Mac users: right click is probably two finger tap.

Adding Modules

To use a module, left click on it (in the left sidebar) and then left click to drop in place. If you selected one in error press escape (ESC).

To delete a module select it with a left click and then either press the delete key or right click and select 'delete'.

Right clicking on modules brings up a context menu, where you can do things like label and rotate the modules.

Adding Wires

To connect two modules together, left click on the two sockets (indicated on the modules as coloured circles), one after the other. The wire will be drawn between the two sockets. If you start drawing a wire by accident press the ESC key.

You can change the shape of the wire by adding waypoints. This is done by left clicking as many times as you want before selecting the destination socket.

You can add waypoints afterwards by clicking on the wire and then again on the wire in the place where you want the waypoint. You can then drag this point around.

The software will naturally draw a curve between the points. This is so it can easily and dynamically re-draw the connection as you move the modules around. To create straight lines place two waypoints very close to each other where you want the corner.

To delete a wire right click on one of the ends and select delete.

To delete a waypoint right click it and select delete.

Specific Modules

The switches can be used to produce constants. Their value can be set by clicking on each of the four switches to toggle the bit value.

The clock module is what controls the timing of your circuits. Once it has been connected up you can put it in to reset mode by holding down the button on the module with the mouse. To progress the clock signal you can use the control panel underneath the menu bar. You can step the clock one step a time or press play and pause to run it automatically, adjusting the speed with the slider.

The RAM module write jumper is implemented as a switch. This needs to be switched on for the circuit to write data to it.

You can also load data in to the ram from a file. Right click on the NRAM and select 'View/Edit Data'. Then File->Load. The file must be a text file containing each byte written in hex (capital letters) delimited by spaces."); text.setPreferredSize(new Dimension(600, 1000)); text.setBorder(BorderFactory.createEmptyBorder(50,50,50,50)); - JScrollPane scrollPane = new JScrollPane(text, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER ); - scrollPane.setPreferredSize(new Dimension(600, 800)); + JScrollPane scrollPane = new JScrollPane(text, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED ); + scrollPane.setPreferredSize(new Dimension(621, 800)); add(scrollPane); pack(); - setResizable(false); //place in center of screen Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); int w = this.getSize().width; diff --git a/src/com/modsim/operations/Ops.java b/src/com/modsim/operations/Ops.java index 8e35c6c..1860a1b 100644 --- a/src/com/modsim/operations/Ops.java +++ b/src/com/modsim/operations/Ops.java @@ -23,15 +23,7 @@ */ public class Ops { - public static DesignAction showHelp = new DesignAction(event -> { - SwingUtilities.invokeLater( - new Runnable() { - @Override - public void run() { - new HelpWindow(); - } - }); - }, "Show help"); + public static DesignAction showHelp = new DesignAction(event -> {new HelpWindow();}, "Show help"); public static class FileIO { private static final FilenameFilter simFileFilter = new FilenameFilter() {