Giter Club home page Giter Club logo

m-microcontroller's Introduction

Contents

Description

Handle your signals like a pro by writing FAL (Factorio Assembly Language). This state of the art MicroController has 4 memory registers, can take any number of inputs on two channels, red and green plus 1 output register.
The MicroController can do everything a combinator can do, only more and better!

FAL has 34 Opcodes and can read 32 lines of instructions.

FAL Reference Document

Examples

1-st

# Outputs the first signal
# from red multiplied by 2.
mov red1 mem1
mul mem1 2
mov mem1 out
jmp 2

2-nd

# accumulates first 4
# signals on the red wire.
:SETUP
clr
set 11 mem2
set 1 mem3
:LOOP
mov red@3 mem1
add mem1 mem@2
mov mem1 mem@2
:NEXT
add mem2 1
tlt mem1 15
set 11 mem1
mov mem1 mem2
add mem3 1
tlt mem1 5
set 1 mem1
mov mem1 mem3
jmp :LOOP

Terms of use

Creative Commons License

This work is a derivative of "MicroController" by Luke Perkin, used under Creative Commons Attribution 4.0 Unported license. This work is attributed to Luke Perkin, ZwerOxotnik and contributors, and the original version can be found here.

This work is licensed under a Creative Commons Attribution 4.0 International License.

Credit

Roundicons and Flaticons.com for the icon sprites.

Disclaimer

THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS IN THE WORK.

m-microcontroller's People

Contributors

factorio-mods-helper avatar xz1048576 avatar zweroxotnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

m-microcontroller's Issues

[BUG]

Describe the bug
South Port 01 is mapped to MEM21-42.

Steps to reproduce

  1. read FAL PDF

Expected behavior
South Port 01 is mapped to MEM21-24.

Library

Local/global library to open codes etc

[FIXED] Editor Mode First Placement Crashes World

Describe the bug
When I place down the world's first microcontroller in editor mode, it crashes the world with the following error (this is the only installed mod, I sanitized to check if it was caused by another mod):

The mod MicroController (0.11.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event m-microcontroller::on_built_entity (ID 6)
__m-microcontroller__/control.lua:91: bad argument #1 of 2 to 'ipairs' (table expected, got nil)
stack traceback:
	[C]: in function 'ipairs'
	__m-microcontroller__/control.lua:91: in function <__m-microcontroller__/control.lua:83>

If I place one down outside of editor mode first, everything works fine.

Steps to reproduce

  1. Create a world
  2. Enter editor mode
  3. Place MicroController

Expected behavior
not crashing?

Microcontroller cannot be placed in map editor mode

Attempt to place microcontroller in map editor mode causes following error:

  78.121 Error MainLoop.cpp:1204: Exception at tick 49556197: The mod MicroController caused a non-recoverable error.
Please report this error to the mod author.

Error while running event m-microcontroller::on_built_entity (ID 6)
__m-microcontroller__/control.lua:88: bad argument #1 of 2 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        __m-microcontroller__/control.lua:88: in function <__m-microcontroller__/control.lua:80>

Factorio versioin: 0.18.2, MicroController version: 0.5.4

Error while trying to set in external memory

Hi. While trying to write to the external memory I've got the following error:

image

Code:

clr
set 11 mem1
set 1 mem@1

Placement of modules:
image

Please is this something that currently not supported or a bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.