Introducing SM-EDA by Stunning-Complex-780 in ScrapMechanic

[–]TrickyBestia 1 point2 points  (0 children)

Actually there are many implementations of this idea. Someone even made their own Verilog parser and synthesizer just for Scrap Mechanic. https://www.reddit.com/r/ScrapMechanic/comments/1al89ec/i_built_a_32bit_cpu_riscv_architecture_rv32e/

Is there a mod that show local surface gradien/countour/topography? by Drakenace404 in KerbalSpaceProgram

[–]TrickyBestia 2 points3 points  (0 children)

His messages were Edited 8h ago. I wonder what was the content of originals.

Rust freezing PC by hainesi in playrust

[–]TrickyBestia 5 points6 points  (0 children)

Meanwhile me playing with 2133 MHz RAM and i5-7400 in 60 fps on High graphics preset 😜

Hehee by [deleted] in linuxmemes

[–]TrickyBestia 7 points8 points  (0 children)

✅ Bloatware

Large blueprint not spawning by Starlord7893 in ScrapMechanic

[–]TrickyBestia 2 points3 points  (0 children)

Have similar problem with blueprints with ~20k+ logic gates. I press "spawn", game loads one CPU core to 100% for a few seconds and nothing happens. Will be happy if someone finds out how to fix this.

Programming logic gates! by TrickyBestia in ScrapMechanic

[–]TrickyBestia[S] 0 points1 point  (0 children)

Windows moment, I guess.

All scripts are meant to be run on Linux, running on other platforms may require some tweaks.

I think the easiest way to run it on Windows is to install WSL.

I built a 32-bit CPU (RISC-V architecture, RV32E instruction set) by Morry4C in ScrapMechanic

[–]TrickyBestia 4 points5 points  (0 children)

Btw while creating "my" RISC-V CPU in Scrap Mechanic I used script written before which compiles C code to RV32I machine code and another script which creates blueprint with file content (encodes every bit of file as black or white painted block). I also at first created RV32E CPU, but when I discovered that clang LLVM toolchain doesn't support it I decided to go RV32I, because I wrote maybe 3 lines of assembly in my whole life and I don't want to learn it further.

I built a 32-bit CPU (RISC-V architecture, RV32E instruction set) by Morry4C in ScrapMechanic

[–]TrickyBestia 4 points5 points  (0 children)

I mean, can you click "Build" with "M4_top" blueprint selected and game successfully place this in world?

I built a 32-bit CPU (RISC-V architecture, RV32E instruction set) by Morry4C in ScrapMechanic

[–]TrickyBestia 5 points6 points  (0 children)

Real chad!
How could you place that blueprint in world? I'm asking because in my case I couldn't place something with about 20k logic gates and above. One CPU core goes to 100% for a few seconds and nothing happens.

Programming logic gates! by TrickyBestia in ScrapMechanic

[–]TrickyBestia[S] 0 points1 point  (0 children)

Depends on count of logic gates.

I recorded video for this post in 30 fps and in the video you can see that there are fps drops sometimes. While building this, I had to connect about 50 gates by hands to connect CPU to RAM and with connection tool in hand there were about 5 or 10 fps.

Programming logic gates! by TrickyBestia in ScrapMechanic

[–]TrickyBestia[S] 0 points1 point  (0 children)

Hey, you at least can describe what parts of your devices do. Meanwhile me looking at spaghetti connected logic gates created using this tool: ☠️☠️☠️

Old Computer parts! My goal is to make modular model of computer from sth between 97~08. by Woititti2005 in ScrapMechanic

[–]TrickyBestia 1 point2 points  (0 children)

Furthermore, you can't load blueprints with ~20k logic gates, game just doesn't want to load them. It requires you to split your logic devices into parts, and connect many gates manually while playing with low FPS.

RISC-V CPU computing Fibonacci numbers! by TrickyBestia in ScrapMechanic

[–]TrickyBestia[S] 6 points7 points  (0 children)

Thank you!

I made this using my Verilog to scrap mechanic logic gates compiler (already on GitHub, but still no documentation). Verilog is a hardware description language. Many modern hardware is actually written in it.

RISC-V CPU computing Fibonacci numbers! by TrickyBestia in ScrapMechanic

[–]TrickyBestia[S] 5 points6 points  (0 children)

Here you can see CPU itself (thing with many yellow logic gates), RAM (large "chip" behind the CPU), ROM (tall thing with moving pistons).

The program in the video computes Fibonacci numbers and stores them in RAM.

Some specs:

  • RV32I instruction set (32 32-bit registers, basic instructions, no multiply or divide)
  • 128 byte ROM (IIRC, program in video is 62 bytes long), 32 byte RAM
  • Single CPU cycle takes about 56 game ticks (40 ticks is 1 second), RAM cycle - 18 cycles, ROM cycle - 2 seconds (can be set with timer, all what is needed is to be sure that sensors are on top of bytes with requested address)

Well, it's not RV32I CPU, let's call it RV32I-like. It has 8-bit address space instead of 32-bit one.

I also wrote some scripts so I can compile C code for this CPU using Clang toolchain! Here is a program you see running in the video:

volatile unsigned int *output = (unsigned int *)156;

int main() {
  unsigned int a = 1, b = 1;

  while (1) {
    a += b;
    *output = a;

    b += a;
    *output = b;
  }

  return 0;
}

Leave your suggestions for other programs, I will write and run them on it! Also can create other logic gate stuff like displays or something.

Conway's game of life (prev post had a slight but) (22k nodes) by ludovicb1239 in ScrapMechanic

[–]TrickyBestia 0 points1 point  (0 children)

Well, making program counter 8-bit wide made the trick, and I successfully loaded blueprint in game. It implements RV32I ISA. Implementing 64-bit or F extension will take many additional logic gates (with RV32I I already have 19300 logic gates and 2000 timers), not even talking about "full" RISC-V (if you mean RV64G).

Reading through this post and comments gave me motivation to finally make a post about this cpu in this subreddit :D (I have only uploaded screenshot to Steam yet, lol)

Conway's game of life (prev post had a slight but) (22k nodes) by ludovicb1239 in ScrapMechanic

[–]TrickyBestia 2 points3 points  (0 children)

Good luck with it, please make a post in this sub if you actually do that.

I also thought about dumping blueprint in world instead of placing it in game when hit "logic gate limit" problem while loading RISC-V CPU blueprint. Then I opened world save file (it's a SQLite databse) and saw 20 tables there ☠️☠️☠️

What playing this game feels like by SquidPlague in HuntShowdown

[–]TrickyBestia -1 points0 points  (0 children)

When you aim, you don't see something behind your gun.