debugging RAM chips on a VIC 20

Modding and Technical Issues

Moderator: Moderators

Post Reply
komodorecomrade
Vic 20 Newbie
Posts: 18
Joined: Thu Jun 09, 2005 2:27 pm

debugging RAM chips on a VIC 20

Post by komodorecomrade »

Hello folks,

I have had a 1981 early revision VIC since childhood and which recently I have taken out of the closet and tried to revive from a blank screen. Following numerous good tips from the internet (one of which pointed me to this group) I have changed the all the cheap ICs that I could find in stock 4066,74LS04,74LS02,LM555,7406,74LS138,74LS245.

after changing the 4066 it sprung to life.However it still suffers from corrupted characters - a problem that has plagued my VIC since the 80s and which i had never got around fixing.it had got worse and worse over the years till i gave up and closeted the VIC.

when i turn on computer from cold everything looks ok with READY
prompt, then when i issue my first command, e.g. LOAD, i get P@@P P@PP
@PPP@ P@PA
instead of READY i now get P@@P@

if i then turn off the vic and turn it back on, i dont get the ready prompt, just a screenfull of random ascii chars and a locked keyboard.i have to wait an hour for it to cool to try to get the READY prompt again.

i have 11 chips of 2114. 4 bit ram is pricey so I was wondering if there is anything i can try to determine which RAM chip it is?i tried 'freeze' with no luck.

PS can i simply solder in 18 leg sockets and swap the ram chips in different places till it works? can i remove the offending chip without replacing it for now? will the VIC run with less than 3583 bytes free? thanks

Konrad
bbell
Vic 20 Hobbyist
Posts: 125
Joined: Thu Mar 10, 2005 7:43 am

Post by bbell »

Hmmm.. Since you get a garbled display, but the machine seems to accept commands, it would seem the screen memory at 7680 is functional, but its not being displayed.

However, if you wish to change the base address of the screen, you can do so by inserting an 8 or 16K ram expansion, or change the VIC chip manually:

poke648,16:sys58648

This will move the screen base address to 4096 from 7680, so it will be on a different RAM chip. (Don't expect to actually use the VIC for any programs - since we haven't adjusted BASIC for the new location of the screen). However you will be able to move the cursor and type normally.

If this doesn't work, perhaps try it while the machine is operating correctly, and see if the problem occurs after it warms up. The VIC may not be properly accepting commands on a garbled screen.

