class room



APPENDIX ELEVEN

THE ATARI XL COMPUTERS

This book was finished just as the 600, 800, 1400 XL computers were about to be released. Atari has been late in releasing information about the new computers, but our secret "mole," DEEP CHIP, reports that the new computers use the same OS. Experiment to be sure and we will update this section in a future edition. We also have been told that customer service will provide a disk that can cause an XL computer to act like a 400/800. Call them if you have trouble running older programs on your computer.

You may already be aware that there is a big difference between the 1200XL and the earlier Ataris. Not only are there more features, but a lot of the software written for the 400/800 won't run on the 1200XL. Why not? Well, a lot of changes were made to the operating system, and all the people who used parts of the OS other than the vectors found that their programs didn't work on the 1200XL. Even Atari was guilty. So before we take a look at where the differences are, let me once again emphasize that you should never, never, never use any part of the OS other than the safe vectors (see Appendix Thirteen). This means that you should stay away from the OS RAM locations, with the exception of locations that the average person may want to use. This means that locations like LMARGN (82) and CRSINH (752) are safe, but locations like PBUFSZ (30) and FREQ (64) are not. The BASIC manual has a partial list of "safe" locations, with the exception of NEWROW and NEWCOL (96 through 98). If in doubt about whether or not you can use a location, don't. If you absolutely have to, get hold of both types of computers and make sure it works on both.

1200XL OS MEMORY MAP

Before we get into the specific changes to the OS, the following will give you an idea of where things are in the 1200XL memory. It assumes that DOS 2.0S is loaded, and that there is 48K memory. You should be able to make the appropriate changes for no DOS or less memory (Figure 61).

0-    127
0000-007F OS page zero RAM
128-    255
0080-00FF BASIC or user page zero RAM
256-    511
0100-01FF 6502 stack
512- 1535
0200-05FF OS RAM
1536- 1791
0600-06FF Free RAM
1792- 7419
0700-1CFB DOS
7420-40959
1CFC-9FFF BASIC or user RAM
40960-49151
A000-BFFF Cartridge
49152-52223
C000-CBFF OS ROM
52224-53247
CC00-CFFF International character set ROM
53248-53503
D000-D0FF GTIA
53504-53759
D100-D1FF Currently unused
53760-54015
D200-D2FF POKEY
54016-54271
D300-D3FF PIA
54272-54527
D400-D4FF ANTIC
54528-55295
D500-D7FF Currently unused
55296-57343
D800-DFFF Floating point package
57344-58367
E000-E3FF Regular character set
58368-65535
E400-FFFF OS ROM
       
            FIGURE 61. 1200XL memory locations

treasure chest



1200XL OS RAM DIFFERENCES

This section will summarize the differences between the version "B" OS and the 1200XL OS. I apologize that the explanations are not more thorough; detailed information on the 1200XL was not easy to come across at the time of this writing.

LINFLG
0            0000

Used while originally debugging the OS.

NGFLAG
1            0001

A flag for the powerup self-test routine. When you first turn on the 1200XL, it checks all its memory locations to make sure they're working correctly.

ABUFPT
28-31        001C-001F

These locations are simply described as "reserved," but from the name I suspect they are some kind of buffer pointers.

PTIMOT, which used to be at location 28, has been moved to 788.

PBPNT has been moved to 734.

PBUFSZ has been moved to 735.

PTEMP no longer exists.

LTEMP
54,55         0036,0037

This, along with any other locations that have the word "loader" in their description, is used by the relocating loader that the 1200XL uses to upload device handlers through the serial I/O port. As this description implies, it's not really something you need worry about.

CRETRY has been moved to 668.

DRETRY has been moved to 701.

ZCHAIN
74,75         004A,004B

A temporary handler loader location

 CKEY has been moved to 1001

CASSBT has been moved to 1002.

FKDEF
96,97         0060,0061

There are four function keys on the 1200XL, labeled F1, F2, F3, and F4. FKDEF points to a table of values for the keys. When you press F2, for example, the second value in the table is used as the ATASCII value for the key. There are eight bytes in the table all together, with the last four being for Shift-F1, Shift-F2, Shift-F3, and Shift-F4. You can, if you want, change FKDEF to point to your own table.

NEWROW has been moved to 757.

NEWCOL has been moved to 758.

PALNTS
98         0062

If PALNTS equals zero, then this is an NTSC Atari. Otherwise it's a PAL. See PAL at location 53268 for an explanation of the two.

NEWCOL+1 has been moved to 759.

KEYDEF
121,122         0079,007A

In the 1200XL, not only can you redefine the function keys, you can also define the whole keyboard with the help of KEYDEF. Well, almost the whole keyboard. KEYDEF is of no help if you want to redefine the following:

