## Mesecons Computer Builds

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Mesecons Computer Builds

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)

circuit_demo.we
Attachments
circuit_demo_schematics.jpg
schematics of the circuits
circuit_demo.jpg
screenshot of circuit_demo.we

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

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

decoder_demo.we
Attachments
decoder_demo.jpg
screenshot of decoder_demo.we
decoder_demo_schematics.jpg
schematics for decoder_demo.we
Last edited by So.Po.Coder on Thu Jan 16, 2020 06:32, edited 2 times in total.

Walker
Member

Posts: 849
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

### Re: Mesecons Computer Builds

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

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

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?

Walker
Member

Posts: 849
Joined: Tue Oct 03, 2017 09:22
In-game: Walker

### Re: Mesecons Computer Builds

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

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

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

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

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.

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

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!

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

Name: Register Demo
Volume: 11985 (47*5*51)
Dependencies: Mesecons
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

register_demo.we
Attachments
register_demo_schematics.jpg
register_demo.jpg
screenshot of register_demo.we

bobbbob
New member

Posts: 6
Joined: Sun Jan 12, 2020 22:32

### Re: Mesecons Computer Builds

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.

Krock
Developer

Posts: 4469
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

### Re: Mesecons Computer Builds

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).

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

Miniontoby
Member

Posts: 330
Joined: Fri Mar 01, 2019 19:25
Location: The Netherlands
In-game: Miniontoby

### Re: Mesecons Computer Builds

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

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

Name: ALU Demo
Volume: 15600 (52*6*50)
Dependencies: Mesecons, Digilines, Digiline-Stuff
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)

alu_demo.we
Attachments
alu_demo_schematics.jpg
alu_demo.jpg
screenshot of alu_demo

bobbbob
New member

Posts: 6
Joined: Sun Jan 12, 2020 22:32

### Re: Mesecons Computer Builds

I made a 4 bit array multiplier, which is a design that does binary multiplication very fast.
Attachments
4bitarraymult.we
screenshot_20200204_224354.png

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

Name: RAM Demo
Volume (demo 1): 6800 (34*5*40)
Volume (demo 2): 7770 (37*5*42)
Dependencies: Mesecons, Digilines, Digiline-Stuff
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)

ram_demo_1.we

ram_demo_2.we
Attachments
ram_demo.jpg

So.Po.Coder
Member

Posts: 11
Joined: Wed Jan 08, 2020 12:03

### Re: Mesecons Computer Builds

Name: Display Demo
Volume (demo 1): 19800 (33*10*60)
Volume (demo 2): 6900 (20*15*23)
Dependencies: Mesecons, Digilines
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)

display_demo_1.we

display_demo_2.we
Attachments
display-demo.jpg
screenshots and circuit diagram