https://hackaday.io/project/4237-mental-1-a-brainfuck-cpu/lo...
And a more recent video, showcasing PS/2 keyboard input: https://twitter.com/treykeown/status/867809790294097920
I like the approach for handling [ and ]. My design is "dumb" in the sense that it uses a `scan` register to handle jumping forward and backwards (so it's quite slow). So far it seems easiest to bite the bullet and scan forwards when [ is zero, but have something similar to your stack pointer for jumping back. Building the jump table for both [ and ] on reset is also a nice optimization.
I have a feeling the approach I take will follow from whatever I decide for RAM zeroing. The purist in me is still a bit put off by the idea of preprocessing. It feels more like a compiler+CPU rather than just a CPU. If I go the "highest address counter" approach where I synthesize zeros the first time a RAM location is passed, I probably won't do the loop pre-processing.
I could do a hybrid approach where both jump points are indexed the first time the loop is scanned. This would achieve amortized constant time. I think I could live with that...
Edit: Have you posted this as a 'show hn'?
If you only have a limited amount of time I would highly recommend the control logic video:
I've then been having them manufactured in China for, which you can have done for ~$15 for 5, shipped. It's very satisfying to have finished fancy PCBs to solder together, and I've learned so much about electronics, PCB design, and small scale board manufacturing since starting this project!
also, do you have images of the empty pcb and finished product after soldering the components that could be added to the git repo?
edit.. just saw some pics from your other comment: https://news.ycombinator.com/item?id=14457760
They're by far the cheapest I've found. They charge $5 for 5 PCBs, with a 10cmx10cm area each. The cheapest shipping at $6 will get them to you in about 20 days from order date, while the Shenzhen DHL shipping option will get them to you in about 7 days from order date. At least, that's been my experience ordering from them.
Maybe it could even have a PCB that has everything socketed like a breadboard except closer together.
Here's what the physical versions of the clock and the register look like during testing (red is clock, blue is register): https://goo.gl/photos/NSAEYVu7AbXVjcBK6
But I've got a lot of other ideas too, so who knows...
To help me understand everything better I've been writing a kind of emulator/simulator[0] (I'm never quite sure of the difference). It still needs work and some terminology changing to match Ben's, but it's got basically the same functionality as the real one.
It's actually a really nice way to be able to rapidly prototype new microcode because the instructions are defined as a slice of bit-fields representing which control lines are set for each cycle[1].
[0]: https://github.com/tomnomnom/eater-cpu
[1]: https://github.com/tomnomnom/eater-cpu/blob/master/instructi...
His videos are so great, I'm happy when I get my monthly emails that he's receiving money. It's a good reminder that I need to hop back on them!
I had to build a 4 bit computer in college and it looked almost exactly like this (less breadboards and components though). The professor wrote the textbook herself. If she made it into a webpage I imagine it would be a longer version of this.
To date is one of my favorite classes I took.
Sure, it's still cool to see someone use 4-bit binary full adder etc and build a computer, but the from Scratch always feels disingenuous.
You could show how you could interactively test and control the board that way.