Data Stored At Locations
ITEM
Run address Cartridge-in byte Cartridge option Initialization address
LEFT CART
$BFFA,B (49146,7) $BFFC (49148) $BFFD (49149) $BFFE,F (49150,1)
RIGHT CART
$9FFA,B (40954,5) $9FFC (40956) $9FFD (40957) $9FFE (40958,9)
To jump into BASIC with the cartridge installed from DOS, for example, type M from the DOS menu. For the address, type BFF9 <Return> which is the INIT address contained in memory locations $BFFE and $BFFF on the CARTRIDGE. This is the same as using the B option, or RUN CARTRIDGE from DOS.
CASSETTE BOOT FILE — This BOOT FILE is designed to load directly into memory and to begin execution upon loading without any keyboard entries required. A CASSETTE BOOT FILE is loaded by holding the START key while turning on the computer.
CHAINING PROGRAMS — One BASIC program can be used to run another by including a statement such as RUN" D: NEXTPROG. BAS'' in the first program. When the statement is executed, NEXTPROG. BAS will be LOADed and RUN and the original program will be erased from memory.
CHARACTER GRAPHICS — The character set in the Atari computer is changeable. A built-in set is available and is used by the system on start-up. See CHARACTER SETS. The character set is used for graphics modes 0, 1, and 2. Although these modes are often called text modes, character modes is more descriptive. The other graphics modes can only display blocks or pixels. The character set can be redefined as figures or objects and can even be changed during the program operation to achieve animation. Many famous games such as Shamus by Synapse and Space Invaders by Atari use constantly redefined characters for animation.
The operating system goes to a certain location in memory to look for the data to print a character on the screen. The beginning address of the character set data is stored in location 756 ($02F4). The normal start of the character set data is location 57344 ($E000). Four pages (IK) of memory are required for a GR.0 character set. Two pages (512 bytes) are needed for GR.1 and GR.2 character sets because no lower case is used. You can flip between character sets by POKEing CHBAS with the address of the new set. Each character is comprised of eight bytes of eight bits each.
Memory location 756
Contents = EO-1
1-E000 00
Points to E001 06
Each character is comprised of 64 bits of information which tell every one of the pixels in an 8 x 8 block whether to be on or off. The pointer in 756 points to the first byte of the character set data and every eighth byte is the start of a new character. You can change the memory to which the pointer points by POKEing location 756 with another number. Try the following experiment in BASIC. Type POKE 756,0. This will make the data in page 0 become the character set data. The screen will be filled with some pattern which is not the character set page 0 is used for the Operating System. Type the double quote sign (") and see what happens. This character happens to be composed of some of the memory locations which include the internal clocks (18,19 and 20). The character will sparkle and blink SYSTEM RESET will return the computer to normal.
To build your own characters you must reserve a part of RAM exclusively for your character set The best way to do this is to find the top of free RAM and back it down a few pages. The value of RAMTOP is stored in location 106. This is the location of the first location of memory which is ROM of the Operating System. The memory for the screen is directly below the top of RAM and the display list is directly below this. You can find the address of this memory boundary and set the RAMTOP IK lower to save room for the new character set The easiest way to build the actual characters is to use a commercial utility such as Instedit from APX. The following program will copy the resident character set into an area below the normal RAMTOP. RAMTOP is actually moved by the first line of the program.
100 RT=PEEK(106):POKE 106,RT-4:REM Look at RAMTOP and reduce it by 4 110 GRAPHICS 0:LET NEWSET=256*<RT-4):REM Define NEWSET as address o-f new char act ers
120 FOR X=C) TO 1023: REM Start loop to co py set
130 POKE NEWSET+X,PEEK(57344+X) : REM Get old characters
140 NEXT X:REM End loop
150 POKE 756,NEWSET/256:REM Point charac ter pointer to new data
CHARACTER SETS — Custom character sets can be used on Atari computers. Many high quality commercial games use redefined character sets to achieve high speed, high resolution animation. Characters are made up of blocks of 8X8 pixels. Each line of pixels is represented by an eight bit byte. SeeDe Re Atari, page 3-4, for a description of this format. A full character set is comprised of 256 characters, but half are simply inverse characters of the lower half. The inverse video function is set by putting a 1 in the high bit of the character byte. Since there are 128 unique characters and we need eight bytes for each, a character set requires 8 X128 or 1024 bytes. The built in
Atari character set is in ROM starting at page 224 ($EO). This corresponds to memory location 57344 ($E000). A new set can be used by setting aside 1024 bytes of your own memory, copying or modifying the Atari set into this area, and changing the pointer to the set The pointer points to the high byte (page number) of the chatacter set The pointer is at756 ($2F4). Insteditfrom APX, Graphics Generator (see The Next Step) by Datasoft, and other utilities are available to help you design your own character sets.
CH BAS — This pointer is the CHaracter BASe register and it is located at memory location 756 ($2F4). It contains the page number (high byte) of the start of the character set data. On starting up the system, CHBAS contains a 224 ($E0) pointing to the character set data from location 57344 on. Four pages (1024 bytes) are needed for a full character set. This means you must reserve at least IK of memory for a new set and the data must reside with IK byte boundaries (that is, not spread over five pages).
C H EC KSU M — A CHECKSUM is a technique for error checking whereby a series of numbers are added and the total compared against a known correct value. This is often done to verify typing in published BASIC programs. The TYPO program used by Antic Magazine uses a CHECKSUM technique. Tokenized values for a small range of line numbers are added and compared against a those of a program which is known to run correctly. The cassette recorder uses a checksum byte which is the sum of all of the bytes in a record. This byte is recorded on the tape and it is calculated by the computer when data are received. If the two sums are different an error is generated. The error may come from defective tape, noise or hardware malfunction.
CHIP — CHIP is an informal way of referring to an integrated circuit such as a microprocessor. The6502 is a CHIP. The actual CHIP is a small slab of silicon which has been processed to facilitate very tiny electrical devices on the surface. The devices process data by retrieving, shifting, and sending signals out to other chips. RAM, ROM, EPROMs, EAROMs, POKEY, ANTIC, and PIA are all CHIPs. The devices are actually very delicate and sensitive to the environment and they must be packaged in a sturdy housing. The familiar black plastic packages with metallic leads (similar to a centipede) are called Dual Inline Packages or DIPs. A tip for those with a computer malfunction is to open up your system and examine every CHIP. Sometimes they work loose from their sockets and cause trouble. If a CHIP is not seated firmly in its socket, press it firmly back into place.
CHR$ — This BASIC command is used to send an ATASCII character to a device (screen, printer, etc.) when the equivalent decimal value is given. Do not forget to add the dollar sign ($) to the CHR. If you do forget, your BASIC program will just be using another variable. This common error is very difficult to track down. To see what the uppercase letter set looks like, RUN the following program:
1 0 FOR X=65 TO 90: PRINT CHR$(X): NEXT X Type in the program and then type RUN.
CHR$(1 25) — The "CLEAR SCREEN" symbol is an inverse upward-left curving arrow in double quotes and it is often printed out as a bracket on many printers. A clearer way of including a CLEAR SCREEN command in your BASIC program is to substitute:
PRINT CHR$(1 25); for the Escape Shift-Clear key sequence.
CIO — Central Input/Output. The CIO is the routine contained in the Operating System which sends all input and ouput data to the correct device handler and then gives control to the HANDLER. This involves control of the computer at the very lowest level such as reading a key from the keyboard, finding a character for the key, and sending it to the monitor or screen for presentation to your eye (and brain).
CLEAR — In Microsoft BASIC II, CLEAR resets all variables, arrays, and strings. This is the same as the CLR function in Atari BASIC.
CLEAR DECIMAL FLAG— One of the most frustrating bugs a programmer runs into is the CLEAR the DECIMAL FLAG bug. The 6502 Processor Status Register has seven flags. One of them is the DECIMAL FLAG. When you are doing arithmetic in binary (or hexadecimal), you are in the HEX mode. When you are doing floating point arithmetic in BASIC, you are in the decimal mode (the flag is set or D=l). If you have a machine language routine in a BASIC program, and the machine language program must do arithmetic, and it expects HEX numbers, your program will crash — sometimes. The best way to prevent this is to start your ML routine off with a CLD instruction to CLEAR the DECIMAL mode FLAG.
Post a comment