[Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

pampogokiraly wrote:
Tue Oct 12, 2021 10:27
quick question... why is there no xnor gate? I know it is inside the fpga, but it's still weird that there is a standalone gate for every one of them except for the xnor one...
I guess many people have asked this themselves already. But I haven't found any discussion about xnor gates on github (nor about xand, nxor or anything similar).
I've found no reason why there shouldn't be one. It's probably just historic reasons why it wasn't added yet. The original gates PR (#48, 9 years ago) didn't even consider xnor gates, and didn't add or and nor gates. Later (this commit, 6 years ago) added or and nor. Xnor gates are maybe also not as popular as xor or and gates.
Adding xnor gates would be very simple and beginner friendly, if someone here wants to do that.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
v-rob
Developer
Posts: 969
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by v-rob » Post

pampogokiraly wrote:
Tue Oct 12, 2021 10:27
quick question... why is there no xnor gate? I know it is inside the fpga, but it's still weird that there is a standalone gate for every one of them except for the xnor one...
I asked the same thing a long time ago. Honestly, I don't think I ever got a satisfactory answer -- it's only one line of code and a new texture to support it.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by pampogokiraly » Post

My only guess that the texture for the xnor gate wouldn't fit on a block...
All praise the Bacon God! The one and only god in MineTest

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Linuxdirk » Post

Why not simply use XOR followed by NOT instead?

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

pampogokiraly wrote:
Wed Oct 13, 2021 09:29
My only guess that the texture for the xnor gate wouldn't fit on a block...
There's indeed no space left for the not circle in the texture. One would probably need to somehow squish the symbol.
Linuxdirk wrote:
Wed Oct 13, 2021 09:37
Why not simply use XOR followed by NOT instead?
By that logic you'd also have no NOR or NAND gates.
Also, XOR + NOT has an extra delay.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Linuxdirk » Post

DS-minetest wrote:
Wed Oct 13, 2021 12:45
By that logic you'd also have no NOR or NAND gates.
Except NOR you don't need any other gates because with NOR gates alone you can build all the other gates. Same applies for NAND.

https://en.wikipedia.org/wiki/NOR_logic
https://en.wikipedia.org/wiki/NAND_logic

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

Linuxdirk wrote:
Wed Oct 13, 2021 14:10
DS-minetest wrote:
Wed Oct 13, 2021 12:45
By that logic you'd also have no NOR or NAND gates.
Except NOR you don't need any other gates because with NOR gates alone you can build all the other gates. Same applies for NAND.

https://en.wikipedia.org/wiki/NOR_logic
https://en.wikipedia.org/wiki/NAND_logic
Yes, of course.
And because you can get OR logic with conductors and diodes, in mesecons NOT is enough for everything.
But that's somewhat irrelevant here. : )
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Linuxdirk » Post

Basically this, yes. So XNOR as dedicated gate would be nice, but it’s not that it’s impossible to to use XNOR logic right now.

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by pampogokiraly » Post

Linuxdirk wrote:
Wed Oct 13, 2021 09:37
Why not simply use XOR followed by NOT instead?
I don't mind that I don't have a xnor gate... it's just really weird that the fpga has it while the normal gates don't
All praise the Bacon God! The one and only god in MineTest

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Codesound » Post

Hi,

The vertical "Cable" does not works when the connection is made by the upper side of it....
It Is normal?


Image

User avatar
PolySaken
Member
Posts: 817
Joined: Thu Nov 09, 2017 05:18
GitHub: PolySaken-I-Am
In-game: PolySaken
Location: Wānaka, Aotearoa
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by PolySaken » Post

yes, that's normal. You need a second cable plate on top.
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by pampogokiraly » Post

Codesound wrote:
Tue Oct 26, 2021 16:17
Hi,

The vertical "Cable" does not works when the connection is made by the upper side of it....
It Is normal?


Image
perfectly normal. You have to replace the mesecon, with a vertical mesecon to make it work. But actually I highly suggest using mese blocks instead... unless vertical mesecons are forced (yes that can happen)
All praise the Bacon God! The one and only god in MineTest

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

The vertical mesecon wire conducts upwards, but the normal mesecons wire doesn't conduct downwards. Therefore there's no connection.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Codesound » Post

HI,

thank you all for the kind answers... I still have to learn a lot.... Thanks again

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Linuxdirk » Post

Any chance this annoying doors issue gets fixed anytime soon?

https://github.com/minetest-mods/mesecons/pull/592

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

Linuxdirk wrote:
Tue Mar 15, 2022 19:51
Any chance this annoying doors issue gets fixed anytime soon?

https://github.com/minetest-mods/mesecons/pull/592
You'll get your fixed doors when the author resolves these damn requested changes!
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Linuxdirk » Post

Yeah ... I had short contact with them and informed them that there are changes requested. I wonder why this isn't fixed by the author/maintainer but instead needs to be fixed by random people form the Internet 🤣

User avatar
jwmhjwmh
Developer
Posts: 125
Joined: Sun Jul 18, 2021 14:10
GitHub: TurkeyMcMac

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by jwmhjwmh » Post

Good news: Mesecons no longer depends on Minetest Game, with the exception of mesecons_doors. All the mods besides that one now have no hard dependencies, although they currently require Minetest Game for sounds and crafting recipes. You can adapt Mesecons to other environments by editing the new mod mesecons_gamecompat.

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by wsor4035 » Post

jwmhjwmh wrote:
Fri May 06, 2022 02:22
Good news: Mesecons no longer depends on Minetest Game, with the exception of mesecons_doors. All the mods besides that one now have no hard dependencies, although they currently require Minetest Game for sounds and crafting recipes. You can adapt Mesecons to other environments by editing the new mod mesecons_gamecompat.
nice. if you want more games sound compat, see https://github.com/mt-mods/sound_api (for using it as a mod dep, or use the submodule if you want to embed it). currently mods like homedecor, basic materials, pipeworks, steel, etc have there own crafting handling (typically supporting mtg, mineclone2/5, farlands reloaded), however im considering pulling that out to its own library. havent quite figured out a good solution yet.
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

superfloh
Member
Posts: 39
Joined: Tue Mar 09, 2021 10:14
GitHub: superfloh247

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by superfloh » Post

I have a question about LUA Controllers and digilines events, hope this is the right place.

My LUA Controller fires an
interrupt(10, "step")
but the interrupt handler
if (event.type == "interrupt" and event.iid == "step") then
is not executed if a digilines event is received during those 10 seconds.

There's a digilines chest right next to the LUA Controller, the digilines event handler
if (event.type == "digiline" and event.msg.action == "tput") then
is executed. It does not create interrupts, it just sets some mem. variables and send a digiline message to an LCD.

Looks like the digiline event removes the interrupt. Is that right?

I thought it works like this:
1. event is program, in that part I execute interrupt(10)
2. during those 10 seconds a digilines event is handled and sets some values in mem
3. after the 10 seconds the interrupt is handled.

What's wrong with my thinking?

complete code: https://github.com/superfloh247/minetes ... in/dye.lua

/edit MT 5.5 with latest versions of mesecons and digilines (WunderWelt server)

/edit2: I found another solution with two independent LUA Controllers that works really well

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

superfloh wrote:
Tue May 24, 2022 13:01
I have a question about LUA Controllers and digilines events, hope this is the right place.

My LUA Controller fires an
interrupt(10, "step")
but the interrupt handler
if (event.type == "interrupt" and event.iid == "step") then
is not executed if a digilines event is received during those 10 seconds.

There's a digilines chest right next to the LUA Controller, the digilines event handler
if (event.type == "digiline" and event.msg.action == "tput") then
is executed. It does not create interrupts, it just sets some mem. variables and send a digiline message to an LCD.

Looks like the digiline event removes the interrupt. Is that right?

I thought it works like this:
1. event is program, in that part I execute interrupt(10)
2. during those 10 seconds a digilines event is handled and sets some values in mem
3. after the 10 seconds the interrupt is handled.

What's wrong with my thinking?

complete code: https://github.com/superfloh247/minetes ... in/dye.lua

/edit MT 5.5 with latest versions of mesecons and digilines (WunderWelt server)

/edit2: I found another solution with two independent LUA Controllers that works really well
Digilines should not remove interrputs.
Try creating a minimal setup for reproduction.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

skiscratcher
New member
Posts: 6
Joined: Mon Oct 04, 2021 01:05
GitHub: CodeScratcher
In-game: skiscratcher

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by skiscratcher » Post

I have been messing around with latches, and am trying to get them to work inside a FPGA (for a project). The normal SR latch design works with mesecons, but does not work with this FPGA design:
Screenshot_2022-07-27_07-20-53.png
Screenshot_2022-07-27_07-20-53.png (27.39 KiB) Viewed 2118 times
. Is there any way I can fix this design?
cdb_27a6e10b04ca

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Desour » Post

You need to place a wire at B and D.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Ghaydn
Member
Posts: 54
Joined: Sat Sep 26, 2020 11:58
In-game: ghaydn
Location: Moscow, Russia

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Ghaydn » Post

SMART BLINKER on luacontroller

Sometimes you need to blink with mese signal, but blinking plant is not enough. Then a luacontroller comes to the rescue.
What this script can do:
1. Blink. Not just on/off single port. Any reasonable sequence of every unused port is available.
2. Adjust blink rate.
3. Turn on/off using mesecon signal.
4. Automatically turn on.
5. Automatically turn off if there was no signal on a specified port for some time.
6. Immediately stop if got a signal from killswitch port.

HOW TO USE
Copy the code https://github.com/Ghaydn/misc_minetest ... r_mega.lua into your luacontroller.
In the top of the script you'll find configurable variables. Adjust them as you need (ports, sequence, rate and wait_time). That's all, press "Execute"!

Luacontrolled blinker is more reliable and lightweight than loops based on delayers or logic gates. Use luacontrollers!
Last edited by Ghaydn on Sun Aug 13, 2023 20:16, edited 1 time in total.
Nobody understands me... — вРН БШ ЯЙЮГЮКХ?

User avatar
Wuzzy
Member
Posts: 4781
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Mesecons (= redstone) [GitHub] [minetest-mod-mesecons]

by Wuzzy » Post

Hi! I like to bring attention again to one of my ancient PRs for Mesecons:

https://github.com/minetest-mods/mesecons/pull/535

I've been waiting for over 2 years for any reaction or feedback. This PR builds on the noteblock by adding pitch variations for every sound variant. But actually, this PR is just a first step towards a bigger PR (also very old now), which adds dozens of new sounds for the noteblock, essentially unlocking many new intstruments, like bells, chimes, choruses, guitar, didgeridoo, xylophone, and more.

Thanks for reading!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 9 guests