BREAK, SHIFT, CTRL, OPTION, SELECT, START, RESET, HELP, CTRL-1, CTRL-F1, CTRL-F2, CTRL-F3, CTRL-F4.

What KEYDEF does is point to a 192-byte table. This table contains the ATASCII values to be assigned to the various keys. Here's how the bytes are used:

0- 63  
Key alone
64-127
SHIFT plus key
128-191
CTRL plus key

And here's how the keys are ordered within each group of 64 bytes (Figure 62).

 
0
1
2
3
4
5
6
7
  0
L
J
;
F1
F2
K
+
*
  8
0
 
P
U
RET
I
-
=
16
V
HLP
C
F3
F4
B
X
Z
24
4
 
3
6
ESC
5
2
1
32
,
SPC
.
N
 
M
/
INV
40
R
 
E
Y
TAB
T
W
Q
48
9
 
0
7
BS
8
<
>
56
F
H
D
 
CAP
G
S
A

            FIGURE 62. 1200XL keyboard layout




Suppose, for example, you pressed the "M" key. "M" is in the column marked "5" and the row marked "32", which means it is byte 37 (32+5). SHIFT-M would be the 101st byte (37+64), and CTRL-M would be byte 165 (37+ 128). These are the three bytes you would use to store the ATASCII values that you want assigned to those key combinations.

Before you attempt to change the table, you may want to check the one currently being used to get an idea of which values are assigned to each key. This will help you with keys like CTRL-CAPS and so forth. Once you've set up all 192 bytes somewhere in memory, change KEYDEF to point to the table.

ROWINC has been moved to location 760.

COLINC has been moved to location 761.

LCOUNT
563         0233

Another temporary loader variable.

RELADR
568,569         0238,0239

A loader variable.

RECLEN
581         0245

Another loader variable.

Noname
583-618         0247-026A

Reserved for undocumented uses.

LINBUF no longer exists.

CHSALT
619         026B

CIA



The 1200XL has two built-in character sets: the regular one and a new international one. CHSALT supposedly holds the address (in pages) of the one that is not being used at the moment. It does not, however, seem to have any function at all on the 1200XLs I've been using.

You can use CTRL-F4 to switch between the two character sets.

VSFLG
620         026C

This is a temporary fine-scroll location.

KEYDIS
621         026D

If this location is set to 255, then the entire keyboard is disabled, with the exception of the following:

CTRL-F1, RESET, OPTION, SELECT, START

CTRL-F1 will restore KEYDIS to zero, which will re-enable the keyboard. POKEing KEYDIS with any value between 1 and 254 will disable CTRL-F1 as well. The only way to re-enable the keyboard in this case is to POKE KEYDIS with a 0 or press the RESET key.

FINE
622        026E

If you ever wished that you could fine-scroll program listings, or any other output to a graphics mode zero screen, FINE is the location for you. Set it to any value other than zero before your GRAPHICS command, and then try listing a program or PRINTing a lot of stuff to the screen. To get back to regular scrolling, POKE it with a zero before a GRAPHICS command.

HIBYTE
648         0288

A loader location.

CSTAT no longer exists.

NEWADR
654         028E

Another loader location.

CRETRY
668         029C

This was moved here from location 54.
TMPX1 no longer exists.

DRETRY
701         02BD

This was moved here from location 55. HOLD5 no longer exists.

RUNADR
713,714         02C9,02CA

Loader location.

HIUSED
715,716         02CB,02CC

digging



Loader location.

ZHIUSE
717,718         02CD,02CE

Loader location.

GBYTEA
719,720         02CF,02D0

Loader location.

LOADAD
721,722         02D1,02D2

Loader location.

ZLOADA
723,724         02D3,02D4

Loader location.

DSCTLN
725,726         02D5,02D6

Finally, something other than a loader location! DSCTLN is used to specify the length of a disk sector. Powerup and RESET set it to 128, but you can set it to anything between 1 and 65536.

ACMISR
727,728         02D7,02D8

Reserved for undocumented uses.

KRPDEL
729         02D9

This one is actually useful. If you press a key and hold it down, after a short delay it will start repeating. KRPDEL specifies the delay. It's initialized to 48, which represents 48/60 = 0.8 seconds. You can change it to any value between 1 and 255, resulting in a delay between one-sixtieth of a second and 4.25 seconds. You can also set it to 0, which will disable the repeat function altogether.

KEYREP
730         02DA

Once a key starts repeating, there is another delay between repeats. KEYREP specifies this delay. It's initialized to six, or one-tenth of a second, which means that you will get 10 characters a second once a key starts repeating. You can make this as fast as 60 characters a second (KEYREP=1) or as slow as 1 character every 4.25 seconds (KEYREP=255).

