RAM test

Let's talk about anything related to the 6502 microprocessor.
Post Reply
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

RAM test

Post by Dan Moos »

This is probably a feature of dubious utility but I'll ask anyway.

How would one implement a power on RAM test, that is capable of determining how much actual RAM is available?

My first idea was to go through every address, first writing all 1's, and verifying, and then doing the same with zeroes. This would test the RAM for functionality but...

I have I/O directly after the SRAM If I try to write to that, currently my UART will get some sort of garbage activity!

My likely compromise will be to have the test stop before I/O space.

I know that this is a silly idea. More of a "satisfy curiosity" kinda thing.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: RAM test

Post by GARTHWILSON »

Make sure mirrored areas of the memory map can't give deceptive results, making it look like there's more RAM there when really you're just testing the same RAM again.

I've had this in the back of my mind for decades and never done anything about it; but since once the RAM is in there and working, it's not likely to ever go bad, especially without taking the whole system down such that software to test RAM won't run anyway; so if a system can have different amounts of RAM installed, I kind of like the idea of either having jumpers to read, or a value you put in flash or EEPROM to tell the system how much RAM is installed.
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?
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: RAM test

Post by Dr Jefyll »

Dan Moos wrote:
I have I/O directly after the SRAM If I try to write to that, currently my UART will get some sort of garbage activity!
Instead of having the initial memory test work upward, can't you just start immediately below the I/O and work downward?

As for mirrored (aliased) regions, maybe you can detect those by writing the address which you intend to test to that address. Move down by 8K (or whatever granularity seems suitable) and repeat until there's no more space (actual or aliased). When you read the values back any aliased locations will be apparent.

Finally, if desired, you can move on to exhaustive functional testing.

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: RAM test

Post by barrym95838 »

Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
cjb
Posts: 46
Joined: 26 Nov 2010
Location: NSW, Australia
Contact:

Re: RAM test

Post by cjb »

Something I've done was to calculate checksums of each page of memory, twice, and see if they were equal. This was viable on the particular hardware (a VIC-20 with a homebrew RAM, EPROM, and two-VIA expansion), where unconnected addresses returned semi-random values on a read, and the VIAs didn't get confused from when just reading their registers, but had timer regs that changed.)
Post Reply