But, if you still end up with a garbled screen once the VIC warms up, then it could be the VIC chip, or a glue chip between it and the rest of the system (I will pull my schematics tomorrow and look if you don't make any progress).

You may also want to try and 'freeze' the VIC chip to see what happens, and maybe resolder it and any other chips nearby incase of a cold solder joint. I assume you tried freezing the RAM, but perhaps not the VIC chip.

I don't know how well the VIC will react to missing RAM. As long as the first 1K of RAM is ok, the cold start routine should adapt to less RAM. However, it is difficult to say what would happen exactly (it is possible the machine might lock up, like you see) since the machine would have to properly reloate the screen memory and basic memory to compensate. I doubt this was well tested during development of the kernel.

Let me know how you do....
Guest

Post by Guest »

i liked the cart idea. the poke idea is neat but the vic wont let me execute a command successfully - it starts garbling the text i type!

does inserting a memory cart effectively bypass bad onboard memory?

a picture is worth a thousand words so here are two

vic on cold start after command given:
http://www.geocities.com/komodorecomrade/vic0.jpg

then 2 min later i turn off vic, leave it for a minute off then turn it on again:
http://www.geocities.com/komodorecomrade/vic1.jpg

if i turn it off, leave it off for another min, then turn it on again i get the same pattern! (if i leave it off for an hour i would get the READY prompt gain- a cold start situation). it seems that the RAM does not loose its contents immediately on power loss.

also about freeze: i was afraid of putting too much freeze on a chip so maybe i was a bit conservative - how long would you freeze a chip to say it was tested? just ice it over or spray it good for a few seconds?

Konrad
bbell
Vic 20 Hobbyist
Posts: 125
Joined: Thu Mar 10, 2005 7:43 am

Post by bbell »

When the VIC is garbling text, if you move the cursor around to unused parts of the screen, is there a character visible when the cursor is shown over top? (IE it is blue flashing on not white off).

I am trying to determine if it is indeed the screen RAM, or something else which is causing the garbling.

Also, does the screen change on its own if you don't type anything? For instance, in your first screen shot the banner and memory free look ok, as well as your "load" command.

But the VIC's response is messed up (and it sort of looks like a "syntax error") even though you entered a proper command. If you just leave it, does the rest of the screen eventually get garbled, or does it seem to only garble where you type?

Adding a 8 or 16k memory cart will not bypass bad memory, however, it will force the screen to be relocated to lower memory, thus you will have it on a different RAM chip (It is the same thing that poke/sys above does).

As far as freezing goes, I usually wait until I see a good layer of frost on the chip that lasts about 30 seconds before it starts to thaw. It usually takes about 3 to 5 seconds of spray. I don't think you can overfreeze a chip and damage it. However, the more you spray on the larger an area you will cool, and this will make it harder to localize the issue. If you are trying to trace down a problem, its best to try each area separately and wait until its back to room temp before trying the next.

Out of curiosity, are the "big" chips in sockets or soldered right to the board? My original VIC had most of the main chips socketed. You may want to reseat them, just to make sure they haven't popped up.

You may also want to measure the voltage somewhere on the 5V side of the board as well, to make sure that the voltage regulator isn't weak (maybe try a good freeze to it too).

BB
Guest

Post by Guest »

good questions. here are the observations from my VIC

>a character visible when the cursor is shown over top
yes invisible chars suddenly appear when cursor moved over. what does this indicate?
>does the screen change on its own if you don't type anything?
no it seems stable until i type OR run a command
>measure the voltage
i measured 5.11V at the tape drive connector.
>same thing that poke/sys above does
tried it
>"big" chips in sockets
yes they are.reseated all.
>Volt reg
the square one with 3 legs and tiny heat sink right? freezed it but no differencr.

poke648,16:sys58648 worked wonders.the screen is back to normal, though as you said Basic is not available.
komodorecomrade
Vic 20 Newbie
Posts: 18
Joined: Thu Jun 09, 2005 2:27 pm

Post by komodorecomrade »

got a cheap 74LS02 and changed the master osc clock chip 7402 as well today. after persisting a bit i found that dispite the character corruption my VIC is still usable, just so long as you type into the middle part of the screen.

thus i did some experimenting. i turned RVS on and started painting screen with space bar. one of the CBM logo asterisks
http://www.geocities.com/komodorecomrad ... deomem.jpg (small jpegs <15K)
suddenly appeared to the right of the cursor! as i continued the CBM logo became more and more corrupted
http://www.geocities.com/komodorecomrad ... sother.jpg .then i print shift-clrhome and started typing in a tiny
prog in the middle portion of the screen, which remained usable. http://www.geocities.com/komodorecomrade/code.jpg
saved it and tape operated. but when i tried to load it back or any other game cassette it just searches forever. if i execute program it works, http://www.geocities.com/komodorecomrade/loop.jpg , the output begins correct but is then corrupted. if i switch off,pause and then switch on again i get that same patter of characters
http://www.geocities.com/komodorecomrade/garbled.jpg .i have to wait for 30 min for the vic to completely cool for it to be
usable again. with liberal use of freeze i determined that the 2114L chip UE6 was locking the vic.now i can turn the vic on and off as much as i like.

but i couldnt determine which chip is causing the garbling of screen output. poke648,16:sys58648 made the screen better, can this command be modified to find out which chips are good/bad? thanks, K
komodorecomrade
Vic 20 Newbie
Posts: 18
Joined: Thu Jun 09, 2005 2:27 pm

Post by komodorecomrade »

the last two sentences were not that clear :oops:

http://www.geocities.com/komodorecomrade/garbled.jpg shows the problem of the locked vic , which i now have found to be 2114 UE6 overheating.

the remaining major problem is that of garbling text when typing in 90% of the screen (http://www.geocities.com/komodorecomrad ... deomem.jpg) besides the loading from tape problem - but i will look at tape problem later.

thanks for being patient with me and for all the help so far. i managed to play a few levels on my garden wars cart by giving UE6 a good spray with freeze :D
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

POKE 648,16 means video matrix starts at position 4096 ($1000), as opposed to position 7680 ($1E00) normally. If memory in this area seems fine, it could be one of the RAM chips. I don't know which goes where, but I believe each chip is 0.5K? In that case, by adding 2 to the value, you will move video matrix to a different RAM chip to test:

POKE 648,18:SYS58648 => video matrix at 4608 ($1200)
POKE 648,20:SYS58648 => video matrix at 5120 ($1400) and so on
POKE 648,30:SYS58648 => video matrix at 7680 ($1E00), default

The screen contains 22*23 = 506 characters, so you would only access one chip at a time?
Anders Carlsson

Image Image Image Image Image
bbell
Vic 20 Hobbyist
Posts: 125
Joined: Thu Mar 10, 2005 7:43 am

Post by bbell »

>poke648,16:sys58648 worked wonders.the screen is back to normal, though as you said Basic is not available.

This implies that it is the last 1K block of ram chips that is faulty. By entering this command, you are moving the screen to the second 1K ram chips.

Do you have a 2114 to replace the flakey one? When you say UE6 do you mean UB6? That would be the high bits of the last K of RAM. (the schematic I am looking at is http://www.mainbyte.com/vic20/e_schematic.pdf)

This could cause all of your problems.

Note though, that all these RAM's are selected through UC1 (74LS138), you may want to check it out too.

If you don't have another 2114, you could swap UE6 with UE5. This should correct the screen issue, but a faulty UE5 will still cause problems, because the machine will fail its initial memory test (which may cause the lockup screen of garbage you see).

BB
Guest

Post by Guest »

i checked again, the chip on my board is UE6. my UE6 causes lockup in the position shown on this board http://phantom.sannata.ru/museum/img/co ... ic20_6.jpg

i changed UC1 (138) & UB6 (lm555) yesterday but did not change symptomns.

can i find 2114s in other devices like TVs or old printers? what other everyday application are they used? also are the vic expander cartridges contain 2114s? thanks,

K
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

This page claims you can substitute 2114 with 2148:

http://maven.smith.edu/~thiebaut/270/da ... /2114.html

They seem to have been common in video games. You may be able to find loose chips for a reasonable amount if you are not going to scavenge some other equipment.

Aha, after 20 years of VIC-20 usage I finally found out the difference between the first revision and the CR: in the first revision there are eleven 2114 chips (1k x 4 bit, i.e. 512 bytes). In the CR revision there are three 2114 chips and two 6116 chips (2k x 8 bit, i.e. 2048 bytes).

Maybe I should try to learn a little more about diagnosing and repairing and have a go at my broken CR unit. I can't even recall if the LED lights when one turns on the power. And yes, I tried to change the fuse. Since I have a fully working first revision unit and am notoriously bad with a soldering iron, I never bothered to look more into it.
Anders Carlsson

Image Image Image Image Image
Guest

Post by Guest »

thanks for all the info

besides poking 648,16 to move vid ram,whichsolved the screen garbling, can i move Basic too? how is this done?

i can get a 3k expander cartridge quite inexpensively - for about the price of 1 new 2114.

it was mentioned earlier on that an expander cart would make the vic move video ram to a lower position - maybe out of range of the bad UE6 2114 ram.

with the cart would i have to poke something to move Basic or would vic handle this? where can i find out how vic assigns memory blocks of expanded/unexpanded memory ? thanks,
K
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Move Basic: POKE 44,18:POKE 4608,0:NEW will move start of Basic 512 bytes forward to accomodate room for the video matrix at 4096. This happens to be the default configuration when you add 8K memory expansion, due to the VIC chip can only access internal memory and Basic needs a workspace without holes.

A 3K cartridge will only move start of Basic (down to address 1024), it will not move the video matrix. You need 8K or more to make it happen. On the other hand, faulty RAM or some logic chip doing the selection will not be cured by adding more memory. Eventually, a program or data will need to be stored in the broken memory area, and then you're stuck anyway.

Schema made a PDF a while ago to roughly illustrate the memory map:

http://www.jammingsignal.com/vic20/vicmemory.pdf
Anders Carlsson

Image Image Image Image Image
komodorecomrade
Vic 20 Newbie
Posts: 18
Joined: Thu Jun 09, 2005 2:27 pm

Post by komodorecomrade »

>POKE 44,18:POKE 4608,0:NEW

this worked like a charm. vic was very stable. i could even write a program,using the whole screen. the poke solution will serve me till i find a replacement 2114.

any idea why the C2N datasette wont read what it has just saved or game tapes?

thanks
K
Guest

Post by Guest »

found C2N cable to be a bit flaky. now i can save and read from tape. a big thanks to every1 here,

K
Post Reply