Reliable 6502/OSI Memory Test?

User avatar
glitch
Posts: 176
Joined: Mon Nov 28, 2011 12:43 am

Reliable 6502/OSI Memory Test?

Post by glitch »

Does anyone have a reliable memory test they like for OSI in specific, or 6502 in general? I recently found one on one of the boss's old 8" floppies, but I'm starting to suspect it doesn't work properly. It sometimes runs for hours without finding a problem, and will then bomb almost instantly on the same ranges with the same RAM boards.

Prefer something that's OS-65D or OSI load format ready, but I can of course build it myself from source.
Check out The Glitch Works
OSI Challenger 3, 510 CPU, 8" floppies, 23 MB hard disk system starting to work!
Parts bin Challenger 3 board set, never had a chassis in its time
User avatar
glitch
Posts: 176
Joined: Mon Nov 28, 2011 12:43 am

Re: Reliable 6502/OSI Memory Test?

Post by glitch »

So I found a disk labeled "MEMORY TEST" in some of the OSI disks I've got. This one loads super fast off 8" disk and doesn't generate random failures on my known-good GW-OSI-RAM1 board. The disk label said it was OS-65D format, so I imaged it with C3DUMP and went to start digging into it. I found out about OSI Disk Dump Utility today which I tried to use on the image, only to find out that it didn't like it! No directory on track 8, just a blank sector.

I thought maybe the disk was just really old and predated on-disk directories (IIRC OS-65D pre-2.0 lacked an on-disk directory, and you had to keep it on paper). I wrote a little Ruby script to rip through part of the C3DUMP image and give me binary output, through which I discovered that the disk was in fact OS-65D 3.0! In addition to not having a directory, track 1, which should be the rest of OS-65D, was instead the memory test program! I guess that's how they got it to autoboot into the memory tester, since the OS was apparently jumping into track 1 once it was loaded to 0x2A00.

The program is nice in that it auto-sizes main memory, and searches for extra memory in high address space (video mem, memory for CP/M, hard disk dual port RAM, etc.). It loops after it finishes a pass, from the strings contained in track 1 I'm not entirely sure that's how it's supposed to do.

Anyway, I have extracted track 1 and will run it through IDA at some point to figure out what it's doing, and how effective of a memory test it is. Until then, here's the disk image, in C3DUMP ASCII format:

http://filedump.glitchwrks.com/software ... _TEST.OSD8
Check out The Glitch Works
OSI Challenger 3, 510 CPU, 8" floppies, 23 MB hard disk system starting to work!
Parts bin Challenger 3 board set, never had a chassis in its time
User avatar
glitch
Posts: 176
Joined: Mon Nov 28, 2011 12:43 am

Re: Reliable 6502/OSI Memory Test?

Post by glitch »

I had some time to work on disassembling the above memory test. It's interesting code! A lot of self-modification. It's not really an OS-65D program as much as it's a hacked on version of OS-65D with a memory test built in. When the disk boots, it loads as usual to 0x2200. Going off the OS-65D disassembly from Lifeboat Associates, it seems the first part is pretty normal: set up disk/track/sector selection and read track 1 into 0x2A00.

Instead of then setting up the printer, there's a JMP into the code from track 1 at 0x2A00. That seems to be the entry point for the memory test. It uses its own character output and string printer, both of which talk to the 65A ROM monitor, so it's not using OS-65D I/O facilities and it's specific to serial systems with the 65A (Challenger 3 style) ROM monitor. Being as how it's loaded at 0x2A00 instead of the rest of OS-65D being loaded there, parts of the program conflict with variable storage from OS-65D, such as the byte for storing the default I/O distributor devices.

I've only partially completed the disassembly, and I'll post the source once it's finished. I get the feeling this will be more of a "quick and dirty" memory test for C3 serial systems, not something you'd really want to qualify a board with. I did get a chance to hammer on the memory test that Mark uploaded late last week, *that* seems to be a proper memory test that really flogs system memory. It's intense enough that it caught a backplane fault in my main C3 system! I'd recommend using that if you need a good memory test. Link below in case folks find this in the future:

http://osi.marks-lab.com/software/tools.html

It's at the bottom of the page. Be aware that the character output will produce garbage on a terminal that is set for 8N1 and does 8-bit ASCII. I set my PC's terminal emulator (minicom) to 7E1 to get around it.
Check out The Glitch Works
OSI Challenger 3, 510 CPU, 8" floppies, 23 MB hard disk system starting to work!
Parts bin Challenger 3 board set, never had a chassis in its time
Mark
Posts: 293
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Reliable 6502/OSI Memory Test?

Post by Mark »

Thanks for testing this!

