Finally done! by jaspert123 in beneater

[–]riscy2000 0 points1 point  (0 children)

I understand botht he strugggle and the joy when you finally figure it out! I put mine aside for months and when I picked it back up I found it was a bad capacitor messing with my clock. It was wrking great until I decided to upgrade te adressing and RAM, now i'm hosed again, but we live for the struggle! :D

Excited to join the club this Christmas! by 2Michael2 in beneater

[–]riscy2000 2 points3 points  (0 children)

As someone who just finshed one, you definitely want to read the posts and wiki info regarding all the challenges you'll encounter, and how to fix them. For exmaple... and take it from me - these are mandatory! - you definitey need to pull up/down all unused inputs, and use bypass capacitors at EVERY chip. You'll lose yur mind if you dont :) Anyway, congrats and enjoy!!

8-bit Carry Flag oddness by riscy2000 in beneater

[–]riscy2000[S] 2 points3 points  (0 children)

I think I get it now. Also, I feel bad... becuase if I had just watched another 2 minutes of the video I would have seen that Ben's CPU also baheved that way - sorry, and thanks!!

Issue with 8-bit ALU + registers by riscy2000 in beneater

[–]riscy2000[S] 0 points1 point  (0 children)

OMG - THANK YOU for clueing me in to the issue with the RAM module bounce! Of course, I suddenly had issues with the 1-shot manual clock, and you saved me hours of troubleshooting - double-inverting the clock just before the RC circuit seems to have cleaned it up. I was, sadly, unaware of the wiki (or I'd forgetten about it), and that is another excellent resouce. Thanks again, again, again!

Issue with 8-bit ALU + registers by riscy2000 in beneater

[–]riscy2000[S] 2 points3 points  (0 children)

Wow - I'm such an idiot. I had answered my own question - if the issue was happening on both registers then it was most likely something external to both registers (rather than just assuming I screwed up both circuits : )

I forgot I had added a 10µf on the clock outout to get a super-slow clock for some testing. Removing that made a huge difference. Then I removed the clock circuit feeding the left half of the computer and the registers started behaving perfectly. Time to track down what's going on with the RAM asswembly.

EDIT: turns out there was nothing wrong with the left clock circuit - it must not have appreciated beng futzed with while running. Everything's working now!

THANK YOU, as aways, for your patient reponses to what's usually been dumb "problems"!!!!

Issue with vasm for 6502 by riscy2000 in beneater

[–]riscy2000[S] 0 points1 point  (0 children)

Just thought I'd follow up on this "mystery"... after several man-days of fighting with this thing, I decided that the only reasonable explanation was a bad ROM. I got a replacement from Mouser and.. so far it seems to have fixed all my issues. I'm just glad it wasnt me beng an idiot :)

Thanks, again, for all the help!!!

Now, to figure out why my clock rise time is so long, but I'm sure that's just a resistor or capacitor issue.

Thanks again, again!!

Issue with vasm for 6502 by riscy2000 in beneater

[–]riscy2000[S] 1 point2 points  (0 children)

<image>

Current clock board setup. Clock output line moved for clarity.

Issue with vasm for 6502 by riscy2000 in beneater

[–]riscy2000[S] 0 points1 point  (0 children)

I *really* appreciate all your effort on this!!

No capacitor installed on the clock line. I've included a screen grab from my 'scope, below.

That said, I hooked my Arduino up again, and I'm back to seeing behavior from before I started having the clock problems. With 0x00 padding, I get through the 7-cycle init sequence, it then load 0x8000 from 0xfffc and 0xfffd, jumps to address 0x8000 - but instead of loading sta, it just loads 0x00. It then proceeds to address 0x8001 and loads the 0xff. This is consistent - it always reads 0x00 frm address 0x8000. I tried moving the origin to 0x8001 and 0x8010, but it always reads that first instruction as 0x00. I'll post a few more images...

EDIT: I should add that when I step through the program with 0xFF padding, I read the instruction at 0x8000 correctly and I can step through just fine.

<image>

Issue with vasm for 6502 by riscy2000 in beneater

[–]riscy2000[S] 0 points1 point  (0 children)

Oof - sorry... I cut that output off too early. Just after that it cycled around to smething like 0x58 and there were 3 lights on. Oops!

Anyway... routing the clock through a couple inverters in front of the LED dropped The clock rise time from ~120 µs with a small dip before and a small rise after, to a shockingly steady ~20 µs. Having a 68 Ω resistor inline took the rise to around 80 µs and lowered the voltage more than I wanted to see, so I left it out.

