The Mosaic 64K RAM Card
Atari Supercharge
LeRoy J. Baxter
|
I found the prospect of dismantling my Atari 800 to install the Mosaic Select (64K memory board) a bit frightening since I had never been inside a computer before. As it turned out, however, I shouldn't have worried. The computer won't fall apart just by breathing on it, and it is not really any more delicate than a stereo or calculator.
My new memory board was actually designed for the Atari 400, but had been especially modified (components added) to work in the 800. Even though the installation manual was written for the 400, it was clear and complete enough to be of great help in modifying the 800. (By the time you read this, Mosaic should have the memory board for the 800 available and you won't have to translate instructions from the 400 manual.)
Once the computer is disassembled, only two modifications need to be made:
First, a two-wire cable needs to be soldered to the main board. It may be best to use a pencil-type soldering iron with a very small tip. If you have not soldered a printed circuit board before, this is the one step you may want someone else to do.
The second modification requires relocating one of the computer chips from the main board to the new memory board and installing a preassembled flat ribbon jumper cable from the socket on the main board to the memory board.
The rest of the job is just a matter of reassembling the computer in reverse order from its disassembly--a task that can be done in one evening and, with a little practice, could probably be done in less than a half an hour.
Mosaic uses only the best components and gives an amazing four year guarantee that is not limited by a lot of hedges and/or disclaimers.
Just Another Memory Board?
The Mosaic 64K Select is memory expansion with a difference. The diagram in Figure 1 tells the story.
First, Select expands the RAM of your Atari 400 to the design maximum of 48K and then goes on to give you 4K more RAM located in the unused ROM area. Further, this 4K of additional RAM is really 16K -- it is addressable as four software-selectable banks of 4K each. The Atari 800 can support three of these boards, giving you 32 banks of 4K each for an astounding 192K of RAM.
Further, Mosaic has taken great pains to make their 64K memory board totally compatible with all existing software. The 4K banks are placed in the unused area between the Basic cartridge and the Operating System ROM -- an area presently untouched by Basic, the Operating System, DOS, or any software. The method chosen for Bank Switching also precludes any software incompatibility as Bank Switching is accomplished by writing (ie. POKE) to ROM. Since the ROM areas are cast in stone (silicon), as it were, nothing is actually written -- it is the act of writing that is important. The specific address that you try to write to determines the Bank that will be selected (see Listing 1).
Note that while the Mosaic 64K Select is totally software compatible, it is not compatible with certain hardware modifications such as the 80-column board.
With the Basic cartridge removed, machine-language programs such as the Atari Word Processor or Visicalc see 52K of continuous RAM -- a big boost in available RAM.
With the Basic cartridge installed (or Microsoft loaded), the normal 40K maximum RAM is available, along with the four 4K banks that Basic can't see (at least not without help).
Figure 1.
What good is "invisible" memory? One of the big problems with using machine-language routines with Basic has been finding a safe place to put them. Until now, page 6 (memory starting at 1536) has been a popular place. Too popular in fact, and a dangerous place since under certain conditions, cassette input will use the bottom half of page 6 as a buffer. Any machine-language routine stored there will be lost. This can be especially damaging if the routine is a Vertical Blank routine.
In contrast, machine-language routines or data stored in the Select Banked Memory areas are 100% safe. An entirely new program may be loaded without affecting anything stored there. In addition, a lot more room is available -- a whopping 4096 bytes instead of just 256 bytes for page 6.
If you have a Mosaic Select, try this:
10 POKE 65472+0,0:REM SELECT BANK 20 DIM A$(19):A$="this is a LOAD test" 30 FOR X=1 TO 19:POKE 49152+X,ASC(A$(X,X)):NEXT X
then type:
RUN
NEW
LOAD "D:filename" (load any program) or load a program from cassette
finally (in Direct Mode):
FOR X=1 TO 19:? CHR$(PEEK(49152),A;:NEXT X
Pressing System Reset does not affect the stored data. Only turning off the computer or overwriting the data will destroy it.
Player/Missiles and Character Sets
With normal memory management, finding a suitable place for Player/ Missile data and/or redefined Character Sets can be a problem. Care must be used to position PM BASE and/or CH BAS on the appropriate 1K or 2K boundary. If the memory area is reserved by moving RAMTOP, then care must also be used to prevent the Display Memory from crossing a 4K boundary. The pitfalls are many and often large blocks of memory end up unused.
Other Applications
The Mosaic Select is in keeping with the open-ended, nature of the Atari itself. Many additional applications come to mind:
1) Relocate the String-Array space to the banked memory area. This could be useful for chained Adventure programs or for Financial/ Budget applications that do different things with the same data. The String-Array data would be instantly available to each program as soon as it was loaded and run.
2) Different sets of data could be loaded into each of the four banks, letting one program act like four. Each set of data would be instantly available with a single POKE.
3) The possibility exists that relatively short Basic programs (less than 4K each) could be stored in each bank, allowing four totally independent (and one Master) programs to be in memory at once and available with just a few POKEs.
4) Machine-language programming Utilities, DOS Utilities, and/or Wedges could be stored in these banks. These utility programs would be easily accessed but would not be affected by LOADs, SAVEs, or RUNs. Nor would they ever conflict with the Basic program area or the Display List/ Display Memory. Different utilities could be stored in each bank and accessed when needed.
5) For Assembly-language programmers using the Atari Assembler Editor, machine-language routines could be written and assembled in the memory area where they will reside a lot easier than writing relocatable code.
6) The fact that each bank is selected by a single POKE allows various forms of "Page Flipping." The program in Listing 1 demonstrates how this can be done. A separate display is placed into each bank and then the banks are flipped using a short machine-language Vertical Blank routine. This kind of page flipping allows color blending and the mixing of text and graphics.
Note that with 4K in each bank, Graphics 6 is the highest resolution mode that can be used. A Graphics 7 Display Memory can fit into 4K, but not both the Display List and the Display Memory.
Also note that if overlaying different graphics modes, either the Display Lists must start at exactly the same memory location, or the Display Lists must be chained.
As with the Atari itself, the list of applications goes on, limited only by the programmer's ability and imagination.
The Future
The first practical applications will probably be Programming Utilities and Wedges that can be relocated to lower memory areas if Select has not been installed. The 64K board will mean that more of these utilities can be in memory and available to the programmer at any one time with less interference with the main program.
The second most practical application might be for Player/ Missiles and Character Set data. By simply writing to a location in this area and then reading that same location, the existence of 64K can be determined.
POKE 49152,3:IF PEEK(49152)=3 THEN PMBAS=49152/256: etc.
Assembly-language programs can check against RAMTOP. If RAMTOP is greater than 192, then 64K is installed.
I am sure that the future will see commercial programs written that will test for the existence of 64K RAM and will load in more data for bigger and better programs if it is installed.
The Mosaic 64K RAM Select appears to be an innovation whose time has come.
Listing 1.
5 REM "YOUR NAME IN LIGHTS" (C) 1982 by LeRoy J. Baxter 6 REM IF TOO MUCH FLICKER, ADJUST TV BRIGHTNESS AND CONTRAST 10 POKE 106,207:REM RAISE RAMTOP 20 BNKBAS=65472:BANK=0:BANKSELECT=2000 30 POKE BNKBAS+1,BANK:GRAPHICS 5+16 35 REM GET START ADDR OF GR.5 DISPLAY LIST 40 AL=PEEK(560):AH=PEEK(561):AD=AL+256*AH 50 POKE BNKBAS+2,BANK:GRAPHICS 5+16 60 POKE BNKBAS+3,BANK:GRAPHICS 2+16:B=PEEK(560)+256*PEEK(561) 70 POSITION 8,5:? #6;"your":POSITION 8,6:? #6;"name" 75 REM MOVE GR.2 DISPLAY LIST TO START AT SAME LOCATION AS GR.5 LIST 80 FOR X=0 TO 18:POKE AD+X,PEEK(B+X) 90 IF PEEK(B+X)=65 THEN POKE AD+X+1,AL:POKE AD+X+2,AH:X=18 100 NEXT X 110 POKE BNKBAS+0,BANK:GRAPHICS 5+16:POKE 710,154 115 REM NOW DRAW TO GR.5 SCREENS -- 1/3 OF DATA TO EACH BANK 120 FOR X=0 TO 15:READ A:POKE 1750+X,A:NEXT X 130 FOR X=0 TO 10:READ A:POKE 1710+X,A:NEXT X 140 FOR X=0 TO 2:POKE BNKBAS+X,X:COLOR X+1:PLOT X*2,19:DRAWTO X*2,28 150 PLOT 79-X*2,19:DRAWTO 79-X*2,28:NEXT X 160 FOR Z=0 TO 2:COLOR Z+1:BANK=Z 170 FOR X=39 TO Z STEP -1:GOSUB BANKSELECT:PLOT 39-X,18-Z:PLOT 40+X,18-Z:PLOT 39-X,29+Z:PLOT 40+X,29+Z:NEXT X 180 READ A:FOR X=1 TO A:GOSUB BANKSELECT:PLOT 39-Z,18-X-Z:PLOT 40+Z,18-X-Z:PLOT 39-Z,29+X+Z:PLOT 40+Z,29+X+Z:NEXT X 190 FOR X=1 TO 4:GOSUB BANKSELECT:PLOT 39-X-Z,18-A-Z:PLOT 40+X+Z,18-A-Z:PLOT 39-X-Z,29+A+Z:PLOT 40+X+Z,29+A+Z:NEXT X 200 READ A:FOR B=1 TO A:READ X,Y:GOSUB BANKSELECT 210 PLOT 39-X,18-Y:PLOT 40+X,18-Y:PLOT 39-X,29+Y:PLOT 40+X,29+Y:NEXT B 220 NEXT Z 230 FOR X=0 TO 2:POKE BNKBAS+X,X:POKE 49152,3:NEXT X:REM SHADOW REG. FOR BANK # 240 X=USR(1710):REM START BANK FLIPPING 250 FOR X=0 TO 2:POKE 1700,X:FOR T=1 TO 20:NEXT T:NEXT X:GOTO 250 280 REM PAGE FLIP ROUTINE 290 DATA 174,0,192,224,3,240,3,174,164,6,157,192,255,76,95,228 300 REM SET VBLANK ROUTINE 310 DATA 104,162,6,160,214,169,6,32,92,228,96 320 REM SCREEN DATA 340 DATA 10,24,5,11,6,11,7,12,8,12,9,13,10,14,10,15,9,16,8,17,7,17,6,17,5,17,4,17,3,16 350 DATA 2,16,1,15,1,14,2,13,3,13,4,13,5,14,6,14,6,15,5,15 360 DATA 6,37,6,8,7,8,8,9,9,9,10,10,11,11,12,12,13,13,14,14,15,15,16,15,17,16,18,16,19,17,20,17,21,17 370 DATA 22,16,23,16,24,15,25,14,25,13,24,12,23,12,22,11,21,11,20,10,19,10,18,10,17,11,16,12,17,13 380 DATA 18,14,19,14,20,15,21,14,20,13,20,14 390 DATA 2,54,7,5,8,5,9,5,10,5,11,6,12,6,13,6,14,6,15,6,16,7,17,7,18,7,19,7,20,8,21,8,22,8,23,8 400 DATA 24,9,25,9,26,9,27,9,28,9,29,10,30,10,31,10,32,10,33,9,34,9,35,8,36,8,37,7,37,6 410 DATA 36,5,35,5,34,5,33,4,32,4,31,4,30,4,29,4,28,5,27,5,26,5,25,6,26,7,27,7,28,7,29,7 420 DATA 30,8,31,8,32,7,32,6,31,6,31,7 2000 POKE BNKBAS+BANK,BANK:BANK=BANK+(BANK<3)-3*(BANK=2):RETURN
LeRoy J. Baxter, 15601 S.E. Oatfield Rd., Milwaukee, OR 97222.
Table of Contents
Previous Section: Keyboard for the Atari 400
Next Section: Atari 1200