Home » Archimedes archive » Micro User » MU 1992-02.adf » PD » Twilight/Header

Twilight/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-02.adf » PD
Filename: Twilight/Header
Read OK:
File size: 0AFE 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)
36     offset to authors text (can be 0)

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. This interface is undefined and may change in
the future, so do not disemble the Default effect to find out what these
are. 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, but it is
suggested that you use this for a short description of the effect. It is
displayed at the top of the parameters pane in the control window.

Authors text
~~~~~~~~~~~~
This is displayed at the bottom of the parameters pane. Again, what you put
in it is up to you. This could include a longer description of the effect,
copyright notice or a contact address. Each line in this text is terminated
by a 0 byte, and the text is terminated by a double 0 byte.


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 33 36 20 20 20 20 20  6f 66 66 73 65 74 20 74  |.36     offset t|
00000230  6f 20 61 75 74 68 6f 72  73 20 74 65 78 74 20 28  |o authors text (|
00000240  63 61 6e 20 62 65 20 30  29 0a 0a 44 65 66 61 75  |can be 0)..Defau|
00000250  6c 74 20 65 66 66 65 63  74 0a 7e 7e 7e 7e 7e 7e  |lt effect.~~~~~~|
00000260  7e 7e 7e 7e 7e 7e 7e 7e  0a 54 68 65 20 64 65 66  |~~~~~~~~.The def|
00000270  61 75 6c 74 20 65 66 66  65 63 74 20 68 61 73 20  |ault effect has |
00000280  61 6e 20 65 78 74 65 6e  65 64 65 64 20 68 65 61  |an exteneded hea|
00000290  64 65 72 2e 20 48 6f 77  65 76 65 72 2c 20 61 73  |der. However, as|
000002a0  20 74 68 65 20 69 6e 74  65 72 66 61 63 65 0a 62  | the interface.b|
000002b0  65 74 77 65 65 6e 20 69  74 20 61 6e 64 20 74 68  |etween it and th|
000002c0  65 20 54 77 69 6c 69 67  68 74 20 6d 6f 64 75 6c  |e Twilight modul|
000002d0  65 20 69 73 20 64 69 66  66 65 72 65 6e 74 20 74  |e is different t|
000002e0  6f 20 61 20 6e 6f 72 6d  61 6c 20 65 66 66 65 63  |o a normal effec|
000002f0  74 20 61 6e 64 20 74 68  65 0a 54 77 69 6c 69 67  |t and the.Twilig|
00000300  68 74 20 6d 6f 64 75 6c  65 20 61 6e 64 20 74 68  |ht module and th|
00000310  69 73 20 65 66 66 65 63  74 20 73 68 61 72 65 20  |is effect share |
00000320  77 6f 72 6b 73 70 61 63  65 20 69 74 20 77 6f 75  |workspace it wou|
00000330  6c 64 20 62 65 20 64 69  66 66 69 63 75 6c 74 20  |ld be difficult |
00000340  74 6f 0a 77 72 69 74 65  20 61 6e 6f 74 68 65 72  |to.write another|
00000350  20 64 65 66 61 75 6c 74  20 65 66 66 65 63 74 2e  | default effect.|
00000360  20 54 68 69 73 20 69 6e  74 65 72 66 61 63 65 20  | This interface |
00000370  69 73 20 75 6e 64 65 66  69 6e 65 64 20 61 6e 64  |is undefined and|
00000380  20 6d 61 79 20 63 68 61  6e 67 65 20 69 6e 0a 74  | may change in.t|
00000390  68 65 20 66 75 74 75 72  65 2c 20 73 6f 20 64 6f  |he future, so do|
000003a0  20 6e 6f 74 20 64 69 73  65 6d 62 6c 65 20 74 68  | not disemble th|
000003b0  65 20 44 65 66 61 75 6c  74 20 65 66 66 65 63 74  |e Default effect|
000003c0  20 74 6f 20 66 69 6e 64  20 6f 75 74 20 77 68 61  | to find out wha|
000003d0  74 20 74 68 65 73 65 0a  61 72 65 2e 20 42 65 63  |t these.are. Bec|
000003e0  61 75 73 65 20 6f 66 20  74 68 69 73 2c 20 74 68  |ause of this, th|
000003f0  65 20 65 78 74 65 6e 65  64 65 64 20 69 6e 74 65  |e exteneded inte|
00000400  72 66 61 63 65 20 74 6f  20 74 68 65 20 64 65 66  |rface to the def|
00000410  61 75 6c 74 20 65 66 66  65 63 74 20 69 73 20 6e  |ault effect is n|
00000420  6f 74 0a 64 65 73 63 72  69 62 65 64 20 68 65 72  |ot.described her|
00000430  65 2e 0a 0a 41 75 74 68  6f 72 73 20 6d 65 73 73  |e...Authors mess|
00000440  61 67 65 0a 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |age.~~~~~~~~~~~~|
00000450  7e 7e 7e 0a 57 68 61 74  20 79 6f 75 20 70 75 74  |~~~.What you put|
00000460  20 69 6e 20 74 68 69 73  20 73 68 6f 72 74 20 6d  | in this short m|
00000470  65 73 73 61 67 65 20 69  73 20 63 6f 6d 70 6c 65  |essage is comple|
00000480  74 6c 79 20 75 70 20 74  6f 20 79 6f 75 2c 20 62  |tly up to you, b|
00000490  75 74 20 69 74 20 69 73  0a 73 75 67 67 65 73 74  |ut it is.suggest|
000004a0  65 64 20 74 68 61 74 20  79 6f 75 20 75 73 65 20  |ed that you use |
000004b0  74 68 69 73 20 66 6f 72  20 61 20 73 68 6f 72 74  |this for a short|
000004c0  20 64 65 73 63 72 69 70  74 69 6f 6e 20 6f 66 20  | description of |
000004d0  74 68 65 20 65 66 66 65  63 74 2e 20 49 74 20 69  |the effect. It i|
000004e0  73 0a 64 69 73 70 6c 61  79 65 64 20 61 74 20 74  |s.displayed at t|
000004f0  68 65 20 74 6f 70 20 6f  66 20 74 68 65 20 70 61  |he top of the pa|
00000500  72 61 6d 65 74 65 72 73  20 70 61 6e 65 20 69 6e  |rameters pane in|
00000510  20 74 68 65 20 63 6f 6e  74 72 6f 6c 20 77 69 6e  | the control win|
00000520  64 6f 77 2e 0a 0a 41 75  74 68 6f 72 73 20 74 65  |dow...Authors te|
00000530  78 74 0a 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 0a  |xt.~~~~~~~~~~~~.|
00000540  54 68 69 73 20 69 73 20  64 69 73 70 6c 61 79 65  |This is displaye|
00000550  64 20 61 74 20 74 68 65  20 62 6f 74 74 6f 6d 20  |d at the bottom |
00000560  6f 66 20 74 68 65 20 70  61 72 61 6d 65 74 65 72  |of the parameter|
00000570  73 20 70 61 6e 65 2e 20  41 67 61 69 6e 2c 20 77  |s pane. Again, w|
00000580  68 61 74 20 79 6f 75 20  70 75 74 0a 69 6e 20 69  |hat you put.in i|
00000590  74 20 69 73 20 75 70 20  74 6f 20 79 6f 75 2e 20  |t is up to you. |
000005a0  54 68 69 73 20 63 6f 75  6c 64 20 69 6e 63 6c 75  |This could inclu|
000005b0  64 65 20 61 20 6c 6f 6e  67 65 72 20 64 65 73 63  |de a longer desc|
000005c0  72 69 70 74 69 6f 6e 20  6f 66 20 74 68 65 20 65  |ription of the e|
000005d0  66 66 65 63 74 2c 0a 63  6f 70 79 72 69 67 68 74  |ffect,.copyright|
000005e0  20 6e 6f 74 69 63 65 20  6f 72 20 61 20 63 6f 6e  | notice or a con|
000005f0  74 61 63 74 20 61 64 64  72 65 73 73 2e 20 45 61  |tact address. Ea|
00000600  63 68 20 6c 69 6e 65 20  69 6e 20 74 68 69 73 20  |ch line in this |
00000610  74 65 78 74 20 69 73 20  74 65 72 6d 69 6e 61 74  |text is terminat|
00000620  65 64 0a 62 79 20 61 20  30 20 62 79 74 65 2c 20  |ed.by a 0 byte, |
00000630  61 6e 64 20 74 68 65 20  74 65 78 74 20 69 73 20  |and the text is |
00000640  74 65 72 6d 69 6e 61 74  65 64 20 62 79 20 61 20  |terminated by a |
00000650  64 6f 75 62 6c 65 20 30  20 62 79 74 65 2e 0a 0a  |double 0 byte...|
00000660  0a 66 6c 61 67 73 0a 7e  7e 7e 7e 7e 0a 62 69 74  |.flags.~~~~~.bit|
00000670  20 20 6d 65 61 6e 69 6e  67 0a 30 20 20 20 20 72  |  meaning.0    r|
00000680  65 73 65 72 76 65 64 20  28 6c 65 61 76 65 20 75  |eserved (leave u|
00000690  6e 73 65 74 29 0a 31 20  20 20 20 66 61 64 65 20  |nset).1    fade |
000006a0  73 63 72 65 65 6e 20 6f  75 74 20 62 65 66 6f 72  |screen out befor|
000006b0  65 20 73 74 61 72 74 69  6e 67 20 65 66 66 65 63  |e starting effec|
000006c0  74 20 28 73 65 65 20 62  65 20 6c 6f 77 29 0a 32  |t (see be low).2|
000006d0  20 20 20 20 65 66 66 65  63 74 20 72 65 71 75 69  |    effect requi|
000006e0  72 65 73 20 74 68 65 20  63 6f 6e 74 65 6e 74 73  |res the contents|
000006f0  20 6f 66 20 74 68 65 20  73 63 72 65 65 6e 20 74  | of the screen t|
00000700  6f 20 62 65 20 70 72 65  73 65 72 76 65 64 20 28  |o be preserved (|
00000710  73 65 65 20 62 65 6c 6f  77 29 0a 33 20 20 20 20  |see below).3    |
00000720  65 66 66 65 63 74 20 69  73 20 74 68 65 20 64 65  |effect is the de|
00000730  66 61 75 6c 74 20 65 66  66 65 63 74 20 28 64 6f  |fault effect (do|
00000740  20 6e 6f 74 20 75 73 65  29 0a 34 20 20 20 20 73  | not use).4    s|
00000750  75 70 70 6f 72 74 73 20  73 75 69 74 69 61 62 6c  |upports suitiabl|
00000760  65 20 74 69 6d 65 20 74  6f 20 73 74 6f 70 20 6d  |e time to stop m|
00000770  65 73 73 61 67 65 73 20  28 73 65 65 20 66 69 6c  |essages (see fil|
00000780  65 20 27 45 6e 74 72 79  27 29 0a 35 2d 33 31 20  |e 'Entry').5-31 |
00000790  72 65 73 65 72 76 65 64  20 28 6c 65 61 76 65 20  |reserved (leave |
000007a0  75 6e 73 65 74 29 0a 0a  49 66 20 61 6e 79 20 66  |unset)..If any f|
000007b0  6c 61 67 73 20 61 72 65  20 61 64 64 65 64 20 69  |lags are added i|
000007c0  6e 20 6c 61 74 65 72 20  76 65 72 73 69 6f 6e 73  |n later versions|
000007d0  20 6f 66 20 54 77 69 6c  69 67 68 74 2c 20 74 68  | of Twilight, th|
000007e0  65 79 20 77 69 6c 6c 20  62 65 20 61 64 64 65 64  |ey will be added|
000007f0  20 69 6e 0a 61 20 77 61  79 20 77 68 69 63 68 20  | in.a way which |
00000800  67 69 76 65 73 20 6e 6f  20 61 64 64 65 64 20 6d  |gives no added m|
00000810  65 61 6e 69 6e 67 20 77  68 65 6e 20 74 68 65 20  |eaning when the |
00000820  70 72 65 73 65 6e 74 6c  79 20 72 65 73 65 72 76  |presently reserv|
00000830  65 64 20 62 69 74 73 20  61 72 65 0a 75 6e 73 65  |ed bits are.unse|
00000840  74 2e 0a 0a 42 69 74 20  31 3a 20 46 61 64 65 20  |t...Bit 1: Fade |
00000850  73 63 72 65 65 6e 20 6f  75 74 20 62 65 66 6f 72  |screen out befor|
00000860  65 20 73 74 61 72 74 69  6e 67 20 65 66 66 65 63  |e starting effec|
00000870  74 0a 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |t.~~~~~~~~~~~~~~|
00000880  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |~~~~~~~~~~~~~~~~|
00000890  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 0a  |~~~~~~~~~~~~~~~.|
000008a0  49 66 20 74 68 69 73 20  69 73 20 75 6e 73 65 74  |If this is unset|
000008b0  2c 20 74 68 65 20 73 63  72 65 65 6e 20 77 69 6c  |, the screen wil|
000008c0  6c 20 6e 6f 74 20 62 65  20 66 61 64 65 64 20 6f  |l not be faded o|
000008d0  72 20 77 69 70 65 64 20  2d 20 69 74 20 69 73 20  |r wiped - it is |
000008e0  61 6c 6c 20 75 70 20 74  6f 0a 74 68 65 20 65 66  |all up to.the ef|
000008f0  66 65 63 74 2e 20 41 20  6e 75 6d 62 65 72 20 69  |fect. A number i|
00000900  73 20 70 61 73 73 65 64  20 74 6f 20 74 65 6c 6c  |s passed to tell|
00000910  20 69 66 20 74 68 65 20  73 63 72 65 65 6e 20 68  | if the screen h|
00000920  61 73 20 62 65 65 6e 20  62 6c 61 6e 6b 65 64 20  |as been blanked |
00000930  62 79 0a 54 77 69 6c 69  67 68 74 2e 20 28 73 65  |by.Twilight. (se|
00000940  65 20 66 69 6c 65 20 27  45 6e 74 72 79 27 29 0a  |e file 'Entry').|
00000950  0a 42 69 74 20 32 3a 20  45 66 66 65 63 74 20 72  |.Bit 2: Effect r|
00000960  65 71 75 69 72 65 64 20  74 68 65 20 63 6f 6e 74  |equired the cont|
00000970  65 6e 74 73 20 6f 66 20  74 68 65 20 73 63 72 65  |ents of the scre|
00000980  65 6e 20 74 6f 20 62 65  20 70 72 65 73 65 72 76  |en to be preserv|
00000990  65 64 0a 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |ed.~~~~~~~~~~~~~|
000009a0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 7e 7e 7e 7e  |~~~~~~~~~~~~~~~~|
*
000009d0  7e 7e 7e 7e 0a 54 68 69  73 20 62 69 74 20 73 68  |~~~~.This bit sh|
000009e0  6f 75 6c 64 20 62 65 20  73 65 74 20 69 66 20 74  |ould be set if t|
000009f0  68 65 20 73 63 72 65 65  6e 20 69 73 20 6e 6f 74  |he screen is not|
00000a00  20 72 65 64 72 61 77 6e  20 74 6f 74 61 6c 6c 79  | redrawn totally|
00000a10  20 2d 20 69 2e 65 2e 20  74 68 65 0a 70 72 65 76  | - i.e. the.prev|
00000a20  69 6f 75 73 20 63 6f 6e  74 65 6e 74 73 20 6f 66  |ious contents of|
00000a30  20 74 68 65 20 73 63 72  65 65 6e 20 61 72 65 20  | the screen are |
00000a40  75 73 65 64 2e 20 49 66  20 69 6e 20 61 6e 79 20  |used. If in any |
00000a50  64 6f 75 62 74 20 6f 76  65 72 20 74 68 65 20 66  |doubt over the f|
00000a60  75 6e 63 74 69 6f 6e 0a  6f 66 20 74 68 69 73 20  |unction.of this |
00000a70  66 6c 61 67 2c 20 73 65  74 20 69 74 2e 20 4d 6f  |flag, set it. Mo|
00000a80  73 74 20 65 66 66 65 63  74 73 20 77 69 6c 6c 2e  |st effects will.|
00000a90  0a 0a 0a 45 66 66 65 63  74 73 20 6e 61 6d 65 0a  |...Effects name.|
00000aa0  7e 7e 7e 7e 7e 7e 7e 7e  7e 7e 7e 7e 0a 4e 6f 20  |~~~~~~~~~~~~.No |
00000ab0  6e 61 6d 65 20 66 6f 72  20 74 68 65 20 65 66 66  |name for the eff|
00000ac0  65 63 74 20 69 73 20 73  74 6f 72 65 64 20 69 6e  |ect is stored in|
00000ad0  20 74 68 65 20 65 66 66  65 63 74 2e 20 54 68 65  | the effect. The|
00000ae0  20 6e 61 6d 65 20 75 73  65 64 20 69 73 20 69 74  | name used is it|
00000af0  27 73 0a 66 69 6c 65 6e  61 6d 65 2e 0a 0a        |'s.filename...|
00000afe