Even more RAM for your 1541
What is itWhen I presented the first ideas for my 1541IDE, I mentioned the fact that it would be difficult to test a new Kernal without an EPROM-emulator. Raymond Day replied mentioning that he added 62 KB of SRAM to his 1541-II: 30 KB to be used for the 1541-II and 32 KB that can be used to replace the ROM to test a new Kernal. Unfortunately he had no schematic at hand so I developed one myself.
A special feature of this project is that no additional board is needed: piggybacking the ICs on top of each other does the addition. Another feature is that I do not only give you a schematic and a description of it, I also supply a description how to do it on a 1541-II. This "hack" can be done on a 1541 as well AFIAK. I still have to find out how to deal with the array used on 1541C boards.
Some preparationsI provided some means for my self to test almost every step of the project. In this case I used a BASIC program that wrote the first 10 characters of the alphabet to some memory locations and then read it again to display it on the screen.
STILL TO COPY FROM DISK !!!! 10 PRINT "WRITING TO RAM...." OPEN 1,8,15 FOR I=0 TO 3 : REM EVERY 8K FOR J=0 TO 9 : REM 10 CHARACTERS FOR K=0 TO 3 : REM 4 PAGES PRINT#1, "M-W";CHR$(J);CHR$(4+K+I*32);CHR$(1);CHR$(65+J+K*4) NEXT K : NEXT J : NEXT I PRINT "READING FROM RAM..." FOR I=0 TO 3 FOR K=0 TO 3 B$="" FOR J=0 TO 9 PRINT#1, "M-R";CHR$(J);CHR$(4+K+I*32);CHR$(1) GET A$ : B$=A$+B$ NEXT J PRINT I, K, B$ NEXT K : NEXT IThis program writes "ABC..." to $0400, "BCD..." to $0500 and so on for $0600 and $0700. The program repeats this every 8K.
Then it reads the contents of al the above locations. You will notice that the screen won't show "ABC..." for the $0400 location. Most likely you will see "PQR...". The reason for this is that the first 8K of the memory range are mirrored throughout the first 32KB. The effect is that you see the characters actually written to $6400.
If you don't see "PQR..." at the first line, either you made a type error, own a non-standard device or it is broken.
Please remember this screen.
The first 32 KB of SRAMThe 1541 originally only has 2 KB of SRAM onboard. The 30 KB add is done by disabling these 2 KB and adding 32 KB using a 32K*8 SRAM like the 57256.
* Piggyback the SRAM on top of the original one (most probably a 2016 or 6116): pin 3 of the 28 pin 32KB SRAM is soldered to pin 1 of the 24 pins 2KB SRAM. If you aligned the ICs correctly then pin 14 is connected to 12, 25 to 23 and so on. Don't solder the pins 20, 22, 23 and 26 of the 32 KB SRAM.
* Connect pin 1 to pin 20 of the 6502, 2 to 24, 26 to 23 and 23 to 22. This is not according the schematic but that doesn't matter.
* Connect pin 28 to pin 24 of the 2 KB SRAM and 27 to 21.
* Take a wire and connect pin 20, 22 and 28 with each other.
The above addition doesn't have any influence on the drive. You can check this by turning the drive on and loading and running the above BASIC program. You should get the same results.
The general idea is enabling this RAM when address line A15 is (L), but with the exception when the 6502 needs to address the I/O (= 6522's). A problem is the mirroring of the I/O throughout the range. Not only the waist of 6 KB of memory is a problem but also the fact that you aren't able to address more then 6 KB of memory in a row. So the next step is demirroring the I/O.
The I/O and original SRAM are selected using a 74LS42. address lines A14 and A13 aren't used in this process and that is what we are going to change by adding a 139 (Uxx).
* Between the 42 and the ROM you'll find a solderdot with a line running under the 42 to pin 12. Check this with an Ohmmeter. Double check: this line comes from pin 15, A15, of the 6502. Cut the line between the dot and the 42.
* Only if you want to add the second SRAM as well: solder a 5 cm long wire into the hole of this solderdot. * We solder two 4 cm long wires to pin 6 and 7 of the 42. We won't need them for the moment.
* Piggyback a 139 on top of the 42 and only connect the pins 8, 12 and 16 of both the ICs.
* Connect pin 13 of the 139 to pin 23 of the 6502, 14 to 24 and 15 to 25.
* Apply power to the 1541 and check if the drive light goes off. Run the BASIC program. The first four lines should show the familiar pattern, the other 12 could show anything.
Now we prepare the electronics to select the 32 KB SRAM.
* Piggyback a 74LS00 (Uxx) on top of the onboard 74LS08 (U1) by connecting the pins 7, 12, 13 and 14. If you don't want add the other SRAM, connect the pins 1, 2, 9 and 10 as well. * The two wires mentioned above are soldered to the pins 4 and 40. It doesn't matter which wire to which pin.
Solder a wire between pin 6 of the 00 and pin 1 of the 139.
* Solder a wire from pin 15 of the 139 to its own pin 2 and 3.
* Cut the line leading to pin 18/20 of the 2 KB SRAM and solder a wire between pin 24 and these pins.
* Remove the wire connecting the pins 20, 22 and 28 of the 32 KB SRAM with each other.
* Connect pin 20 and 22 with pin 4 of the 139.
* Start the 1541 up and start the above BASIC program. You should see this pattern:
The second 32 KB of SRAMAs said, 32 KB of SRAM is used to test a new Kernal. If you don't need this testfacility then skip this part.
* Piggyback a 32 KB SRAM on top of the other one. Solder all pins except 20 and 22. Connect these pins to 28 with an wire.
* The onboard 74LS08 (U1) has one unused gate: pin 11, 12 and 13. 12 and 13 are connected to +5V, cut these lines.
* Solder a 10K resistor between pin 14 and 13.
* Solder a wire from pin 2 to 9.
* Solder a wire from pin 1 to 11.
* With a little bit of luck you can bend pin 10 of the 00 to pin 11 of the 08. * Solder a wire from pin 34 of the 6502 to pin 12 of the 08 at the bottom side of the 1541.
* Solder a wire from pin 25 of the 6502 to pin 2 of the 00.
* Check if the 1541 still works fine.
* Cut the line between the solderdot pin 25 of the 6502 at the bottomside.
* Cut the line towards pin 22 of the ROM.
* Solder a wire between pin 22 and the wire in the solderdot.
* Connect the wire to pin 8 of the 00.
You just implemented the electronics needed to access the ROM parallel to the RAM. You can test it by simply applying power to the 1541.
* Connect the pins 20 and 22 of the second SRAM to pin 3 of the 00. * Solder a switch plus the needed wires between pin 13 of the 00 and ground.
All needed soldering is done now. I haven't tested the second SRAM yet. IMHO testing can be done by first copying the contents of the ROM to the second SRAM using "M-R" and "M-W". Turn the switch and try to load a program from this 1541. It should perform this task without any problem.
The next step could be changing a message. Changing the "OK" message is the most effective way to see to see the result as no other action is needed then reading the error channel (presuming the previous load was without errors).
You can email me here.