Go to file
2021-03-14 13:39:17 -07:00
css 0.4.13: Elements are now dragged to position, some refacoring of code 2021-03-14 00:33:21 -08:00
img First commit 2021-02-19 13:47:37 -08:00
js 0.4.14: WireNodes, uS speed in FPS display 2021-03-14 13:39:17 -07:00
.editorconfig First commit 2021-02-19 13:47:37 -08:00
.gitattributes First commit 2021-02-19 13:47:37 -08:00
.gitignore First commit 2021-02-19 13:47:37 -08:00
.htaccess First commit 2021-02-19 13:47:37 -08:00
404.html First commit 2021-02-19 13:47:37 -08:00
favicon.ico First commit 2021-02-19 13:47:37 -08:00
humans.txt First commit 2021-02-19 13:47:37 -08:00
icon.png First commit 2021-02-19 13:47:37 -08:00
index.html 0.4.13: Elements are now dragged to position, some refacoring of code 2021-03-14 00:33:21 -08:00
README.md 0.4.14: WireNodes, uS speed in FPS display 2021-03-14 13:39:17 -07:00
robots.txt First commit 2021-02-19 13:47:37 -08:00
tile-wide.png First commit 2021-02-19 13:47:37 -08:00
tile.png First commit 2021-02-19 13:47:37 -08:00

MatCat BrowserLogic

MatCat BrowserLogic https://www.logic.parts/ is a logic simulator written purely in HTML5 / Javascript using 2D Canvas. This code will always work standalone, just download and browse to index.html with your favorite browser.

The goal of this project is to offer a logic simulator that is full featured conceptual simulation of logic. It does not aim to be an electrical simulator, so realistic propagation delays and such are not simulated, however that is not to say that there aren't (as some elements such as clocks and buffers and IC I/O do have delayed buffers).

I designed this to design CPU's in, I am sure someone with some imagination could design nearly anything in it :).

Status

Currently, in pre-alpha early dev stage; however the simulator is about to enter the alpha stage, this means that the simulator core functionality is mostly in place. The Alpha stage will be dedicated to polishing the simulator itself, finding and fixing bugs, introduction of local storage for saves, introduction of server storage, and development of the website including adding integration features. Outside contribution is welcome, please contact me (MatCat) in #LogicParts on Freenode IRC network.

License

To be decided, but at this moment this code is open source and free to use for non-commercial uses.

Copyright (c) 2021, MatCat

LZ-String, Copyright 2013 pieroxy under MIT license https://github.com/pieroxy/lz-string/blob/master/LICENSE

Changelog

0.4.14

  • Added WireNode element, allows you to better manage wires. Please note that signals only flow in the direction of connection! It is NOT a bidirectional element
  • Added draw speed to FPS display (in uS)

0.4.13

  • Clicking on an element on the toolbar no longer spawns an element to the work area directly, but rather lets the user place it.

0.4.12

  • Fixed bug where pastes would get offset when canvas is panned

0.4.11

  • Copy and Paste, note that Paste in the menu may not work on some browsers because of security permissions, but standard keyboard shortcuts will work.
  • Added !PRE and !CLR to flipflops, these are ACTIVE LOW inputs so you must make them high to use the flipflop.

0.4.10

  • Draw optimizations, the drawing loop has been considerably optimized.
  • Edit button added to IC properties, note that there is currently no mechanism yet to go back to what you where doing, or to save any changes you make to whatever it was in. This is a WIP feature, I provided the button for those that need to change an IC, they can atleast go into it, make changes and save it, then delete the IC from their current design (presumably pre-saved and loaded after making edits / saves), and place it back in.

0.4.9

  • Fixed a bug where the JS engine would hang if attempting to place a new element when the visual work area is too full of elements.

0.4.8

  • Fixed bug where disconnects where not propagating properly

0.4.7

  • Added LZW compression to save files (can be disabled on save)
  • Settings are now saved persistently
  • Added a basic help window, accessible via the top menu Help->Help, or pressing F1.
  • Hovering over an output will now hilight the links from it
  • Fixed a bug where keybindings could conflict while typing in textboxes

