6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 10:33 pm

All times are UTC




Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Mon Oct 12, 2015 7:31 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Hey, I am super-new to the 6502, or computer coding in general. Thankfully I am a scientist and I pay attention to history and inventions. I have the old "Programming the 6502" Rodnay Zaks book and while I studied x86 assembler for about two weeks, and 6502 op codes on and off for about a month, I have just obtained a rudimentary grasp of the addressing modes (i.e. stuff embedded inside the op codes that point to the data location/type). So, needless to say, I am psyched. I am not sure I am ready for a hardware project just yet, but finding you guys... and the other resources you provide and point to... is awesome. Just what I need to inspire me to design my own system. Let me tell you what I'm looking for; sufficiently low tech stuff to interface with the 6502; voice synthesizers (preferably 80's style!), RAM chips (simplest possible; authentic to history would be nice too!). However, I understand I don't have a "vintage" chip. Maybe I could hack an old nintendo? naaahhhh! I like nintendo games too much to do that. I have a 65816 chip (WDC), but it's probably all different logic levels now? Way beyond TTL systems now? HC-CMOS, right? or more and bigger/better? I am afraid I have no grasp of what electronics has done in the past 20 years. Too much proprietary crud gets in the way, I think. If electronics was impenetrable before, think about it now! ICs at the 10's of nanometer node! When will these atoms get all leaky on us? Who is to say; could be any day now! But I have digressed from the main. What is a good, basic, 64kB "starter" RAM chip? I am not averse to yard sale/flea market "hunting and hacking". I am still stupid about I/O methods, chips, and etc. I figure I can "Cro Magnon" a solution, if I have to step by step, machine code with LEDs and jumper wires. (Please, no SMTs! Argggh my soldering skills are horrendous!). Any comments you have are welcome, of course!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 12, 2015 9:17 pm 
Offline
User avatar

Joined: Fri Oct 31, 2003 10:00 pm
Posts: 200
ebay wil help you to get the ic's you want! chinese sellers like utsource are quite reliable.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 12, 2015 9:38 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8513
Location: Midwestern USA
randallmeyer2000 wrote:
Hey, I am super-new to the 6502, or computer coding in general.

Welcome to our little 6502 world, where rainbows and unicorns abound, and we make 40 year old technology seem like it's brand new. :lol:

Quote:
Thankfully I am a scientist and I pay attention to history and inventions. I have the old "Programming the 6502" Rodnay Zaks book and while I studied x86 assembler for about two weeks, and 6502 op codes on and off for about a month, I have just obtained a rudimentary grasp of the addressing modes (i.e. stuff embedded inside the op codes that point to the data location/type).

You should download and peruse a copy of the official Western Design Center programming manual, which covers 6502 assembly language programming from start to finish. Also, be sure to stop by WDC's site for data sheets, which will be essential when you get to the point of designing your own 6502 contraption.

Quote:
I have a 65816 chip (WDC), but it's probably all different logic levels now?

The 65C816 has always been CMOS, as is its eight bit counterpart, the 65C02. We generally recommend that you do not use the NMOS 6502 in a new design, unless you are trying to re-create the technology of the 1970s. The CMOS versions perform much better, are less susceptible to circuit noise and don't have the design bugs that are present in the NMOS 6502.

Quote:
What is a good, basic, 64kB "starter" RAM chip? I am not averse to yard sale/flea market "hunting and hacking".

May I suggest that before you start looking for parts sources that you give some thought to what you'd like to build? A first-time machine can be very simple, using a 65C02 or 65C816, a 32K RAM, some ROM and at least a 65C22 VIA for I/O. You want to start off as simple as possible until you get enough hardware experience to be able to troubleshoot and resolve circuit faults or design errors.

Your best bet for parts depends on where in the world you are located.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 12, 2015 10:12 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Make sure you go through the 6502 primer at http://wilsonminesco.com/6502primer/ which covers many aspects of building your own computer. In spite of the many chapters, it really is a primer for the 6502 beginner, not a dissertation on loftier subjects like cache and memory management, object-oriented programming, etc.. I second BDD's motion that you download and use the programming manual available online for free. It's excellent.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 8:24 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Welcome indeed! Rodnay Zaks was one of the first books I used too. Garth's primer is well worth reading - for a more direct entry into a minimal project try Grant Searle's pages.

