DefChar Spectrum Character Editor ================================= J.G.Harston v1.20 1984-2003 http://mdfs.net/Software/Spectrum/Fonts/Editors 70 Camm Street, Walkley, Sheffield S6 3TR Introduction ------------ DefChar is a simple character editing program. The Spectrum has 21 user- definable graphics characters available to the user. The ordinary characters can also be defined by altering the system variable CHARS to point into RAM. DefChar allows you to manipulate the character definitions in various ways. These instructions describe the Spectrum version of DefChar. The BBC and Amstrad versions are functionally the same. MAIN MENU ========= On running DefChar the main menu is displayed listing the available main commands, the complete character set, and a grid displaying the character being edited. At any point if DefChar stops with an error, it can be rerun to return directly to the main menu. A: Change start of characters ----------------------------- This changes the address in memory of the character set being edited. Valid values for this are 40000 to 65000. If you enter a value out of this range, it is ignored. A valid value is rounded down to the nearest multiple of 256. The character start address is shown on the main menu under the character set. R: Reset -------- This will reset the character set being edited to that of the character set in the ROM. When selected, you have to confirm by entering 'Y'. W: SWAP ------- This swaps two character definitions E: EDIT ------- This enters editing mode to define characters. V: VIEW ------- This will view a character by drawing it on the large editing grid. L: Load a file, S: Save a file ------------------------------ This allows you to load and save the full character set. You will be prompted for the filename, and the character to start to load/save. Pressing ENTER will start at character 32 (space). When saving you are then prompted for the final character to save, pressing ENTER will save to the end of the UDCs, character 164. D: Drive -------- This allows you to set the default drive for loading and saving files. Enter '1' to '8' for microdrives 1 to 8, 'T' for tape or 'S' for serial link. When the program starts this is set to the drive just loaded from. The current drive number is displayed on the main menu below the character set. C: Catalog ---------- This catalogs the current device as selected with D from the main menu. When cataloging from tape, pressing ENTER will stop the listing. Q: Quit ------- This exits the program. You are asked for confirmation, then given a page of instructions on how to select the character set in memory. After pressing another key, the program NEWs itself to clear memory. CHARACTER EDITOR ================ Pressing 'E' from the main menu enters the editing menu. This has a similar layout to the main menu, with the character set at the top, the editing grid at the left, and the menu of operations at the right. The cursor keys 5, 6, 7, 8 move the cursor around the editing grid clearing pixels. Holding Shift down moves around the editing grid setting pixels. M: MIRROR --------- This reflects the grid across the vertical axis. F: FLIP ------- This reflects the grid across the horizontal axis. Q: SPIN \ --------- This reflects the grid across the diagonal axis from the top-left corner to the bottom right corner. P: SPIN / --------- This reflects the grid across the diagonal axis from the top-right corner to the bottom-left corner. I: INVERT --------- This inverts every pixel on the grid. S: SUPERIMPOSE -------------- This superimposes another character onto the grid. You are asked whether to use XOR or OR to merge the characters, then the character to be superimposed. Note that XOR is reversible by doing the same again, but OR isn't. Y,G,H,B: SCROLL --------------- These scroll the grid around in the of the four directions. The keys are laid out in a diamond shape, pointing in the directions that they scroll in. Eg Y at the top scrolls upwards, etc. V: VIEW ------- This copies a character onto the grid, clearing whatever was there before it. ENTER: Enter character ---------------------- This function enters the definition into a character. You are asked for the character, and pressing on its own will abort the entry. After entering, the character set is updated, and you will be able to see the new character in it. E: Exit to main menu -------------------- This will return you to the main menu where you can load and save the character set, and do other functions. Entering character codes ======================== In various places you are asked for 'Which character'. In answer to this, you can enter the character code or the actual character. If the string you enter is only one character, then that is the character to use, otherwise the string is evaluated as a number. If you give a number out of range or you enter invalid characters, you will be asked to enter it again. Just pressing will cause the input to be ignored. Valid characters are 32 to 165 and -1 to -9. The characters '-1' to '-9' are spare ones that aren't used in the character set, but they can be used for temporary storage in more complicated manipulation. Files and filenames =================== The Devpac/Tasword "d:filename" file access convention is used. When loading or saving files, if the second character of the filename is ':', then the first character specifies what device to use, either 'T' for tape, '1'-'8' for microdrive 1 to 8 or 'S' for serial link. Otherwise, the default device is used. For example, "1:JSWChars" refers to a file "JSWChars" on microdrive 1, "T:Matrix" refers to a file "Matrix" on tape, "Cyrillic" refers to a file "Cyrillic" on the default device set by the Drive option. DefChar will load and save with the Discovery and the DISCiPLE as they use standard microdrive commands. When a full character set is saved from CHR$32 (space) to CHR$164 (UDC U), 1024 bytes of data are saved consisting of the 96 main characters CHR$32 to CHR$127 followed by 72 spare bytes forming the temporary characters '-1' to '-9', followed by the User Defined Characters 'A' to 'U'. Using the characters in other programs ====================================== To load a character set with another program, you use: LOAD "" CODE or LOAD *"m";;"" CODE where and are the file to be loaded and is the address in memory to load the file. You can then select the character set with: POKE 23606,start-256*INT(start/256):POKE 23607,INT(start/256)-1 The default ROM character set can be selected with: POKE 23606,0:POKE 23607,60 Version History =============== 1.20 Jul 1986: Uses d:filename file access 1.11 Jun 1986: FontEditor: Branched version with command entry for MegaBasic 1.11 Mar 1986: DefCharCmd: Branched version with command entry 1.10 Apr 1986: Entered as Computer Studies project with Charmaker 1.10 Oct 1985: Updated for microdrive access 1.00 Feb 1985: First completed version