Mesecons Computer Builds

Post Reply
User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Mesecons Computer Builds

by So.Po.Coder » Post

2020/7/7 Update: My finished 8 Bit Mesecons Computer project is showcased here

Thought I would start a new thread since I cannot see where there is one specifically for Mesecons computer builds. After stumbling upon some YouTube videos of Minecraft Redstone computer builds, I thought it might be cool to take a crack at it with Minetest Mesecons. I am by no means any expert at computer architecture, design, etc. so I'm learning as I go and hope to inspire my kids, who also enjoy playing Minetest to perhaps learn more about circuit design by playing with Mesecons too.

I'm getting my inspiration from Ben Eaters fantastic YouTube video series describing how to build an 8-bit breadboard computer. Obviously there are differences between building it on a breadboard and building it within Minetest, but my hope is that enough theory carries over as to make it a worthwhile endeavor. He does a great job of explaining first principles of circuit design and how complex circuits are built using discreet logic gates. As I progress through his series, I've been trying to recreate what he is doing in Minetest using the excellent Mesecons mod. My goal initially is to try to use Mesecons exclusively without relying on Digilines or other mods, but I'm open to using other mods if the architecture requires it.

I'll start with a small demo of some of the circuits used in Ben's computer. I posted this to the "Share your WorldEdit files" thread originally, but after giving it some thought decided to start a new thread since this will be specific to Mesecons (Digilines, etc) computer builds. I'm sure there are Minetest users out there with an actual education in computer science who could do something much more impressive than anything I will attempt. Even if you're just learning like me feel free to post the fruits of your labor here!

Name: Circuit Demo
Volume: 4104 (54*2*38)
Dependencies: Mesecons
Description: Some demos for different circuit types made for educational purposes. Lower row are made with all logic gates, middle row are the same circuits but using FPGAs and Microcontrollers to try and reduce the circuit size, and the upper row are the same circuits but using a single Luacontroller. Included circuits are:
  • SR Latch
  • SR Latch (gated)
  • D Latch (gated)
  • JK Latch (gated)
  • JK Flip-Flop (master-slave)
  • Full Adder
Image
Image
circuit_demo.we
(268.88 KiB) Downloaded 76 times
Attachments
circuit_demo_schematics.jpg
schematics of the circuits
(104.07 KiB) Not downloaded yet
circuit_demo.jpg
screenshot of circuit_demo.we
(214.07 KiB) Not downloaded yet
Last edited by So.Po.Coder on Tue Jul 07, 2020 13:17, edited 2 times in total.

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Name: Decoder Demo
Volume: 5500 (55*2*50)
Dependencies: Mesecons, Digilines
Description: Some demos for different versions of 3:8 and 4:16 bit decoders. Top row is a 4:16 bit decoder made exclusively with logic gates, middle rows are 3:8 and 4:16 bit decoders made using FPGAs to try and reduce the circuit size, and in the bottom row are the 3:8 and 4:16 bit decoders using Luacontrollers and Digilines. Included circuits are:
  • 3:8 Bit Decoder
  • 4:16 Bit Decoder
Image
Image
decoder_demo.we
(438.84 KiB) Downloaded 65 times
Attachments
decoder_demo.jpg
screenshot of decoder_demo.we
(365.96 KiB) Not downloaded yet
decoder_demo_schematics.jpg
schematics for decoder_demo.we
(82.71 KiB) Not downloaded yet
Last edited by So.Po.Coder on Thu Jan 16, 2020 06:32, edited 2 times in total.

User avatar
Walker
Member
Posts: 1146
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

Re: Mesecons Computer Builds

by Walker » Post

hopefully someday someone will build a microcontroller (maybe 4-bit?) in Mesecons ^^

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Walker wrote:hopefully someday someone will build a microcontroller (maybe 4-bit?) in Mesecons ^^
Well, there is a microcrontroller in mesecons. Or is that what you meant? I found the Luacontroller much more flexible, but perhaps I'm misunderstanding something. Would you like to post a project demonstrating the uses of the mesecons microcontroller, beyond the preprogrammed options?

User avatar
Walker
Member
Posts: 1146
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

Re: Mesecons Computer Builds

by Walker » Post

sorry, just noticed that I was MUCH too imprecise ^^

