• Aucun résultat trouvé

By POKEing different numbers into address 36869, you can change where the Video Interface Chip looks for its character maps. You do this automatically when you change the keyboard from graphics to text mode. Graphics is a value of 240 at 36869, and text is 242. The value in between, 241, represents reversed graphics characters, but using the reversed characters doesn't normally change the value at 36869.

A value of 252 moves the map location to 4096, the start of standard 3.5K memory. Above 252 the corresponding address in creases by increments of 1024, up to 7168 for a value of 255. Be cause of the length of the Pixelator program, it uses the highest value. (For a fuller explanation of what happens at address 36869, consult Jim Butterfield's "Browsing the VIC Chip" in COM-PUTEl'sFirstBookofVIC.)

The Pixelator program, once it is up and running, consumes almost 3K of memory (see Program 1). On VICs that haven't been expanded, that leaves just room enough to store 64 characters.

That limit coincides with the fact that the second half of the map memory starting at 7168 corresponds to screen memory in most machines. Well discuss a way of getting around this 64-character limit later.

Of course, with expanded memory, all you have to do is select a memory location that doesn't interfere with screen memory.

Sometimes the problem is solved automatically because the screen memory moves (as do the screen color addresses). The three variables in line 20 allow you to change the program to com pensate. XX is map memory and should always be a multiple of 1024. SC is screen memory. CL is color memory.

When you run Pixelator, you are first offered a choice of creat ing a new character or retrieving an old one from memory. The choices are color-coded green and cyan, respectively. If you select

"new character" by pressing the programmable key Fl, the border changes from white to green, and you are asked to select one of the four work frames by keying Fl, F3, F5, or F7. Next you are asked to select the character at the address where you intend to design a new shape.

60

Four Options Following Design

Once you've selected a character, you'll see a half-height dot screen figure pop up in the top left corner of the frame. That's your cursor, and you can move it anywhere within the frame by using the cursor controls. To design a character, use the space bar.

SHIFT/SPACE leaves a trail of red spaces in its wake. These red spaces correspond to the pixels which will be darkened in the completed character. Without shifting, the space bar returns the spaces to white. You can clear a cluttered frame simply by holding the space bar down until all the red is gone.

After you have worked on the character to your satisfaction, you have four options. Fl stores your creation in the appropriate eight bytes of memory and then returns you to the opening for mat. F3 aborts the frame, returning you to the opening format without storing the character. F5 renames the character, enabling you to reassign it to a memory location different from the one for which it originally was named. This is of more use when retriev ing characters from memory than when creating new ones, but it works in both modes. F7 allows you to work on a series of charac ters without having to go through the "select frame — select char acter" process every time. The command stores the current char acter, jumps to the next frame, and increments the character name. You can keep doing this until you have stored the question mark, at which point you are returned to the opening format.

If at the opening format you opt to retrieve a character from memory, the border changes to cyan, and you are given five choices. Fl retrieves from RAM; that is, it accesses either charac ters you have already stored or whatever garbage happens to be in memory at the time. F2 accesses the VIC's ROM characters from the graphics mode, and F4 calls up the reverse of those char acters. F6 and F8 are for text mode, the latter key again applying to reversed characters. You can freely mix characters from all modes and modify them to suit your needs. (If you need a full alphabet to go along with your custom characters, there is a short cut, pro vided you store your characters at 7168. After POKEing 255 into 36869, you can use RVS ON to get any normal character from @ to

?. RVS OFF gives you your custom characters. This works only at 255.)

From there you are asked to select frame and select character again, but if you call up a graphics character (or, in text mode, an uppercase character) from ROM, you will be asked to rename it to something with a screen value less than 64. You now have the

61

Four characters as seen by "Pixelator"

same options as before: to store, to abort, to rename, or to store and increment. If you have renamed a character, both the original character and its new name will be incremented.

Saving Your Custom Characters

More than likely, you will want to use Pixelator to create charac ters for use in some other program, such as a videogame. Three shorter programs allow you to save the information the Pixelator has created. To save the characters directly on cassette as a data file, interrupt the Hxelator with:the StOPi^y and type NEW to 7

get ridjpf the program. JThenload '^mamzf' itio thevfl(5 Pixavei^J

(Program 2) allows you to save a Mock of chaMders 6f ariy size, up to 64, on tape as a single data file. The first number in the file rep resents the screen value of the first character; the second number is the last character. This allows you to record as many different blocks as you like. Each file will contain the information necessary to store the data in the right place. Also, for convenience, each file will be tagged with the name of its first character. Now you can turn your VIC off.

Loading Your Custom Characters

cassette and enter it back into memory. Noticeline 1& which sell

62

'2-the value of XX, '2-the start of map memory:py changing that value,