Page 8 of 13

Re: Building a simple 6502 microcomputer

Posted: Wed Oct 10, 2012 7:24 pm
by GARTHWILSON
alkopop79 wrote:
Still a bit off topic but I remember someone mentioning a book about CPUs and how to build them. Since I'm skint and have no money to buy the parts (although Dajgoro kindly offered me his ICs for free!), I started messing with Logisim and decided to build a simple CPU. Had some success but it's still hard to figure out where to start and what makes a processor. Someone recommended a book but I can't remember where....
About book on microprocessor design: viewtopic.php?f=1&t=1419&start=51 (remove the "&start=51" to get to the beginning of the topic)

I also have some related links on my links page at http://wilsonminesco.com/links.html, near the top.

Re: Building a simple 6502 microcomputer

Posted: Wed Oct 10, 2012 8:11 pm
by alkopop79
Thank you gents!

Re: Building a simple 6502 microcomputer

Posted: Wed Oct 10, 2012 11:02 pm
by alkopop79
Apparently people build CPUs in Minecraft. I don't get it. It's just getting more confusing and may I add, Minecraft pops up everywhere when people talk about their projects. Is that some IT people thing that common people are not supposed to understand? Again, what does a game has to do with CPUs?

Re: Building a simple 6502 microcomputer

Posted: Thu Oct 11, 2012 3:43 am
by whartung
Minecraft has nothing to do with CPUs. Rather it's a game/sand box that lets players build things. Through happenstance, some of the components in the game lets you build simple gates, and from there folks have built CPUs and others bits of logic.

It's a basically painstaking and arduous process, but much of it can be automated. What you end up with is a novelty, a "CPU", a very slow CPU, made of rocks and torches.

Later, someone made an add-on to the game that contained an embedded CPU simulator (it may well have been a 6502), and on that simulator they implemented a Fig-Forth, as well as modules for more storage and such. Again, it's a novelty, but many geeks have latched on to toy with this. It's a novelty like the Tinker Toy Computer.

In a similar vein, there was an article recently that shows how the card game, Magic the Gathering, can be Turing Complete. Amusing but, again, novelty.

Finally, the author of Minecraft has mentioned that his next game, which may be a space ship game, will include a programmable computer. It will have it's own built in CPU simulator with which you can do things.

Re: Building a simple 6502 microcomputer

Posted: Thu Oct 11, 2012 10:03 am
by alkopop79
Thank you whartung, now it makes sense. Sounds amazing!

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 11:16 am
by alkopop79
Dajgoro was so kind he offered his components for me. His stuff is NMOS on the other hand and wonder if it makes any difference in the design (other than the power consumption and the speed)? I want to build Daryl's SBC-2 or the UK101. Any modification needed for those circuitries to work with NMOS parts?

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 12:04 pm
by Dajgoro
alkopop79 wrote:
Dajgoro was so kind he offered his components for me. His stuff is NMOS on the other hand and wonder if it makes any difference in the design (other than the power consumption and the speed)? I want to build Daryl's SBC-2 or the UK101. Any modification needed for those circuitries to work with NMOS parts?
Thanks to BitWise for sending them to me in the first place.
The 650c02 has some extra pins that on the NMOS are no connection, so you shouldn't have any issues with the NMOS (at least i didn't have). But design the board so that you can swap it with a 65c02 when you decide to buy it.

Btw. Check that topic unused stuff circle that i opened in the hardware section, and post which components would you like to have from the list.

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 12:13 pm
by PaulF
You should have no difficulties using an NMOS 6502 in place of a CMOS 65C02. They are pin compatible and need no circuit changes when switching between them. On one system, I tested it with NMOS 6502s (because I had a stack of them) and once I knew it was working and I wouldn't blow up the CPU, I put in my only available CMOS 65C02. The system worked equally well with either device.

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 12:16 pm
by alkopop79
Great! Thank you!

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 12:26 pm
by alkopop79
"Shift to the left,
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!"

Brilliant, Paul :D

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 12:34 pm
by 8BIT
alkopop79 wrote:
Dajgoro was so kind he offered his components for me. His stuff is NMOS on the other hand and wonder if it makes any difference in the design (other than the power consumption and the speed)? I want to build Daryl's SBC-2 or the UK101. Any modification needed for those circuitries to work with NMOS parts?
Only thing to watch for is Pin 1. On the NMOS chips, it is Ground. On some CMOS chips (WDC for sure), it is an output. I made provisions on my SBC-2 board to handle both. To ground it, you add a strap just to the left of the TTL Oscillator. Otherwise, it is not connected.

Daryl

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 4:50 pm
by GARTHWILSON
There are quite a few differences, and Daryl's idea to make the board handle either one is a good one. In addition to the lower power and higher speeds you mention, the CMOS one has:
  • more instructions
  • more addressing modes
  • stronger bus drivers
  • all bugs removed, JMP(xxFF) being a major one in the NMOS
  • allows the clock to be stopped (unlike the NMOS which would lose data if you dipped much below 100kHz)
  • does not require external active components for the clock like the NMOS did
  • vector-pull output pin (on WDC's), pin 1 on the DIP
  • bus-enable input pin (on WDC's), pin 36 on the DIP
  • memory-lock output (on WDC's), pin 5 on the DIP
  • RDY pin allows halting even on write cycles (NMOS halted only on read). Also, CMOS pulls RDY low during a WAIt instruction.
  • RST\ is a schmitt-trigger input on Rockwell's (which simplifies the reset circuit) but I don't know if it is on WDC's.
There are others, and probably some of these won't be important to you (for example the memory-lock output may be used to ensure the integrity of Read-Modify-Write instructions in a multiprocessor system, something I've never used); but several of the points above will make you not want to ever go back to the NMOS after you've used the CMOS.


Edit: I should also mention that a nice thing about WDC's 65c22 (the VIA, not the processor) is that the I/O pins, when in input mode, present only a CMOS load, not the heavy LSTTL load that even other brands of CMOS 6522 present. The heavier LSTTL-simulating load of the Rockwell 65c22 was a problem for a few of my applications.

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 5:01 pm
by alkopop79
So I guess if I just purchase CMOS 6502, it should be all fine. Thank you!

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 5:08 pm
by BitWise
alkopop79 wrote:
So I guess if I just purchase CMOS 6502, it should be all fine. Thank you!
I have quite a few more CMOS 6502s, 32K RAM chips, CMOS 6522s and 4K EEPROMs

Re: Building a simple 6502 microcomputer

Posted: Fri Oct 12, 2012 5:12 pm
by BitWise
BitWise wrote:
alkopop79 wrote:
So I guess if I just purchase CMOS 6502, it should be all fine. Thank you!
I have quite a few more CMOS 6502s, 32K RAM chips, CMOS 6522s and 4K EEPROMs
Also ATF1504AS, ATF16V8 and ATF20V10 PLDs. Even have some 6551 UART chips.