[HN Gopher] Show HN: I made a little digital circuit simulator t...
___________________________________________________________________
Show HN: I made a little digital circuit simulator that operates on
PNGs
This is a little toy project of mine that lets you simulate digital
logic graphs. It was inspired by Minecraft's Redstone and the Piet
esolang. It's got some serious drawbacks-- you write circuits as
PNGs and simulate them with a Python interface. It's slow to run
and slow to experiment with. And it is certainly difficult to use
for people with any kind of color blindness. But despite that, I
hope this can still be a fun toy!
Author : lynndotpy
Score : 120 points
Date : 2022-02-03 15:55 UTC (7 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| bradrn wrote:
| This reminds me very strongly of the WireWorld cellular
| automaton: https://quinapalus.com/wires0.html
|
| (Also, how did you get a post with both text and a link? I didn't
| know it was possible.)
| spicybright wrote:
| I looooove this stuff!
|
| I'm sure you're aware, but here's some other related works I'm a
| fan of.
|
| https://esolangs.org/wiki/Turing_Paint
|
| https://esolangs.org/wiki/Piet
|
| https://esolangs.org/wiki/Drawfuck
| lynndotpy wrote:
| Turing paint is a new one to me (and very interesting to me as
| well, because it sounds like it uses a similar approach under
| the hood.) Thank you for showing me these!!
| [deleted]
| tobyhinloopen wrote:
| We're also working on something like this, but we're making a
| game around it
|
| https://charperbonaroo.github.io/bls/#0
| lynndotpy wrote:
| Oh wow this is awesome. I got through the first few levels and
| would like to complete it later...
|
| Also, is this the same as the 2015 'bitmap logic simulator'? I
| found this while reworking reso awhile back:
| https://realhet.wordpress.com/2015/09/02/bitmap-logic-simula...
| CyberShadow wrote:
| Very nice!
|
| FWIW, I can't figure what to do on the "ride the line" level. I
| don't understand what the motors do exactly (powering both
| motors simultaneously makes the car go sideways) and what the
| sensors are sensing.
| wccrawford wrote:
| Looking good so far!
| saulrh wrote:
| That's incredible. It was just "very cool" for the first few
| levels - if you cleaned up the directions and added a factorio-
| style blueprint library I could easily see myself sitting down
| to work out optimal solutions to any level you put out, like I
| did with Codex of Alchemical Engineering - but the last level
| put it on a whole new level. This is everything that's good
| about HS electronics classes where you get to make line-
| following robots but without _any_ of the real-world
| annoyances. Massively streamlined. Get enough content in this
| interface and I bet you could sell a lesson plan to every
| school district in the United States.
| emersonrsantos wrote:
| That's awesome, thanks for sharing! Will play with it in the
| weekend.
| mentos wrote:
| As a complete layman I wonder if there's a future where you could
| use a picture/X-ray of an old CPU architecture and simulate it
| blindly with an approach similar to yours?
| philipkglass wrote:
| "Blindly" is a stretch but people have built transistor level
| simulations of old chips from photographs. Check out the
| delightful Visual 6502 if you've never seen it before:
|
| _In the summer of 2009, working from a single 6502, we exposed
| the silicon die, photographed its surface at high resolution
| and also photographed its substrate. Using these two highly
| detailed aligned photographs, we created vector polygon models
| of each of the chip 's physical components - about 20,000 of
| them in total for the 6502. These components form circuits in a
| few simple ways according to how they contact each other, so by
| intersecting our polygons, we were able to create a complete
| digital model and transistor-level simulation of the chip._
|
| _This model is very accurate and can run classic 6502
| programs, including Atari games. By rendering our polygons with
| colors corresponding to their 'high' or 'low' logic state, we
| can show, visually, exactly how the chip operates: how it reads
| data and instructions from memory, how its registers and
| internal busses operate, and how toggling a single input pin
| (the 'clock') on and off drives the entire chip to step through
| a program and get things done._
|
| http://www.visual6502.org/
| zokier wrote:
| I'm not a semiconductor engineer, but one of the problems
| with this approach is that modern chips are significantly
| more "3D"; they have tons of layers in them, and you also got
| stuff like finfets etc to deal with. You can see some of that
| in here
| https://www.extremetech.com/computing/193200-intels-14nm-
| bro...
| lynndotpy wrote:
| I think it'd have to be a very different approach (unless it's
| an electron scan?) I'm not an electrical engineer though, so
| I'm in the layman camp as well!
|
| If someone made that, I assume it'd use some computer vision to
| identify the individual components and the connections between
| them. After that, each component would need to have their
| individual simulator. (Unless x-rays can see individual
| semiconductors?)
| junon wrote:
| I'm annoyed I didn't think of this before. This is genius.
| sackerhews wrote:
| Brilliant idea!
|
| That logo however is the most repulsive piece of artwork I've
| seen in a long time.
|
| (I am sorry for being blunt)
| arriu wrote:
| The project is super cool but I agree the logo is a terrible
| example of it in use. I'd love to see a more easy to digest
| example. The logo circuit is confusing and I'm not sure what to
| make of it.
| lynndotpy wrote:
| I have some small examples in a blogpost about it:
| https://lynndotpy.xyz/posts/reso_intro.html
|
| It shows the four basic logic gates, a one-bit adder, and
| simple digital clocks. I'll add these to the git repo in a
| bit!
| junon wrote:
| Speak for yourself, I love it!
| lynndotpy wrote:
| Nah it is indeed absolutely hideous. There's a higher-res
| version with less funky colors that I think looks a bit nicer:
| https://gitlab.com/lynnpepin/reso/-/raw/master/logo/reso_log...
| math0ne wrote:
| Can't account for some taste, I love the look!
| ahefner wrote:
| That's neat.
|
| There's lots of interesting circuit simulators on the web now,
| but has anyone ever seen a toy/simple simulator for VLSI devices?
| Something where you could draw in metal/poly/whatever layers to
| create and simulate transistors?
| abecedarius wrote:
| https://www.zachtronics.com/kohctpyktop-engineer-of-the-peop...
| (Flash game)
| lynndotpy wrote:
| Zachtronics has a lot of good games in this area. I haven't
| played this one, but Shenzhen I/O might scratch this itch
| too: https://www.zachtronics.com/shenzhen-io/
| Nullabillity wrote:
| Prime Mover[0] is a pretty fun "IC"[1] puzzle game.
| ComPressure[2] also scratches a similar itch with a
| steampunkier vibe.
|
| [0]: https://store.steampowered.com/app/693700/Prime_Mover/
|
| [1]: Scare quotes because these things are ultimately games,
| not realistic simulations. Not that there's anything wrong with
| that.
|
| [2]: https://github.com/brejc8/ComPressure (FOSS!),
| https://store.steampowered.com/app/1528120/ComPressure/
| vmception wrote:
| > It was inspired by Minecraft's Redstone and the Piet esolang.
|
| Isn't this the crux of the NSO Group exploit on Iphones?
| sdflhasjd wrote:
| This reminds me of the way Powder Toy does circuit simulation
| with cellular automata
| davidandgoliath wrote:
| Very cool: you're amazing!
| carterschonwald wrote:
| This is wonderful! :)
| lynndotpy wrote:
| Thank you!!
| thebeardisred wrote:
| I appreciate any time folks take steps towards what "could be"
| rather than merely replicating what "is".
|
| Thanks for building this, contributing to the "marketplace of
| ideas", and inspiring others.
| Simon_O_Rourke wrote:
| That's an awesome idea, I wish I had something like that when I
| was doing college hardware design courses.
___________________________________________________________________
(page generated 2022-02-03 23:01 UTC)