Skip to content

Commit

Permalink
Last changes for v2.14.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LogisimIt committed Apr 7, 2018
1 parent 17efab2 commit bc5bde8
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 26 deletions.
Binary file modified Compiled/Logisim-ITA.exe
Binary file not shown.
Binary file modified Compiled/Logisim-ITA.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions Logisim-Fork/com/cburch/logisim/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ public class Main {
public static void main(String[] args) throws Exception {
Startup startup = Startup.parseArgs(args);
if (AppPreferences.SEND_DATA.getBoolean())
Startup.runRemotePhpCode("http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=yes");
Startup.runRemotePhpCode("http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=1");
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
if (AppPreferences.SEND_DATA.getBoolean())
Startup.runRemotePhpCode("http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=no");
Startup.runRemotePhpCode("http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=0");
}
});
if (startup != null) {
Expand All @@ -69,7 +69,7 @@ public void run() {
} else {
if (AppPreferences.SEND_DATA.getBoolean())
Startup.runRemotePhpCode(
"http://logisim.altervista.org/LogisimData/Autoupdates/autoupdates.php?val=add");
"http://logisim.altervista.org/LogisimData/Autoupdates/autoupdates.php?val=1");
Startup.restart(args);
}
}
Expand Down
4 changes: 2 additions & 2 deletions Logisim-Fork/com/cburch/logisim/gui/main/Canvas.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ public void propertyChange(PropertyChangeEvent event) {
} else if (AppPreferences.SEND_DATA.isSource(event)) {
if (AppPreferences.SEND_DATA.getBoolean())
Startup.runRemotePhpCode(
"http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=yes");
"http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=1");
else
Startup.runRemotePhpCode("http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=no");
Startup.runRemotePhpCode("http://logisim.altervista.org/LogisimData/OnlineUsers/online.php?val=0");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Logisim-Fork/com/cburch/logisim/gui/menu/MenuHelp.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void actionPerformed(ActionEvent e) {
if (startup.autoUpdate(false, menubar.getProject().getFrame())) {
if (AppPreferences.SEND_DATA.getBoolean())
Startup.runRemotePhpCode(
"http://logisim.altervista.org/LogisimData/Autoupdates/autoupdates.php?val=add");
"http://logisim.altervista.org/LogisimData/Autoupdates/autoupdates.php?val=1");
Startup.restart(Main.OpenedFiles.toArray(new String[0]));
}

Expand Down
16 changes: 8 additions & 8 deletions Logisim-Fork/com/cburch/logisim/std/memory/Counter.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ public AttributeSet createAttributeSet() {
return new CounterAttributes();
}

@Override
protected void instanceAttributeChanged(Instance instance, Attribute<?> attr) {
if (attr == BEHAVIOR) {
updateports(instance);
instance.fireInvalidated();
}
}

