from Hacker News

Cloning a 6502 Apple-1 in just 930 logic gates

by gioele on 5/10/20, 11:22 AM with 45 comments

  • by tyingq on 5/10/20, 1:29 PM

    The C74-6502 is somewhat similar. A 6502 built using 74xx chips, that runs 20x faster than the 6502 (20Mhz vs 1MHz).

    And correct enough that he drops it into both a VIC20, and a C64, and it works.

    https://c74project.com/

    About ~130 74xx chips vs the Gigatron's 33, and SMT instead of through-hole.

    Edit: A link to an old school web-ring of other homebrew (mostly) ttl logic CPUs: https://www.homebrewcpuring.org/ringhome.html

  • by jhbadger on 5/10/20, 2:16 PM

    "It needs just 930 logic gates (packed into 33 standard 7400-series ICs) to create a computer that beat 'complex' 1980s home computers like the VIC-20 in terms of both CPU power and graphics."

    Given that 7400 chips existed at the time, why did no contemporary microcomputer go this route? Would it just have been cost prohibitive?

  • by peter_d_sherman on 5/11/20, 2:29 AM

    >"Turning 930 logic gates into a working 6502 Apple-1 clone? Like the venerable IBM 360/30, the Gigatron uses a form of microcode to elevate its spartan eight hardware instructions into a comfortable instruction set you can live with. Like the 8-bit IBM 360/30 CPU, the Gigatron normally pretends to be a 16-bitter using its microcoded instruction set. Unlike the IBM, though, the Gigatron's instruction set is not compatible with anything else.

    Which sparked a discussion: could the microcode also contain a 6502 compatible instruction set? That would prove that a 6502 compatible system could be done with much, much less hardware, even back in the 70s.

    Short answer: yes. In fact, you can make it into an entire Apple-1 clone without the use of a 6502.

    [...]

    Marcel wrote the Gigatron's 6502 microcode quickly (no bugs detected so far) but wrapping the Apple-1 around it took about a year. The machine has become dual-core: you either use its colourful native vCPU microcode to embarrass 1980s home computers, or you boot it into 6502/Apple-1 mode to demonstrate how a compatible Apple-1 including all its display hardware can be done in only 930 logic gates. Hmm!

    The 6502 microcode takes up about 1K of ROM cells, and could fit inside a fast late-70s ROM. But the Gigatron cheats a bit by using a biggish 128K EPROM from the 1980s. That leaves enough space to tuck in the 6502/Apple-1 microcode next to all the other features of the latest Gigatron v5a ROM."

  • by bogomipz on 5/10/20, 3:47 PM

    >"Like the venerable IBM 360/30, the Gigatron uses a form of microcode to elevate its spartan eight hardware instructions into a comfortable instruction set you can live with. Like the 8-bit IBM 360/30 CPU, the Gigatron normally pretends to be a 16-bitter using its microcoded instruction set."

    Could someone elaborate on how exactly the IBM 360/3 and Gigatron "elevate" their eight hardware instructions into a larger ISA via microcode?

  • by fortran77 on 5/10/20, 9:23 PM

    What's fascinating about this is that the home computer "revolution" could have started a few years sooner had people just realized they could make a CPU out of 33 74xxx series IC chips. These were relatively low cost by the early to mid 70s. It took a generation of skill to go back and see what could be done with just these logic building blocks.
  • by oneplane on 5/10/20, 2:58 PM

    I wonder how big the difference is between current logic gate performance vs. what we have available when the 6502 was 'new'.
  • by Koshkin on 5/10/20, 2:09 PM

    TL;DR: this is a very simple computer running an emulator. Cool project! (The approach is similar to the way many of FPGA applications are done these days.)
  • by ncmncm on 5/10/20, 7:49 PM

    I still recall the shock discovering that Micro-soft BASIC in the Apple ][ did a linear search for the line number from, the beginning of the program, on each GOTO or GOSUB. It would have been super-easy to memoize the search result at the branch site, but Bill couldn't be bothered.