Let's make a computer

Discussion in 'Public Member Events' started by jkrmnj, May 27, 2016.

  1. As the title said, let's make a redstone computer. This is a massive undertaking that will take tons of time and effort, but will also be tons of fun. This computer must work on EMC and ideally fit in town. The build process will be documented so all can see the progress. Here are some more specific goals:
    • Must be programmable
    • Must work on EMC
    • Should be unique in some way. Can't just be a copy and paste of a bunch of schematics
    • Will likely need to fit on a single Utopia residence (unless someone can provide resources to use two next to each other)
    These goals are still fairly vague but should be enough to guide the project from beginning to end. There also won't be a bunch of people with specific jobs. Instead, everyone is encouraged to jump in and help out if they can.

    Current goal: come up with specification for the computer. This is all of the theoretical stuff with how to work it.

    Currently I am thinking Von Neumann architecture since (from what I have read) they tend to be smaller to make. Making it 8bit would be good if the size works out. Anyone with more redstone building experience have anything to add?
  2. 64-bit
    Count me in
    jkrmnj likes this.
  3. I have got some experience with computers (I'm the one who built the first working 1pixel 1redstone lamp touchscreen(A show-off, I?)) so, if you are in need of some hardware/ switches (like memories, calculators) count me in :)
    EDIT: I have submitted my PC on a redstone-competition thread, so if you want to see it...
    ShelLuser and jkrmnj like this.
  4. A computer using only redstone? Daring... what should it be able to do? Perhaps comparable to the early scientific calculators with how they can be programmed to do specific arithmetic tasks and give an output based on the outcome?
    jkrmnj and ShelLuser like this.
  5. oh i thought it'd play minecraft
    jkrmnj and nuclearbobomb like this.
  6. I'm interested
    jkrmnj likes this.
  7. I remember seeing that. Do you think it could fit into something like this? Having a fill screen would be awesome.
    It will be fairly simple but still cool. If you want an idea of how this could turn out, look up redstone computers on Youtube. Some of the results are insane.
  8. Could lag sever idk sorry -1
    jkrmnj likes this.
  9. The name made me giggle like a 12 year old boy.

    WitherDoggie, 72Volt, Olaf_C and 7 others like this.
  10. My theory on this is that if it gets out of hand, someone in staff will say something. Otherwise, this is just another redstone contraption such as the many many farms already in existence.
    ShelLuser and IronDoesPvp like this.
  11. I can spell, I promice :p
  12. I thought the spelling was intentional. It's the first three letters that got me :p
  13. I also thought it was a joke :p
  14. okay okay calm down
  15. It will probably have to be on a single utopia res because some far away parts wouldn't work in unloaded chunks. We can stack things high or underground to save space.
    BitcoinDigger and jkrmnj like this.
  16. I have once made a 8-bit calculator, (one that only works when you're changing the numbers to 1's and 0's) It works, and calculates really fast (and is 8X30X4) it has got 2 times the inputs 1 2 4 8 16 32 64 and 128 (people who have learned to calculate in 1's and 0's should understand how this works), Making it 60 blocks wide whould double that amount of numbers, mmhh, sounds good...

    EDIT: a little lession calculating in 1's and 0's for everyone :)

    With 10 numbers (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) the first number is worth [number]*10^0 the second (going from right to left) is worth [number]*10^1 the third is worth [number]*10^2 etc. so, when you're using 2 numbers [0, 1] it works like this: first (going from right to left again) [number]*2^0 second [number]*2^1 etc. so, when you want to calculate the numbers 10011010 and 01110101 you can just calcultate that:
    ------------- +
    and if you want to know what number that is you use the technique I discribed above :) (I'm just to lazy)

    one more edit:
    you don't need to do that, I have once put my reder distance on 1 on my largest pc, and it did just work...
    jkrmnj, ShelLuser and 607 like this.
  17. My dyscalculia is spiralling out of control right now :p
  18. Not really a typical SMP project :)

    So perhaps just one that demonstrates basic components?
    Memory, multiplexing, bus, command word, register, ALU,
    16 keys keyboard, binary numeric input and output, perhaps BCD output ... perhaps 16x16 pixel graphics?

    RISC, Load / Store
    Flags: zero, carry
    ALU: NOT, AND, OR, XOR, INC, DEC, ADD / ADC, SUB / SBC, SHL (through carry), SHR (through carry)
    Control: relative jump (JP), relative jump if not zero (JNZ), if carry (JC), NOP, HLT (halt)
    Addressing modes: immediate, register, register indirect with immediate offset
    8-bit word, 8-bit immediate
    Registers: PC program counter, A accumulator, B, C, D, E
    No stack?
    Load: LD A, (reg + 4-bit offset) ; reg = B...E
    Store: LD (reg + 4-bit offset), A ; reg = B...E
    memory mapped IO
    8-bit address space (256 addresses)

    Sample program:

    ; add two 16-bit numbers
    ; input from 16-bit binary inputs "INPUT1" and "INPUT2" (MMIO)
    ; output to 16-bit binary output "OUTPUT1" (MMIO)

    LD D, INPUT1 ; load address INPUT1 into D
    LD E, OUTPUT1 ; load address INPUT2 into E
    LD A, (D) ; load left LSB into A
    LD B, A
    LD A, (D + INPUT2 - INPUT1) ; INPUT2 - INPUT1 is 4-bit offset - load right LSB into A
    ADD A, B ; LSB of the result goes to A
    LD (E), A ; store result LSB
    LD A, (D + 1) ; left MSB
    LD B, A
    LD A, (D + INPUT2 - INPUT1 + 1) ; right MSB
    ADC A, B ; add with carry
    LD (E + 1), A ; store result MSB
    HLT ; halt

    ; program size: 15 bytes
    ; used memory: 0 bytes
    ; used registers: A, B, D, E

    imm4 - 4 bit signed immediate
    imm8 - 8 bit signet immediate
    reg - 2 bit register 00 = B, 01 = C, 10 = D, 11 = E
    operation - 4-bit operation encoding:
    0000 no operation (used for LD A, reg)
    0001 add
    0011 adc
    0100 sub
    0110 sbc
    ... etc.

    00 00 {imm4} PC <- PC + 1 + imm4 ; jump relative
    00 00 1111 halt; HLT

    00 01 00 00 // {imm8} PC <- imm8 ; jump unconditionally
    00 01 00 01 // {imm8} if not zero: PC <- imm8 ; jump if not zero, JNZ
    00 01 00 10 // {imm8} if carry: PC <- imm8, JC

    00 10 00 {reg} reg <- A
    00 11 01 {reg} // {imm8} reg <- imm8
    00 11 10 00 // {imm8} A <- imm8

    01 {reg} {operation} A <- A [operation] reg, e.g. ADD A, B

    10 {reg} {imm4} A <- (reg + imm4) ; load

    11 {reg} {imm4} (reg + imm4) <- A ; store

    Wouldn't that already be way too much?

    How about one made to carry out just one program?
    Can we call it iComp EMC-Air? :)
    Or just a simple calculator?
    Olaf_C, Jelle68, jkrmnj and 3 others like this.
  19. There is one big problem though.
    Redstone do glitch from time to time (not only) on EMC.
    It would be very tedious to debug such a machine.
    ShelLuser, BitcoinDigger and 607 like this.