3 ms·
Surely you could design one of your own? The complexity seems low enough for a hobby project, it's not like trying to recreate a IBM Z CPU.
by jhgb 4y ago
Surely you could design one of your own? The complexity seems low enough for a hobby project, it's not like trying to recreate a IBM Z CPU.
- krallja 4y agoYes, the original 6502 was laid out by hand on Mylar with pencils and X-acto knives by only a couple people. A motivated hobbyist could probably do it in a weekend in VHDL. The more interesting thing I think is that the existence of this official IP core implies that it is already out in production in millions of components, like the Tamagotchi[1] and Furby[2], presumably running at a very diverse array of clock frequencies. I wonder which product has the fastest WDC 6502? [1] https://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-reverse-engineering/ https://hackaday.com/2013/05/24/tamagotchi-rom-dump-and-reve... [2] https://official-furby.fandom.com/wiki/Furby_(1998)/Technical_information https://official-furby.fandom.com/wiki/Furby_(1998)/Technica...
- anonymousiam 4y agoYes, the complexity of the 6502 is low. In 1979 I took an "Introduction to Microprocessors" course (which had a bunch of digital design prerequisites). During one session, the instructor handed out 3x5 cards to the (25-30 or so) students. (Not all students got a card.) Each card represented some function or register of the 6502 that the student would emulate. The student who got the "bus" was the busiest and had to walk around moving data between the other students. The "clock" would send fetch/execute triggers, the instructions would come across the "bus" from memory into the "instruction decoder" and execution would commence. Obviously execution was slow, but it was a great exercise to show the class just how simple the 6502 was.
- krallja 4y agoWhat a fun paper computer! I wonder if those cards still exist somewhere.
- anonymousiam 4y agoGood question. You inspired me to see what I could find. The instructor was still associated with the college as of 2015, but he may have retired now. Google shows nothing associating him with 6502. I expect that the course curriculum has changed in the last 43+ years. A little cyber stalking shows that he sold his house in 2017: https://www.youtube.com/watch?v=inCBLQJja2U https://www.youtube.com/watch?v=inCBLQJja2U While thinking about him and the course, I remembered my final exam in that class, which I nearly failed. I had mastered the material maybe a little too well. The assignment was to program our KIM-1 (https://en.wikipedia.org/wiki/KIM-1 https://en.wikipedia.org/wiki/KIM-1) to drive a speaker with a 1KHz square wave on a PIO port (bit 0) when a switch was closed between ground and the same PIO bit 1. So obviously you had to set up the data direction register of the PIO with bit 0 as output and bit 1 as input, and have a loop that would toggle the bit 0 output every 500us if the PIO bit 1 input was at logic-0. Even back then, I liked to optimize my code, and the instructor did not give us detailed requirements about the state of PIO output bit 0 when PIO input bit 1 was logic-1, other than to say that the tone would not be present. So instead of reading PIO bit 1 in the loop and performing a compare to branch one way or the other, I simply inverted PIO input bit 1 and stored it into the data direction register for PIO bit 0 on every loop iteration. Thus the tone would be present when bit 1 was at ground, but not present otherwise (because bit 0 had been defined as an input rather than a output, and was in a high impedance state). The instructor looked at my code and gave me a "F". I had to confront him after the class and he grudgingly changed my final grade to a "C".
- krallja 4y agoI don’t see the problem with your code?