I meant to build a microcontroller IN minetest ... so from Mesecons gates

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Haha, I gotcha. But seriously, if you (or anyone) has any Mesecons projects you want to share, feel free to post them here (even if it's not a micro-controller). Cheers! ^^

bobbbob
New member
Posts: 6
Joined: Sun Jan 12, 2020 22:32

Re: Mesecons Computer Builds

by bobbbob » Post

I actually completed an 8 bit cpu made entirely from mescons logic gates just this week. I was also inspired by Ben Eater's series. I'd upload it now but I'd like to make a video on how to use it so stay tuned.

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

bobbbob wrote:I actually completed an 8 bit cpu made entirely from mescons logic gates just this week. I was also inspired by Ben Eater's series. I'd upload it now but I'd like to make a video on how to use it so stay tuned.
Sweet, looking forward to checking it out!

I finished my first version of the computer, but I'm stumbling into road blocks using logic gates exclusively. One is the display combinational logic, which is massive, and the other is the memory address decoders, which get slower and buggier the larger my computer gets. I end up having to crank the clock down to a crawl to get the whole setup to function correctly. I might have to resort to Digilines/Lua code (at least for the display and MAR) to get it to function right, so if you have managed to pull it off with just logic gates I'd be very interested in checking it out!

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Name: Register Demo
Volume: 11985 (47*5*51)
Dependencies: Mesecons
Relevant circuits: D Latch
Relevant videos in Ben Eater's series:
  • Bus architecture and how register transfers work
  • Tri-state logic: Connecting multiple outputs together
  • Designing and building a 1-bit register
  • Building an 8-bit register
  • Testing our computer's registers
Description: Some demos of 8 bit registers for testing. In addition to input/output pins, all registers include clock, reset, enable in and enable out pins. The shift register has one serial in rather than 8 input pins. Included registers from right to left in the screenshot are:
  • 8 Bit Shift Register (Serial → Parallel)
  • 8 Bit Register
  • 8 Bit Instruction Register
Image
Image
register_demo.we
(614.55 KiB) Downloaded 58 times
Attachments
register_demo_schematics.jpg
(107.95 KiB) Not downloaded yet
register_demo.jpg
screenshot of register_demo.we
(96.48 KiB) Not downloaded yet
Last edited by So.Po.Coder on Sun Mar 29, 2020 03:01, edited 2 times in total.

bobbbob
New member
Posts: 6
Joined: Sun Jan 12, 2020 22:32

Re: Mesecons Computer Builds

by bobbbob » Post

I finished that video and made a thread on it, figured that would be better. I don't know how to link to threads, it's in the maps section.

User avatar
Krock
Developer
Posts: 4572
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Mesecons Computer Builds

by Krock » Post

Here's the entire wiring of the FPGA to create something that acts like a shift register.

HOLD = 1: "Data IN" is wired to and kept in "Value"
HOLD = 0: "Value" is wired to "Data OUT"

This allows chaining the FPGA infinitely. It is possible to create marquee text displays or carrying a single signal slowly onwards (blinky plant connect to HOLD).

Image

Fun fact: This circuit is unlikely to work in real life due to gate propagation delays.
Attachments
illegal_shift_register.png
(93.13 KiB) Not downloaded yet
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Miniontoby
Member
Posts: 438
Joined: Fri Mar 01, 2019 19:25
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: Mesecons Computer Builds

by Miniontoby » Post

cool, I am going to also make a one
My English isn't very good because I'm Dutch ---- Check my mod "Doorbell" Vote your gang

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Name: ALU Demo
Volume: 15600 (52*6*50)
Dependencies: Mesecons, Digilines, Digiline-Stuff
Relevant circuits: D Latch, Full Adder
Relevant videos in Ben Eater's series:
  • Twos compliment: Negative numbers in binary
  • ALU design
  • Building the ALU
  • Troubleshooting the ALU
  • Testing the computers ALU
Description: Some demos of 8 bit adders. The adders are wired with Digilines and a digiboard to more easily enter numbers and display both binary and decimal input/sum numbers. The ALU uses Mesecons exclusively and includes two registers and allows for subtraction using two's compliment.
  • 8 Bit Adder Using Logic Gates (back)
  • 8 Bit Adder Using FPGA's (front-right)
  • 8 Bit ALU (Adder/Subtractor) w/2 Registers (front-left)
Image
Image
alu_demo.we
(862.96 KiB) Downloaded 69 times
Attachments
alu_demo_schematics.jpg
(97.27 KiB) Not downloaded yet
alu_demo.jpg
screenshot of alu_demo
(81.43 KiB) Not downloaded yet
Last edited by So.Po.Coder on Sat Mar 28, 2020 11:33, edited 1 time in total.

bobbbob
New member
Posts: 6
Joined: Sun Jan 12, 2020 22:32

Re: Mesecons Computer Builds

by bobbbob » Post

I made a 4 bit array multiplier, which is a design that does binary multiplication very fast.
Image
Attachments
4bitarraymult.we
(143.52 KiB) Downloaded 49 times
screenshot_20200204_224354.png
(1015.13 KiB) Not downloaded yet

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Name: RAM Demo
Volume (demo 1): 6800 (34*5*40)
Volume (demo 2): 7770 (37*5*42)
Dependencies: Mesecons, Digilines, Digiline-Stuff
Relevant circuits: D Latch
Relevant videos in Ben Eater's series:
  • 8-bit computer RAM intro
  • RAM module build (parts 1-3)
  • RAM module testing and troubleshooting
Description: RAM modules. The first demo is an 8 bit 16 address module that uses digilines for the memory address register and logic gates to latch data to the specified address. The second demo includes two modules that use the memory chips available in the digilines-stuff mod.

NOTE 1: use cpdef's fork of jogag's digilines-stuff project. He has fixed a critical bug required to use the memory chips.

NOTE 2: the green LEDs in the first demo indicate the physical address to read/write to, where as the green LEDs in the second demo display the address in binary to read/write to on the internal memory chip.
  • 8 Bit 16 Address RAM module (ram_demo_1)
  • 8 Bit 256 Address RAM module (ram_demo_2 back)
  • 16 Bit 1024 Address RAM module (ram_demo_2 front)
Image
ram_demo_1.we
(938.55 KiB) Downloaded 57 times
ram_demo_2.we
(433.9 KiB) Downloaded 57 times
Attachments
ram_demo.jpg
(316.84 KiB) Not downloaded yet
Last edited by So.Po.Coder on Sat Mar 28, 2020 10:38, edited 1 time in total.

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Name: Display Demo
Volume (demo 1): 19800 (33*10*60)
Volume (demo 2): 6900 (20*15*23)
Dependencies: Mesecons, Digilines
Relevant circuits: 4 bit display decoder
Relevant videos in Ben Eater's series: designing a 7-segment hex decoder

Description: I don't think seven-segment displays are well suited for voxel games like Minecraft and Minetest. However I like the 15 segment (block?) display used in the Mesecons Laboratory's digilines clock tutorial, so in the first demo I have created a 15 segment display using a decoder built with logic gates, and one using digilines for comparison. The circuit diagram could be used to create a 15 segment display in any voxel game. In the second demo I have used digilines to create a multi-digit display for displaying signed or unsigned 8 bit binary numbers.
  • 4 bit display decoder - logic gates (demo_1 right)
  • 4 bit display decoder - digilines (demo_1 left)
  • 8 bit display decoder - digilines (demo_2)
Image
display_demo_1.we
(364.15 KiB) Downloaded 55 times
display_demo_2.we
(138.21 KiB) Downloaded 56 times
Attachments
display-demo.jpg
screenshots and circuit diagram
(276.58 KiB) Not downloaded yet
Last edited by So.Po.Coder on Sat Mar 28, 2020 10:26, edited 1 time in total.

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

Name: Clock/Counter Demo
Volume: 4200 (30*5*28)
Dependencies: Mesecons
Relevant circuits: JK Flip-flop (master-slave)
Relevant videos in Ben Eater's series:
  • 8 bit computer clock (parts 1-4),
  • binary counter,
  • program counter design,
  • program counter design,
  • program counter build,
  • 8 bit CPU control logic Part 2
Description: The clock input of the front program counter is triggered by the "counter enable" (CE) pin. This counter can be set to the 4 bit number active on the inputs by setting the "jump" (J) pin high. The rear counter's clock input is connected to the on board clock, which is the inverse of the first clock. It supports up to 8 micro-instructions per instruction, but can easily be expanded to 16 micro-instructions by simply replacing the place-holder blocks in the highest bit value position with a mesecon to complete the connection.
  • clock and 4 bit counter w/jump (front)
  • reversed clock and 4 bit counter (back)
Image
clock_counter_demo.we
(247.59 KiB) Downloaded 27 times
Attachments
clock_counter_demo.jpg
clock counter demo screenshot and schematic
(126.17 KiB) Not downloaded yet

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

I finished the completed computer a few months ago, but just never got around to posting it. I thought I would wrap this project up and tie it with a bow so I can move on to other projects. It's been fun working on it. I made a web page with the downloads and dependencies, also a video description of what the computer can do.

Mesecons 8 Bit Computer

User avatar
BuckarooBanzay
Member
Posts: 397
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: Mesecons Computer Builds

by BuckarooBanzay » Post

hi So.Po.Coder

Great work!
I'm planning on creating a tutorial/lab in form of a game that features your schematics.
Whats the license on them?

I'll attribute/credit your work no matter what :)

User avatar
So.Po.Coder
Member
Posts: 26
Joined: Wed Jan 08, 2020 12:03
GitHub: SoPoCoder

Re: Mesecons Computer Builds

by So.Po.Coder » Post

My Mesecons computer project is licensed under a Creative Commons Attribution-ShareAlike 4.0 license, which includes any .we files included in the download and any demos I posted on this thread.

But if your referring to the images of circuit schematics I posted in the thread above, I drew the RAM module, display decoder and binary clock schematics myself so I feel comfortable offering them up under the same license. The others I just yanked off the internet, so you may want to google image search them to find their original sources.
Best of luck!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest