Alternate character sets

From: Michael Current (aa700@cleveland.Freenet.Edu)
Date: 01/28/92-10:41:41 PM Z


From: aa700@cleveland.Freenet.Edu (Michael Current)
Subject: Alternate character sets
Date: Tue Jan 28 22:41:41 1992


Reprinted from the A.C.E.C. BBS (614)-471-8559

Incorporating alternate character sets in 8-bit Atari programming.
By Charlie Henrich

Here is a program for all you BASIC programmers who wish to use
alternate character sets in your projects.  This can give you the
ability to create graphic screens equivalent to Graphics Mode 8 but
with more versatility in detecting collisions and such.  Lines 190-210
are the heart of the loader where FILE$ is the name of the file with
the device number and extender attached.  To use the main program, your
character sets should use the ".FNT" extender.  You can also learn
other 'tricks' by dissecting this program, e.g.: how to add extenders
and devices to a file name the user inputs and other string manipulations.
The "Number of Pages" defines the amount of memory you wish to reserve
for storage of your alternate character set data.  Remove POKE 712,Q
in line 200 if you don't want the border to flash when the character
set is being loaded.  Have Fun!

                                           

10 GRAPHICS 0:POKE 710,6:POKE 712,144:POKE 82,0:POKE 709,12:
   POKE 752,1:? "<ESC><SHFT-CLEAR>":REM CLEAR SCREEN AND SET COLORS
20 DIM LN$(5000)
30 OPEN #1,6,0,"D:*.FNT"
40 INPUT #1,LN$
50 IF ASC(LN$(1,1))>32 THEN ? :GOTO 70
60 ? LN$(1,10)
70 TRAP 80:GOTO 40
80 CLOSE #1
90 DIM D(15),FILE(15):POKE 752,0
100 ? "Name of File ";:INPUT D$:D$(LEN(D$)+1)=".FNT"
110 FILE$="D1:":FILE$(LEN(FILE$)+1)=D$
120 ? :? "Number of Pages ";:INPUT PG
130 X=PEEK(106)-PG
140 POKE 709,6:POKE 752,0:? "<ESC><SHFT-CLEAR>":REM CLEAR SCREEN
150 ? "Type: POKE 756,";PEEK(756):? "To Use ROM-Set"
160 ? :? "Type: POKE 756,";X:? "To Use New Set"
170 REM  **** LOADER **** 
180 CHBAS=X*256
190 OPEN #1,4,0,FILE$:FOR X=0 TO 1023
200 GET #1,Q:POKE CHBAS+X,Q:POKE 712,Q:NEXT X
210 ? :? :POKE 752,0:POKE 709,12:POKE 712,144

-- 
 Michael Current, Cleveland Free-Net 8-bit Atari SIGOp   -->>  go atari8  <<--
   The Cleveland Free-Net Atari SIG is the Central Atari Information Network
      Internet: currentm@carleton.edu / UUCP: ...!umn-cs!ccnfld!currentm
      BITNET: currentm%carleton.edu@interbit / Cleveland Free-Net: aa700


-----------------------------------------
Return to message index