DefChar Character Editor ======================== J.G.Harston v2.11 17-Feb-2019 mdfs.net/Apps/Font - jgh@mdfs.net 70 Camm Street, Walkley, Sheffield S6 3TR Introduction ------------ DefChar is a simple character definition program. You can manipulate the character definitions in various ways. It should work on any system with BBC BASIC and access to VDU23 and OSWORD 10, such as BBC, Electron, Master, DOS, Windows, Linux, Spectrum, etc. Editing characters ------------------ On the display, you see the character set at the top. On the left is the editing grid with the value of each line down the side. In the middle is a menu of operations performed on the whole set, and on the right, operations performed on the editing grid. The options in the menu are selected by pressing either the upper case letter (middle menu) or the indicated letter or character (right menu). The cursor keys move the cursor around the editing grid. Holding Shift down will scroll the grid. Pressing TAB or COPY flips the current bit. Pressing 0 or 1 will reset or set the bit. You can press Return instead of P to Enter a definition into the character set. The 'Check font' option goes through the whole character set to see if any have been duplicated. You can also press * to do *-commands. While at the '*' command prompt you can also do 'L'oad and 'S'ave. Load/saving fonts ----------------- You can save the character set in two ways, as binary data, or as VDU sequences as in a RISC OS BBC font file. The former just saves the eight bytes of each definition one after the other. Saving as a BBC font file saves the whole VDU sequences. You can load either type of file. If you load a binary data file, you are asked for the character to start loading at. If the file would extend past character 255, the loading stops after loading character 255. Character sets can be loaded and saved with *CLoad and *CSave, either as transient commands or in the CharROM. BBC font files can also be loaded by *EXECing, *TYPEing or *PRINTing them. Mouse control ------------- You can use a mouse to control the program. The *MOUSE command provides a mouse driver so you can use a mouse without a mouse driver ROM plugged in. On the editing grid, the left mouse button sets bits, the middle button flips bits, and the right button clears bits. Clicking at the edge of the grid scrolls the grid in that direction. Clicking the left button on a character in the character set at the top of the screen Gets that character onto the grid. Clicking with the right button Puts the grid definition into the character set. Clicking the left button over the menus selects that menu option. Exploding the character set --------------------------- To define the whole character set, it needs to be exploded. On the Master and later computers, and with a second processor, the character set is permanently exploded. On the Electron, BBC and B+ the character set is by default imploded. *FX20,6 or the *EXPLODE command explodes the character set. *EXPLODE is provided in the CharROM and as a transient command. The command re-enters the current language after exploding the character set to take into account the change in the value of PAGE. You can put the *EXPLODE command in a *EXEC sequence or on a function key if you want to automatically do something afterwards, eg: 10 *KEY 0 CH."Prog2" 20 *FX138,0,128 30 *EXPLODE ON 40 *BASIC The *FX138,0,128 enters function key 0 into the keyboard buffer. The syntax of the *EXPLODE command is: *EXPLODE just explodes the character set with *FX20,6, and re-enters the current language. *EXPLODE ON explodes the character set and re-enters the language, and also puts some code on the Break intercept vector, so that the character set is re-exploded when Break is pressed. *EXPLODE OFF implodes the character set with *FX20,0, and disables any Break intercept code. If a *EXPLODE command does not result in PAGE moving, then the current language is not re-entered. On a Master series computer, or if the Tube is active, the *EXPLODE command has no effect.