Jump to content

Search the Community

Showing results for tags 'BASIC XL'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Atari Systems
    • Atari 2600
    • Atari 5200
    • Atari 7800
    • Atari Lynx
    • Atari Jaguar
    • Dedicated Systems
    • Atari 8-Bit Computers
    • Atari ST/TT/Falcon Computers
  • Gaming General
  • Marketplace
  • Community
  • Game Programming
  • Site
  • Classic Gaming News
  • The Club of Clubs's Discussion
  • I Hate Sauron's Topics
  • 1088 XEL/XLD Owners and Builders's Topics
  • Atari BBS Gurus's Community Chat
  • Atari BBS Gurus's BBS Callers
  • Atari BBS Gurus's BBS SysOps
  • Atari BBS Gurus's Resources
  • Atari Lynx Programmer Club's CC65
  • Atari Lynx Programmer Club's ASM
  • Atari Lynx Programmer Club's Lynx Programming
  • Atari Lynx Programmer Club's Music/Sound
  • Atari Lynx Programmer Club's Graphics
  • The Official AtariAge Shitpost Club's Shitty meme repository
  • The Official AtariAge Shitpost Club's Read this before you enter too deep
  • Arcade Gaming's Discussion
  • Tesla's Vehicles
  • Tesla's Solar
  • Tesla's PowerWall
  • Tesla's General
  • Harmony/Melody's CDFJ
  • Harmony/Melody's DPC+
  • Harmony/Melody's BUS
  • Harmony/Melody's General
  • ZeroPage Homebrew's Discussion
  • Furry Club's Chat/RP
  • PSPMinis.com's General PSP Minis Discussion and Questions
  • PSPMinis.com's Reviews
  • Atari Lynx 30th Birthday's 30th Birthday Programming Competition Games
  • 3D Printing Club's Chat
  • Drivers' Club's Members' Vehicles
  • Drivers' Club's Drives & Events
  • Drivers' Club's Wrenching
  • Drivers' Club's Found in the Wild
  • Drivers' Club's General Discussion
  • Dirtarians's General Discussion
  • Dirtarians's Members' Rigs
  • Dirtarians's Trail Runs & Reports
  • Dirtarians's Wrenching
  • The Green Herb's Discussions
  • Robin Gravel's new blog's My blog
  • Atari Video Club's Harmony Games
  • Atari Video Club's The Atari Gamer
  • Atari Video Club's Video Game Summit
  • Atari Video Club's Discsuuions
  • Star Wars - The Original Trilogy's Star Wars Talk
  • DMGD Club's Incoming!
  • DASM's General
  • AtariVox's Topics
  • Gran Turismo's Gran Turismo
  • Gran Turismo's Misc.
  • Gran Turismo's Announcements
  • The Food Club's Food
  • The Food Club's Drinks
  • The Food Club's Read me first!
  • The (Not So) Official Arcade Archives Club's Rules (READ FIRST)
  • The (Not So) Official Arcade Archives Club's Feedback
  • The (Not So) Official Arcade Archives Club's Rumor Mill
  • The (Not So) Official Arcade Archives Club's Coming Soon
  • The (Not So) Official Arcade Archives Club's General Talk
  • The (Not So) Official Arcade Archives Club's High Score Arena
  • Adelaide South Australia Atari Chat's General Chat & Welcome
  • Adelaide South Australia Atari Chat's Meets
  • Adelaide South Australia Atari Chat's Trades & Swaps
  • KC-ACE Reboot's KC-ACE Reboot Forum
  • The Official Lost Gaming Club's Lost Gaming
  • The Official Lost Gaming Club's Undumped Games
  • The Official Lost Gaming Club's Tip Of My Tounge
  • The Official Lost Gaming Club's Lost Gaming Vault
  • The Official Lost Gaming Club's Club Info
  • GIMP Users's Discussion


There are no results to display.

There are no results to display.


  • AtariAge Calendar
  • The Club of Clubs's Events
  • Atari BBS Gurus's Calendar
  • ZeroPage Homebrew's Schedule

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start










Custom Status



Currently Playing

Playing Next

