32K Disk
by Ron Hodge
Smooth scrolling is the most dramatic graphics capability of the Atari system. If you've been following Kyle Peacock's recent series, Fine Scrolling (issues 13-16), you've no doubt sat entranced while the screen moved about smoothly under joystick control.
After deciding to set up your own scrolling game or utility, you whip out Create-A-Font (issue 16) and create the character set that will make your screen sparkle. Then, it suddenly dawns on you how do you design a scrolling screen when you can't even see all of it?
I was faced with the same problem, and the result was Scredit (short for Scrolling Screen Editor). Scredit is a screen editor that allows you to design a screen simply by typing in the characters to the screen, then SAVEing the screen as a binary file.
My particular need was for a screen in Graphics Mode 2, 24 TV screens wide. While your screen may not be the same size or mode, I think you'll find it easy to modify the program for your own needs. Let's take a took at how Scredit works.
Scredit starts with a menu of options you'll need to get started. After taking a look at the disk directory with option 4, press 1 or 3 to LOAD in a screen or character set. The menu will remind you whether you're LOADing or SAVEing a file, and ask for the filename. Prefix the filename with D:. Scredit will confirm that the LOAD is complete, or report any disk I/O errors, using standard error numbers.
If you change your mind about LOADing or SAVEing a file, simply press RETURN when asked for the filename. You'll get an error message and a request for your next option. (You may LOAD or SAVE a file from any drive, but only look at the directory on the drive 1.)
After LOADing your files, press 5 to exit to the editor. Your cursor will be in the upper left corner of the screen. To move it around, use the CONTROL-ARROW keys or press the trigger while moving the joystick. If you want to place a character on screen, press the appropriate key, or the space bar to erase a character. All CONTROL-KEY combinations other than the cursor arrows are ignored by Scredit.
Press OPTION to change the image priority of the cursor. You have two methods to see which character is under the cursor. Pressing START will toggle the screen between the character set chosen and the internal character set. Pressing SELECT will display the character in the text window, along with its hex value.
The hex value will show you how the character derived its color. If the high bit is set, it shows an inverse character. If the next-highest bit is set, the character is in lower caps. For example:
C=$23 | upper case |
C=$63 | small caps (+$40) |
C=$A3 | inverse (+$80) |
C=$E3 | inv + small caps (+$40+$80) |
Move the joystick to scroll the screen. The cursor will move if the trigger is pressed. You can get back to the menu by pressing ESCAPE. Flipping to the menu and back is also convenient for positioning the cursor at the beginning of the screen, since you always enter the editor at the beginning of the screen.
That's all there is to using Scredit. It shouldn't be hard to modify Scredit for other screen sizes or modes. Screen and player/missile parameters, in addition to the display list, are all the changes needed. The logic flow remains the same. Since horizontal and vertical scrolling are so similar, the routines to maintain cursor position for vertical or horizontal scrolling are similar to the current routines.
One last thought. Since the logic for Scredit is so minimal -- about 2300 bytes -- it could be coresident with a program under development. Then you could flip between the program you're fine-tuning and Scredit to make screen changes as needed.
SCREDIT.LST is available in ATASCII format.
10 REM *** SCREDIT ***
20 DATA 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,
0,0,10,11,12,13,14,15
30 DIM DAT$(91),HEX(22):FOR X=0 TO 22:
READ N:HEX(X)=N:NEXT X:LINE=990:RESTOR
E 1000:TRAP 110:? "CHECKING DATA"
40 LINE=LINE+10:? "LINE:";LINE:READ DA
T$:IF LEN(DAT$)<>90 THEN 160
50 DATLIN=PEEK(183)+PEEK(184)*256:IF D
ATLIN<>LINE THEN ? "LINE ";LINE;" MISS
ING!":END
60 FOR X=1 TO 89 STEP 2:D1=ASC(DAT$(X,
X))-48:D2=ASC(DAT$(X+1,X+1))-48:BYTE=H
EX(D1)*16+HEX(D2)
70 IF PASS=2 THEN PUT #1,BYTE:NEXT X:R
EAD CHKSUM:GOTO 40
80 TOTAL=TOTAL+BYTE:IF TOTAL>999 THEN
TOTAL=TOTAL-1000
90 NEXT X:READ CHKSUM:IF TOTAL=CHKSUM
THEN 40
100 GOTO 160
110 IF PEEK(195)<>6 THEN 160
120 IF PASS=2 THEN PUT #1,224:PUT #1,2
:PUT #1,225:PUT #1,2:PUT #1,0:PUT #1,6
4:CLOSE #1:END
130 ? "INSERT DISK WITH DOS, PRESS RET
URN";:DIM IN$(1):INPUT IN$:OPEN #1,8,0
,"D:AUTORUN.SYS"
140 PUT #1,255:PUT #1,255:PUT #1,0:PUT
#1,64:PUT #1,80:PUT #1,73
150 ? :? "WRITING FILE":PASS=2:LINE=99
0:RESTORE 1000:TRAP 110:GOTO 40
160 ? "BAD DATA: LINE ";LINE:END
1000 DATA 202843202F40207940201C4320A3
4020DC40207D41A580C93590EED0062028434C
F144202843203C432040434C,627
1010 DATA 0040A220A9039D4203A94D9D4403
A9439D4503A9089D4A03A9009D4B032056E4A2
10A9039D4203A94A9D4403A9,599
1020 DATA 439D4503A90C9D4A03A9009D4B03
2056E4A9008DC502A99A8DC6028DC80260A230
A9039D4203A9509D4403A943,993
1030 DATA 9D4503A9049D4A03A9009D4B0320
56E478A510297F85108D0ED25860A9008DA302
A9408DA402A20FBCB444BDB3,542
1040 DATA 44868220C140A682CACA10EF60A2
009D4403989D4503A9099D4203A9289D48038A
9D49032056E46020F542A907,162
1050 DATA A230A001206341A99B8DCA44A9C9
A04420C140201443ADC944C920F0DEC9319005
C937B00160A9FD8DC944A9C9,737
1060 DATA A04420C14020F542A9208DC9444C
E840A240A9039D4203A9069D4A03A9539D4403
A9439D45032056E4A905A240,304
1070 DATA A0282063419810078481A2404CEC
42A220A9C49D4403A9449D4503A9099D4203A9
282071414C37419D4203A9C9,608
1080 DATA 9D4403A9449D4503989D4803A900
9D49032056E460ADC9448580C9349009D00620
1E414C024360C932D00AA9FD,112
1090 DATA A04320C1404CA441A916A04420C1
40201443A9098555202243A905A210A00F2063
41201C43981007C088F0034C,961
1100 DATA 5442ADC944C944F005A0A54C5442
A580C933D033A24020EC42A004207542981003
4C5442A907A2409D4203A900,555
1110 DATA 9D4403A9549D4503A9009D4803A9
029D490320AE42A4814C3442A24020EC42A580
C931D004A004D002A0082075,835
1120 DATA 429810034C5442A580C931D004A9
07D002A90B20954284819810034C5442A580C9
32D00AA940A04420C1404C02,114
1130 DATA 43A92FA04420C1404C0243A202A9
209D7544CA10FA20B742A99BA00C996A442014
43A96AA04420C1404C0243A2,556
1140 DATA 40A9039D4203A9C99D4403A9449D
4503989D4A03A9009D4B032056E4848160A240
9D4203A9009D4403A9609D45,915
1150 DATA 03A9009D4803A9149D49032056E4
848120EC4260848198A009A200C9649006E964
E84CBE4220E242A200C90A90,711
1160 DATA 06E90AE84CCD4220E24218693099
6A44C860488A6930996A44C86860A90C9D4203
2056E460A9188555A9008556,401
1170 DATA A90C855460201443A951A04420C1
40A906CD1FD0D0FB60A991A04420C14060A201
8EF00260A2008EF00260A210,345
1180 DATA 20EC42A22020EC42A23020EC42A2
404CEC426C0A0060A97AA04420C1404C024345
3A9B533A9B4B3A9B443A2A2E,602
1190 DATA 2A007D1D1D7F1E1E1E1E53435245
44495420284329203139383420524F4E20484F
4447459B1D1D7F312D204C4F,309
1200 DATA 41442053435245454E9B7F322D20
534156452053435245454E9B7F332D204C4F41
442043484152205345549B7F,680
1210 DATA 342D2044313A204449524543544F
52599B7F352D204558495420544F2045444954
4F529B7F362D204558495420,876
1220 DATA 544F20444F539B1D7F5748494348
204F5054494F4E203F202020202020209B1D7F
4E414D45204F462046494C45,908
1230 DATA 20544F20D3C1D6C5203F9B1D7F4E
414D45204F462046494C4520544F20CCCFC1C4
203F9B1D7F4C4F414420434F,45
1240 DATA 4D504C455445449B1D7F53415645
20434F4D504C455445449B7F505245535320D3
D4C1D2D420544F20434F4E54,167
1250 DATA 494E55459B7FC5D2D2CFD23A2020
2020202020209B7FC5D2D2CFD23A204E4F2044
4F53204F4E204449534B9B20,634
1260 DATA 2020202020202020202020202020
20202020202020202020202020202020202020
9BE543D543C243B0439E438E,292
1270 DATA 437C435943202020202000000000
00000000000000000000000000000000000000
000000000000000000000000,866
1280 DATA 0000000000A00FB9AE4899F00088
10F7A004B9A94899C4028810F7A9548DF402A9
00A0FF99003488D0FA85F08D,141
1290 DATA 04D48583A95A8DC002A9308D00D0
85FDA9008D01D08D02D08D03D0A9018D6F02A9
008D08D0A9FF207F47A9308D,351
1300 DATA 07D4A9038D1DD0A0A1A90099FF73
88D0FA78A9008D2F02A02FB979489900068810
F7A9008D3002A9068D3102A9,245
1310 DATA 3E8D2F02A9478D0002A9488D0102
58A096A245A907205CE4A9C08D0ED42079404C
B545A583D018A6FEF00CA514,78
1320 DATA 2901D00E20B6474C62E4AD8402F0
032058474C62E4A514C514F0FCA5FED0F6AD84
02D02BAD7802C907D0062087,381
1330 DATA 464C4746C90BD00620BD464C4746
C90ED00620ED464C4746C90DD006201E474C47
46AD1FD0C903D0062018484C,399
1340 DATA 1046C905D009206C482029484C10
46C906D00B20BE48A9048D1FD04C4746ADFC02
C9FFF01DC91CD0034C0C4920,702
1350 DATA CF48B01120E848B00F205A46206D
46207E464C47464CB545A9FF8DFC024C1046A9
FF8DFC02A204A514C514F0FC,735
1360 DATA CAD0F74CB545A230A9009D48039D
4903A9079D42032056E460A82A2A2A2A2903AA
98299F1D284985F160205748,111
1370 DATA A000A5F191FAA4F8C013F015B013
E6F8E6F2D002E6F3A5FD18690885FD8D00D060
A90085F8A93085FD8D00D0A5,837
1380 DATA F238E91385F2B006A5F3E90085F3
60A4F8F015C6F8A5F2D002C6F3C6F2A5FD38E9
0885FD8D00D060A91385F818,813
1390 DATA 65F285F2A5F3690085F3A9C885FD
8D00D060A4F9F013C6F9C6F3C6F3A900207F47
84FCA9FF207F4760A90985F9,714
1400 DATA A5F318691285F3A900207F47A0BF
84FCA9FF207F4760A4F9C009F01AB018E6F9E6
F3E6F3A900207F47A5FC1869,979
1410 DATA 1085FCA9FF207F4760A90085F9A5
F338E91285F3A900207F47A02F84FCA9FF207F
4760AD7802C907D00E208A47,478
1420 DATA B01AA90885F0A98085FE60C90BD0
0D209E47B008A90085F0A91485FE60A4FCA210
91F688CAD0FA60A4F4C0E190,948
1430 DATA 04A5F5D008E6F4D002E6F5186038
60A4F4C0069004C6F41860A6F5F008C6F41002
C6F5186038608A102BC6F0F0,34
1440 DATA 06A5F08D04D460A21CFE0306D003
FE0406CACACA10F3A90085FEE6F2D002E6F3A9
0885F08D04D460E6F0A4F0C0,471
1450 DATA 08B006A5F08D04D460A21CBD0306
D003DE0406DE0306CACACA10F0A90085FEA5F2
D002C6F3C6F2A90085F08D04,184
1460 DATA D460A901CD6F02D006A9048D6F02
608D6F0260A000B1FA484A4A4A4A2038486829
0F186910C91A900318690799,150
1470 DATA 3C74C86048A9E08D0AD48D09D4A5
FF8DC6026840A5F285FAA5F385FBA5F0F008A5
FAD002C6FBC6FA60205748A0,945
1480 DATA 00B1FA293F8D2D74607070705700
6057006257006457006657006857006A57006C
57006E570070D70072420074,440
1490 DATA 42287442507442787441000628CA
94460008FF026005000034000000002F300094
A954CDF402F0048DF40260A9,18
1500 DATA E08DF4026048293FA005D9E248F0
068810F86818606838600C1C2C343736C98FD0
05201E473860C98ED00520ED,619
1510 DATA 463860C986D00520BD463860C987
D0042087463860A9FF8583A23020EC42A9008D
1DD08D00D0A9228D2F028D00,431
1520 DATA D44C004040002060000000000000
00000000000000000000000000000000000000
000000000000000000000000,975
10 DATA 886,957,808,431,727,198,599,55
3,272,701,611,124,947,676,36,8526
160 DATA 165,400,643,736,739,594,825,6
10,609,552,355,530,502,378,633,8271
1140 DATA 619,561,666,493,760,573,382,
415,551,888,586,695,839,484,647,9159
1290 DATA 812,789,983,768,887,783,939,
678,46,956,72,145,914,964,983,10719
1440 DATA 982,990,696,217,152,410,681,
680,498,5306
Listing 2 appears on a separate page.