Try also the short online hands-on intro Easy 6502 by Nick Morgan. It's a good place to try out short program fragments too.

Have a good explore of this site too - perhaps especially the Tutorials and Primers page.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 4:35 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Whoa! You guys are fast! This is both good and bad. (1) It will keep me on task. (2) When I run out of funds (as I always do) I will be embarrassed and run away from your "over-achieving-slacker-hackers" web-chat. OK, at least I know my own proclivities! I'll try to do the former, not the latter. Thanks Big Ed. If I can keep the past two weeks momentum (between books, and your website, and other 6502/tech websites) I will certainly check out every link that can make my WDC 65816 do magical stuff. (I realize I misspoke/typed in yesterdays post; I know a little bit about TTL chips and 7400 series and the CMOS replacements (5500 series, I think?) and then the high speed CMOS and stuff, but mostly from a "book" perspective; you know, like "history" type stuff. "Hands-on", "hardware-hack" or "hardware design" is something that eludes me! I did read some of a digital design book (Verilog? VHDL, Hardware description language) and some of Barry Brey's circa 2001 "Intel Microprocessors x86 and Pentiums II and II" book, Forrest Mimms radio shack "handy manuals", and "sensor and solar projects ---I don't remember any of the real titles to these books--and two radio shack primers; one on digital circuits, the other on analog. So I have a good intellectual foundation. Timing diagrams will be tricky, and my Oscilloscope is a dinosaur, but a handy dandy Hewlett Packard dinosaur. kind of like this one, only for one third the price, cuz the guy was retiring and "winnebago-izing" his life. 25 mHz bandwidth--low for modern circuits, but appropriate for 6502 projects, I think?! Back, oh about, circa 2004 or 2005, I tried to make the forest mimms radios shack computer with just TTL chips and a 74181ALU (?is that the part #?), but I think it glitched and I gave up. Also, I didn't have an oscilloscope, or much clue how to use one, so that could be the problem. Maybe it was my 555 circuit? Did I make it a one shot/monostable or an astable multivibrator? I am babbling, aren't I? I've digressed; back to the main!). BDD and Garth; I dl-ed the manual (s) last night, after posting here. I bought the 65816 about 5 years ago, and dl-ed and printed (partially! big manual!) the manual then too. Hey, here's a dumb question, froma lowly biologist. I had the chip in my backpack for about a week. I walk alot, and occasionally pick up trash from the flotsam and jetsam of our throw-away society, and I picked up a speaker one day. Completely forgot, and placed large magnets in the pack. Now walked around with both in pack for like a week (too stupid to realize that stuff is heavy?!). Is this bad? More to the point, mightn't the jostling of the magnet create a fluctuating magnetic field that, in turn, could induce electrons to flow in wires? Mightn't too much electron flow burn the baby-wires of an IC? Just my obsessive compulsive scientist mind at work ... I wish I obsessed BEFORE I made the mistake! But I digress, again. BDD: Count me in for rainbows and unicorns. Now, I made a quick search for voice/speech synthesizers and 6502 projects on yahoo last night and found two links (but it was late at night and I lost them. I will re-find them today, I think...). Any of you ever make your chip talk? Or, if not the 6502, other talking chips from you guys? BDD, I know exactly what I want to build, but you guys will call me nuts if I say it out loud, so I keep that to myself for now. Just know that I am a fast learner and I will stress the system to its limits. I had already planned to buy the VIA or some I/O device, but don't REALLY know what they do. I will read more, and buy the cheap one from WDC, just to have it on hand for when I figure out what to do with it. I am still learning about addressing modes, and memory-map areas, i.e. standards and conventions and/or stack areas, ROMS etc. So, BDD, you say 32kRAM? Is this because the 64K locations mappable by the 6502/65816-board (i.e. system) might want to keep some in reserve for ROM and PIA/VIA/I-O etc.? Seems reasonable, I guess. but I will buy two 32k, so as to not limit my system. Hey, that brings up a subject I haven't thought about in a while. Weight of the copper? Double sided board? I will give that some serious thought too. I noted an oscillator can is recommended (though I hope to "play with X-tals" at some point, too!), and I suppose geometry and thickness of copper might depend upon clocking speed for the "most driven" of the bus lines (If I recall, they can tend to act like antennae, in a high speed digital circuit). I suppose 1 MHz isn't too bad? I know 1 to 10 MHz starts to make pluggable breadboards go glitchy (maybe? Also why my 74181ALU project went bust? I forget if I one-stepped it or not?)? I think? Hey, one more question guys, but I will put it in a separate post, below this one (or above; or wherever the posting program places it!). Thanks a million. I will read more, and post less; and ultimately, I will solder more and post less, and test twice as much as both put together. That's the plan, at least!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 4:37 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
kind of like this one http://www.ebay.com/itm/This-is-working ... 51ac4bbd66 i.e. the HP 1222a Oscilloscope.... i typo-ed above, by neglecting to paste the link


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 4:42 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Don't worry about magnets: they don't harm chips. But static electricity is bad - take precautions, especially if you often get shocks from things.