The ACIA is initialized by the OSI ROM as 8N2, and the memtest program never resets it.
8N1 would be far more useful these days. I'll fix it in the next version.

Cheers,
-Mark
User avatar
glitch
Posts: 176
Joined: Mon Nov 28, 2011 12:43 am

Re: Reliable 6502/OSI Memory Test?

Post by glitch »

Stop bits shouldn't confuse the receiving end, too many stop bits *almost* never matters. It's probably sending something to the ACIA that has the high bit set. I'm not sure if this is a modification that you made or if this is just a slightly different version, but the RAM test I have on disk doesn't print the up-count on serial systems, only video systems -- perhaps something in the up-count is getting sent to the ACIA that's meant for screen rendering?
Check out The Glitch Works
OSI Challenger 3, 510 CPU, 8" floppies, 23 MB hard disk system starting to work!
Parts bin Challenger 3 board set, never had a chassis in its time
Mark
Posts: 293
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Reliable 6502/OSI Memory Test?

Post by Mark »

No I totally changed the memory test display but none of the functionality. I didn't have access to the C3 version when I started, so I took the C1P/video version and modified it to run under both systems. I figured all the terminals used today would all respond to ^H, so I allowed the increment counter to be displayed on the C3 terminal as well, backspacing over the previous values until printing the loop success character. At least it gives an indication that *something* is going on.

The memory test doesn't change the I/O configuration of the system ACIA, so I don't know why the high bit is set on your system. It was working correctly on the simulated OSI, which ignores the actual serial word, so I know the data going in is only ASCII. My only guess is it saturates the output stream, and it is losing start bit synchronization. I believe a continuous 11bit word serial stream without pauses will confuse a 10 bit word decoder. Anyway its an easy enough change to go from an 11bit 8N2 to a 10bit 8N1 to see if that fixes it. Source and build tools are included with the download in case you're interested, but I plan on testing it on my real C3 system and updating it next week once I clear some bench space. Memory space is tight. Getting it to work on all systems & popular ROM versions, survive resets, and still reside within the 1st 1K is challenging, but there is some available stack space used in the C3 version that will allow for the change.

-Mark
User avatar
glitch
Posts: 176
Joined: Mon Nov 28, 2011 12:43 am

Re: Reliable 6502/OSI Memory Test?

Post by glitch »

I much prefer your version with continuous display of progress -- I was never sure with the other if it'd run off into the weeds, or was still testing! In fact, when testing it out, I used the prototype GW-OSI-RAM1 board with the lamp register on it, mapped for the middle of memory, just so I could see the lamp pattern change now and then :)

It could also be an issue with 8N2 on USB -> RS-232 converters. On a real terminal, it doesn't display garbage, but I believe I had the terminal set for 7-bit ASCII anyway. I'll try and test with a real RS-232 port some time. I'm out of the shop for the weekend though.
Check out The Glitch Works
OSI Challenger 3, 510 CPU, 8" floppies, 23 MB hard disk system starting to work!
Parts bin Challenger 3 board set, never had a chassis in its time
CrawfordG
Posts: 21
Joined: Sat Jun 22, 2019 7:38 pm

Re: Reliable 6502/OSI Memory Test?

Post by CrawfordG »

Jonathan,

I really wish I had checked the forums yesterday! I needed to check my 520 board s on my C3, and found a mem test in the Small Systems Journey that Bill Dromgoole sent me. Spent a chunk of time checking the hex codes, translating to serial load format, etc. and got it running.

OSI 520 boards (or at least mine) are really heat sensitive. I rigged up a fan, and they all run rock solid now. I still can’t wait to replace them with the OSI-RAM card though.

-Crawford
User avatar
glitch
Posts: 176
Joined: Mon Nov 28, 2011 12:43 am

Re: Reliable 6502/OSI Memory Test?

Post by glitch »

AFAIK, the design itself is not heat-sensitive, and actually the SEMI4200s usually run pretty cool. You may have iffy sockets or something, basically all of my 520 boards needed sockets replaced.
Check out The Glitch Works
OSI Challenger 3, 510 CPU, 8" floppies, 23 MB hard disk system starting to work!
Parts bin Challenger 3 board set, never had a chassis in its time
Mark
Posts: 293
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Reliable 6502/OSI Memory Test?

Post by Mark »

I set up my C3 system today and finally ran MemTest on real hardware. Happy to find it still boots and so far no memory issues!

I located the binary output that glitch ran into for at least 2 characters in the output stream. The program now resets the ACIA to 8N1 and filters output to 7bits, just in case. I also fixed the stack pointer on the C3 version to hopefully survive resets and use better.
I've updated the version on the tools page on my website. Get TestMem.zip Source & build tools are included.
Feel free to copy it here too Dave!

-Mark
Post Reply