@Override
public void paintInstance(InstancePainter painter) {
Graphics g = painter.getGraphics();
Expand Down Expand Up @@ -234,14 +242,6 @@ public void propagate(InstanceState state) {
state.setPort(CARRY, carry ? Value.TRUE : Value.FALSE, DELAY);
}

@Override
protected void instanceAttributeChanged(Instance instance, Attribute<?> attr) {
if (attr == BEHAVIOR) {
updateports(instance);
instance.fireInvalidated();
}
}

private void updateports(Instance instance) {
boolean newbehavior = instance.getAttributeValue(BEHAVIOR) == NEW_BEHAVIOR;
Port[] ps = new Port[(newbehavior ? 9 : 8)];
Expand Down
13 changes: 13 additions & 0 deletions Logisim-Fork/doc/en/html/libs/mem/counter.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ <h2>Pins</h2>
will load the value found at the <var>data</var> input at the next clock
trigger - or, if the <var>count</var> input happens to be 1, the counter's
value will decrement.</dd>
<dd>New: When 1 loads the value from the data input, when 0 normally counts</dd>

<dt>West edge, middle pin labeled <var>D</var>
(input, bit with matches Data Bits attribute)</dt>
Expand All @@ -86,6 +87,7 @@ <h2>Pins</h2>
<dd>Count: When this is 1 or unconnected, the value in the counter increments
whenever the clock input is triggered - or it decrements if the <var>load</var>
input happens to also be 1.</dd>
<dd>New: When 1 the counter decrements, when different from 1 increments</dd>

<dt>South edge, indicated with a triangle (input, bit width 1)
<dd>Clock: At the instant that this is triggered as specified by the Trigger
Expand All @@ -97,6 +99,14 @@ <h2>Pins</h2>
As long as it is 1, the counter's value is asynchronously pinned to 0. This
occurs asynchronously - that is, without regard to the current clock input
value. As long as this is 1, the other inputs have no effect.</dd>
<dt>North edge, labeled 1 (input, bit width 1)
<dd>Preset: When 0 or undefined, this input has no effect.
As long as it is 1, the counter's value is asynchronously pinned to max value. This
occurs asynchronously - that is, without regard to the current clock input
value. As long as this is 1, the other inputs have no effect.</dd>
<dt>North edge, leftmost pin (input, bit width 1)
<dd>Enable: When 1 or undefined, this input has no effect.
As long as it is 0, the other inputs have no effect.</dd>

</dl>

Expand Down Expand Up @@ -135,6 +145,9 @@ <h2>Attributes</h2>
clock rises from 0 to 1. The <q>falling edge</q> value indicates that it should
update at the instant the clock falls from 1 to 0.</dd>

<dt>Behavior</dt>
<dd>Select if use the legacy behavior or the new one introduced in Logisim 2.14.3.0</dd>

<dt>Label</dt>
<dd>The text within the label associated with the component.</dd>

Expand Down
12 changes: 6 additions & 6 deletions Logisim-Fork/resources/logisim/pt/std.properties
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ counterResetTip= Clear: quando em 1, reiniciar em 0 assincronamente
counterCarryTip= Carry: será 1 quando o valor máximo for alcançado (ou mínimo se em decremento)
counterEnableLabel= ct
counterLabel= ctr
counterBehavior = Behavior
counterNewBehavior = New behavior
counterOldBehavior = Old behavior
newcounterLoadTip = Load: when 1, loads from data input
newcounterReverseCountTip = Reverse count: when 1, counts backwards
newcounterEnableTip = Enable: when 0, stops counting
counterBehavior = Funcionamento
counterNewBehavior = Novo funcionamento
counterOldBehavior = Velho funcionamento
newcounterLoadTip = Carrega: quando 1, carrega o valor dos dados de input
newcounterReverseCountTip = Contagem regressiva: quando 1, conta regressivamente
newcounterEnableTip = Habilitação: quando 0, para de contar
# std/DFlipFlop.java
dFlipFlopComponent= Flip-Flop tipo D
# std/TFlipFlop.java
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This is an italian fork based on the original Logisim version.<br>
* Almost infinite canvas, arrows will show you in what direction is the circuit if it's outside of your view
* New FF layout and attributes
* FF D, S-R: Latch option in trigger list
* New Counter behavior
* Controlled Buffer / Inverter: Negate Control Input attribute
* Added Sel pin in Register component
* Added Preset pin in Register and Counter components
Expand Down
25 changes: 19 additions & 6 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@
<!DOCTYPE xml>
<logisim>
<jar_file>https://github.com/LogisimIt/Logisim/raw/master/Compiled/Logisim-ITA.jar</jar_file>
<jar_version>2.14.2.0</jar_version>
<jar_version>2.14.3.0</jar_version>
<exe_file>https://github.com/LogisimIt/Logisim/raw/master/Compiled/Logisim-ITA.exe</exe_file>
<exe_version>2.14.2.0</exe_version>
<exe_version>2.14.3.0</exe_version>
<changelog>
* Code and RAM usage optimizations
* Hover circles for nodes in the PLA ROM edit window
* Reverse slider attribute
</changelog>
* Bug fix for online users counter
* Fixed Logisim not reopening all files after a restart (ex. after an update)
* Fixed some translation
* New Counter behavior, now easier to understand, with possibility to continue using the old one
Truth table:
RCNT LD
0 0 up count
0 1 load
1 0 down count
1 1 load
X X up count
X 0 up count
X 1 load
0 X up count
1 X down count
EN = 0 --> no count
</changelog>
</logisim>

0 comments on commit bc5bde8

Please sign in to comment.