Top
 Profile  
Reply with quote  
 Post subject: Bored Games
PostPosted: Tue Oct 13, 2015 4:52 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
So, if--hypothetically speaking--you were to make a board game, the purpose of which was to teach children and/or young adults and/or non-techies, the function of a 6502--or for that matter, any microprocessor--what would it look like? What features would you include? What would be the "essential" op-codes, without which the "board-game ALU" would not function. I picked about 20 Op-codes from the Zaks book (i.e. transfers, branches, clears, loads, ADC, SBC, JMP, shifts, etc) and will make cards, picked up like "community chest" or "chance" in a monopoly game, or maybe one with each roll, so that simple add, subtract, multiply and divide programs can be practiced by unsuspecting, bored, precocious children, and their over-achieving, helicopter parents. I might even make a board with some toggle switches and LEDs, and give each player their own stack--where they can push the numbers from a random number generator--for later use. Each player borrows the ALU for their turn and takes their data back to the stack, or RAM with them (I think Push and Pop instructions will be free to use, at any time during a player's turn, even without a card/machine code). It is a rough idea, and I have worked out much more, but what do you think? Maybe I should try to make an x86 version, too, but I think my first love is the 6502---even though I know bup-kiss about actually using or making anything with it! Have you guys ever heard of a game that was "monopoly-like" but teaches Assembly/machine code? How about video games like this? (You would think the latter would be obvious enough to some computer programmer, somewhere??!!!).


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 5:17 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
You might like to check out Computer Science Unplugged, which has materials for teaching Computational Thinking without computers.

You might also look into Bell Labs' CARDIAC computer - a paper machine. It turns out that very little by way of instructions and registers still allows some interesting problem solving.

Another very small machine is this build of a scaled down Manchester Baby - with simulator and example programs!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 5:50 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Thanks BigEd. Any good reason magnets aren't bad? I forget if any ole conductor (Al? Cu? Au? Ag?) will do (Lenz's law? Or Oersted? Who said stationary wire and moving magnetic field generates moving charges? Lenz, I think? Oersted said putting a compass near a current flowing through a wire is bad for finding true North; Oersted's was a revelation for 1820-ish times. Common wisdom--so often the "true north" of humanity (sarcasm)--said that Oersted shouldn't have witnessed that, but sure enough the stupid compass, and wires, and electrons did what they did, and theories were adjusted, not facts.). Really "Old-school" stuff was that guy William Gilbert. Can you imagine; "Garlic does not affect the compass!". He proved it with science, circa 1600! Anyhoo, maybe the ceramic case is impermeable (I forget my terminology for magnets; remnance, permeability of free space, permittivity of free space, etc.)? Maybe plastic cases too? Or maybe the generated amperage is too small to effect it? Maybe the wires are so small they don't have enough electrons to make a big enough flow to fry them? I don't know. Good to know the rule (or rule of thumb) thanks! I am pretty good about using my static mat and grounding myself. TTL's more tolerant, so I've read, but CMOS is less so. Also, thanks for the links regarding computer-computer games (bored games!). I think I might buy the following (TMS5110AN2L); I found an old gift-card in my wallet with $3.87; but shipping and handling has me turning the couch cushions for the the extra $3.08! Hahahaha! (TMS5110AN2L Speech Synthesizer 3 / $1.00 + $5.95 S + H) (stupid ebay won't even accept my pennies, even if I find them. So much for "this instrument is legal tender for all debts public and private"... I guess a seller can charge what he likes, but "your first born son" is not a pricetag that anybody likes to see! Another giftcard will cost me another $5.95 just to use the visa name! Gougers!). I know, I should be looking for RAM and studying RAM, and studying 6502 some more, but a cheap speech chip, in my pocket or in the mail on the way to my pocket, might induce me to study speech chips too!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 6:17 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
nope; 4000 series = CMOS; 5500 series is a fantasy my mind created. But you guys knew that, because I'm the noob.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 7:13 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8513
Location: Midwestern USA
randallmeyer2000 wrote:
nope; 4000 series = CMOS; 5500 series is a fantasy my mind created. But you guys knew that, because I'm the noob.

The current logic offerings include:

  • 74LS — TTL input and output levels, best used only with NMOS parts in recreating a 1970s-era design, or for repair purposes.

  • 74HC — CMOS input and output levels, performance comparable to 74LS, best used with clock speeds at or below 8 MHz.

  • 74HCT — Like 74HC, but with TTL-compatible inputs.

  • 74AC — CMOS input and output levels, high performance that is two to four times better than 74HC, with stronger output drive.

  • 74ACT — Like 74AC, but with TTL-compatible inputs.

  • 74ABT — TTL input and output levels, very high performance and very strong output drive.

There are some other logic families that could be used, but the above are the ones that are most readily available and most adaptable to hobby use. The 4000 series should not be used for computer purposes due to mediocre performance.

In general, CMOS outputs are required to drive CMOS inputs, and may also drive TTL inputs. TTL outputs may not be able to successfully drive CMOS inputs, which is why the 74ACT and 74HCT devices were developed. Note that unless you need to interface a TTL output to a CMOS input there is no good reason to use 74ACT or 74HC—you'll pay a small penalty in performance.

The use of 74ABT in a beginner's project is not recommended, as these devices feature exceptionally fast output switching speeds that are likely to cause problems with ringing that a beginner may not be able to resolve. For the same reason, caution is required with 74AC logic, although a well-constructed unit should be fine.

For a first-time effort, I recommend that you build with 74HC, since it will be more forgiving of less-than-meticulous construction.

randallmeyer2000 wrote:
So, BDD, you say 32kRAM?

That would be a good start. Despite having a 16 bit address bus, a 65C02 system consisting entirely of RAM isn't very practical. Using a 32K static RAM, you can use simple logic to decode RAM, ROM and I/O. One or two 65C22 VIAs would give you plenty of I/O. Garth covers much of that in his 6502 primer. If you decided you want some TIA-232 (aka RS-232) connectivity you could use a 65C51 UART. Be aware, however, that the WDC version has a defect that affects the transmitter.

Speaking of RAM sizing, you'd be amazed how much 6502 code and data can be stuffed into 32K. My POC unit has 52K of exposed RAM and even after consumption of some of it for the hardware stack and BIOS usage, there is still some 50K that is available. I've yet to use more than about 15 percent of it at any one time.

While on the subject of parts to be included in your computer, I routinely caution anyone who is making a first-time effort to build a 65C02 contraption to learn how to fly a Piper Cub before venturing into the cockpit of a 747. In other words, be conservative with your design, as excessive/creeping featurism will increase the likelihood of your unit being DOA, or not getting built at all. Or, to paraphrase the words of Charles F. "Boss" Kettering, parts left out can't cause trouble and drive you nuts. :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 7:47 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
randallmeyer2000 wrote:
Whoa! You guys are fast! This is both good and bad. (1) It will keep me on task. (2) When I run out of funds (as I always do) I will be embarrassed and run away from your "over-achieving-slacker-hackers" web-chat. OK, at least I know my own proclivities! I'll try to do the former, not the latter.

Thanks Big Ed. If I can keep the past two weeks' momentum (between books, and your website, and other 6502/tech websites) I will certainly check out every link that can make my WDC 65816 do magical stuff. (I realize I misspoke/typed in yesterdays post; I know a little bit about TTL chips and 7400 series and the CMOS replacements (5500 series, I think?)

The 4000 family was what I would consider the original widely used CMOS logic; but it is super slow. 74HC is just a tad faster than 74LS in most cases but a tad slower in a few cases. Then there's 74AC which is two or three times as fast as 74HC, and other ones. I see BDD posted while I was writing, and he has some good logic family info there.

Quote:
and then the high speed CMOS and stuff, but mostly from a "book" perspective; you know, like "history" type stuff. "Hands-on", "hardware-hack" or "hardware design" is something that eludes me! I did read some of a digital design book (Verilog? VHDL, Hardware description language) and some of Barry Brey's circa 2001 "Intel Microprocessors x86 and Pentiums II and II" book, Forrest Mimms radio shack "handy manuals", and "sensor and solar projects ---I don't remember any of the real titles to these books--and two radio shack primers; one on digital circuits, the other on analog. So I have a good intellectual foundation.

Timing diagrams will be tricky, and my Oscilloscope is a dinosaur, but a handy dandy Hewlett Packard dinosaur. kind of like this one, only for one third the price, cuz the guy was retiring and "winnebago-izing" his life. 25 mHz bandwidth--low for modern circuits, but appropriate for 6502 projects, I think?!

There's a lot you can do with that, as long as you have a pair of probes worthy of it, and you use them in the x10 position. The x1 switch position is worthless for anything over a MHz or two; and a 1MHz reasonably square wave has components of easily ten times that much. (Actually a 50%-duty-cycle square wave only has odd harmonics, but you know what I mean.)

Quote:
More to the point, mightn't the jostling of the magnet create a fluctuating magnetic field that, in turn, could induce electrons to flow in wires? Mightn't too much electron flow burn the baby-wires of an IC?

As Ed said, not a worry. Not at all.

Quote:
Any of you ever make your chip talk? Or, if not the 6502, other talking chips from you guys?

Not to synthesize speech, but for digital recording and playback.

Quote:
I had already planned to buy the VIA or some I/O device, but don't REALLY know what they do.

The data sheet is good and complete, but you have to take the somewhat sterile information there are let your imagination come up with a million ways to use it. The "Tip of the Day" column that gives some ideas is at viewtopic.php?t=342 . The Circuit Potpourri section of the 6502 primer has a lot of applications too, some coming from the "Tip of the Day" column.

Quote:
So, BDD, you say 32kRAM? Is this because the 64K locations mappable by the 6502/65816-board (i.e. system) might want to keep some in reserve for ROM and PIA/VIA/I-O etc.? Seems reasonable, I guess. but I will buy two 32k, so as to not limit my system.

The whole memory map is 64K, which includes RAM, ROM, and I/O. With a rather complex (and slow) address-decoding scheme, you might be able to get as much as 62 or 63K of RAM; but 32K is an awful lot for a beginner to fill, unless it's with data. My first commercial 6502 project was something like 10,000 lines and filled about 24K of ROM IIRC (and 8K of RAM, all for data), and the list file (with macros expanded out) printed out to something like an inch thick.

Quote:
Hey, that brings up a subject I haven't thought about in a while. Weight of the copper? Double sided board? I will give that some serious thought too. I noted an oscillator can is recommended (though I hope to "play with X-tals" at some point, too!), and I suppose geometry and thickness of copper might depend upon clocking speed for the "most driven" of the bus lines (If I recall, they can tend to act like antennae, in a high speed digital circuit). I suppose 1 MHz isn't too bad? I know 1 to 10 MHz starts to make pluggable breadboards go glitchy

Don't worry about copper weight unless you're running super high currents somewhere, which you won't be doing in the buses. At the highest speeds, skin effect keeps all the current near the surface anyway, so thick copper traces don't gain you as much. If you're going to stick to 1MHz to start, you don't need to be extreme at all. Later, if you do want to start using faster-slewing parts and turning the clock speed way up, refer to our sticky topic, "Techniques for reliable high-speed digital circuits" and to the 6502 primer's "Construction: Avoiding AC-Performance Problems page and the links at the bottom of it too.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 13, 2015 8:00 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
randallmeyer2000 wrote:
Thanks BigEd. Any good reason magnets aren't bad? I forget if any ole conductor (Al? Cu? Au? Ag?) will do (Lenz's law? Or Oersted? Who said stationary wire and moving magnetic field generates moving charges?

A conductor moving through a magnetic field will get a voltage induced in it. In antennas ("antennae" is for insects), we refer to "volts per meter," as the voltage produced is, in part, proportional to the length. It is also proportional to how fast the field moves through the wire. The speed as which the magnetic field and the IC moved WRT each other in your bag is much too low to worry about, and the bond wires and lead frame are very short for this as well. The size of the bond wires (usually .001" or .002") is irrelevant.

Quote:
am pretty good about using my static mat and grounding myself. TTL's more tolerant, so I've read, but CMOS is less so.

CMOS has protection diodes, but they're teensy, made to discharge slow static build-up, not handle big zaps.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: