У нас вы можете посмотреть бесплатно Help Me Make a ROM/PLA Building Program! или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
As I mentioned in the video, I have a stackish interpreter video underway, and another tutorial episode to follow. But for now I wanted to try and make a program that would make building ROM's a little easier.
The Look-up Table portion of it is easy, But I'm having a bit of trouble figuring out how to create an algorithm for making the decoder.
The decoder I want to be able to create is properinglish19's design: • Tutorial: Decoders (and a fast pistonless ...
If you're building a sequential decoder (I.E. The first output is on if the inputs equal 0, the second if the inputs equal 1, third if 2, fourth if 3 and so on) this decoder is fairly straight forward. However in this context I'm using them for combination decoders. Meaning there's no guarantee that every bit will be considered at each line, nor will every combination be used, or even if they'll be in order.
So Ideally I'd like to give it a text document where every line represents a line in the decoder and every character in the line represents an input to the decoder. If the character is a 0, the program needs to place a repeater, if it's a 1 it needs to place a torch, otherwise it needs to skip that bit entirely.
So if I give it a text document that looks like this:
1XX
01X
001
000
it needs to create a decoder with 3 inputs and for outputs.
the first output needs to be active if the first input is on, ignoring the other inputs of course.
the second active only if the first input is off and the second input is on. ignoring the last input.
the third, on only if the inputs are off, off, on respectivly
and the fourth if the inputs are all off.
Lastly it would be ideal if the program took care of the placement of signal-refresh repeaters for the user, on both the inputs and the outputs. This might be harder than you think, since the repeaters need to be placed in such a way that any surrounding repeaters or torches can still power the line if need be.
If you feel up to the challenge, feel free to post a video (or a comment) about your algorithm. The language doesn't matter as long as you post your algorithm in a psudo-language that I can translate.
Aaaaaand the source code for the LUT builder if anyone needs it
just keep in mind, the code was written for processing, and youtube doesn't allow angle brackets. So anywhere you see lessthan and greaterthan, they need to be replaced with open and close angle brackets respectively:
import java.awt.*;
import java.awt.event.*;
import java.awt.datatransfer.*;
import javax.swing.*;
import java.io.*;
Robot robot;
String path = null;
void setup() {
try {
robot = new Robot();
robot.setAutoDelay(40);
}
catch (Exception e) {
e.printStackTrace();
}
selectInput("Select a file to process:", "fileSelected");
while (path==null)println("path is " + path);
delay(5000);
String[] lines = loadStrings(path);
int widest_line=0;
for (int i=0; i lessthan lines.length; i++) { //make input lines
println("placing input line " + (i+1) + " of " + lines.length);
int x = (i+1)*2;
int z = lines[i].length()*2-2;
if (lines[i].length() greaterthan widest_line)widest_line=lines[i].length();
typeString("/fill ~"+x+" ~1 ~-1 ~"+x+" ~1 ~"+z+" minecraft:iron_block");
typeString("/fill ~"+x+" ~2 ~ ~"+x+" ~2 ~"+z+" minecraft:redstone_wire");
for (int j=-1; j lessthan z; j+=16) { //place repeaters
typeString("/setblock ~"+x+" ~2 ~"+j+" minecraft:unpowered_repeater 2");
}
}
for (int i=0; i lessthan widest_line; i++) { //make output lines
println("placing output line " + (i+1) + " of " + widest_line);
int x = lines.length*2;
int z = i*2;
typeString("/fill ~ ~-1 ~"+z+" ~"+x+" ~-1 ~"+z+" minecraft:iron_block");
typeString("/fill ~ ~ ~"+z+" ~"+x+" ~ ~"+z+" minecraft:redstone_wire");
for (int j=0; j lessthan x; j+=16) { //place repeaters
typeString("/setblock ~"+j+" ~ ~"+z+" minecraft:unpowered_repeater 3");
}
}
for(int i=0;i lessthan lines.length;i++){ //set torches
println("placing torches for line " + (i+1) + " of " + lines.length);
String line = lines[i];
for(int j=0;j lessthan line.length();j++){
int x = i*2+1;
int z = j*2;
if(line.charAt(j)=='1')typeString("/setblock ~"+x+" ~1 ~"+z+" minecraft:redstone_torch 2");
}
}
exit();
}
void typeString(String text) {
StringSelection stringSelection = new StringSelection(text);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(stringSelection, stringSelection);
robot.keyPress('
');
robot.keyRelease('
');
robot.keyPress(CONTROL);
robot.keyPress('V');
robot.keyRelease('V');
robot.keyRelease(CONTROL);
robot.keyPress('
');
robot.keyRelease('
');
}
void fileSelected(File selection) {
if (selection == null) {
println("Window was closed or the user hit cancel.");
exit();
} else {
path = selection.getAbsolutePath();
println(path);
}
}