Home » Archimedes archive » Micro User » MU 1992-01.adf » PDstuffing » Twilight/+TwPRD/Header

Twilight/+TwPRD/Header

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Micro User » MU 1992-01.adf » PDstuffing
Filename: Twilight/+TwPRD/Header
Read OK:
File size: 0965 bytes
Load address: 0000
Exec address: 0000
File contents
Twilight Programmers Reference Disc
Effect Header


The header of an effect contains serveral offsets (like a module), and 8
bytes to identify the file as an effect.

bytes  meaning
0-7    Text "TwEffect"  - checks file is an effect
8      offset to authors message
12     offset to control description  (filled in by controldes - set to 0)
16     offset to default control data (filled in by controldes - set to 0)
20     offset to sleep init code
24     offset to sleep poll code
28     offset to sleep finalise code
32     flags  (see below)

Default effect
~~~~~~~~~~~~~~
The default effect has an exteneded header. However, as the interface
between it and the Twilight module is different to a normal effect and the
Twilight module and this effect share workspace it would be difficult to
write another default effect. It may change in the future. Because of this,
the exteneded interface to the default effect is not described here.

Authors message
~~~~~~~~~~~~~~~
What you put in this short message is completly up to you. You could put a
short description of the effect, your name or a copyright notice in it. It
is terminated by a 0 byte. It is displayed at the top of the parameters pane
in the control window.


flags
~~~~~
bit  meaning
0    reserved (leave unset)
1    fade screen out before starting effect (see be low)
2    effect requires the contents of the screen to be preserved (see below)
3    effect is the default effect (do not use)
4    supports suitiable time to stop messages (see file 'Entry')
5-31 reserved (leave unset)

If any flags are added in later versions of Twilight, they will be added in
a way which gives no added meaning when the presently reserved bits are
unset.

Bit 1: Fade screen out before starting effect
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If this is unset, the screen will not be faded or wiped - it is all up to
the effect. A number is passed to tell if the screen has been blanked by
Twilight. (see file 'Entry')

Bit 2: Effect required the contents of the screen to be preserved
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This bit should be set if the screen is not redrawn totally - i.e. the
previous contents of the screen are used. If in any doubt over the function
of this flag, set it. Most effects will.


Effects name
~~~~~~~~~~~~
No name for the effect is stored in the effect. The name used is it's
filename.

