Maps Redstone Device

4-bit Redstone processor/computer (and an operating system)

  • 1.2k views 2 today
Progress
100% complete
  • 2
  • 1
Taars_m18
Lvl 15Journeyman System
14
This time I created a simple redstone processor but much more advanced than my previous creations but still simple compared to other builds. When I finished building the processor I realized that it was somewhat difficult to write a program for the processor, and I started to think about what would be the best way to make a simple interface so that the user can communicate with the hardware in a comfortable way, nd that's when I got the idea of ​​creating a basic operating system that would allow you to manipulate and interact with the hardware in the best possible way, so I started coding a set of programs and sub-programs, which used all the available resources, since the idea was not to modify the processor architecture and thus "MC-OS 1.0" or "Minecraft Redstone Operating System 1.0" was born.
It is a simple MS-DOS style operating system that allows the user to manipulate memories, addresses and perform some simple tasks, and by implementing this operating system the processor and its assembly became a "computer" since by connecting the memory that houses the operating system and connect a screen to display data, I had to place small RAM memories and the operating system memory acting as ROM, so by having all these components and a system that allows storing, manipulating and processing data, I obtained a "computer" by definition, but the processor alone cannot act as such, although it can perform small data storage and manipulation tasks.
As for the processor, it consists of some basic instructions for the ALU such as "ADD" "SUB" "AND" "OR" and also other more complex ones that allow the data to be processed in different ways such as: "LOAD" "STORE" "LOOP" END"

The processor instruction set is:
-ADD
-SUB
-AND
-OR
-LOAD (Load data from data memory into main registers)
-STORE (Store the main registers in data memory)
-LOOP (Performs a loop and must indicate how many lines of the program it will repeat backwards and how many times it will do so)
-END (simply ends the program)

They are basic and simple instructions but thanks to them you can code interesting and quite complex programs. For example, I have managed to create the Fibonacci sequence with the following program:
LOAD R1, M1 (Loads memory address 1 into register #1 [​contains a 1])
LOAD R2, M2 [​contains a 1]
ADD R1, R2, M1 (Adds register 1 with register 2 and saves the result to memory address 1 [​now contains a 2])
LOAD R1, M1 [​Contains a 2]
LOAD R2, M2 [​contains a 1]
ADD R1, R2, M2 [​Now contains a 3]
LOOP 6 (if it is not indicated how many times to repeat the loop it will simply do it indefinitely)

Now, the operating system, as I mentioned earlier, is a set of programs and sub-programs that are executed in order as needed. The operating system is made up of 4 fundamental parts, “The user interface”, “The ROM”, “The programs/sub-programs” and “The boot sequence”, first the boot sequence is executed that verifies the state of the main system processor registers and the state of the data memory, if everything is "ok" the ROM memory integrated with the operating system will be enabled, which is the intermediary between the programs and the user, and after that sequence the user will be able to Select a program to run and what data you want to use. The user has 4 programs that they can run: "ADD" and "SUB" which are part of a "calculator" program that allows the user to enter two values ​​and add or subtract them, then there is "WRITE" which is a program that allows the user to write any data to the data memory, and finally there is the "PRINT" program which simply allows the user to display any memory address on the screen, they are simple tasks but believe me, the more you dive into the code and processes of the operating system, the more confusing and complex it becomes.
Well, as for the specifications of the processor there is not much to say, it is simply slow due to its large size and complexity, it runs at 0.1Hz (approximately one cycle every 10 seconds) and works with 4-bit buses which is a limitation significant.

More like this

  Have something to say?

Welcome