• Please review our updated Terms and Rules here

PET ROM/RAM replacement board

Neat! And very interesting.
Questions comes to mind:
- is it possible to dump the a whole 64K of memory in one go? If so, how long would it take?
- would this board work on any machine with a 6502? (If firmware exists, of course)?
 
Thanks!

You can dump the whole memory at once, or any subset of the memory.
The speed of the dump would be determined by the baud rate of the USART on the microcontroller. Currently I have it set to 19200 baud, which would be 19200/8 = 2400 bytes per second. 64k / 2400 ~ 26.6 seconds for a full dump.
I haven't tried it yet but there should be no problem going to 115k baud, which would be a full memory dump in 4.45 seconds. This would include the ROM image you've programmed into memory, so you would not necessarily need to dump that part.

I imagine this could work in other 6502 computers. The 'mapping RAM' can be programmed to enable/disable parts of the memory map to correspond with the computer in question. I am currently using 6 address lines to the mapping ram, so I believe that corresponds to 1k granularity in control of the SRAM chip. So if that works with the desired machine you could set the memory map. With a small board revision more address lines could be used to increase the precision. And you would load the appropriate ROMs for the target machine.
 
Tried bumping up the baud rate to 115.2k and it works so far. Also tried out the board in an 8032, replacing the screen editor ROM contents with the CRTC version. Worked without any trouble.
Incidentally, I've been wondering if it's possible to add a piezo speaker to a PET 2001 with basic 4.0 roms by connecting it to the 6520. Anyone know if this is possible, or is this limited to the CRTC version?
 
Hey there,

At long last I got a chance to add a serial bootloader to the PETvet board, so I'm pretty much ready to send out the first few of these.
To reprogram the PETvet's controller, you remove a jumper on the board, connect it to a serial port, and power it up. Using a terminal program on your host computer, the PETvet will ask you to start an XMODEM transfer and replace the programming jumper. When you start the transfer and replace the jumper, the PETvet will receive the new firmware via XMODEM and reprogram itself. This is the mechanism for loading new ROM contents, memory maps, and jumper settings.

In this first batch I'll have 4 or 5 of these that I can send out. I'll be selling this first batch at cost, which will be somewhere around $45, and I will use the feedback from the first users to patch up any issues. They are a little tricky to assemble, so I'll be putting them together and sending them out assembled. There is a mistake on this first batch of boards which I'll fix with a couple of wire jumpers - the TX and RX lines to the serial port are reversed. Oops.
I've tested it so far on a PET 2001 with basic 2 and 4, and on an 8032 with basic 4.

A couple people have asked for one, so I'll send out PMs to these folks. I don't remember how many have requested them offhand. Please let me know if you are interested in one, and if there are some left in the first batch I'll get one out to you.

More information will be posted at:
http://bitfixer.com/PETvet
 
Hi there,

Just wanted to let people know,
As much as I wanted to get the PETvet boards out to the people who were interested, I made the frustrating discovery that there is an intermittent problem that seems to be happening on the PET 8032 when I use it with the PETvet. I've tested it on a couple of 2001s and it has been working perfectly on those.
The issue seems related to the interaction of the PETvet with the 8032's video RAM, and maybe some folks here can help me with it.
Here's the issue:

On the 8032, when powered up, the PET seems to boot fine - chirps, screen comes up with BASIC 4.0 prompt, and gives the full 32k of RAM free. When I hit enter several times, at first the screen starts scrolling down, and then the cursor starts jumping back and forth toward the right side of the screen. It does not seem to be very regular - sometimes you can scroll down the whole screen, sometimes just a few lines before this starts happening. Eventually if you hit enter enough, syntax errors start to come up, alternating between the left and the right of the screen.

I think there is a timing issue, because I tried switching out the 85ns 628128 RAM with a 70ns RAM, and it definitely improved - although still not 100%. If I run a basic program that loops from 1 to 1000, printing out the result, the numbers print down the left of the screen, but once in a while will jump to the right slightly as if tabbed inward..