0.4.6

  • Added a new keybinding system, and added many keyboard shortcuts (look in menu)
  • Fixed a bug where a button would stay on off the mouse was moved away from it while being eld down
  • Fixed a bug where you could link from elements with no outouts

0.4.5

  • Keypad now supports either Switch, or Button mode for Function keys, also has Clear output that pulses for 100ms when Clr is pressed
  • Changed max input count for basic elements to 64 (from 12)

0.4.4

  • Fixed a delinking bug
  • Fixed a bug where selection only worked in certain directions

0.4.3

  • There is now multi-selection, including movement, deleting, disconnecting, etc.

0.4.2

  • Added Hex keypad with 4 bit output, also has 3 function keys

0.4.1

  • Fixed a signal propogation bug with IC's

0.4.0

  • You can now pan the work area, hold ctrl key while mouse dragging an empty area.
  • Right Click Menu
    • If an item is selected you can delete or disconnect them
  • Top menu
    • New / Open / Save moved to File menu
    • You can now disable connection drawing, or put them above or below elements in View menu
    • There is now a pan to center feature in View menu
    • Create IC has been moved to Tools menu
    • Help menu -> About opens the Welcome Window
  • Save dialog
  • Fixed various small bugs

0.3.10

  • Added BCD and Decimal options to the 4 bit output display, as well as bit labels in inputs

0.3.9

  • Added grid alignment, hold CTRL key while moving to get pixel level positioning.
  • Fixed property restoration issue with labels on loading a save

0.3.8

  • Added labels! You can specify the text, size, and color

0.3.7

  • Added 4 bit display! Currently shows hex format
  • Fixed a bug with flip flop save states for connections

0.3.6

  • Fixed a bug where flip flops weren't firing output changes when only !Q changed.

0.3.5

  • Fixed a bug where newly linked objects weren't being polled to the proper output

0.3.4

  • Added Flip-Flops! There are 4 to choose from, JK, SR, D, and T!

0.3.3

  • Fixed a bug that crashed the engine when attempting to place an IC with no inputs

0.3.2

  • Added IC Element, allows for converting a logic design to an IC for use in designs.
  • Added IC Input and IC Output which allow for external connections when a design is used as an IC
  • Added a New button for creating a new design

0.3.1

  • Toolbox is now dynamically created and categorized
  • The delete button is gone for now (use delete key on keyboard), it will come back when toolbar is added.

0.3.0

  • Saving / Loading of designs
  • New Element: Buffer, allows for construction of circuits that would otherwise be recursive
  • Added pulse count to the delay block printout
  • Fixed grid draw bug

0.2.12

  • Fixed floating active link when deleting an element while linking
  • Fixed the delay element so that it properly buffers all input pulses

0.2.11

  • Added Delay element

0.2.10

  • New elements will now do overlap detection on placement
  • Newly placed elements will now be selected

0.2.9

  • Active linking is now drawn with quadratic curves
  • Links can now be deleted by simply trying to link the same link again
  • Added pulse element
  • Clock element now shows countdown in ms to next state change

0.2.8

  • New elements now spawn in the center
  • Added button element
  • Changed switch graphical look

0.2.7

  • Added welcome screen window

0.2.6

  • Added background grid
  • Logic elements now have proper logic shapes

0.2.5

  • Fixed clock sync issue when disabled
  • Added recursive detection on logic to prevent runaway oscillations
  • Fixed click alignment on single input elements

0.2.4

  • Brought connections to foreground to make them more obvious in less then ideal layouts
  • Resized logic elements and positions I/O better
  • Logic elements will now grow or shrink in size based on I/O
  • Made selection box transparent

0.2.3

  • Fixed bug where timer isn't removed when clock is deleted

0.2.2

  • Fixed freaking out inputs on some input values
  • Quadratic CURVES! Links now look MUCH nicer :)

0.2.1

  • Fixed input property constraints on elements
  • Added NOT gate

0.2.0

  • Switched to a dark theme
  • Added left hand toolbar
  • Linking can now be done by clicking on an output then an input
  • Added new element: Clock

0.1.0

Initial public release.