APPLICATIONSCREATION GRAPHIQUE ★ The Light Fantastic ★

The Light Fantastic (Computing with the Amstrad)Applications Creation Graphique
★ 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 ★ 

THE dk'tronics light pen comes with a superb graphics package enabling you to draw diagrams and paint pictures with ease. This is great fun, but what else can it do and how can the light pen be incorporated into your own programs?

There's a short demonstration program in the manual which should give you a few ideas - it's a simple reaction tester.

But our own favourite light pen program is The Light Fantastic, which was originally written for the BBC Micro by Mike Cook. We thought it so good we've now converted it for the Amstrad.

When you run it, first the light pen is calibrated. All you need to do is place the pen on the blue square in the centre of the screen and press Space. The main program then starts.

You'll see two rows of ladies holding bells. These are The Amstrad Ladies Campanology All-Stars. Simply point the light pen at one of the ladies and she will respond with a ring of her bell. This must be one of the easiest ways to play music on the Amstrad ...

The pitch of the bell held by each of the 16 ladies is printed below them as a guide. There are two complete octaves and you can either play by ear or use these notes to help you.

The actual routines to read and calibrate the light pen are quite straightforward. The subroutine at line 570 reads the pen position. It's taken from the light pen manual.

To find where the pen is. GOSUB 570. It returns with x set to the x position and y set to the y position. The x co-ordinate ranges from 1 to 40 and the y from 1 to 25. This is irrespective of the current mode and is just right for our program, which runs in Mode 1.

It's not important how it works -just copy it into your own program. It reads and writes to addresses on the expansion bus at the rear of the Amstrad if you're interested.

To calibrate the pen it's placed at a known position on the screen. Then the variable cat is adjusted until x and y are correct. Lines 260 and 300 check x and y and alter as necessary. You'll need this if you want to use the light pen in your own program.

An important point to note is that a light pen needs light to work. The more light there is the better it works, so use bright colours.

The rest of the program is just simple Basic. Two rows of bellringers are printed with the pitch of the bells below. Then there's a loop which checks if you are pointing the pen at one of the ladies and if you are, rings the bell.

I hope this has given you a few ideas and shown how easy it is to use a light pen.

It's especially suitable for young children who haven't learned to read yet. They can simply point the pen at what they want.

Can any reader come up with an educational program for young children using a light pen?

CWTA

★ PUBLISHER: Computing With The Amstrad
★ YEAR: 1985
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1985
★ AUTHORS: Mike Cook (Converted by 'The A Team' ( Alan McLachlan ? )])
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listings:
» The  Light  Fantastic    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-07-18
DL: 167
TYPE: ZIP
SiZE: 5Ko
NOTE: 40 Cyls
.HFE: Χ

» The  Light  Fantastic    (Computing  with  the  Amstrad)    ENGLISH    LISTINGDATE: 2013-09-20
DL: 203
TYPE: PDF
SiZE: 223Ko
NOTE: 2 pages/PDFlib v1.6

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Jeu de caractères informatiques / Computerzeichensatz
» Applications » Ink Editor (CPC Amstrad International)
» Applications » Paper Change
» Applications » Traitement de l'Image Part2b (CPC Revue)
» Applications » Cad - Master Light Pen
» Applications » 3D Surface Plotter (Computing with the Amstrad)
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 035 millisecondes et consultée 1443 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.