On the 2001 I see no issues like this, and everything seems to behave properly.
Right now I'm just kind of banging my head against this and wanted to see if anyone had any ideas.. I'm thinking it may be related to the video memory but I'm not sure how. Welcoming any suggestions.. thanks!
- Mike
 
Well, to make things more confusing, I just tried a second PETvet that I had built on my second 8032, and I see no trace of the behavior I was observing before. Quite the quandry.
 
Well, to make things more confusing, I just tried a second PETvet that I had built on my second 8032, and I see no trace of the behavior I was observing before. Quite the quandry.

Mike,
This may indicate a timing problem that is sometimes allowing a skinny glitch. You can set up a logic analyzer for glitch detect mode, or for a quick & dirty test, try hanging a 100 pF capacitor (to ground) one at a time from the write enable signals and other candidate timing signals until you 'hit a nerve' and make things worse or clear up the problem. Then you can check the signal out further.

I am not usually an advocate of a shot gun approach, but sometimes the 'magic cap' method is worth an hours' time.
-Dave
 
Well, to make things more confusing, I just tried a second PETvet that I had built on my second 8032, and I see no trace of the behavior I was observing before. Quite the quandry.

Silly question, I know, but if you swap the boards does the problem follow the PET or the PEvet? ;^)

I've complained myself about the problem I've been having with two out of three of my Dynamic PET boards, in which I get the occasional video glitch involving misplaced or incorrect characters. I'm convinced on those machines the problem lies with the address multiplexor circuit in front of VRAM glitching, but I haven't been able to chase it down. I wonder if on the 8032 that's exhibiting the issue the delay introduced by the "mapper ram" could be causing a similar glitch? I get the feeling that the timing constraints in that circuity are really tight, and perhaps if the machine in question just happens to have a marginal cap or something somewhere on the board introducing the PETvet is just enough to push it over the edge?

Does changing the mapping settings on the PETvet affect things at all? (IE, lets's say you set the board up so the mapper just passes through everything, the RAM on the PETvet isn't used at all, does the problem persist?)
 
Thanks very much for the tips.
Did a bit more testing, and found out that the problem may lie with the individual PETvet I was using to test.
PETvet #2 so far has tested fine on *both* PET 8032s, while PETvet #1 showed the issue on 8032 #1. I am just about to test it on 8032 #2. What happens here will provide some useful information.
I'm going to check all the PETvet boards I've built so far to see if there's a discernable pattern. If only the one PETvet shows the problem, that's a good thing :)
The only difference with that board is that I used larger capacitors with the MAX232 serial driver, 10uF instead of 0.1 uF for the PETvet #1. The nominal value is 1uF for the MAX232 chip, but up to this point I haven't had any issues. Don't know if this is related to the problem or not.
I will test the various boards and see what happens.. Thanks again
- Mike
 
The problem indeed follows the PETvet and not the PET :)
PETvet #1 has issues on both 8032s, while PETvet #2 tested fine on both.
The issues did not appear exactly the same - on PET #1 the basic prompt came up fine and then the cursor started jumping to the right after pressing return a few times.
On PET #2 shows "commodore basic 4.0", then a line shifted to the right that says "11486.253 bytes free" (not the exact numbers, but something like that) and then a more shifted "ready" under that.
Which may mean that just this one board has an issue. I'm setting it aside for now and testing the others.
 
The problem appears to be confined to that one PETvet board, so I'm sure I made a hamfisted construction error somewhere.
The other PETvets, and a new one I just built are all testing properly on both the 2001 and the 8032, so I'm ready to send these out to the brave early testers. 2 have been sent out so far, with more to come. If you've sent me a message about a PETvet, I'll contact you about it in short order. I hope this gadget helps people to get their PETs (and possibly other 6502 computers) up and running.

The PETvet would also make a good start for a simple 6502 homebrew computer design. It takes care of the RAM, ROM, and addressing issues, and pretty much all you would need for a full computer is a clock source and a reset signal. There may be other details I'm forgetting but these are the biggies.
 
