Musings of a Fondue

An FPGA for the Computer

I’ll be using the Altera Cyclone II - Mini Development Board as the main FPGA of the Hack Computer V1 (name pending).

Cyclone II Mini Dev Board

I got it for $20 on eBay and the kit came with a (knockoff) USB Blaster for programming. The idea to use the board came from Charles Cole’s hardware setup of his homebrew Z-Machine. The price is great and I love that it only has the bare minimum components on it.

I worked through this excellent getting started guide by Trey Dahlberg on Youtube and everything seems to be running well.

Specs:

  • Altera Cyclone II EP2C5T144C8
  • 50MHz clock
  • Schematic

Update (January 18, 2017):

I recently came across the Multicomp project by Grant Searle. In it he uses this development board and consequentially has a ton of really helpful information on the board and some of the things it’s capable of. The project is described by Hackaday as a ‘pick and mix retrocomputer’ which allows you to use the FPGA as a Z80, 6502, 6800 or whatever CPU mashup you feel inspired to. His project also describes in detail interfacing with various devices including SRAM, SD cards, VGA, composite video, PS/2, USB - basically I found the holy grail! Check out the project page to learn more about the board, and maybe even build a mix and match computer of your own.

Note: if you use this development board, make sure to desolder the four zero ohm resistors as explained in Grant’s project page.

A Screen for the Computer

I bought this Mcufriend touch screen. It’s the unbranded version of this one sold by Adafruit.

Front

Back

I got it for $10 compared to Adafruit’s price of $40. I came across the screen through this awesome video by Charles Cole where he walks through his FPGA implementation of a Z-Machine. I also bought the Altera mini dev board he recommends ($20 which is a steal) but that’s another post.

My gameplan is

  • To first get it working on Arduino (since there is information available online on how to do so).
  • Once it works on Arduino, convert the relevant files (driver, graphics) from C, Python, or whichever language is used to Hack Computer’s high level language.
  • Then change a few things here and there on the Hack Computer so that it outputs for the LCD screen instead of Tkinter.

Part 1) Getting the screen to work

Particles and SketchUp Shenanigans

Particles are cool! Example,

I had this idea back in 2014 of getting the points from premade 3D models (similar to the video above), and using them to do fancy animations in Threejs. Then I hit a knowledge wall and shelved it. Until today…

Nand to Tetris - Part 1 of 2

I finished the first half of the course.

And here’s a video of what my implementation looks like in action.

It can run programs! Albeit very slowly. The demo above is vastly sped up. In realtime, it took about 37 minutes to run.

The code for the emulator is on Github.

Project MViz - Update 4

I randomly came across this awesome project by makc. At first I thought it was a rendered photo of a model made by dedicated 3D software like Maya and Blender. But no, it was actually running live on the web using Three.js! Wow.

It is basically the explosion effect I’ve been after, whereby the whole country, not just a bar, extrudes outwards to indicate the value of a data point.

I had been working at this problem for sometime, but my results were rather unspectacular. Also my approach of using only the outlines of the countries meant I was limited in how the coutries could be rendered. Getting the countries’ surfaces would require using triangulation, a rabbit hole I wasn’t particularly keen on entering.

Learning Shaders

I came across this awesome tutorial series for learning shaders by Omar Shehata of Tuts+.

It is targeted at beginners and has lots of visuals! It also uses ShaderToy, which means you can work through the tutorial online without having to download or setup anything.

If you manage to get through the first bit, you will learn a lot about how photo and video editing software work!

Check it out!