6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 3:37 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Odd Kim-1 memory issue
PostPosted: Tue May 23, 2023 6:56 am 
Offline

Joined: Sat May 13, 2023 5:53 am
Posts: 7
I've just started using a Kim-1 that belonged to my brother and which hasn't been powered on for a very long time, possibly decades. It seems to take a minute or so and multiple resets to settle down, but then allows me to use the monitor as expected.

I ran into problems when trying to load the first addition program from the manual. Opcodes at certain memory addresses were being corrupted, but in a consistent and reproducible way.

I did some testing loading 0, 1, 2, 4, 8, 16, 32 into the first 16 locations in memory, and discovered this:
If I load 00 into the first 16 memory locations, then load 08 into location 0000, location 0008 becomes 08. If I load 08 into location 0001, location 0009 becomes 08. Trying this with other values suggests loading any value with an 8 in it (binary 1000) adds 8 to the value held in memory location 8 places later.

Does anyone have any ideas what might be causing this? Could it be something as simple as a short between an address and a data line somewhere? (I have a multimeter but no oscilloscope for fault finding).

Grateful for any advice!


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 8:58 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
As the ROM addressing is working - otherwise the user interface almost certainly wouldn't work - perhaps most likely A4 is open and has floated high, at the RAM end. A cracked trace or dry joint could cause that. Even possible that the RAM chip has failed.

I'd suggest starting by checking continuity of A4 and for confidence also A3 and A5. Check that all the pins which should be connected are connected, and while you're walking around the pins, check that in all cases adjacent pins are not connected.


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 12:34 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Ah... <sigh> I have fond memories of the KIM-1. Uh, no pun intended :oops:

I agree the problem involves memory circuitry, but I'd worry about the A3 signal, not A4. Perhaps Ed's brain got struck by an alpha particle! Or perhaps mine did.

The KIM-1 uses 1kx1 RAM chips, meaning there's a separate chip for each bit. It's plausible that a single chip has failed. Stand by while I check the manual for more details.

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Last edited by Dr Jefyll on Tue May 23, 2023 1:22 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 12:56 pm 
Offline

Joined: Sat May 13, 2023 5:53 am
Posts: 7
Thank you both! So, do I understand correctly that each byte has its bits stored across all 8 RAM chips?


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 1:23 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Yes, that's right. This is shown in Figure 3.4 on page 27 of the user manual.

The error you described is affecting the data in bit3 of the bytes, and bit3 is managed by memory IC U-9. Apparently U-9 is failing to heed the A3 signal from the CPU.

It's worth doing the continuity check as Ed suggested, but I'm not optimistic it'll reveal a problem with connections. To me it seems more likely that the fault is inside IC U-9, and it'll need to be replaced. Too bad KIM's chips are soldered in place.

As an aside: initially I also wondered about U-13, the tri-state driver that drives RAM read data onto the CPU data bus. Could one of its sections have failed? But if that were the case then I think you would've noticed bit3 always reading high (or always reading low).

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 1:36 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Links to the 65xx and KIM-1 manuals (and an entertaining story about their origin :P ) can be found here.

As for your KIM-1, are you confident that it's getting a good source of 5V power? It's a bit of a long shot. But after all these years I should know enough to look for simple problems before hypothesizing about more complex ones... :roll:

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 3:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
(oops! Thanks Jeff for the correction)


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 5:17 pm 
Offline

Joined: Sat May 13, 2023 5:53 am
Posts: 7
Good question about power! I did wonder about that. I'm using an Apple 2A / 10W USB adaptor. It's showing around 5.15V on my multimeter, unloaded. Any advice on a better off-the-shelf power supply?


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 7:08 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Quote:
I'm using an Apple 2A / 10W USB adaptor. It's showing around 5.15V on my multimeter, unloaded.
That should be adequate (unless it's a counterfeit, in which case the specs perhaps won't be met). I'm guessing you've already used it to power up the KIM-1, so what voltage does your multimeter show when the supply is powering the KIM? The KIM expects 5V, give or take a certain tolerance which is probably either +/- 5% or +/- 10%. I'm not sure if it's 5% or 10%, and a quick peek in the User Manual didn't help (but perhaps I was too hasty). Anyway, if you're within +/- 5% and the supply isn't counterfeit (truly is capable of supplying as much as 2A) then you should be fine.

Appendix D of the User Manual shows a power supply you can build. Apparently the KIM-1 requires as much as 1.2A of current from the 5V supply. And, if you intend to use the cassette interface, KIM also requires 12V at up to 50 mA.

blogmywiki, do you have PM notifications turned on? I ask because you've apparently not read a PM I sent you earlier. In it, I suggest you needn't necessarily fix the RAM problem. You could alternatively disconnect the on-board RAM and add a single, more modern memory chip that massively upgrades the KIM's modest 1K.

OTOH, if you can obtain a replacement for U-9 and are comfortable doing the surgery then that's probably the best choice. And of course we're happy to guide you regarding either of those options.

I'm speaking as if it's confirmed that U-9 is the culprit. And perhaps that's a tad premature.