00000000  54 77 69 6c 69 67 68 74  20 50 72 6f 67 72 61 6d  |Twilight Program|
00000010  6d 65 72 73 20 52 65 66  65 72 65 6e 63 65 20 44  |mers Reference D|
00000020  69 73 63 0a 45 66 66 65  63 74 20 48 65 61 64 65  |isc.Effect Heade|
00000030  72 0a 0a 0a 54 68 65 20  68 65 61 64 65 72 20 6f  |r...The header o|
00000040  66 20 61 6e 20 65 66 66  65 63 74 20 63 6f 6e 74  |f an effect cont|
00000050  61 69 6e 73 20 73 65 72  76 65 72 61 6c 20 6f 66  |ains serveral of|
00000060  66 73 65 74 73 20 28 6c  69 6b 65 20 61 20 6d 6f  |fsets (like a mo|
00000070  64 75 6c 65 29 2c 20 61  6e 64 20 38 0a 62 79 74  |dule), and 8.byt|
00000080  65 73 20 74 6f 20 69 64  65 6e 74 69 66 79 20 74  |es to identify t|
00000090  68 65 20 66 69 6c 65 20  61 73 20 61 6e 20 65 66  |he file as an ef|
000000a0  66 65 63 74 2e 0a 0a 62  79 74 65 73 20 20 6d 65  |fect...bytes  me|
000000b0  61 6e 69 6e 67 0a 30 2d  37 20 20 20 20 54 65 78  |aning.0-7    Tex|
000000c0  74 20 22 54 77 45 66 66  65 63 74 22 20 20 2d 20  |t "TwEffect"  - |
000000d0  63 68 65 63 6b 73 20 66  69 6c 65 20 69 73 20 61  |checks file is a|
000000e0  6e 20 65 66 66 65 63 74  0a 38 20 20 20 20 20 20  |n effect.8      |
000000f0  6f 66 66 73 65 74 20 74  6f 20 61 75 74 68 6f 72  |offset to author|
00000100  73 20 6d 65 73 73 61 67  65 0a 31 32 20 20 20 20  |s message.12    |
00000110  20 6f 66 66 73 65 74 20  74 6f 20 63 6f 6e 74 72  | offset to contr|
00000120  6f 6c 20 64 65 73 63 72  69 70 74 69 6f 6e 20 20  |ol description  |
00000130  28 66 69 6c 6c 65 64 20  69 6e 20 62 79 20 63 6f  |(filled in by co|
00000140  6e 74 72 6f 6c 64 65 73  20 2d 20 73 65 74 20 74  |ntroldes - set t|
00000150  6f 20 30 29 0a 31 36 20  20 20 20 20 6f 66 66 73  |o 0).16     offs|
00000160  65 74 20 74 6f 20 64 65  66 61 75 6c 74 20 63 6f  |et to default co|
00000170  6e 74 72 6f 6c 20 64 61  74 61 20 28 66 69 6c 6c  |ntrol data (fill|
00000180  65 64 20 69 6e 20 62 79  20 63 6f 6e 74 72 6f 6c  |ed in by control|
00000190  64 65 73 20 2d 20 73 65  74 20 74 6f 20 30 29 0a  |des - set to 0).|
000001a0  32 30 20 20 20 20 20 6f  66 66 73 65 74 20 74 6f  |20     offset to|
000001b0  20 73 6c 65 65 70 20 69  6e 69 74 20 63 6f 64 65  | sleep init code|
000001c0  0a 32 34 20 20 20 20 20  6f 66 66 73 65 74 20 74  |.24     offset t|
000001d0  6f 20 73 6c 65 65 70 20  70 6f 6c 6c 20 63 6f 64  |o sleep poll cod|
000001e0  65 0a 32 38 20 20 20 20  20 6f 66 66 73 65 74 20  |e.28     offset |
000001f0  74 6f 20 73 6c 65 65 70  20 66 69 6e 61 6c 69 73  |to sleep finalis|
00000200  65 20 63 6f 64 65 0a 33  32 20 20 20 20 20 66 6c  |e code.32     fl|
00000210  61 67 73 20 20 28 73 65  65 20 62 65 6c 6f 77 29  |ags  (see below)|
00000220  0a 0a 44 65 66 61 75 6c  74 20 65 66 66 65 63 74  |..Default effect|
00000230  0a 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 0a  |.~~~~~~~~~~~~~~.|
00000240  54 68 65 20 64 65 66 61  75 6c 74 20 65 66 66 65  |The default effe|
00000250  63 74 20 68 61 73 20 61  6e 20 65 78 74 65 6e 65  |ct has an extene|
00000260  64 65 64 20 68 65 61 64  65 72 2e 20 48 6f 77 65  |ded header. Howe|
00000270  76 65 72 2c 20 61 73 20  74 68 65 20 69 6e 74 65  |ver, as the inte|
00000280  72 66 61 63 65 0a 62 65  74 77 65 65 6e 20 69 74  |rface.between it|
00000290  20 61 6e 64 20 74 68 65  20 54 77 69 6c 69 67 68  | and the Twiligh|
000002a0  74 20 6d 6f 64 75 6c 65  20 69 73 20 64 69 66 66  |t module is diff|
000002b0  65 72 65 6e 74 20 74 6f  20 61 20 6e 6f 72 6d 61  |erent to a norma|
000002c0  6c 20 65 66 66 65 63 74  20 61 6e 64 20 74 68 65  |l effect and the|
000002d0  0a 54 77 69 6c 69 67 68  74 20 6d 6f 64 75 6c 65  |.Twilight module|
000002e0  20 61 6e 64 20 74 68 69  73 20 65 66 66 65 63 74  | and this effect|
000002f0  20 73 68 61 72 65 20 77  6f 72 6b 73 70 61 63 65  | share workspace|
00000300  20 69 74 20 77 6f 75 6c  64 20 62 65 20 64 69 66  | it would be dif|
00000310  66 69 63 75 6c 74 20 74  6f 0a 77 72 69 74 65 20  |ficult to.write |
00000320  61 6e 6f 74 68 65 72 20  64 65 66 61 75 6c 74 20  |another default |
00000330  65 66 66 65 63 74 2e 20  49 74 20 6d 61 79 20 63  |effect. It may c|
00000340  68 61 6e 67 65 20 69 6e  20 74 68 65 20 66 75 74  |hange in the fut|
00000350  75 72 65 2e 20 42 65 63  61 75 73 65 20 6f 66 20  |ure. Because of |
00000360  74 68 69 73 2c 0a 74 68  65 20 65 78 74 65 6e 65  |this,.the extene|
00000370  64 65 64 20 69 6e 74 65  72 66 61 63 65 20 74 6f  |ded interface to|
00000380  20 74 68 65 20 64 65 66  61 75 6c 74 20 65 66 66  | the default eff|
00000390  65 63 74 20 69 73 20 6e  6f 74 20 64 65 73 63 72  |ect is not descr|
000003a0  69 62 65 64 20 68 65 72  65 2e 0a 0a 41 75 74 68  |ibed here...Auth|
000003b0  6f 72 73 20 6d 65 73 73  61 67 65 0a 7e 7e 7e 7e  |ors message.~~~~|
000003c0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 0a 57 68 61 74  |~~~~~~~~~~~.What|
000003d0  20 79 6f 75 20 70 75 74  20 69 6e 20 74 68 69 73  | you put in this|
000003e0  20 73 68 6f 72 74 20 6d  65 73 73 61 67 65 20 69  | short message i|
000003f0  73 20 63 6f 6d 70 6c 65  74 6c 79 20 75 70 20 74  |s completly up t|
00000400  6f 20 79 6f 75 2e 20 59  6f 75 20 63 6f 75 6c 64  |o you. You could|
00000410  20 70 75 74 20 61 0a 73  68 6f 72 74 20 64 65 73  | put a.short des|
00000420  63 72 69 70 74 69 6f 6e  20 6f 66 20 74 68 65 20  |cription of the |
00000430  65 66 66 65 63 74 2c 20  79 6f 75 72 20 6e 61 6d  |effect, your nam|
00000440  65 20 6f 72 20 61 20 63  6f 70 79 72 69 67 68 74  |e or a copyright|
00000450  20 6e 6f 74 69 63 65 20  69 6e 20 69 74 2e 20 49  | notice in it. I|
00000460  74 0a 69 73 20 74 65 72  6d 69 6e 61 74 65 64 20  |t.is terminated |
00000470  62 79 20 61 20 30 20 62  79 74 65 2e 20 49 74 20  |by a 0 byte. It |
00000480  69 73 20 64 69 73 70 6c  61 79 65 64 20 61 74 20  |is displayed at |
00000490  74 68 65 20 74 6f 70 20  6f 66 20 74 68 65 20 70  |the top of the p|
000004a0  61 72 61 6d 65 74 65 72  73 20 70 61 6e 65 0a 69  |arameters pane.i|
000004b0  6e 20 74 68 65 20 63 6f  6e 74 72 6f 6c 20 77 69  |n the control wi|
000004c0  6e 64 6f 77 2e 0a 0a 0a  66 6c 61 67 73 0a 7e 7e  |ndow....flags.~~|
000004d0  7e 7e 7e 0a 62 69 74 20  20 6d 65 61 6e 69 6e 67  |~~~.bit  meaning|
000004e0  0a 30 20 20 20 20 72 65  73 65 72 76 65 64 20 28  |.0    reserved (|
000004f0  6c 65 61 76 65 20 75 6e  73 65 74 29 0a 31 20 20  |leave unset).1  |
00000500  20 20 66 61 64 65 20 73  63 72 65 65 6e 20 6f 75  |  fade screen ou|
00000510  74 20 62 65 66 6f 72 65  20 73 74 61 72 74 69 6e  |t before startin|
00000520  67 20 65 66 66 65 63 74  20 28 73 65 65 20 62 65  |g effect (see be|
00000530  20 6c 6f 77 29 0a 32 20  20 20 20 65 66 66 65 63  | low).2    effec|
00000540  74 20 72 65 71 75 69 72  65 73 20 74 68 65 20 63  |t requires the c|
00000550  6f 6e 74 65 6e 74 73 20  6f 66 20 74 68 65 20 73  |ontents of the s|
00000560  63 72 65 65 6e 20 74 6f  20 62 65 20 70 72 65 73  |creen to be pres|
00000570  65 72 76 65 64 20 28 73  65 65 20 62 65 6c 6f 77  |erved (see below|
00000580  29 0a 33 20 20 20 20 65  66 66 65 63 74 20 69 73  |).3    effect is|
00000590  20 74 68 65 20 64 65 66  61 75 6c 74 20 65 66 66  | the default eff|
000005a0  65 63 74 20 28 64 6f 20  6e 6f 74 20 75 73 65 29  |ect (do not use)|
000005b0  0a 34 20 20 20 20 73 75  70 70 6f 72 74 73 20 73  |.4    supports s|
000005c0  75 69 74 69 61 62 6c 65  20 74 69 6d 65 20 74 6f  |uitiable time to|
000005d0  20 73 74 6f 70 20 6d 65  73 73 61 67 65 73 20 28  | stop messages (|
000005e0  73 65 65 20 66 69 6c 65  20 27 45 6e 74 72 79 27  |see file 'Entry'|
000005f0  29 0a 35 2d 33 31 20 72  65 73 65 72 76 65 64 20  |).5-31 reserved |
00000600  28 6c 65 61 76 65 20 75  6e 73 65 74 29 0a 0a 49  |(leave unset)..I|
00000610  66 20 61 6e 79 20 66 6c  61 67 73 20 61 72 65 20  |f any flags are |
00000620  61 64 64 65 64 20 69 6e  20 6c 61 74 65 72 20 76  |added in later v|
00000630  65 72 73 69 6f 6e 73 20  6f 66 20 54 77 69 6c 69  |ersions of Twili|
00000640  67 68 74 2c 20 74 68 65  79 20 77 69 6c 6c 20 62  |ght, they will b|
00000650  65 20 61 64 64 65 64 20  69 6e 0a 61 20 77 61 79  |e added in.a way|
00000660  20 77 68 69 63 68 20 67  69 76 65 73 20 6e 6f 20  | which gives no |
00000670  61 64 64 65 64 20 6d 65  61 6e 69 6e 67 20 77 68  |added meaning wh|
00000680  65 6e 20 74 68 65 20 70  72 65 73 65 6e 74 6c 79  |en the presently|
00000690  20 72 65 73 65 72 76 65  64 20 62 69 74 73 20 61  | reserved bits a|
000006a0  72 65 0a 75 6e 73 65 74  2e 0a 0a 42 69 74 20 31  |re.unset...Bit 1|
000006b0  3a 20 46 61 64 65 20 73  63 72 65 65 6e 20 6f 75  |: Fade screen ou|
000006c0  74 20 62 65 66 6f 72 65  20 73 74 61 72 74 69 6e  |t before startin|
000006d0  67 20 65 66 66 65 63 74  0a 7e 7e 7e 7e 7e 7e 7e  |g effect.~~~~~~~|
000006e0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |~~~~~~~~~~~~~~~~|
*
00000700  7e 7e 7e 7e 7e 7e 0a 49  66 20 74 68 69 73 20 69  |~~~~~~.If this i|
00000710  73 20 75 6e 73 65 74 2c  20 74 68 65 20 73 63 72  |s unset, the scr|
00000720  65 65 6e 20 77 69 6c 6c  20 6e 6f 74 20 62 65 20  |een will not be |
00000730  66 61 64 65 64 20 6f 72  20 77 69 70 65 64 20 2d  |faded or wiped -|
00000740  20 69 74 20 69 73 20 61  6c 6c 20 75 70 20 74 6f  | it is all up to|
00000750  0a 74 68 65 20 65 66 66  65 63 74 2e 20 41 20 6e  |.the effect. A n|
00000760  75 6d 62 65 72 20 69 73  20 70 61 73 73 65 64 20  |umber is passed |
00000770  74 6f 20 74 65 6c 6c 20  69 66 20 74 68 65 20 73  |to tell if the s|
00000780  63 72 65 65 6e 20 68 61  73 20 62 65 65 6e 20 62  |creen has been b|
00000790  6c 61 6e 6b 65 64 20 62  79 0a 54 77 69 6c 69 67  |lanked by.Twilig|
000007a0  68 74 2e 20 28 73 65 65  20 66 69 6c 65 20 27 45  |ht. (see file 'E|
000007b0  6e 74 72 79 27 29 0a 0a  42 69 74 20 32 3a 20 45  |ntry')..Bit 2: E|
000007c0  66 66 65 63 74 20 72 65  71 75 69 72 65 64 20 74  |ffect required t|
000007d0  68 65 20 63 6f 6e 74 65  6e 74 73 20 6f 66 20 74  |he contents of t|
000007e0  68 65 20 73 63 72 65 65  6e 20 74 6f 20 62 65 20  |he screen to be |
000007f0  70 72 65 73 65 72 76 65  64 0a 7e 7e 7e 7e 7e 7e  |preserved.~~~~~~|
00000800  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |~~~~~~~~~~~~~~~~|
*
00000830  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 0a 54 68 69 73  |~~~~~~~~~~~.This|
00000840  20 62 69 74 20 73 68 6f  75 6c 64 20 62 65 20 73  | bit should be s|
00000850  65 74 20 69 66 20 74 68  65 20 73 63 72 65 65 6e  |et if the screen|
00000860  20 69 73 20 6e 6f 74 20  72 65 64 72 61 77 6e 20  | is not redrawn |
00000870  74 6f 74 61 6c 6c 79 20  2d 20 69 2e 65 2e 20 74  |totally - i.e. t|
00000880  68 65 0a 70 72 65 76 69  6f 75 73 20 63 6f 6e 74  |he.previous cont|
00000890  65 6e 74 73 20 6f 66 20  74 68 65 20 73 63 72 65  |ents of the scre|
000008a0  65 6e 20 61 72 65 20 75  73 65 64 2e 20 49 66 20  |en are used. If |
000008b0  69 6e 20 61 6e 79 20 64  6f 75 62 74 20 6f 76 65  |in any doubt ove|
000008c0  72 20 74 68 65 20 66 75  6e 63 74 69 6f 6e 0a 6f  |r the function.o|
000008d0  66 20 74 68 69 73 20 66  6c 61 67 2c 20 73 65 74  |f this flag, set|
000008e0  20 69 74 2e 20 4d 6f 73  74 20 65 66 66 65 63 74  | it. Most effect|
000008f0  73 20 77 69 6c 6c 2e 0a  0a 0a 45 66 66 65 63 74  |s will....Effect|
00000900  73 20 6e 61 6d 65 0a 7e  7e 7e 7e 7e 7e 7e 7e 7e  |s name.~~~~~~~~~|
00000910  7e 7e 7e 0a 4e 6f 20 6e  61 6d 65 20 66 6f 72 20  |~~~.No name for |
00000920  74 68 65 20 65 66 66 65  63 74 20 69 73 20 73 74  |the effect is st|
00000930  6f 72 65 64 20 69 6e 20  74 68 65 20 65 66 66 65  |ored in the effe|
00000940  63 74 2e 20 54 68 65 20  6e 61 6d 65 20 75 73 65  |ct. The name use|
00000950  64 20 69 73 20 69 74 27  73 0a 66 69 6c 65 6e 61  |d is it's.filena|
00000960  6d 65 2e 0a 0a                                    |me...|
00000965