An FPGA Based 6502 Computer

A diagram of the CHOCHI Board

It’s no secret that people love the 6502 processor. This historic processor powered some of our favorite devices, including the Apple II, the Commodore 64, and the NES. If you want to play with the 6502, but don’t want to bother with obtaining legacy chips, the CHOCHI board is for you.

While many people have built modern homebrew 6502 computers, the CHOCHI will be much easier for those looking to play with the architecture. It’s based on a Xilinx XC3S50 FPGA which comes preconfigured as a 6502 processor.

After powering on the board, you can load a variety of provided binaries onto it. This collection includes a BASIC interpreter and a Forth interpreter. Of course, you’re free to write your own applications in 6502 assembly, or compile C code for the device using the cc65 compiler.

If you get bored with the 6502 core, you can always grab Xilinx’s ISE WebPACK for free and use the board as a generic FPGA development tool. It comes with 128K of SRAM and 31 I/O pins. Not bad for a $30 board.

18 thoughts on “An FPGA Based 6502 Computer

      1. 3 reasons: I am trying to design the board for assembly
        - If I put components on the solder side, that basically means 2 passes on a pick & place/reflow process for a production run and would increase the production cost quite a bit.
        - There are through hole connectors, so the board might have to go through a wave soldering. (not sure if they can handle reflow temperature) Wave soldering would also mean a minimum component side and glue for the surface mount parts.
        - this is a double side board, vias has to go all the way to solder side, i.e. parasitic inductance would be much more than a multilayer board and larger packages will have larger parasitics which also diminish the effects of decoupling.

        FYI: There are 40 0402 caps around the peripheral of the FPGA on the component side. i.e. 1 per power pin. smallest package means smallest package parasitic. This has much more caps than your typical open source style FPGA board.

        Probably the best I can do for the FPGA under the circumstances.

  1. I never understood the popularity of the 6502. It is an unrelenting 8 bit machine. There is no way to index across 256 byte pages. Not enough registers. Now it certainly was easy to build into a system. But programming one left a lot to be desired.

    1. being limited creates challenges that many find quite fun. I myself enjoy sitting down and hammering out code for the NES in my spare time (and often wish it had decimal mode. hehe).

    2. spoken like a Z80 programmer!!

      The 6502 was the first RISC processor, 157 instructions, with 15 addressing modes

      I used to hear that “not enough registers” crap all the time!

      With page zero addressing you have 256 registers, which gives you some powerful addressing modes that no other processor had.

      Indexed indirect and indirect indexed made records (structs) easy, same with look up tables and arrays.

      Every time I had to work with a Z80 or 8080 it was a chore and wondered how in hell I was going to get the job done

    3. The 6502 has a few distinct advantages which are commonly overlooked. The zero page was what made up for the lack of registers; 256 bytes which could be accessed a full cycle faster than higher addressed memory. My bias is you can pack a bunch of stuff into Z80 registers, but you can pack even more into the 6502 zero page “registers.”
      As for “you can’t index across 256 byte pages,” the small technical hurdles that the 6502 lacked in was a *specific* set of challenges that could be stepped around.

      The amount of 6502 code base is amazing, and the amount of 6502 code masterpieces is awe inspiring.

    4. I think that Enso (Chochi’s designer) said it best:
      “Working with it requires a minimal mindset that retrocomputing fans are familiar with and the rest of the world finds confusing.”

      Programming a 6502 in assembly is not for everyone, but I find its limitations to be endearing, and the methods needed to successfully overcome these limitations extremely satisfying.. It was the first assembly language that I learned, before 8008, 6800, 6809, Z80, 68000, pdp-8, pdp-11, and IBM-360, and is still easily my favorite, with 6809 a distant second.

      Mike

  2. The 65816 (basically a 6502 with some 16 bit stuff glued on to give it more address space) was an interesting CPU to write code for I tell you (at least that’s what I remember from my days of writing SNES ASM hacks)

  3. Loved the good old 6502 buy with an FPGA why not be bold? Why not a VAX, 370, 680xx, or a Cray for your embedded processor?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s