APPLICATIONSPROGRAMMATION ★ BUILD A MONSTER ★

Build a Monster|The Amstrad User)Poke a Monster|The Amstrad User)
★ 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 ★ 

This program was developed mainly because of the need to design new sprites for the "Roland on the Run" game which recently appeared in a number of parts in the English Amstrad Computer User, and to find out how the screen memory is used and addresses when using multicoloured sprites. As 'Roland'is in Mode 1, this program is also designed to build sprites in that Mode.

In Mode 1, one byte controls the colour of four pixels. Each pixel is controlled by two bits. Bits 7and 3 control the leftmost pixel; the next pixel across is controlled by bits 6 and 2; the next by bi ts 5 and 1; and finally the rightmost pixel by bits 4 and 0. For example, take the binary number 00000001 and look at bits 4 and 0 as a pair. Putting them side by side (01) the two bits can no w be read as a normal binary number. In this case the answer is 1 which represents INK 1 for the rightmost pixel. If the binary number was 00010000, then bits 4 and 0 would read 10, which, when read as abinary number gives 2, making the rightmost pixel INK 2. The monsters in 'Roland'use 64 bytes - this program builds sprites of the same size for use in the 'Roland'game.

Inside the Program

When a pen number is keyed in, it is given a predetermined decimal number and will produce the correct binary number for the bit. When the 'P' (Place in memory) is pressed a FOR...NEXT loop is set up producing 256 bits, which in turn are combined in fours to produce 64 bytes. The bytes are converted to a hex number and stored as the data.

Running the Program

On running the program, you will notice a flashing cursor in the top left hand comer of a large square. The square is the working area in which the sprite is built. The cursor is moved about the screen via the cursor keys. There is no need to follow a pattern - just move the cursor around and input the pen number you wish a pixel to be at a chosen point.(0=Black, l=White, 2=Red and 3=Blue). With the background already black there is no need to fill it. Build your sprite with the other three colours using 0 (black) to wipe out any errors. At any time during the building of your sprite 'P can be pressed. This will pole the information into screen memory producing an actual size sprite in the small square. The cursor then returns to the work area allowing alterations. Continue building your sprite and when happy with it, press'S' which will save the data to disc or tape. If you find that you are not happy with the sprite, then press 'L' and the data will be loaded allowing further alterations. Pressing the control and V keys sends the hex data to a printer.

The hex data produced by this program (representing your sprite) can now be placed into the unassembled listing of 'Roland', or it can be poked in after the Roland program is running. The size of the sprite is two characters high by two characters wide. We suggest that you make a drawing of your sprite in a 16 x 16 grid prior to running the program -it will make the building process easier.

TAU

★ PUBLISHER: The Amstrad User (Australia)
★ YEAR: 1986
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LICENCE: LISTING
★ AUTHOR: P.T. Crowe (SCAUG)

★ AMSTRAD CPC ★ DOWNLOAD ★

Je participe au site:
» Newfile(s) upload/Envoye de fichier(s)
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Data Maker (Computing With the Amstrad)
» Applications » Elektronikers Freud
» Applications » Sideways Printing (The Amstrad User)
» Applications » Répondeur Télématique (CPC Revue)
» Applications » Soliluna (CPC Infos)
» Applications » Rsx - Programm - Tracer (CPC Amstrad International)

QUE DIT LA LOI FRANÇAISE:

L'alinéa 8 de l'article L122-5 du Code de la propriété intellectuelle explique que « Lorsque l'œuvre a été divulguée, l'auteur ne peut interdire la reproduction d'une œuvre et sa représentation effectuées à des fins de conservation ou destinées à préserver les conditions de sa consultation à des fins de recherche ou détudes privées par des particuliers, dans les locaux de l'établissement et sur des terminaux dédiés par des bibliothèques accessibles au public, par des musées ou par des services d'archives, sous réserve que ceux-ci ne recherchent aucun avantage économique ou commercial ». Pas de problème donc pour nous!

CPCrulez[Content Management System] v8.7-desktop/cache
Page créée en 081 millisecondes et consultée 688 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.