Does A3 (ie,pin 6) of U-9 show continuity (as it should) with pin 6 of the other RAM chips? Does the solder joint look OK where pin 6 joins the PCB trace? Other comments, anyone?

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Tue May 23, 2023 8:06 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Is the perhaps-suspect RAM chip a lot hotter than the others? That can sometimes be an indication of a bad chip.

I wouldn't worry about power supply, with a misbehaviour which is so specific and repeatable.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 24, 2023 6:32 am 
Offline

Joined: Sat May 13, 2023 5:53 am
Posts: 7
Thank you everyone! The fault is indeed *very* consistent and reproducible, so it does feel like a hardware problem on the board itself to me.
I'll do some more testing this weekend, thanks for the advice on continuity tests.
I'm very reluctant to try to replace a faulty chip for fear of messing up a piece of vintage hardware, so I am interested to learn more about connecting external modern RAM.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 24, 2023 9:18 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
blogmywiki wrote:
Thank you everyone! The fault is indeed *very* consistent and reproducible, so it does feel like a hardware problem on the board itself to me.
I'll do some more testing this weekend, thanks for the advice on continuity tests.
I'm very reluctant to try to replace a faulty chip for fear of messing up a piece of vintage hardware, so I am interested to learn more about connecting external modern RAM.


If the chips are socketed, then swapping 2 round would be a good place to start. Then, if the fault follows the swapped chip, you know it's the chip, but if the fault stays then it could be board, tracks, etc.

But one thing that might be worth thinking about - but bear-in mind that I know nothing about the Kim-1 monitor, etc. - could you be overwriting critical areas actually used by the "KIM" software causing some odd side-effects? I'm wondering because I'm thinking that a RAM (or board) fault like this would likely cause the whole system to crash and losing just a few bits of RAM in a 256-bit IC seems unlikely to me, but I've seen stranger things happen...

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Wed May 24, 2023 12:32 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
drogon wrote:
I'm thinking that a RAM (or board) fault like this would likely cause the whole system to crash
I too was struck by that thought. In particular, how is it possible for the KIM firmware to successfully return from a subroutine?? :shock: But I gather from the lead post that the problem can't exactly be described as bad bits in RAM. Instead, it appears that address line A3 is stuck high or stuck low inside RAM chip U-9. (Perhaps a bond wire has broken off, but the reason isn't important.) The CPU can ask for access to 1024 different bits but the chip responds by accessing only 512 of the bits, because address line A3 is being ignored. Or, as blogmywiki put it,
blogmywiki wrote:
If I load 00 into the first 16 memory locations, then load 08 into location 0000, location 0008 becomes 08. If I load 08 into location 0001, location 0009 becomes 08. Trying this with other values suggests loading any value with an 8 in it (binary 1000) adds 8 to the value held in memory location 8 places later.
This implies a degree of tolerance. Subroutines can successfully execute as long as they aren't nested more than four levels (8 bytes) deep! But if it had been A0 that failed then the system would be DOA.

blogmywiki wrote:
I'm very reluctant to try to replace a faulty chip for fear of messing up a piece of vintage hardware, so I am interested to learn more about connecting external modern RAM.
Hmmmm. Well, it's fairly straightforward to add external RAM using the Expansion Connector. But in order to inhibit the on-board RAM I suspect (I need to verify this) it'll be necessary to cut one or two traces on the PCB. If so then your "vintage hardware" will no longer be pristine. And it's already compromised anyway due to the RAM problem, so my feeling is you may as well replace U-9. But the decision is yours.

How are your construction skills? If you do build a board that attaches to the Expansion Connector then I'd suggest making it bigger than the RAM requires. Then later you could use the extra space to put in a 65C22 or some other goodies! :P

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sat May 27, 2023 9:10 am 
Offline

Joined: Sat May 13, 2023 5:53 am
Posts: 7
Thanks everyone, lots of great ideas and advice here.
I'm ruling out the PSU for now, as the fault is utterly consistent and the supply, if unorthodox, is genuine, it's a never used Apple part, shrink-wrapped and taken from an iPad box.
The chips are not socketed, alas, and my construction skills are not great. I did wonder about cutting traces to add external RAM, and am wondering if I can determine with some certainty that the RAM chip is at fault, it would be kinder to the historical artefact to replace it (or get someone with better soldering skills to replace it for me) than to cut traces to enable external RAM...
Anyway, I'll do some more testing later this weekend and thank you again to everyone who has taken an interest in this.


Top
 Profile  
Reply with quote  
PostPosted: Sat May 27, 2023 1:39 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
blogmywiki wrote:
it would be kinder to the historical artefact to replace it (or get someone with better soldering skills to replace it for me) than to cut traces to enable external RAM...
To be clear, there's only a single trace that would have to be cut. We don't need to sever the data bus connections; merely prevent U14 and U13 (which are 74125 tristate driver ICs) from driving onto the bus, and we can do that by interrupting the signal that tells them when to enable. There might be one or two even more minor mods, but all the mods would be reversible (although not invisible). My point is, it's not as if you'd be butchering the board.

That said, building and connecting a memory expansion is a moderately demanding job if you're a novice. The payoff is greater, but you might need guidance if you hit a snag. You might prefer instead to simply replace the defective RAM chip.

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 47 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: