Dan's 6502 build, aka, The WOPR Jr.
Re: Dan's 6502 build, aka, The WOPR Jr.
Sounds like I've fallen with some crochety old farts
I hope so. Thems the kinda folks you learn from!
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Dan's 6502 build, aka, The WOPR Jr.
GaBuZoMeu wrote:
Add a pushbutton to your arduino (well debounced of course)
Quote:
When the programs becomes more complex, single stepping is usually not helpful.
Dan Moos wrote:
Dumb question...Do I just tie the WE pin HIGH on my 28c256 EEPROM? Seems like the thing to do.
<snip>
That clarified, a simple wire tying WE HIGH is what I want, right?
<snip>
That clarified, a simple wire tying WE HIGH is what I want, right?
Quote:
Another question. I'm getting close to the next major test phase. I have both buses, the memory, and the decoding logic just about complete. I kinda want to test all that before I start talking to the VIA. I figure I need to hand enter something really simple into the ROM that does something with the data bus that I can confirm on my Arduino terminal connection.
Since I'll be entering this thing in machine code, it needs to be super simple. Any ideas for what I can tell the thing to do that basically tests RAM and ROM?
Since I'll be entering this thing in machine code, it needs to be super simple. Any ideas for what I can tell the thing to do that basically tests RAM and ROM?
Quote:
Also, what is the standard easy [way] to code a delay? Some sort of loop full of NOPs? I was thinking a simple test would be to blink some LEDs. I can clock the CPU with my function gen to slow it down, but when it's running on the crystal oscillator, I'll need some delay if things are to blink at human speeds.
Code: Select all
DELAY: LDY #$FF ; Put the desired value in X before JSR'ing to DELAY.
d1: DEY
BNE d1
DEX
BNE DELAY
RTS
;-------------Quote:
Yeah, it would be like a poor man's harddisk. I can definitely see the advantage. It's the big picture plan, but my attitude is as little plumbing, no matter how trivial, until she's running.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Dan's 6502 build, aka, The WOPR Jr.
barrym95838 wrote:
Dan Moos wrote:
Someone mentioned that my star scheme with the data bus could cause problems. Care to elaborate?
Mike B.
You have a signal generator (e.g. your oscillator), a transmission line (copper wires with more or less ground return), and an end of the transmission line (whether there is something connected or not doesn't matter now). A rapid signal transition from the generator is coupled into the transmission line, travels along it and reaches the end where it should be terminated. This will work perfectly if (and only if) the generators source impedance, the TL impedance, and the terminating impedance matches precisely. If there are mismatches a more or less amount of energy is "reflected". That is, a fraction of the signals energy (may appear either as voltage or current) travels back to the generator where it causes an additional load which in turn causes distortions. The amount of energy that is reflected depends on the mismatch. Worst cases are open end and short circuit - both causing 100% reflection (theoretically, omitting the influence of ohmic resistance). The faster the rise and fall times are and the longer the TL is the more curious distortions will appear.
Now to the question bus vs. star:
The bus looks like: GEN - TL - RCV1 - TL - RCV2 - TL - RCVn
Because all intermediate receivers are only light loads the amount of impedance disturbance is small, and therefor they do not cause much reflections. Furthermore the reflected energy may travel along both TLs (backward to GEN, and forward to next RCV). Only at the end RCVn needs to be well matched, otherwise that reflection travels back and may ruin the signal.
In a star like connection ALL receivers are at the end of a short TL. That means ALL require well matching otherwise ALL will reflect some energy. And the sum of all reflections will bang back at the generator. If they were in phase, this could be very ugly.
With older LS-TTL logic you have slow rise and fall times, relative high source impedances, and relative low receiver impedances. So the mismatch wasn't very strong, usually a series resisitor near the generator sufficiently increases the source impedance and damps reflections (at least for a moderate line length). But modern AC-MOS has a very low generator output impedance and a very high input impedance. So the "natural" mismatch is ways higher. Additionally rise and fall times are much faster. With modern AC-MOS it is much more difficult to tame the signals especially those that are widely distributed.
Hmm, I hope this was not too academic
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Dan's 6502 build, aka, The WOPR Jr.
Dan Moos wrote:
Yeah, but the "toys" are sort of a subset of the hobby. Most of my testing so far has been with a DVM checking for ones and zeros. But watching things on the scope from a fun standpoint is a pretty neat thing. I know my learning curve skyrocketed when I started using one. Everything I'd ever read was right there to be seen!
Quote:
Sounds like I've fallen with some crochety old farts
I hope so. Thems the kinda folks you learn from!
I started working with electronics at a time when the RCA receiving tube manual cost a US dollar, was two inches thick (in paperback) and no electronics technician worthy of the name would be caught dead without one. Things have changed a bit since then, but not the underlying physics. And I still have my receiving tube manual so I can stay fresh on the technology of yesteryear when it comes into my shop (meaning the occasional tube-power instrument amplifier in need of repar).
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Dan's 6502 build, aka, The WOPR Jr.
My intro to the hobby was tube guitar amps. I actually have a 60's era ( if I remember) RCA manual! It's actually still handy. I also have the Radiotron Designers Handbook 4th edition that is the go-to tome for valve stuff. Thing's like three inches thick. Not sure how they got "Handbook" out of that! I have an older edition that's a lot thinner, do maybe that's what happened.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Dan's 6502 build, aka, The WOPR Jr.
Dan Moos wrote:
My intro to the hobby was tube guitar amps. I actually have a 60's era ( if I remember) RCA manual! It's actually still handy. I also have the Radiotron Designers Handbook 4th edition that is the go-to tome for valve stuff. Thing's like three inches thick. Not sure how they got "Handbook" out of that! I have an older edition that's a lot thinner, do maybe that's what happened.
Not too long after I built those amps, I was given some Sylvania 8417 beam power tetrodes by an uncle who was a partner in a company that built and installed PA systems. With a little help from my high school science teacher, who was an audiophile who built some of his own stuff, I came up with a circuit that would produce 100 watts RMS into an 8 ohm load. I built two such amps for my stereo and then built another pair for a buddy. I used those two amps until 1984, when I replaced them with a Dynaco 400 watt solid state power amp.
Ah, the good old days, when the stereo not only reproduced music, it helped keep the house warm in the wintertime.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Dan's 6502 build, aka, The WOPR Jr.
GARTHWILSON wrote:
Quote:
When the programs becomes more complex, single stepping is usually not helpful.
I ended up adding features to my simulator to trap and trace memory access to specific locations. But that's a lot harder to do on hardware. But then, this could suggest that perhaps you may have better luck debugging software on a simulator before it even gets to the hardware (for such things that are able to be done correctly in the simulator).
Also, don't be afraid to wire up LEDs or suck and use those as debug traps in your code. You can use those as indicators of where the code goes, until you get your serial port working, then you can just spit stuff out to the console stream.
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: Dan's 6502 build, aka, The WOPR Jr.
BigDumbDinosaur wrote:
Dan Moos wrote:
My intro to the hobby was tube guitar amps. I actually have a 60's era ( if I remember) RCA manual! It's actually still handy. I also have the Radiotron Designers Handbook 4th edition that is the go-to tome for valve stuff. Thing's like three inches thick. Not sure how they got "Handbook" out of that! I have an older edition that's a lot thinner, do maybe that's what happened.
Not too long after I built those amps, I was given some Sylvania 8417 beam power tetrodes by an uncle who was a partner in a company that built and installed PA systems. With a little help from my high school science teacher, who was an audiophile who built some of his own stuff, I came up with a circuit that would produce 100 watts RMS into an 8 ohm load. I built two such amps for my stereo and then built another pair for a buddy. I used those two amps until 1984, when I replaced them with a Dynaco 400 watt solid state power amp.
Ah, the good old days, when the stereo not only reproduced music, it helped keep the house warm in the wintertime.
Tubes I have good stock of today are all NOS and include KT88, EL34, 6550, 6L6GB and GC, 5881, EL84/6BQ5 and a nice quantity of vintage DHTs, including 71A, 45, 2A3 and WE300b triodes. I also have good stock of rectifiers and smaller tubes for input/drivers and phase-inverters. And no... none are for sale. I've been collecting these for over 4 decades and they will be handed down to my kids and their amplifiers/preamps, etc. as needed.
Not to be one-sided, I also have a fair amount of solid-state gear but I stopped doing design/build on that back in the 80's, preferring to buy specific pieces, mostly A/D-D/A units, Genelec monitors and audio interface cards to external converters. Funny how so many of us have the overlap into other electronics based hobbies
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: Dan's 6502 build, aka, The WOPR Jr.
Ok, back to build.
I have gotten to the point where I'm trying to output a pattern on the VIA ports that I can probe. Nothing comes out, but I did find what I think is a problem.
The following scope shot is the CS2 pin on the VIA. I'm at 1V/10ns per division. Its just a quick blip! By comparison, the CS1 pin goes HIGH for 3us, which sounds about right.
I have activity on all the pins I'd expect, and so far this is the only signal that looks suspicious.
I'm using the first decode circuit on Garth's primer. all connections seem good, and the meter says I have continuity. On the scope, the CS2 goes LOW at the same time the CS1 goes HIGH. This tells me at least that portion of the decoding is good. Also, since the VIA is being selected at regular intervals, along with all the other activity, I feel that my program is running (it is an endless loop of setting the VIA ports, and yes, I set the DDRs to all ones). If my program is running, then that means ROM addresses are being decoded too.
So I'm pretty shir that skinny pulse is my problem.
Ideas?
I have gotten to the point where I'm trying to output a pattern on the VIA ports that I can probe. Nothing comes out, but I did find what I think is a problem.
The following scope shot is the CS2 pin on the VIA. I'm at 1V/10ns per division. Its just a quick blip! By comparison, the CS1 pin goes HIGH for 3us, which sounds about right.
I have activity on all the pins I'd expect, and so far this is the only signal that looks suspicious.
I'm using the first decode circuit on Garth's primer. all connections seem good, and the meter says I have continuity. On the scope, the CS2 goes LOW at the same time the CS1 goes HIGH. This tells me at least that portion of the decoding is good. Also, since the VIA is being selected at regular intervals, along with all the other activity, I feel that my program is running (it is an endless loop of setting the VIA ports, and yes, I set the DDRs to all ones). If my program is running, then that means ROM addresses are being decoded too.
So I'm pretty shir that skinny pulse is my problem.
Ideas?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Dan's 6502 build, aka, The WOPR Jr.
Dan Moos wrote:
The following scope shot is the CS2 pin on the VIA. I'm at 1V/10ns per division. Its just a quick blip! By comparison, the CS1 pin goes HIGH for 3us, which sounds about right.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Dan's 6502 build, aka, The WOPR Jr.
Yeah, that's probably a good idea.
Coming soon.
Coming soon.
Re: Dan's 6502 build, aka, The WOPR Jr.
Also, it is some sort of decoding error I think. A14 should go HIGH and A15 should go LOW every VIA access. I only have A14 going HIGH when A15 is HIGH. What I think is causing the short pulse is that the NAND gate that selects the VIA is getting a nearly, but not perfectly simultaneous LOW and HIGH at the same time, and that the sight delay briefly allows a short output.
That would just be a symptom though. Those signals shouldn't be doing that.
I will try and post a schematic soon. I'm actually really similar to the schematic Garth has posted on. 6502.org. In fact, I'm not sure if they have any differences.
But yes, I'll create one and post it.
That would just be a symptom though. Those signals shouldn't be doing that.
I will try and post a schematic soon. I'm actually really similar to the schematic Garth has posted on. 6502.org. In fact, I'm not sure if they have any differences.
But yes, I'll create one and post it.
Re: Dan's 6502 build, aka, The WOPR Jr.
OK, semi success!
The original problem was that in the melee, I'd over written the crucial part of the ROM that tells the thing what to go do with itself when it turns on. Fixed that, and BAM, output on the VIA!
It's strange though. I put $AA on both ports, which to me should be 10101010. I get 01010101. Both ports have this. I'm gonna Change the desired output and see what's up. Maybe all ones to one port, all 0s to the other.
Standby
The original problem was that in the melee, I'd over written the crucial part of the ROM that tells the thing what to go do with itself when it turns on. Fixed that, and BAM, output on the VIA!
It's strange though. I put $AA on both ports, which to me should be 10101010. I get 01010101. Both ports have this. I'm gonna Change the desired output and see what's up. Maybe all ones to one port, all 0s to the other.
Standby
Re: Dan's 6502 build, aka, The WOPR Jr.
OK, definite success. I tried outputting various bit patterns on the VIA, and anyways got what I expected.
Of course I haven't tried a RAM operation yet. I guess I'll put some byte in RAM, retrieve it, and output it. Maybe do some math on it. Just to prove its working.
Actually, I really should go to bed.
Good night all!
Of course I haven't tried a RAM operation yet. I guess I'll put some byte in RAM, retrieve it, and output it. Maybe do some math on it. Just to prove its working.
Actually, I really should go to bed.
Good night all!
Re: Dan's 6502 build, aka, The WOPR Jr.
Having great success. I wrote a simple program that puts a number in RAM, adds to it, and outputs the result on port A of the VIA. I figure that simple operation proves out my decoding, and that I got my RW pins right. It works as it should, so I think I'm in good shape.
Here's a current pic. My wife was unimpressed with the two lit LEDs, but I'm ecstatic because they meant my computer added 1 +2 successfully
Here's a current pic. My wife was unimpressed with the two lit LEDs, but I'm ecstatic because they meant my computer added 1 +2 successfully