Making a simulation of the innards of a computer!

Old Post

I'm working on a simulation of a computer!

Try it out!
$ 2 0.000001 0.41233529972698213 36 5 50 5e-11
207 952 280 952 240 4 Out
w 632 440 744 440 0
150 904 280 952 280 1 2 5 5
I 744 128 816 128 0 0.5 5
150 744 208 816 208 1 2 0 5
w 704 200 744 200 0
w 704 200 704 408 0
I 704 408 752 408 0 0.5 5
150 752 424 816 424 1 2 0 5
152 816 288 888 288 1 2 5 5
s 704 200 704 160 0 0 false
w 704 160 704 128 0
w 704 128 704 72 0
w 608 440 632 440 0
194 512 440 768 440 0 false 0.000046
s 448 424 512 424 0 1 true
w 512 424 512 440 0
194 464 216 528 216 0 true 0.000046
w 456 280 464 216 0
194 480 320 640 320 0 true 0.000046
w 560 248 560 288 0
w 560 288 480 288 0
w 480 288 480 320 0
w 576 352 576 384 0
w 576 384 464 384 0
R 704 72 704 48 0 0 40 5 0 0 0.5
R 448 424 416 424 0 0 40 5 0 0 0.5
w 888 288 904 288 0
x 439 438 497 441 4 10 Manual\sPulse
x 597 183 687 186 4 10 Select\sClock\sSource
I 576 320 640 320 0 0.5 5
150 640 248 688 248 1 2 0 5
w 560 216 624 216 0
w 624 216 640 240 0
w 640 320 640 256 0
w 688 248 728 248 0
w 728 248 744 216 0
w 816 128 904 272 0
w 816 208 816 280 0
w 816 296 816 424 0
w 752 408 752 416 0
w 752 432 744 440 0
b 688 40 1044 509 0
b 400 400 680 510 0
b 680 192 407 390 0
x 416 498 465 501 4 24 Step
x 408 381 459 384 4 24 Auto
x 706 499 870 502 4 24 Selection\sLogic
x 501 110 604 113 4 40 Clock
b 1072 24 392 531 0
w 952 280 1160 280 0
w 744 128 744 -64 0
152 744 -136 744 -64 1 2 0 5
L 736 -136 736 -160 2 0 false 5 0
w 464 384 464 344 0
150 456 344 456 280 1 2 0 5
I 424 272 424 344 0 0.5 5
w 424 344 448 344 0
w 424 272 424 8 0
w 424 8 744 8 0
w 744 8 744 -64 0
x 760 -66 938 -63 4 24 Clock\sHalt/Reset
r 608 472 656 472 0 1000
g 656 472 672 472 0 0
o 0 1 0 x81012 5 0.0001 0 3 5 49 23 0 5 -26 1 0 5 -101 CLK
38 17 F1 5 0.000009999999999999999 0.00009999999999999999 -1 Clock\sPulse\sLength
38 14 F1 5 0.000009999999999999999 0.00009999999999999999 0 \0
38 19 F1 5 0.000009999999999999999 0.00009999999999999999 0 \0

Copy it, save it to a text file, and load it by going to CircutJS, pressing CtrlO, and selecting the text file.

Images

image
The Clock

To Do

Clock
ALU
CPU
Program Memory
IO

I'm following along with Ben Eater's Build a Computer on a breadboard series.

This has nothing to do with Snap!.

Where should I post it?

not here lol

maybe try to make a simulation of a computer in snap

Good Idea.

get at least something like dos to run
that would be really cool

Or just calculating fib.

Making a DOS emulator in Snap! is possible if someone made a working Linux emulator in Scratch.
I wanted to make this a while ago but had no clue what I was doing so I gave up.

Technically, it was a RISC-V emulator (the easiest CPU architecture to implement) running Linux. DOS was only made for the much harder-to-emulate 8086 architecture. :grimacing:

true. where can i find the instruction set for that?

IDK. The internet, I guess.

I was thinking, maybe a logic simulator?

that wouldn't be too hard. here's a project you might be able to use:

I think I saw that before.

yeah it was a featured project

Here:

https://snap.berkeley.edu/snap/snap.html#present:Username=bluebaritone21&ProjectName=Logic%20Sim

(If you enable JS and click the top, it opens the license.)

cant you include the licence in the project without having to open a new tab?
is there a copyright symbol pasted there? it doesn't show up for me... it's just a box
this symbol 🄯

every project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike license so you don't need to bother with that license thing in your project anyway.

Oh.