I have a couple of additional PETvets ready, and I'll get these out to the next brave testers soon.
I made another discovery which I don't quite understand, so perhaps some of you will know more than I.
I found out that a PETvet that I had previously tested to work on both a 2001 and an 8032 mysteriously stopped working on a 2001.
After some nervous headscratching I realized that I had swapped the 6502 which used to be in the PETvet with the processor which was originally in one of the 8032s - While my other 6502s had the MOS logo, with "MPS 6502", this had an "S" type logo and had a model number "SY6502A".
All of the MOS 6502s that I tested worked fine in the PETvet, but the SY6502A did not, and it was not completely consistent. Perhaps one out of 10 times I tried it, the beginning of a "Commodore BASIC" message was on the screen with some additional garbage characters.
I imagine there's a subtlety of timing that is causing the difference.
Just wanted to see if anyone had any insights into this. But so far every MOS 6502 has worked in the PETvet without issue.
 
Just wanted to see if anyone had any insights into this. But so far every MOS 6502 has worked in the PETvet without issue.

No insights, but I can try to replicate your results when I finally get hacking on my PETvet. I'm pretty sure my "spare" 6502 is a Synertek label one. (Actually, come to think about it I think it's that "spare" that's actually installed in my 2001-N/4032.)

When you say "2001" do you mean a static RAM 2001, or a Dynamic RAM (2001-N) board?
 
Hello,

Today, I received the PETVet from Mike.... This is my first experience with this wonderful device. Like Tezza said, the analogy of pacemaker to a human heart, the PETVet is for the PET.

From my experience on my PET2001-8 repair, having built Scouter3D PETROM/RAM replacements, I should have been content with the setup.
However, the PETVet as is gives my PET2001-8 additional (new) specs:
1. New set of ROMS ---BASIC 2 ROM
2. Additional memory -- 32K of RAM
3. Flashable ROMS
4. Additional features...see documentation at bitfixer.com
....http://s6.postimage.org/r11i8039d/BASIC2_32_K.jpg

...notice that I still have that screen anomaly (location 513 character on the screen).

Well, I emptied out again all ROM/RAM sockets, took the MOS6502 cpu and plugged it into the PETVet board.
The PETVet comes with 3 switch settings. SW setting #1 is for my PET2001. Mike has already set it up for me. I referred to the first PETVet documentation just to confirm things are set properly.
-http://s6.postimage.org/db6yz7g5d/PETVet_Close_Up.jpg

The PETVet has a 'socket-header-socket' combination which would allow it to be plugged in to the 6502CPU socket on the motherboard. It sits perfectly, right height and right placements.
Here are some of the first pics I made...
http://s6.postimage.org/7fd1bt0u9/PETVet_Pics2.jpg
http://s6.postimage.org/wrrolqb9d/PETVet_Close_Up1.jpg
http://s6.postimage.org/4ntrl72bl/PETVet_Side.jpg
http://s6.postimage.org/gymq59och/PETVet_Pics1.jpg

I loaded the first CURSOR#16 cover from tape, ran it for a while and left the PET as if it is on a 'burning test'.
Everything runs cool (ATMEGA, RAM, ROM and support chips) or 'just warm'. However, the MOS6502 chip has a hot spot on the middle. I might take a small heatsink in glue it on top of the 6502 chip --give it a longer life.
Here it is in action!!
http://s6.postimage.org/pfm8g6t1d/PETVet_In_Action.jpg

New Life indeed to an Old friend! PET2001-32

Rizal
 
Great to hear that the PETvet is working for you!
As soon as I get some time I'll be posting the full source code and detailed instructions about how to flash the firmware and reprogram the ROM images. Also two additional brave testers will be getting their PETvets shortly.
With the input from the first few PETvetters I can hopefully fix up any issues before making another batch of PCBs.
Anyway, great that this could bring some new life to an old buddy.
 
Great pictures Riza, thanks for posting.

Mike (gubbish), what happens with those boards where the RAM is soldered in. Does the PETVet bypass that RAM somehow?

Tez
 
Back
Top