NOCLIK
731         02DB

If NOCLIK is set to 0, then the television speaker will make a "clicking" sound every time you press a key. Set it to 255 and it won't. CTRL-F3 will switch it back and forth between the two values.

By the way, if you set NOCLIK to a value other than 0 or 255, the click will be turned off and CTRL-F3 will have no effect on it; it can only be turned back on by pressing RESET or POKEing NOCLIK with a 0.

HELPFG
732         02DC

HELP



HELPFG is used to tell whether or not the HELP key is pressed. It can have the following values:

0
  
means it's not pressed.
17

means that HELP is pressed.
81

means that SHIFT-HELP is pressed.
145

means that CTRL-HELP is pressed.

You should note that HELPFG will not change to zero when the HELP key is released. That means that you should POKE 732,0 before you try and read it. Otherwise you may get an old value.

DMASAV
733         02DD

You can use CTRL-F2 to turn off DMA in order to speed up calculations. What happens is the OS stores a zero into SDMCTL at location 559. When you press any other key, SDMCTL will be reset to whatever value it was before. The OS uses DMASAV to hold the value of SDMCTL so it knows what to reset it to.

PBPNT
734         02DE

This was moved here from location 29.

PBUFSZ
735   02DF

This was moved here from location 30.

HNDLOD
745         02E9

A handler loader flag.

CHBAS
756         02F4

Don't worry, this is still the same as it was before. The reason I'm mentioning it here is because there is now a new character set built into the computer. If you POKE CHBAS with a value of 204, you'll get an international character set. This is the same as the regular character set, except that the graphics characters have been redefined and are now letters and characters that English doesn't normally use.

You can use CTRL-F4 to switch back and forth between the two built-in character sets. If you have your own character set in memory, however, pressing CTRL-F4 the first time will switch you to the international character set, but pressing it again will give you the regular character set instead of yours. In other words, you can't use CTRL-F4 to switch between the regular character set and your special character set.

NEWROW
757         02F5

This was moved here from location 96.

NEWCOL
758,759         02F6,02F7

This was moved here from locations 97 and 98.

ROWINC
760         02F8

This was moved here from location 121.

COLINC
761         02F9

pointing



This was moved here from location 122.

JMPERS
782         030E

JMPERS is used to tell how the system is configured. It is unclear at this time exactly what that means.

PTIMOT
788            0314

This was moved here from location 28.

TEMP2 was moved to location 787.

PUPBT1-PUPBT3
829-831         033D-033F

These are simply labeled as "power-up/reset." They seem to have some kind of effect on what happens if you press RESET, but I'm not sure what it is.

SUPERF
1000         03E8

Another mystery, this one is simply described as "screen editor." I assume it's used as some kind of variable by the screen editor. POKEing values to it doesn't seem to have any effect, and it always reads zero.

CKEY
1001         03E9

This was moved here from location 74.

CASSBT
1002         03EA

This was moved here from location 75.

CARTCK
1003         03EB

CARTCK is the checksum value for the cartridge. It is used to make sure the cartridge is being read correctly.

ACMVAR
1005-1016         03ED-0EF8

Reserved for undocumented uses.

MINTLK
1017         03F9

Also reserved.

CINTLK
1018         03FA

Cartridge interlock. The 1200XL lets you unplug and plug in a cartridge without turning the computer off first. CINTLK tells the OS whether or not a cartridge is currently being plugged in or pulled out. If it's equal to one, then everything is OK. If not, it will reboot the system. That means that POKEing CINTLK with anything other than one will have the same effect as turning the computer off and then back on again.

CHUNK
1019,1020         03FB,03FC

Handler chain. Sorry, but that's all I know about it.

You should also be aware that PORTB in the PIA chip (54017) is no longer used for controller jacks three and four, since there are only two controller jacks on a 1200XL. Similarly, any locations dealing with joystick two, joystick three, paddle four, paddle five, paddle six, or paddle seven will no longer be of any use.

EXTRA GRAPHICS MODES

That's right, the 1200XL gives you four extra modes that the 400/800 doesn't. Actually, that's not quite true. Back at SDLSTL we saw that there were five ANTIC graphics modes that BASIC didn't allow you to use unless you set up your own display list. All the 1200XL does is give the screen handler the capability to set up four of these modes for you. Graphics 12 will give you an ANTIC mode four display list, Graphics 13 ANTIC mode five, Graphics 14 ANTIC mode twelve, and GRAPHICS 15 ANTIC mode fourteen. For more information on each of these modes, see Appendix Twelve on ANTIC modes.


Return to Table of Contents | Previous Chapter | Next Chapter