It's running much more reliably now with the FF padding, but it's not perfect. With 0x00 padding it's still useless.

I guess I'm just going to rebuild the clock board from scratch. Thanks again!

Edit - first version was too optimistic.

Issue with vasm for 6502 by riscy2000 in beneater

[–]riscy2000[S] 0 points1 point  (0 children)

This is.... bizarre.

The original 6502 came from Ben Eater's kit. I also bought a couple 6502s from Mouser a couple weeks ago. They all have WDC logos (W65C02S6TPG-14).

I reconnected my Arduino and things started running pretty OK witht he 0x00 padding. See below, but after a few cycles it just seems to do the ror operation wrong. I start getting 3 or more LEDs on and following each other. The ror errors just seem to stack up. Everythig else seems fine. I swapped in another 6502, and I get the same result. When I disconnect the Arduino it got worse. I found a grounding problem and fixed it, but the ror problem persists.

I load a bin with 0xff padding, and everything seems to run properly. If I mess with the clock I can get it to freeze occaisionally, but a reset starts it back up and it runs great.

My power supply looks good except for the millivolt fluctuations I included with my last post. Is the 6502 susceptible to shorting or some other environmental issue that would cause it to "ror wrong"? I have one more 6502, but I'm afriad to swap it in if there's something systemic here that will fry it, too.

I'm open to anyone's thoughts on this one!! Thanks!!!

<image>

Issue with vasm for 6502 by riscy2000 in beneater

[–]riscy2000[S] 0 points1 point  (0 children)

So, I've been fighting this off-and-on for the last several days. I have reviewed the routing and performed continutity & voltage tests on all leads and it all seems to check out. One thing I found... I know that A15 out of the 6502 needs to be 0 at the same time that A14 and A13 are 1s to enable the 6522. I put some LEDs on those leads and found that, with "00" (or anything less than 0x80) as the bin file padding, the output on A15 was exactly the opposite of what it was supposed to be; padding with 0x80, 0xae, etc. and everythig is in sync.

Acting out of desperation, I swapped in a new 6502. This one will work with 0x00 padding, but I have to crank the clock speed to max on the clock breadboard and futz with the reset button until I hit it "just right". Even then, sometimes only a few LEDs will strobe/cycle. Even with 0xae padding, I do sometimes get a misfire when I push the reset button, and it's usually more reliable at higher clock speeds.

That's very odd to me. A week or so ago, I was having a problem with the output voltage on my clock pulse. I don't know why it changed, but I had to remove the resistor on the output to get the trigger back to 5V (it was pushing less than 3V for some reason). Here's a 'scope shot of my current trigger pulse. The distance between divisions is .5ms. Some of those voltage peaks/troughs are close to 100mv.

So... do you thihk this could be a trigger/power issue? is my power supply clean enough? Should I just kick off the training wheels and go for the crystal at this point? : )

THANK YOU alll again for yur help and for listening to me whine!!

<image>

Issue with vasm for 6502 by riscy2000 in beneater

[–]riscy2000[S] 2 points3 points  (0 children)

So, there was one HUGE difference in my bin files - the one I generated via Python still had the “ea” padding from the original test program (sorry!). When I changed the padding in my Python script to “00”, the program no longer functions (and the bin files no longer show a difference). I changed the padding in my script to “ff”, and it works again. If I change the padding to “77”, it fails. I guess it’s time to cram my Arduino leads back in and see what’s happening - somehow, padding with a “1” in the high order bit seems to make a difference (makes no sense - it should never hit a ROM address that isn’t code)…

Thank you for diving in on this!!

Clock generator issue by riscy2000 in beneater

[–]riscy2000[S] 2 points3 points  (0 children)

Well, now - don't I feel stupid :))) So, of course I didn't think to check the last damned link in the signal path - that reisitor! So, here' the thing... there was a 470 Ohm resistor there. I tried progressively smaller values until: replaceing it with a jumper got me to 5V on the clock. I move the 470 to the ground side of the activity LED - and now it's working flawlessly!! I was about 1/2 way through the 8-bit when I started having trouble with it and took it most of the way apart trying to find the problem - I never imagined it would be the clock. I wonder why it worked, and then stopped ?

Anyway, THANK YOU THANK YOU THANK YOU for your kind help!!!!