Search the Community
Showing results for tags 'character set'.
Found 2 results
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.
Hi, New/old A8 basic coder here (haven't touched it in ~30y). Trying to remember how to use ML strings to redefine character sets... My most immediate problem is that I can't get certain characters on the screen. CHR$(127) does not output the right-facing triangle character. I need to get that in a string to redefine my character set but I'm forgetting how. The screenshot attached shows another person's program that contains said character in a string, but I don't know how it was done. I have access to Atari800MacX, Envision on a windows XP VM, and I'm open to other mac/win/a8 tools if there's an easy-peasy character set generator that outputs what I need. I also don't mind converting the values by hand into ATASCII but I figure there's easier ways My requirements are that the code be self-contained in the basic file and that it be as compact as possible, so I can't use external files to load the charset data, and I figure strings are better than data statements.