Aus C64-Wiki
Zur Navigation springenZur Suche springen

Ramanzeige zeigt weniger Ram an[Quelltext bearbeiten]

Thread von Nicolas Welte Dez. 2001

Peter Eriksson wrote:

> When I set up my kid brother's C128 earlier today, I discovered it only
> reports 1284 bytes of free RAM in C64-mode (in the startup banner)! In
> C128-mode however, 122365 bytes of RAM are reported as free. The computer

One or more of the RAM chips in bank 0 are bad and must be replaced. There are test programs to determine which one it is, but those come on a cartridge. C128 mode does not do a memory test, so it always reports the full number of BASIC bytes, but C64 mode will stop at the first bad byte. Since the first bad byte is after the end of the used BASCIC RAM, you can run a small test yourself. Now I'm not sure where that byte is exactly, but it is very probably at location 2049+1284=3333 (ohh, what a magic number!). So if you run this test:

R=3333:POKE R,0:?PEEK(R):POKE R,255:?PEEK(R)

and you don't get the numbers 0 and 255 printed out, then please post the numbers and I can look up the bad chip. If you get those numbers, 3333 is not the bad byte, so you could try a few numbers around that.

> I noticed that I got different values from the PEEK() statements on
> occasion, both in C64 and C128 mode so I took the liberty of adding a
> GOTO jump into the program, looping the whole shebang to look for
> different values. Here's what I got:

> 32, 223
> 0, 223
> 0, 255
> 32, 255

> Although 0, 255 did actually appear, I take it all those other values
> report that something is really wrong?

The fact that you sometimes got a 32 when there should be a 0, and a 223 instead of a 255 (255-223=32) means that the memory bit that is responsible to hold a value of 32 at address 3333 is acting totally crazy. It just doesn't store what it should, it returns a random state.

In the C128 and plastic C128D computers, there is a single RAM chip that is responsible for storing this bit. A decimal value of 32 corresponds to bit 5 in binary notation (since 2^5=32), so I'll check my service manual for the chip location: U43 holds this bit in RAM bank 0. If you had a metal C128DCR, this bit would be stored in U39, together with the bits 4,6 and 7.

Since this question turns up sometimes, I'll make a table now for future reference. This is also useful if you have a RAM test program that outputs chip locations, which are made for the first generation C64, and you want to repair one of the other computer types.

 C64 with 8 RAM chips: RAM chip type 64kbit x 1: e.g. 4164
 0         U21
 1         U9
 2         U22
 3         U10
 4         U23
 5         U11
 6         U24
 7         U12
 C64 with 2 RAM chips: RAM chip type 64kbit x 4: e.g. 41464
 0,1,2,3   U10
 4,5,6,7   U9 on large boards / U11 on small boards
 C128 and plastic C128D: RAM chip type 64kbit x 1: e.g. 4164
      bank  0      1
 0         U38    U46
 1         U39    U47
 2         U40    U48
 3         U41    U49
 4         U42    U50
 5         U43    U51
 6         U44    U52
 7         U45    U53
 C128DCR: RAM chip type 64kbit x 4: e.g. 41464
      bank  0      1
 0,1,2,3   U38    U40
 4,5,6,7   U39    U41
> Nicolas, I have never ever dealt with a problem like this before.
> Could you please explain to me on a real basic level what's wrong and
> what has to be done? I'd very much appreciate it!

I hope I made clear what is wrong, you have a bad RAM chip that causes this single memory bit to read back random values. The cure is easy, the RAM chip has to be replaced. First of all, you need to get a proper replacement. If you need one of the 4164 chips, you can also use a 41256 instead, those are easy to get from old PC mainboards, or other old computers. 4164 are so old that they can be hard to find. Since the RAM chip number prefixes often change from manufacturer to manufacturer, you can ignore this and just look that the chip has 16 pins and the number ends in 64 or 256. If you have to use a '256 chip, you have to solder a short piece of wire between pins 1 and 16 of that chip (these are the pins just left and right of the alignment notch on the chip). This mod will make the chip look just like a '64 chip to the system.

To remove the old chip at U43, you can just cut off the legs of the chip first with a small wire cutter or small scissors, and take care not to damage the circuit board. Then hold each of the stuck pins with tweezers and heat up the solder joint on the board, and pull out the pin. Do this for each pin, and then clean out the holes in the mainboard. If you have a solder sucker, heat up the solder and then suck it out. If you don't have one, some people report good success with a syringe needle that just fits the hole. Insert it while the solder is hot, and keep rotating the needle a little while the solder cools down. This will leave a clean hole. I know, not everybody has syringes at home. I also don't have them, I only heard of this technique :-) Then insert the new chip and solder it in place (and add the wire, if you have a '256 chip). If you're unsure about your abilities in soldering, use a chip socket for the new chip.

Unfortunately there might still be another bad chip that you will only discover once you have the good one in place, and the RAM test advances to other adresses. Then the whole procedure starts from the beginning.

Addendum:[Quelltext bearbeiten]

Wenn bei einem C64 (alte Boards mit 8xRAM) der obige Fehler auftritt, aber beim Einschalten immer mal unterschiedliche RAM-Angaben kommen (bis zu 30912 BYTES, was den häufigsten Wert darstellen sollte) und Testprogramme, wie z.B. Doc'64 alle RAMs als defekt zeigen, so kann es sein, dass der Multiplexer auf U13 (ein 74LS257) kaputt ist. Dieser wäre dann auch noch zu tauschen.