Live data from Hacker News

Cloning a 6502 Apple-1 in just 930 logic gates

obsolescenceguaranteed.blogspot.com

21–30 of 47 posts

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#21
post #15

Earlier quoted context omitted.

If you want to implement a complicated computer you have two choices: you can create a complicated logic circuit that does what you need (this is called "hardwired") or you can create a far simpler computer and program it to emulate the complicated one (this is called "microcode"). https://en.wikipedia.org/wiki/Microcode Since the simple computer will only ever run one program, the emulator for the complicated comput…

Thanks, I understand that microcode is one of two ways to implement the control unit on a CPU. My question was more of if a CPU only has "a spartan eight hardware instructions" and microcode is used to implement each of those eight hardware instructions how does that allow the ISA to be greater than the original eight instructions?

The microcode here consists of sequences of the eight low-level gigatron hardware instructions, which implement the richer 6502 ISA.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#22
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.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#23
post #2

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…

There is also a discrete-transistor version that runs much slower than the original 6502, but with the advantage of an LED on each signal, so you can watch it run.

https://m.youtube.com/watch?v=tQIwS2GzXLI

See also (not a 6502 though)

http://6502.org/users/dieter/mt15/mt15.htm

that approches half as fast as a real 6502.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#24
post #15

Earlier quoted context omitted.

If you want to implement a complicated computer you have two choices: you can create a complicated logic circuit that does what you need (this is called "hardwired") or you can create a far simpler computer and program it to emulate the complicated one (this is called "microcode"). https://en.wikipedia.org/wiki/Microcode Since the simple computer will only ever run one program, the emulator for the complicated comput…

Thanks, I understand that microcode is one of two ways to implement the control unit on a CPU. My question was more of if a CPU only has "a spartan eight hardware instructions" and microcode is used to implement each of those eight hardware instructions how does that allow the ISA to be greater than the original eight instructions?

The microcoded CPU is processing a richer virtual ISA. Have a look at SWEET16 for an analogous 16-bit virtual CPU on an 8-bit CPU: https://en.m.wikipedia.org/wiki/SWEET16

Edit: SWEET16 would run fine on this emulated 6502, too. Inception!

The Apollo guidance computer did something similar.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#25

Earlier quoted context omitted.

Thanks, I understand that microcode is one of two ways to implement the control unit on a CPU. My question was more of if a CPU only has "a spartan eight hardware instructions" and microcode is used to implement each of those eight hardware instructions how does that allow the ISA to be greater than the original eight instructions?

The microcoded CPU is processing a richer virtual ISA. Have a look at SWEET16 for an analogous 16-bit virtual CPU on an 8-bit CPU: https://en.m.wikipedia.org/wiki/SWEET16 Edit: SWEET16 would run fine on this emulated 6502, too. Inception! The Apollo guidance computer did something similar.

Very interesting link. I hadn't seen this before, this helps. Thanks.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#26
post #21

Earlier quoted context omitted.

Thanks, I understand that microcode is one of two ways to implement the control unit on a CPU. My question was more of if a CPU only has "a spartan eight hardware instructions" and microcode is used to implement each of those eight hardware instructions how does that allow the ISA to be greater than the original eight instructions?

The microcode here consists of sequences of the eight low-level gigatron hardware instructions, which implement the richer 6502 ISA.

Thanks for the insight. That makes sense. Cheers.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#27
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.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#28
post #22

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.

In fact you could poke around and get the line numbers in a different order and the program would still run properly.

That's why subroutines were put at the beginning of "efficient" code.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#29

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.

But they did build those systems. They were called minicomputers. They took up more room than a microcomputer and cost a bunch more money. Because building a system like this is expensive both in engineering and component costs.

Re: Cloning a 6502 Apple-1 in just 930 logic gates

#30
post #9
post #8

I wonder how big the difference is between current logic gate performance vs. what we have available when the 6502 was 'new'.

Not a lot really, as far as the 74xx series goes. 10ns gate delay for the original 74xx TTL chips, vs 6ns gate delay for the current CMOS 74HCxx chips. The reduced power consumption is a bigger benefit.

Is that due to both the chemical gate setup as well as node size?
Post reply on HN