Dis-Integrated 6502 Running Programs; Acting Like Computer

[Eric Schlaepfer] tends to turn up to Maker Faire with projects you simply don’t want to miss. This year is no different. Twelve months ago we delighted in seeing his 6502 processor built from an enormous reel of discrete MOSFETs. At the time it was freshly built and running random code to happily blink the LEDs reflecting activity in the registers. This year he’s given that blinking meaning and is running real programs on his Monster 6502 processor.

A processor isn’t a computer until the peripherals are built up around it. He’s done that with a new board called the MIM-1 for Monster Interface Module. It includes a keypad for input and six 7-segment displays for immediate output. This gives the user direct control over the processor to peek and poke at registers, set breakpoints, and manage the operation of the processor. It also brings audio connectivity, VGA, and PS/2 keyboard connectivity so that the user can interact with code running on the 6502 using a screen and a keyboard.

There is even a Y-modem protocol built into the MIM-1 that allows you to save and load programs. This is satisfyingly shown off in the video when [Eric] loads up a game he wrote himself. The audio and video hit your right away — it turns out that [Eric’s] brother is a pixel artist and was happy to jump in and help out with the project. But don’t be fooled by the cheap trick of running a game… the real mastery her is first in the Monster 6502 itself, and second in the MIM-1 board which emulates all of the computer peripherals around it by using an STM32. This is truly spectacular work.

Keep your eye on the Monster 6502 page as we suspect [Eric] will document the MIM-1 once the excitement of BAMF is past.

31 thoughts on “Dis-Integrated 6502 Running Programs; Acting Like Computer

  1. “Twelve months ago we delighted in seeing his 6502 processor built from an enormous reel of discrete MOSFETs.”

    That’s some old skool stuff right there. Just one level above building one’s own FETs.

    1. It’s entirely in the realm of possibility to use chemicals, metal solder paste stencils and a UV light to make a large 6502 out of a full silicon wafer. With minor modification you could even add a bunch of LEDs to indicate values.

      1. But you forgot to mention the need to get the doping chemicals to diffuse dopant into the wafer, not to mention the need for oxide growths. These require equipment… accurate equipment. starting with the lithography, moving to the diffusion/implant, and including oxide growth, steam ox, and dry o2 ox. Yes, it can be done in a LARGE garage… with a LARGE budget… not something in the realm of possibility for most people. It’s simply not enough to dump some chemicals on a wafer, and expect it to be doped. The dopant must be introduced to the Si lattice, then activated. Activation occurs only at ~1000 degrees C. Not to mention that the dopant must first be introduced into the lattice as interstitials, also not easy.

      2. Addendum. Have you considered the clean room requirements? Also the toxic chems needed during photomask removal and oxide etching? These chems need special attention, meaning more equipment. You can’t sling HF around willy nilly.

  2. I wonder how hard it would be to build a discrete transistor version of a 6532 RIOT and an Atari TIA and produce a full discrete transistor version of the Atari 2600 that could run 2600 games?

    1. If you’re aiming for a complete Atari, I wouldn’t bother, as it wouldn’t have worked.
      If you would have read the link, you would have seen that this board runs only at 60KHz vs ~1MHz for a real 6502 due to the NMOS capacitance. You cannot drop this board into a real working 6502-based computer and expect it to work as-is, even with an original machine.

          1. The original 6502 used depletion mode MOSFETs and this unit is using enhancement mode MOSFETs and that accounts for *most* of the speed difference. Even if he used depletion mode MOSFETs then it still probably wouldn’t reach the speed of the original chip simply because of it size and the signal path lengths.

            Gate capacitance is less of a problem with depletion mode MOSFETs because you *drive* the gate *OFF* and this drains the capacitance.

          2. The original 6502 used NMOS technology. This consists of enhancement and depletion MOSFETs, but normally the depletion mode FETs are not driven at all in NMOS circuits, they just act as drain resistor (pull up), their gates are shorted to the source. On a silicon chip its easier and more space and power efficient to use the dep. FETs than to make resistors.
            It is possible that they used some other special circuits with the dep. FETs, but the speed limit lies in the size and the huge capacitance of the discreet FETs. These are huge and powerful compared with integrated FETs in chips. The FETs of the internal logic are usually much smaller (I estimate good for something like 0,2mA) than the IO FETs and even these are only designed for something like 20mA compared to the discreet which are probably something like 2N7002, good for 200mA.

  3. Ugh, HaD, you buried the lede here. What’s the graphics hardware running that game he wrote? No way that a 6502 made of discrete components (with a clock measured in kilohertz) is pushing those pixels at VGA resolution by itself. Did he make a little sprite engine on the MIM board?

    1. Was thinking the same thing, even with the extra hardware doing all the work it’d surely take ages for the system to load the sprites into the vram?

      Interested to see some documentation of how it works, at the moment I’m still banging rocks together like a caveman with 80×25 B/W Text only

    2. If you look closely at the MIM quick reference, there is a sprite engine of some sort on there that supports 8×8 and 16×16 sprites, over an 80×25 tiled background.j

    1. That’s not without challenges. The Apple ][ interleaves video fetches tightly with CPU bus phases, and so is very tightly coupled to the CPU frequency.

      You would need an adaptor circuit (a synchronizer circuit, basically) to proxy bus accesses between the 1MHz domain and the variable-speed MOnSter6502 domain, and to provide the necessary timing signals in both directions.

      The MOnSter6502 FAQ actually addresses this:

      “Can you hook it up inside an Apple ][ and run Oregon Trail?

      No, not directly. It’s neat to think of plugging the MOnSter 6502’s [s]in-circuit emulator (ICE)[/s] in-circuit replica (ICR) cable directly into a socket inside an Apple ][, but that wouldn’t actually work. The Apple ][ design relies on a number of clever tricks that derive timing for video generation and peripheral control from the main clock signal — all of which will fail if you need to run at a slower speed.

      There are some ways to get around limitations like these. For example, the Replica I computer (an Apple I clone) uses a Parallax Propeller chip to emulate a system clock and some of the timing-dependent external processing.”

    2. Oh, and then there’s the floppy drive as well. It requires exact cycle timing for its loops.

      But, presuming you could solve those issues, it’d be pretty cool.

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