CODINGLISTINGS ★ TEST PATTERNS (AMSTRAD COMPUTER USER) ★

Test Patterns (Amstrad Computer User)Coding Listings
★ 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 ★ 

Ivor Spital - AMSTRAD There are six different display options, similar to those generated by TV test pattern generators used for aligning colour TV equipment. Lines 170 to 240 use INKEY$ to read a number from 1 to 6 from the keyboard (to select the option) and then branch to the appropriate routine.

After the routine has been selected, the program will ‘hang' there as a result of the n GOTO n command which terminates each routine. The chosen pattern will then stay on the screen until the [ESC] key has been pressed twice. Note, however that we have REMed out line 50 so that you can break the program using the [ESC] key. (The alternative form of REM, an apostrophe, is used in line 50.). If line 50 was not disabled by REM, you could not then break from the program to check the listing or change it, unless BASIC tripped over an error -and there may not be one if you have been conscientious. Always remember to save yourself a breakable copy of programs where you use the ON BREAK command.

Note that the same crosshatch subroutine at line 750 is used in Mode 0 for the crosshatch pattern, and in Mode 2 for the bandwidth/geometry pattern, demonstrating the compatibility of the graphics coordinates between different screen modes. Note also the SPEED INK statement in lines 60 and 700. This determines the speed at which alternate colours will flash. Finally when you have tested each routine for correct operation, you may unREM line 50 by deleting the apostrophe. Remember then to save the program onto cassette if you wish to keep, or further develop it, as once you RUN the program, the only way you will be able to break from it, will be by resetting the computer.

Significant line numbers are as follows:

  • 60 Sets the screen at 320 x 200 resolution.
  • 70-90 Sets up two text windows so that we can keep messages separate from the graphics. 100-110 Initialise 3 arrays storing the co-ordinates of points in 3D space.
  • 120 Initialise dx% and dy% - the co-ordinates of your 'dot cursor' -note that the LOGICAL coordinates are always expressed as though there are 640 x 400 dots on the screen even though the actual resolution changes with screen mode. This saves you having to convert all your calculations every time you change screen mode.
  • 160-260 Collect data and draw cross section on the screen. Branches to separate routine at 1600 to complete computation of data for plotting. 300-430 Draws successive cross sections and connects each one to the previous section so as to form a 3D picture.
  • 470-530 End routine.
  • 650-890 Moves your ‘dot cursor' around the screen,
  • 930-1010 Puts data for each point into the arrays x%
  • and y% describing the 2D cross section. Draws line to previous point.
  • 1060-1140 Accepts data on the amount of detail (FACES) in the final picture. Rotates the 2D cross section data in 3D space in steps of 360 degrees/FACES.

A point to note is the use of integer variables wherever possible to improve the speed of computation.
You could try to make some improvements to the program along the following lines -

1) Draw a line along the centre of the input screen to mark the centre line for the cross section.

2) The ‘dot cursor' will erase any previously drawn lines whilst on its travels about the screen. See if you can write a routine to prevent this.

Save the program on tape as we shall be using it again in later issues.

Ivor Spital, ACU

★ PUBLISHER: Amstrad Computer User
★ YEAR: 1984
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: FREEWARE
★ COLLECTION: AMSTRAD COMPUTER USER 1984
★ AUTHOR: Ivor Spital
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Aucun fichier de disponible:
» Vous avez des fichiers que nous ne possédons pas concernent cette page ?
★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » DI-SYMM II Pattern Generator
» Coding Src's » Patterns
» Applications » Pattern-Fill / Pattern-Draw (CPC Amstrad International)
» Applications » Pattern Fill (Computing with the Amstrad)
» Coding Src's » Pattern Generator (Amstrad Action)
» Applications » RSX Pattern-Copy (Schneider Magazin)
Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

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