Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Digital Logic Sim

​A minimalistic digital logic simulator · By Sebastian Lague

Made a Computer!

A topic by Perodactyl created 67 days ago Views: 399 Replies: 7
Viewing posts 1 to 6
(+1)

It's based off the LEG from the game "Turing Complete."

The program I wrote is made using customasm. It took over 2 minutes to run. Here it is:

#include "defs.casm"  
disp clear
disp refresh 
mv 0 r1
loopY:
     mv 0 r0
     loopX:
         or r0 0x70 r2 ; Setting the upper nibble sets the red.
         disp rgb r2 r1
         disp put r0 r1
         disp refresh
         inc r0
         jmp to loopX if r0 lt 16
     inc r1
     jmp to loopY if r1 lt 16
halt

Here's the project: https://drive.google.com/drive/folders/1RLjHh8HrQtIy1CEIqtvdRZ7acndhpw3t?usp=sha...

(+1)

That's so cool bro I am working on a computer too. Also mind adding me on discord or something i want to discuss to see if we could collab or you could help me (i have the same user as here my pfp is a cat with glasses)

(+1)

OMG YOU MADE AN EDGE DETECTER HELL YEAH THATS WHAT I NEEDED

Developer(+3)

Awesome!

(+1)

I had a peak, mostly because I was curious about your edge detector, but it doesn't seem to be working for me. Are there any peculiarities about it that you found when making it?

Yeah... the edge detector didn't seem like it was working, so I cut it out and used the solution from SebLague's 2nd video to sync with the clock. The edge detector could fire for too long, or for not long enough, depending on how I was trying to use it.

(2 edits)

Right on - I'll have another go.

the solution I had been mulling over was to basically to divide the Real clock by 2, and use that as the system clock, and use the Real clock as a  faux rising and falling. It's not really a pulse per say, but it gives the same net effect.

EDIT: Screenshot

EDIT 2: errr. revised Screenshot