APPLICATIONSUTILITAIRES RSX/LIGNE DE COMMANDE ★ RSX - DEFINE - PLACE|POPULAR COMPUTING WEEKLY) ★

A new image: RSX's |DEFINE & |PLACEEverything in its place
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

Two new graphics commands for the CPC 464 by Brian Cadge

The graphics potential of the CPC464 is very promising, as can be seen from some of the first software to become available. However, in Basic the user is restricted to using user designed characters. The disadvantages of these are their size and the fact that only two colours can be present in each cell. To get more colours we have to individually plot the points using Plot and Draw. This is clearly too slow for fast action games.
Fortunately, it is quite simple to extend the Locomotive Basic (or any other language for that matter), using Resident System Extensions (RSX's). The program presented here gives you two new graphics commands. Firstly, here is an explanation of how to use the new commands from Basic.

All RSX commands start with the | character (obtained using shift and @ together), and these commands are called Define and Place. Their syntax is:

|DEFINE, image, width, height
|PLACE, image, xpos, ypos

Notice thai a comma appears straight after the command name and before the first parameter. This is essential, as is the I character; if either is missed out then you'll get a syntax error. The first parameter in both commands is image which is a number referring to the particular image you wish to address. The first image is numbered 0, the next 1 and so on. The more images you want the more memory you must reserve. As set up by the Basic loader you get space for two images, numbered 0 and 1. For every extra image you must lower Himem by 256 bytes.

Width is the width of the image in screen bytes (not in characters or pixels), there are always 80 column bytes on the screen, and so in Mode 2 one character is one byte wide, in Mode J a character is two bytes wide, and in Mode 0 it is four bytes wide. Height is the height of the image in characters. The maximum size of an image is 7 x 4. This command assumes that the image to be stored is located in the top left of the screen- Therefore, you set up your character using Plot etc, and then use j define to get it off the screen. So in mode 1, to copy the equivalent of one character cell you would use: |DEFINE, 0, 2, 1.

★ PUBLISHER: POPULAR COMPUTING WEEKLY
★ YEAR: 1984
★ AUTHOR: Brian Cadge

CPCrulez[Content Management System] v8.7-desktop/cache
Page créée en 909 millisecondes et consultée 1070 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.