Found 5 results

  1. Hello together! Tera thanks to low.blow, which I nominate hereby : "Atari man of the year", we now have two books back, where rumors told, they never existed. 30 Days to Understanding BASIC XL-Bill Wilkinson and Diane Goldstein, 180 pages. and OSS BASIC XL-Reference Manual-1st Edition 1983, 143 pages. The real McCoy! No reprint! 100 % OSS stuff! Both with OCR! OSS.zip So, remaining are just these artifacts: Artifacts.pdf and Atari is completely restored. :-))))
  2. Hello together! Recently the following manuals: OSS-The Basic XL Toolkit-Including the BASIC XL Runtime Package-Reference Manual and OSS-Basic XE Reference Manual did arrive at Atarimania. So, the circle is closing... There is just one book left, which seems to be lost: 30 Days to Understanding BASIC XL - Bill Wilkinson and Diane Goldstein If anyone of you has this book, we would really appreciate that to complete the BASIC XL project. Many thanks in advance to you and Happy Easter! :-) The manual for BASIC XL is exceptional. The first section, an exhaustive tutorial entitled, "30 Days to Under standing BASIC XL," takes the novice by hand and walks him through the fundamentals of BASIC programming. Experienced programmers can proceed directly to the excellent 135-page reference section. Review - BASIC XL BASIC XL OPTIMISED SYSTEMS SOFTWARE 1173D S. Saratoga/Sunnyvale Rd. San Jose, CA 95129 (408) 446-3099 16K Cartridge $99.00 by Robert L. Riggs Optimised Systems Software (O.S.S.) has done it again! Bill Wilkinson & Co. have put the cap on the BASIC language for Atari computers: BASIC XL. It's neatly wrapped and documented in a yellow binder which accompanies the bright orange cartridge. The documentation begins with a 176-page tutorial entitled "30 Days to Understanding BASIC XL," written by Bill Wilkinson and Diane Goldstein. If you are a complete novice at BASIC programming, this book and a fair amount of determination are all you will need to learn to use your Atari computer. Bill and Diane introduce you to BASIC XL with the "chapter-a-day" system: 30 chapters, beginning with "Getting to know your computer" and extending through "Congratulations: 30 END." Following the tutorial is the reference manual which documents the entire language, including 45 syntax expressions and keywords not found in 8K Atari BASIC. It's a well-known fact that Bill Wilkinson was part of the team that developed 8K Atari BASIC. He's written more than once of the bugs and limitations inherent in that language. BASIC A+ did much to alleviate those shortcomings, but it was disk-based and devoured too much memory. BASIC XL is on cartridge and, because of its memory bank design, uses no more RAM than Atari BASIC. Critics of the execution speed of other versions of BASIC will find little to complain about with regard to O.S.S.'s latest achievement. BASIC programs previously typed in from magazines and abandoned because of their boring snail-pace run at arcade speeds with BASIC XL. In fact, timing loops almost invariably have to be extended when running Atari BASIC programs with BASIC XL. That's right, BASIC XL is upward compatible with Atari BASIC, unlike MicroSoft BASIC. And it still offers MicroSoft-style string-handling, auto line-numbering, renumbering and line delete. Other useful additions to the BASIC vocabulary include ELSE, WHILE, ENDIF, ENDWHILE, PRINT USING, TAB and TRACE/TRACEOFF. Player-missile graphics are of particular interest to many Atari programmers. Dozens of articles and programs in a variety of books and magazines are devoted to utility programs to help you design and use players and/or missiles. O.S.S. provides you with BASIC commands to deal with these pesky critters. just wait until you can use commands like MISSILE, BUMP, PMCOLOR, PMGRAPHICS, PMMOVE, PMWIDTH and PMCLR. You'll love it! SET is another new and extremely powerful command. It allows you to exercise control over a variety of system level functions. You can quickly and easily change 13 functions such as BREAK key enable/disable, Tab stop settings for the comma in PRINT statements, the prompt character for INPUT, auto DIMensioning, and LIST formatter to automatically indent structured statements. DOS commands directly from BASIC include DIR (disk directory), ERASE, PROTECT, UNPROTECT and RENAME. And that's not all. You get additional functions like DPEEK/DPOKE, ERR, FIND, HSTICK/VSTICK, PEN, PMADR and SYS. You can type them all in caps, lower case or even reverse characters for all BASIC XL cares. Just think -- no more angrily hitting the CAPS/LOWR key after a syntax error! Yes, I know that doesn't add up to 45 commands, yet. There are more advanced-technique keywords that some of you will undoubtedly drool over, so I suggest that you run (don't walk) directly to your friendly Atari dealer and buy your very own copy of BASIC XL immediately. It's the here-and-now solution to all your BASIC needs for your Atari computer.
  3. Hello Everyone, I wrote this simple Simon! (Repeat the Pattern of the Four Color Pads) program many years ago to test out BASIC XL. When I got the Colleen Emulator running on my Android phone, I really wanted to adapt the program to use the Touchscreen instead of the joystick interface. I wrote to Tom Hudson of the ANALOG magazine days and he gave me some information to get me started - Thanks, Tom! The interface is very simple. The Paddle(0) gives the X and the Paddle(1) gives the Y values of the touched location. The paddle trigger, PTrig(0) is used for sensing when the screen is touched. I wrote a small subroutine at the end of the program to convert the touched screen locations into a Joystick value. Both the Joystick and Touchscreen versions are included in the attached zip file for your use and study. Last but not least, you'll need to remember to Enable the Touchscreen Mode in the Preferences menu of the Colleen emulator to turn on the Touchscreen functionality. Have fun! Hayden Simon! 1.2 All Files_Released.zip
  4. Sifting the heap of aged floppy disks has turned up an interesting pile of ... shtuff. Machine language routines can be a big help to Atari BASIC/BASIC XL programs boosting performance and providing nifty features not included by BASIC. That is, provided the machine language routine can be brought into the BASIC program. In this case the Atari BASIC language can be like an island fortress repelling all invading data, because the language makes it inconvenient to get a machine language routine into a safe place usable by the BASIC progam. Convenience for BASIC means representing the machine language routine as either DATA statements to be READ and POKE'd into memory, or as string assignments. However, assembler output -- the machine language bytes -- does not come in a convenient format for BASIC. A machine language program is usually stored in Atari's segmented load file format. This is binary information including structure which embeds starting and ending addresses for blocks of memory data. While the segmented file is clever and is the standard format for Atari machine language programs loaded and run from DOS, neither Atari BASIC nor BASIC XL have a facility to easily load the segmented file formats into memory. A user could choose the DOS load option to load machine language utilities into memory, but this requires extra work on the part of users (who may be famous for forgetting to tie their shoe laces), and requires more thought and planning to design the machine language program to load into a location that will not be overwritten by the BASIC program when it loads and runs. BASIC XL does have the BGET command which can load an arbitrary amount of binary data from a file into any specified location of memory. The problem here is that this does exactly that -- it just loads data directly into memory. It does not understand the segmented file format. The BGET function is useful only if a machine language file is stripped of its segment information which is not smart to do if the file does not describe one contiguous block of memory. So, how to easily get a file of machine language data turned into something useful for BASIC namely, DATA statements or string assignments? Here is a BASIC XL program, BIN2DATA.BXL that processes binary/machine language file into more convenient data for OSS BASIC XL. BIN2DATA.zip What it does: Accepts the input file name containing machine language or other binary data Accepts the output file which will contain BASIC code that can be ENTER'd into BASIC XL and lightly modified for use. Allows the user to choose to load the segmented file into the memory specified by the file. Note that while this can load multiple segments it is intended for simple routines. Multiple segments will be consolidated into one range from the minimum/starting address to the maximum/ending address. Allows the user to choose to load the file directly into memory without reading any segment addresses. In this case the user will be prompted to specify a starting address for loading the data. Accepts the user's choice of output as DATA statements or string assignments. In the case of DATA statements the user can choose if the data will be in Hex or Decimal. The user may choose (within reason) the minimum and maximum number of values that will be output in a single line. The user may choose the starting line number and line increment. The program prints the BASIC statements to the screen and the output file at the same time providing the user visual feedback of the file output. Note that for the string representation there are two binary values that cannot be directly expressed in the string. The first is $02 which is the internal code for the the double quote character (ATASCII 34). The other is value $DB which is the internal code for the end of line character (ATASCII 155). The program substitutes a blank space for both of these values and remembers the position of the data in the string. After writing the string assignments the program will then output DATA statements listing the position of the problem characters within the string. This is expressed using BASIC's string position assignment values where the first character is position (1), not (0). It is up to the programmer to utilize the list to correctly update the data in the string. Here are a few, lovely pictures of the program in operation: Input entry of a program to output as a string: Here is the actual string output. This program has an embedded double quote character (binary $02) at position 8 in the string. Input entry of a program to output as Data: Here is the resulting output: The Good The Bad And the Ugly... The input handling is merely fairly decent, and not completely bullet resistant. When it asks for input from the user it pretty much needs actual input. Hitting RETURN by itself is a reliable way to break the program. The output is designed to fit the wider range of possibilities that BASIC XL permits. Using the program's output for regular Atari BASIC requires some tweaks: the command statements need to be changed to all upper case (i.e. "DATA" not "Data"), and the Hex format for Data statements cannot be used. The quotes and end of line position lists are always generated in hexadecimal. (Oops. Well, BASIC XL, you know.) The program has a lot of comments which could free up a lot of space when deleted. There are certainly redundant things going on in the code which could be optimized, and probably stupid, ugly misuse of TRAP. (So, you have fun with that, OK? Let me know how it goes.) The BIN2DATA.BXL Program: 1000 Rem SAVE "H1:BIN2DATA.BXL"1005 Rem1010 Rem BY KEN JENNINGS1015 Rem1020 Rem READ A BINARY DOS OR MAC/651025 Rem OBJECT FILE INTO MEMORY THEN1030 Rem OUTPUT THE BYTES AS BASIC1035 Rem DATA STATEMENTS OR STRING1040 Rem ASSIGNMENT.1045 Rem1050 Rem THE LOADER CAN HANDLE MULTI-1055 Rem SEGMENT FILES, BUT THIS IS1060 Rem ONLY TO COMPENSATE FOR1065 Rem MAC/65s PROPENSITY TO MAKE1070 Rem SEGMENTS WHEN NOT NEEDED.1075 Rem1080 Rem MULTIPLE SEGMENTS WILL BE1085 Rem CONSOLIDATED TO ONE, ALL-1090 Rem ENCOMPASSING START AND END1095 Rem ADDRESS. THIS MEANS A 1100 Rem PROGRAM WITH SEPARATED1105 Rem SEGMENTS MAY HAVE TONS OF1110 Rem USELESS MEMORY INCLUDED.1115 Rem1120 Rem THIS IS REALLY MEANT FOR1125 Rem SHORT MACHINE LANGUAGE1130 Rem ROUTINES THAT BASIC WILL CALL1135 Rem VIA USR().1140 Rem1145 Rem FOR SAFETY THE PROGRAM WILL1150 Rem LIMIT ADDRESSES TO PAGE 6,1155 Rem OR ADDRESSES BEWEEN THE END1160 Rem OF BASIC PROGRAM MEMORY AND1165 Rem THE START OF THE CURRENT1170 Rem DISPLAY LIST.1175 Rem1180 Fast1185 Graphics 0:Poke 82,0:Poke 710,01190 ? "Convert DOS or MAC/65 binary/object"1195 ? "file into BASIC Data or string."1200 Dim I$(20),Infile$(12),Outfile$(12),File$(12)1205 Dim H$(5),Hx$(32),W$(6)1210 Maxqe=256:Ql=0:El=01215 Dim Qlist$(Maxqe,2),Elist$(Maxqe,2)1220 W$="What?"1225 Rem1230 Rem FILENAMES1235 Rem1240 ? :Input "Enter file name to read: ",Infile$1245 ? :Input "Enter file name to write: ",Outfile$1250 Rem1255 Rem PROCESS BIN FILE ADDRESS INFORMATION?1260 Rem1265 ? :Input "Ignore address structures (Y/N): ",I$1270 Ignadd=Find("NnYy",I$(1,1),0)1275 If Ignadd=0 Then ? W$:Goto 12651280 Ignadd=Int((Ignadd+1)/2)1285 If Ignadd=2:Rem GET START ADDR1290 Rem1295 Rem STARTING ADDRESS IF LOADING1300 Rem DIRECTLY. LIMIT THIS TO1305 Rem SENSIBLY VALID ADDRESSES:1310 Rem PAGE 6 AND RAM AFTER THE1315 Rem PROGRAM IN MEMORY BEFORE1320 Rem THE DISPLAY LIST1325 Rem1330 ? :Input "Enter starting address (hex): ",H$1335 Gosub 2695:If Xaddr=0 Then ? W$:Goto 13301340 Ad=Xaddr:Gosub 2775:If Erradd>0 Then ? W$:Goto 13301345 Endif1350 Rem1355 Rem DUMP AS DATA STATEMENTS OR ATASCII STRING?1360 Rem1365 ? :Input "Output Data or String (D/S): ",I$1370 Ds=Find("DdSs",I$(1,1),0)1375 If Ds=0 Then ? W$:Goto 13651380 Ds=Int((Ds+1)/2)1385 Hd=1:Rem A DEFAULT FOR QUOTE/EOL LISTS1390 If Ds=1:Rem OUTPUT HEX OR DEC?1395 Rem1400 Rem DATA CAN BE HEX OR DECIMAL.1405 Rem1410 ? :Input "Output Hex or Decimal (H/D): ",I$1415 Hd=Find("HhDd",I$(1,1),0)1420 If Hd=0 Then ? W$:Goto 14101425 Hd=Int((Hd+1)/2)1430 Endif1435 Rem1440 Rem STARTING LINE NUMBER. BASIC1445 Rem ALLOWS LINES UP TO 32767, BUT1450 Rem TO BE REALISTIC THE STARTING1455 Rem LINE NUMBER SHOULD BE A LOT1460 Rem LESS THAN 32K. SO, THIS IS1465 Rem LIMITED TO 30000.1470 Rem1475 ? :Input "Starting line number: ",I$1480 If Len(I$)<1 Then ? W$:Goto 14751485 If I$(1,1)<"0" Or I$(1,1)>"9" Then ? W$:Goto 14751490 Sline=Val(I$)1495 If Sline>30000 Then ? W$:Goto 14751500 Rem1505 Rem LINE INCREMENT1510 Rem1515 ? :Input "Line increment (1-50): ",I$1520 If Len(I$)<1 Then ? W$:Goto 15151525 If I$(1,1)<"0" Or I$(1,1)>"9" Then ? W$:Goto 15151530 Iline=Val(I$)1535 If Iline>50 Or Iline<1 Then ? W$:Goto 15151540 Rem1545 Rem DATA ITEMS PER LINE. ALLOW1550 Rem MORE DATA FOR STRINGS.1555 Rem1560 ? "Bytes per line (";1565 If Ds=1:? "4";:Else "16";:Endif1570 ? " to ";1575 If Ds=1:? "24";:Else "96";:Endif1580 Input "): ",I$1585 If Len(I$)<1 Then ? W$:Goto 15601590 If I$(1,1)<"0" Or I$(1,1)>"9" Then ? W$:Goto 15601595 Bline=Val(I$)1600 If (Ds=1 And (Bline<4 Or Bline>24)) Or (Ds=2 And (Bline<16 Or Bline>96)) Then ? W$:Goto 15601605 ?1610 Rem1615 Rem INIT THE READING VARS1620 Rem1625 Zstart=$ffff:Rem THE ABSOLUTE STARTING ADDRESS1630 Zend=$00:Rem THE ABSOLUTE END ADDRESS1635 Tstart=$ffff:Rem TEMPORARY START1640 Tend=$00:Rem TEMPORARY END.1645 Rem1650 Rem OPEN THE FILE TO READ1655 Rem1660 File$=Infile$1665 Trap 2970:Open #2,4,0,Infile$1670 Rem1675 Rem READING DATA1680 Rem1685 If Ignadd=2 Then Goto 1825:Rem STRAIGHT FILE READ1690 Rem1695 Rem READING SEGMENTED FILE 1700 Rem1705 Trap 30401710 Lb=-1:Hb=-1:Tstart=$ffff:Tend=$001715 Get #2,Lb:Get #2,Hb1720 If Lb=$ff And Hb=$ff Then Goto 17101725 If Tstart=$ffff Then Tstart=Hb*256+Lb:Goto 17151730 Tend=Hb*256+Lb1735 Ad=Tstart:Gosub 2770:Eads=Erradd1740 Ad=Tend:Gosub 2770:Eade=Erradd1745 Rem IF BAD ADDRESS THEN EXIT...1750 If Eads>0 Or Eade>0 Then Goto 31201755 Rem REDETERMINE MIN/START, MAX/END ADDRESS1760 If Tstart<Zstart Then Zstart=Tstart1765 If Tend>Zend Then Zend=Tend1770 Rem SEGMENT READ, POKE AT START1775 Trap 30051780 Get #2,Ch1785 Poke Tstart,Ch1790 If Tstart=Tend Then Goto 1695:Rem BLOCK DONE1795 Tstart=Tstart+11800 Goto 17751805 Rem1810 Rem STRAIGHT FILE READ1815 Rem UNKNOWN SIZE, POKE AT END1820 Rem1825 Tstart=Xaddr:Tend=Xaddr-11830 Trap 3085:Rem EXPECT EOF1835 Get #2,Ch1840 Tend=Tend+11845 Ad=Tend:Gosub 27751850 If Erradd>0 Then Goto 3120:Rem ABORT1855 Poke Tend,Ch1860 Goto 18351865 Zstart=Tstart:Zend=Tend1870 Rem1875 Rem IF DATA WAS READ, OUTPUT BYTES...1880 Rem1885 Close #21890 If Zstart>Zend:Rem NO ADDRESS RANGE1895 ? "No addresses set from file"1900 End1905 Endif1910 Rem1915 Rem OUTPUT FILE...1920 Rem1925 File$=Outfile$1930 Trap 2970:Open #2,8,0,Outfile$1935 Trap 32151940 Rem1945 Rem OUTPUT BYTES.1950 Rem1955 Sep=1:Byte=01960 Rem1965 Rem DESCRIPTIVE COMMENT FOR THE FORGETFUL1970 Rem1975 ? Sline;" Rem ";Infile$1980 ? #2;Sline;" Rem ";Infile$1985 Sline=Sline+Iline1990 Ch=Zend-Zstart+11995 ? Sline;" Rem Size = ";2000 ? #2;Sline;" Rem Size = ";:Gosub 31502005 Sline=Sline+Iline2010 Ch=Zstart2015 ? Sline;" Rem Start = ";2020 ? #2:? #2;Sline;" Rem Start = ";:Gosub 31502025 Sline=Sline+Iline2030 Ch=Zend2035 ? Sline;" Rem End = ";2040 ? #2:? #2;Sline;" Rem End = ";:Gosub 31502045 Sline=Sline+Iline2050 ? #22055 Rem2060 Rem REAL DATA OUT...2065 Rem2070 While Zstart<=Zend2075 Rem NEW LINE SEPARATION2080 If Sep=1:Rem NEW LINE2085 ? Sline;" ";2090 ? #2;Sline;" ";2095 Sline=Sline+Iline2100 If Ds=1:Rem BASIC DATA2105 ? "Data ";2110 ? #2;"Data ";2115 Else :Rem OUTPUT STRING2120 ? "A$";2125 ? #2;"A$";2130 If Byte>0:Rem STRING CONTINUATION2135 ? "(";Byte+1;")";2140 ? #2;"(";Byte+1;")";2145 Endif2150 ? "=";Chr$(34);2155 ? #2;"=";Chr$(34);2160 Endif2165 Endif2170 Rem BETWEEN DATA2175 If Sep=0 And Ds=1:Rem NOT END OF LINE2180 ? ",";2185 ? #2;",";2190 Endif2195 Rem NOW GET DATA TO OUTPUT2200 Ch=Peek(Zstart)2205 Rem DATA OR STRING?2210 If Ds=1:Rem DATA2215 Gosub 3150:Rem DEX OR DEC OUTPUT?2220 Else :Rem STRING2225 Gosub 2915:Rem CONVERT BYTE TO CHR$2230 Gosub 2810:Rem CHECK FOR SUBSTITUTION2235 If Subqe=1:Rem QUOTE OR EOL2240 ? " ";2245 ? #2;" ";2250 Else :Rem NOT SUBSTITUTED2255 ? Chr$(27);Chr$(Chs);:Rem CONVERTED FROM CH2260 ? #2;Chr$(Chs);2265 Endif2270 Endif2275 Rem COUNT THE BYTE OUTPUT2280 Rem AND DETERMINE END OF LINE2285 Byte=Byte+1:Sep=02290 If Byte/Bline=Int(Byte/Bline):Rem BREAK LINE2295 Sep=12300 Endif2305 Zstart=Zstart+12310 If Sep=1 Or Zstart>Zend:Rem END OF LINE OR END OF DATA2315 If Ds=2:Rem END OF DATA FOR STRING2320 ? Chr$($22)2325 ? #2;Chr$($22)2330 Else :Rem DATA2335 ? #22340 Endif2345 Endif2350 Endwhile2355 Rem2360 Rem OUTPUT QUOTE AND EOL LISTS2365 Rem2370 If Ql>0:Rem OUTPUT QUOTE LIST2375 ? Sline;" Rem Embedded quote list"2380 ? #2:? #2;Sline;" Rem Embedded quote list"2385 Sline=Sline+Iline2390 Sep=1:Byte=02395 I=12400 While I<=Ql2405 If Sep=1:Rem NEW LINE2410 ? Sline;" Data ";2415 ? #2;Sline;" Data ";2420 Sline=Sline+Iline2425 Endif2430 If Sep=0:Rem BETWEEN DATA2435 ? ",";2440 ? #2;",";2445 Endif2450 Ch=Dpeek(Adr(Qlist$(I;)))2455 Gosub 3150:Rem OUTPUT CH2460 Sep=02465 If I&$fff8=I Then Sep=12470 I=I+12475 Endwhile2480 Endif2485 Rem2490 If El>0:Rem OUTPUT EOL LIST2495 ? Sline;" Rem Embedded EOL list"2500 ? #2:? #2;Sline;" Rem Embedded EOL list"2505 Sline=Sline+Iline2510 Sep=1:Byte=02515 I=12520 While I<=El2525 If Sep=1:Rem NEW LINE2530 ? Sline;" Data ";2535 ? #2;Sline;" Data ";2540 Sline=Sline+Iline2545 Endif2550 If Sep=0:Rem BETWEEN DATA2555 ? ",";2560 ? #2;",";2565 Endif2570 Ch=Dpeek(Adr(Elist$(I;)))2575 Gosub 3150:Rem OUTPUT CH2580 Sep=02585 If I&$fff8=I Then Sep=12590 I=I+12595 Endwhile2600 Endif2605 ? #22610 Close #2:Trap 400002615 End2620 Rem2625 Rem REPORT LAST ERROR2630 Rem2635 ? "Error ";Err(0);" at line ";Err(1)2640 Return2645 Rem2650 Rem REPORT LAST ADDRESSES2655 Rem2660 ? "Start: $";Hex$(Tstart);"/";Tstart2665 ? " End: $";Hex$(Tend);"/";Tend:?2670 Return2675 Rem2680 Rem SUBROUTINE CONVERT HEX2685 Rem STRING TO NUMERIC VALUE.2690 Rem2695 Hx$="0123456789ABCDEFabcdef"2700 Xaddr=02705 If Len(H$)<1 Then Return2710 If H$(1,1)="$" And Len(H$)>1 Then H$(1)=H$(2):Goto 27052715 If H$(1,1)="$" Then Return2720 For X=1 To Len(H$)2725 B=Find(Hx$,H$(X,X),0)2730 If B=0 Then Xaddr=0:Return2735 If B>16 Then B=B-62740 Xaddr=Xaddr*16+(B-1)2745 Next X2750 Return2755 Rem2760 Rem ADDRESS RANGE CHECK2765 Rem2770 Erradd=02775 If (Ad<Dpeek($0e) And (Ad<$0600 Or Ad>$06ff)) Or Ad>=Dpeek($0230) Then Erradd=12780 Return2785 Rem2790 Rem CANNOT EMBED QUOTE OR EOL2795 Rem IN STRING, SO TRACK FOR2800 Rem DATA OUTPUT LATER.2805 Rem2810 Subqe=02815 If Ch=2:Rem BYTE 2 = CHR$($22) = QUOTE2820 If Ql>=Maxqe:Rem TOO MANY2825 ? "Too many embedded quotes ($02=$22)."2830 End2835 Endif2840 Ql=Ql+1:Subqe=12845 Dpoke Adr(Qlist$(Ql;)),Byte+12850 Endif2855 If Ch=$db:Rem BYTE $DB = CHR$($9B) = EOL2860 If El>=Maxqe:Rem TOO MANY2865 ? "Too many embedded End Of Lines ($DB=$9B)."2870 End2875 Endif2880 El=El+1:Subqe=12885 Dpoke Adr(Elist$(El;)),Byte+12890 Endif2895 Return2900 Rem2905 Rem CONVERT CH BYTE TO CHR$2910 Rem2915 Chs=Ch:Chi=Ch&$7f2920 If Chi>=$00 And Chi<=$3f:Rem ++ $202925 Chs=Chs+$202930 Endif2935 If Chi>=$40 And Chi<=$5f:Rem -- $402940 Chs=Chs-$402945 Endif2950 Return2955 Rem2960 Rem FILE OPEN ERROR2965 Rem2970 ? "Failed to open file: ";File$2975 Gosub 26352980 End2985 Rem2990 Rem ERROR DURING SEGMENT DATA2995 Rem IS NOT ALLOWED3000 Rem3005 ? "Error Reading Segment Data"3010 Gosub 2635:Gosub 26603015 End3020 Rem3025 Rem ERROR DURING SEGMENT ADDRESSES3030 Rem3035 Rem EOF MAY MEAN END OF SEGMENT3040 If Err(0)=136 Then Goto 18853045 Rem NOT EOF IS BAD(DER)3050 ? "Error Reading Segment Header"3055 Gosub 2635:Gosub 26603060 End3065 Rem3070 Rem ERROR DURING REGULAR FILE3075 Rem3080 Rem EOF MEANS END OF FILE3085 If Err(0)=136 Then Goto 18653090 ? "Error reading data"3095 Gosub 2635:Gosub 26603100 End3105 Rem3110 Rem ADDRESS RANGE ERROR3115 Rem3120 ? "Address Range Error During I/O":?3125 Gosub 26603130 End3135 Rem3140 Rem OUTPUT CH AS HEX OR DEC3145 Rem3150 If Hd=1:Rem HEX OR DEC3155 B$=Hex$(Ch)3160 If Ch<=$ff Then B$=B$(3)3165 ? "$";B$;3170 ? #2;"$";B$;3175 Else :Rem DEC3180 ? Ch;3185 ? #2;Ch;3190 Endif3195 Return3200 Rem3205 Rem FILE WRITE ERROR3210 Rem3215 ? "Failed to write file: ";File$3220 Gosub 26353225 End
  5. A short time ago I found some (debatably) useful utilities for the Atari 8-bit while scraping a crate of old floppies into ATR files. One of these is a character set editor I have been working on (and off) for a few decades. I spent most of July adding a few useful features for the modern era of Atari emulators, and dealing with some bugs. So, here's a new toy to play with, GRID EDIT. The attached ZIP file will unpack to an ATR. I ordinarily use this as D2:. GRIDEDIT_ATR.zip Better docs should be completed soon, (Copy and paste from a word doc is not looking very good.) Here's a first stab at useful info... ==================================================== REQUIRES 40K RAM, OSS BASIC XL, floppy disk drive or emulator supporting Host drives. PROBABLY REQUIRES DOS 2.0S, or other DOS with an equally small (or smaller) footprint. With DOS2.0S there is about 1.4K of free ram between the end of the program, and the fixed location of the first character set in RAM. RECOMMENDED Joystick, or Touch Tablet FEATURES Edits 8 fonts in memory. Most functions/operations can be applied to a single character or an entire font. Reverts font changes to the last saved version, the version read at startup, or the original ROM version. An onscreen doodling area allowing preview of the fonts with font and color changes permitted per line. Keyboard, Joystick, or Touch Tablet operation. Non-modal (mostly) input methods allow open workflow for the user. (Simultaneous editing, menu, and doodling operations.) ==================================================== INTRODUCTION My favorite Atari 8-bit feature is redefined character sets, because it is fairly simple to utilize and so readily fit into my tiny brain. Atari’s character set magic provides considerable bang for the buck allowing even slow BASIC programs to achieve graphics movement approximating animation. Over the years I’ve collected and written countless character set editors. GRIDEDIT is one of my old, much-abused BASIC prototypes of unpolished features and experimental user interfaces hacked up prior to writing better versions in Assembly. This is a simple character editor for ANTIC Mode 2 (GRAPHICS 0) text fonts. It can also be applied to Mode 6/7 text with the understanding the program does not show colored characters. GRIDEDIT was originally developed using the Atari 800 with 48K (and cassette!). A few changes were recently added using Altirra emulating a 64K 800XL. Seems to work fine. ==================================================== SUMMARY In the upper left is the edit grid to change the current character. in the top center of the screen is the menu to choose actions, switch fonts, etc. In the upper right is the character selector showing all 128 Atari font characters. Below the selector is a status line reporting the state/behavior of the program. In the center of the screen is a preview line that shows the current font centered on the current character being edited. At the bottom of the screen is a doodling area. Each row of text can have its own colors and fonts assigned. (DLI abuse going on.) The user’s input cursor appears as a flashing block on the screen. Move the cursor with the current input device – the arrow keys, the joystick, or the touch tablet stylus. Press a controller button or use the Space Bar or Enter key to select the item under the cursor. The display/user input is primarily non-modal. While a Menu is waiting for input the Edit Grid is still functional, the Character Selector can choose characters in the current font, and the Doodling area allows drawing characters. ==================================================== EDIT GRID The Edit Grid presents an 8 x 8 grid of the current character's bitmap. Within the bitmap the controller button(s) (or keyboard) turn bits on and off: Use the joystick button to toggle bits on and off. Use the keyboard’s ‘Return’ and ‘/’ keys to turn bits on and off. Use the touch tablet’s left, right, and stylus buttons to turn bits on and off. The outer borders are shortcuts for bit shifting operations. Selecting the outermost border containing arrows will move the entire bitmap contents in the direction of the arrow. The next border inside will move just the bits in that horizontal line or vertical column. The ‘S’ or ‘R’ characters at the corners of the inner border indicate the current bit shifting mode when selecting the bit shift shortcut borders. The character displayed in inverse video indicates which mode is in effect: S – “SHIFT”: bits shifted past the borders of the grid are lost, and the new bits shifted in are zero/clear. R – “ROLL” bits shifted past the borders of the grid “roll” around and reappear as the new bits on the opposite side of the grid. ==================================================== MENU The menu allows choice of functions or operations. A choice is made by moving the cursor to the corresponding line and pressing the controller button or Return key. Some choices will present other menus. Most menus have a Cancel option as the last entry that will quit the current line of prompting and return to an earlier menu. Some Menus include an OK option to accept the changes made on screen. ==================================================== CHARACTER SELECTOR This array presents all 128 Atari characters. Move the cursor to the desired character and press the controller button or Return key to edit the character in the current font. ==================================================== STATUS The status box provides important information to the user. The first line reports the current Font (1 to 8 ) and the character being edited as a hexadecimal value for its position in the font. The left half of the second line displays the list of possible input devices. The current input device is shown as an abbreviation – “Joy” for joystick, “Key” for keyboard, and “Tab” for Atari touch tablet. The input devices not in use are represented by a single inverse video character of the key to press to activate the device. (‘J’, ‘K’, or ‘T’). The right half of the second line displays the current mode for bit manipulation functions and other operations. The values may be “Char” or “All”. “Char” mode means the function or operation chosen works only on the current character. In “All” mode the functions and operations act on the entire current font. The first character of each mode appears as inverse video indicating the key to press to set the mode. The last line of status displays the font and character information marked as the intended source for the Copy operation. The first value is the font number, then a slash, then the hexadecimal value of the character’s position in the font. ==================================================== PREVIEW The Preview lines show the current font on the top line, and inverse video on the second line. A flashing marker appears above and below the current character. Additionally, the Preview display also allows choosing the character to edit. Move the cursor to the desired character and press the controller button or Return key to edit the character in the current font. ==================================================== DOODLING The Doodling area allows plotting the current character in a 40 character x 8 line display. Each line of the display can be adjusted to set a new value for font (CHBASE), character control (CHACTL), Border color (COLBK), line color (COLPF2) and text luminance (COLPF1). The joystick button plots the character on screen. The ‘Return’ key also plots, and the ‘/’ key plots the inverse video value of the current character. Likewise, the touch tablet buttons plot in normal and inverse video. ==================================================== STARTUP LOAD the program into OSS BASIC XL, and RUN it. After a few moments the program will present a list of disk drive devices choices numbered 1 through 4. Choose the disk device to use as the default device by pressing the corresponding number key. The Return key is not needed. The chosen default device will be used for all subsequent save and load operations. The program will attempt to load eight fonts from the default disk drive. The fonts have fixed names on the disk: FONT1.FNT, FONT2.FNT, etc. up to FONT8.FNT. If a file is not found then the program will automatically use a copy of the internal ROM font. The program will save a backup file on the default disk device for each font. The backup for FONT1.FNT is F1.FNT, FONT2.FNT is F2.FNT, and so on. The backup is created only during the program startup and never written again. If the DOODLE.DAT file exists, the program will load the configuration of the Doodling area from that file including the characters that had been drawn in the Doodle area, and the fonts and colors chosen for each of the lines. ==================================================== INPUT The cursor may be controlled and input provided via keyboard, joystick, or touch tablet. Special keys controlling the operating configuration function regardless of the current input method. KEYBOARD Use the arrow keys (with or without the ctrl key) to move the cursor. JOYSTICK Use the joystick plugged into the first joystick port to move the cursor. The joystick button will choose items, draw pixels in the current character, or draw in the doodle are depending on the location of the cursor. TOUCH TABLET The tablet stylus will move the cursor around the screen. CONFIGURATION KEYS Configuration keys are always available regardless of the type of input. K - Set keyboard input J – Set joystick input T – Set touch tablet input C - Set Character-only mode for Functions A - Set All (entire Font) mode for Functions S - Set Bit Shift mode for Grid Editor R - Set Bit Roll mode for Grid Editor ==================================================== BUGS There are certainly more than enough bugs to go around. Share with friends and enjoy. You’re welcome. “All” mode has side effects when editing a Doodle row’s configuration: When a Doodle configuration item menu is entered (CHBASE, COLBK, etc.), the program automatically changes all the lines’ values to the current value for the chosen line. Since only the last value of the current row is remembered for the case of the Cancel menu choice, it causes Cancel to return all the rows to the previous value of the current row, not the previous value of each individual row. Switching back to “Char” mode will cause the Cancel menu item to revert only the chosen Doodle row’s configuration, leaving all the other rows modified. ==================================================== RANDOM NOTES Disregard that FRE(0) says there’s about 10.5K of free memory. The 8 fonts are at fixed locations starting at $7800. This works out to about 1.4K of actual free memory. The lowest hanging fruit for optimizing has been done – using variables in place of constants. Without that the program would probably be looking at space for only 5 fonts. This program had little pre-planning - - or 30 years of design consideration depending on the point of view. It has been hacked on over and over to add features and change behaviors. Due to this there are redundant variables and temporary variables that occur only once in the code. Finding and optimizing this is an exercise for the masochistic. The easiest way to free up a ton of memory is to remove the many, many REMark lines. That is, if you never intend to understand the program. Reading comprehension plummets without the comments. Those who understand Display List Interrupts will recognize that the DLIs for the Doodling area are doing three and one-half things more than can actually fit in the horizontal blank time allowed. It is what it is. The DLIs are there just to provide a rough guess of what the characters sets will look like. The most recent round of hacks made the program play nicer with an emulator (Altirra preferred for Windows). This added support for Host drives (really trivial) and touch tablet input. An emulator implementing a fake touch tablet is a cheap way to have mouse support from the Host environment without handling the mouse in the Atari itself and so frees the Atari from the overhead of a polling (or frequently interrupting) machine language handler. Tablet support took just about an hour to work out tablet coordinates vs the Player/Missile screen cursor. ==================================================== WHY OSS BASIC XL? I work in straight Atari BASIC only if someone requires it. OSS BASIC XL is 99% of my BASIC use and one of the underappreciated gems on the Atari 8-bits. It bugged me that Atari magazines back in the day printed articles for Action!, but never for BASIC XL which had a much larger user base. It loads Atari BASIC tokenized (SAVE’d) programs without changes, 99% compatible ENTER’ing programs previously LIST’ed by Atari BASIC. It is faster (much faster) than Atari BASIC. BASIC XL provides a heap of neat, built-in extra features… Player/Missile graphics support. Memory move at machine language speeds. String arrays. Structured statements: If/Else/Endif and While/Endwhile FAST mode that predetermines line location to eliminate the line lookup overhead. [*]It fits in a ROM cart occupying the same memory as 8K Atari BASIC. [*]Everyone and their cousin should be able to easily get the ROM running under emulation.
  • Create New...