Cloning a 6502 Apple-1 in just 930 logic gates
31–40 of 47 posts
Re: Cloning a 6502 Apple-1 in just 930 logic gates
#32I 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.
This changes my understanding of the semantics of basic immensely.
Re: Cloning a 6502 Apple-1 in just 930 logic gates
#33Earlier quoted context omitted.
The simplicity of Gigatron is compensated by the large memory that was extremely expensive.
This is a much more profound insight than is readily apparent. It is really easy to build a Turing machine -- except for the tape. You could probably build a universal TM is a lot less than 930 gates. All hardware design is essentially nothing more than taking common design patterns and moving off the tape and into the engine so that the tape can be more compact and the machine can run faster. This is the main reason…
Re: Cloning a 6502 Apple-1 in just 930 logic gates
#34I 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
#35I 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.
1) it ran in under 4K bytes of memory on an Altair 8800. That means less than 4,096 bytes of memory. Not 4,096 Kilobytes or Megabytes. 4,096 bytes.
2) An enhanced version ran in under 8K bytes of memory. Less than 8,192 bytes. Let me repeat: less than 8,192 bytes.
When you're fitting an entire BASIC interpreter in 8,192 bytes, you're not spending a lot of effort to memoize a search result.
Bill had a lot on his plate at the time. The software started out on the Altair, but all sorts of manufacturers were soon beating the door down begging for versions for the Commodore PET, the Atari, and countless other computers.
Re: Cloning a 6502 Apple-1 in just 930 logic gates
#36Earlier quoted context omitted.
This is a much more profound insight than is readily apparent. It is really easy to build a Turing machine -- except for the tape. You could probably build a universal TM is a lot less than 930 gates. All hardware design is essentially nothing more than taking common design patterns and moving off the tape and into the engine so that the tape can be more compact and the machine can run faster. This is the main reason…
74 series gate golf to get the most compact hardware brainfuck implementation: http://grapsus.net/74/
Re: Cloning a 6502 Apple-1 in just 930 logic gates
#37I 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.
Sneer all you want, Microsoft Basic was a reasonable achievement considering that: 1) it ran in under 4K bytes of memory on an Altair 8800. That means less than 4,096 bytes of memory. Not 4,096 Kilobytes or Megabytes. 4,096 bytes. 2) An enhanced version ran in under 8K bytes of memory. Less than 8,192 bytes. Let me repeat: less than 8,192 bytes. When you're fitting an entire BASIC interpreter in 8,192 bytes, you're n…
"Tiny BASIC was published openly and later invented the term "copyleft" to describe this. This made it popular in the burgeoning early microcomputer market."
Re: Cloning a 6502 Apple-1 in just 930 logic gates
#38Which 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."
Re: Cloning a 6502 Apple-1 in just 930 logic gates
#39What'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
#40Earlier quoted context omitted.
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.
For example, one thing about the Gigatron is that it uses static RAM. Static RAM is fast, but expensive, and back in the early 80s even dynamic RAM was dear, and static RAM was several times more expensive than that. All the early 8080 and 6502 computers were using dynamic RAM. With static RAM, and fetching instructions out of ROM, and using a 74 series that wasn't available at the time, the Gigatron benefits from mo…