• Please review our updated Terms and Rules here

6502 Assembly Language Question.

Stupid question, I know--but if you have spare RAM in other areas, why not save the cells you need in page 0 elsewhere and then restore them when you're done?
That is a good suggestion. One reason I went down the "don't touch page 0" pathway was that I had never tried to code anything in 6502 and I knew it was heavily used by BASIC in the PET. It was only after I started learning to do it recently for the 6502 that I found about about the limitations in the addressing modes to code things like indirect addresses outside of page 0. I had not struck this before when writing some simple assembly programs for the 8080 and the 8088. That surprised me, so I became obsessed with trying to get around that issue. I have got the self modifying code working now, so I am going to stick with it for now.
 
If keeping it original isn’t a concern there are certainly many ways to skin the cat of putting SRAM in there in place of the DRAM. (Under the CPU daughterboards, mostly, but the expansion connector certainly works if you disable the onboard memory select.) There are several flavors of those solutions out there for sale.

I don’t know if what you’re seeing could be related, but I actually have two Dynamic boards that have an intermittent *video* memory corruption issue; run something that updates the screen constantly, like a video game, and the occasional write will get corrupted or misplaced. The SRAM isn’t the problem, I can swap it into another board I have and it’s fine. My suspicion is that there’s something wonky happening with the address multiplexer circuit that flips the address presented to the vram between the CPU and the video address generator circuit, and it might be an “analog” problem because some aging component is messing with signal timing. (And I somehow have managed to leave figuring this out on my to-do list for almost a decade at this point.)

Anyway, it wouldn’t surprise me at all if some similar subtle issue could randomly happen in the address multiplexing circuitry that drives the DRAM in these things, that stuff isn’t any younger and timing is probably even more critical.
DRAM definitely seems more finicky as it ages than SRAM, in my limited experience with it, which is mainly on S-100 boards and now the PET. Whether it is the control circuitry or the DRAM itself I'm not sure, but plain TTL chips seem a lot more reliable than actual DRAM IC's. Your problem with the video SRAM likely must be in the circuitry around it if the SRAM doesn't do this in another computer, but it would pay to replace the SRAM just in case it was a marginal condition in the original computer vs the particular SRAM IC's. As an experiment you could also try adding some additional 0.1uF bypass caps in the region of that circuitry, to see if it helped.

I was thinking an added 32k sram module would also get around that horrible pcb drill hole vandalism on some Dynamic PET boards. I am going to make a board at some point. In my case when I make modifications to vintage computers (or any vintage machines) I try to do it using period correct parts, as if it could have been done around the time it was made. I will probably make a board that plugs onto the expansion connector with sixteen of the very lovely Toshiba TMM2016 SRAM IC's on it. That would look very nice I think. And if wanted a 2716 ROM or two could also go in a spot (replacing a TMM2016) to hold a program or two.
 
Last edited:
Back
Top