Home » Archimedes archive » Archimedes World » AW-1996-03-Disc 2.adf » !AcornAns_AcornAns » September/Bounce/!ReadMe

September/Bounce/!ReadMe

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 » Archimedes World » AW-1996-03-Disc 2.adf » !AcornAns_AcornAns
Filename: September/Bounce/!ReadMe
Read OK:
File size: 069A bytes
Load address: 0000
Exec address: 0000
File contents
See 'Acorn Answers' in magazine for additional expanation.

Inventory:
~~~~~~~~~~
!ClikMe1st	Obey file to set current directory
!ReadMe		This text file
Bouncer		Main file - a BASIC Assembler program to demonstrate
		fast sprite plotting, via a few bouncing heads
DataGen		Bouncer uses its own sprite format - this program
		converts sprite file 'Source' into such a form
		(stored in the file 'HeadData')
HeadData	The sprite image of 'Source' converted into a form
		useable by 'Bouncer'
Palette		The standard desktop colours, run by 'Bouncer' & 'SprOp'
Source		A sprite file to bounce! nb sprite size must not be
		altered (see 'DataGen' for details)
SprOp		A short BASIC program which attempts the same animation
		as 'Bouncer', but using only BASIC & OS_SpriteOp, for
		speed comparisons with 'Bouncer' - it is about 5 times
		slower to run than 'Bouncer'.

Try double clicking on !ClikMe1st, & then running each of 'Bouncer' &
'SprOp'.

Each program will prompt you for the number of heads to bounce & will
suggest a value. When you get bored with the bouncing, press any key & you
will be taken back to the prompt for number of heads. Use Escape to quit.

These programs attempt to maintain the maximum speed of animation possible
& if this falls below the preset value (initially 50 frames per second),
you will hear a beep.

The performance of the two programs can be compared by initially starting
out with a low head count & gradually increasing it until you begin to hear
beeps during the bouncing, indicating that the program concerned has been
stretched to its limits.

On my machine, the most heads that can be bounced at a reliable 50fps is
7 for 'SprOp' & 38 for 'Bouncer'.
00000000  0a 53 65 65 20 27 41 63  6f 72 6e 20 41 6e 73 77  |.See 'Acorn Answ|
00000010  65 72 73 27 20 69 6e 20  6d 61 67 61 7a 69 6e 65  |ers' in magazine|
00000020  20 66 6f 72 20 61 64 64  69 74 69 6f 6e 61 6c 20  | for additional |
00000030  65 78 70 61 6e 61 74 69  6f 6e 2e 0a 0a 49 6e 76  |expanation...Inv|
00000040  65 6e 74 6f 72 79 3a 0a  7e 7e 7e 7e 7e 7e 7e 7e  |entory:.~~~~~~~~|
00000050  7e 7e 0a 21 43 6c 69 6b  4d 65 31 73 74 09 4f 62  |~~.!ClikMe1st.Ob|
00000060  65 79 20 66 69 6c 65 20  74 6f 20 73 65 74 20 63  |ey file to set c|
00000070  75 72 72 65 6e 74 20 64  69 72 65 63 74 6f 72 79  |urrent directory|
00000080  0a 21 52 65 61 64 4d 65  09 09 54 68 69 73 20 74  |.!ReadMe..This t|
00000090  65 78 74 20 66 69 6c 65  0a 42 6f 75 6e 63 65 72  |ext file.Bouncer|
000000a0  09 09 4d 61 69 6e 20 66  69 6c 65 20 2d 20 61 20  |..Main file - a |
000000b0  42 41 53 49 43 20 41 73  73 65 6d 62 6c 65 72 20  |BASIC Assembler |
000000c0  70 72 6f 67 72 61 6d 20  74 6f 20 64 65 6d 6f 6e  |program to demon|
000000d0  73 74 72 61 74 65 0a 09  09 66 61 73 74 20 73 70  |strate...fast sp|
000000e0  72 69 74 65 20 70 6c 6f  74 74 69 6e 67 2c 20 76  |rite plotting, v|
000000f0  69 61 20 61 20 66 65 77  20 62 6f 75 6e 63 69 6e  |ia a few bouncin|
00000100  67 20 68 65 61 64 73 0a  44 61 74 61 47 65 6e 09  |g heads.DataGen.|
00000110  09 42 6f 75 6e 63 65 72  20 75 73 65 73 20 69 74  |.Bouncer uses it|
00000120  73 20 6f 77 6e 20 73 70  72 69 74 65 20 66 6f 72  |s own sprite for|
00000130  6d 61 74 20 2d 20 74 68  69 73 20 70 72 6f 67 72  |mat - this progr|
00000140  61 6d 0a 09 09 63 6f 6e  76 65 72 74 73 20 73 70  |am...converts sp|
00000150  72 69 74 65 20 66 69 6c  65 20 27 53 6f 75 72 63  |rite file 'Sourc|
00000160  65 27 20 69 6e 74 6f 20  73 75 63 68 20 61 20 66  |e' into such a f|
00000170  6f 72 6d 0a 09 09 28 73  74 6f 72 65 64 20 69 6e  |orm...(stored in|
00000180  20 74 68 65 20 66 69 6c  65 20 27 48 65 61 64 44  | the file 'HeadD|
00000190  61 74 61 27 29 0a 48 65  61 64 44 61 74 61 09 54  |ata').HeadData.T|
000001a0  68 65 20 73 70 72 69 74  65 20 69 6d 61 67 65 20  |he sprite image |
000001b0  6f 66 20 27 53 6f 75 72  63 65 27 20 63 6f 6e 76  |of 'Source' conv|
000001c0  65 72 74 65 64 20 69 6e  74 6f 20 61 20 66 6f 72  |erted into a for|
000001d0  6d 0a 09 09 75 73 65 61  62 6c 65 20 62 79 20 27  |m...useable by '|
000001e0  42 6f 75 6e 63 65 72 27  0a 50 61 6c 65 74 74 65  |Bouncer'.Palette|
000001f0  09 09 54 68 65 20 73 74  61 6e 64 61 72 64 20 64  |..The standard d|
00000200  65 73 6b 74 6f 70 20 63  6f 6c 6f 75 72 73 2c 20  |esktop colours, |
00000210  72 75 6e 20 62 79 20 27  42 6f 75 6e 63 65 72 27  |run by 'Bouncer'|
00000220  20 26 20 27 53 70 72 4f  70 27 0a 53 6f 75 72 63  | & 'SprOp'.Sourc|
00000230  65 09 09 41 20 73 70 72  69 74 65 20 66 69 6c 65  |e..A sprite file|
00000240  20 74 6f 20 62 6f 75 6e  63 65 21 20 6e 62 20 73  | to bounce! nb s|
00000250  70 72 69 74 65 20 73 69  7a 65 20 6d 75 73 74 20  |prite size must |
00000260  6e 6f 74 20 62 65 0a 09  09 61 6c 74 65 72 65 64  |not be...altered|
00000270  20 28 73 65 65 20 27 44  61 74 61 47 65 6e 27 20  | (see 'DataGen' |
00000280  66 6f 72 20 64 65 74 61  69 6c 73 29 0a 53 70 72  |for details).Spr|
00000290  4f 70 09 09 41 20 73 68  6f 72 74 20 42 41 53 49  |Op..A short BASI|
000002a0  43 20 70 72 6f 67 72 61  6d 20 77 68 69 63 68 20  |C program which |
000002b0  61 74 74 65 6d 70 74 73  20 74 68 65 20 73 61 6d  |attempts the sam|
000002c0  65 20 61 6e 69 6d 61 74  69 6f 6e 0a 09 09 61 73  |e animation...as|
000002d0  20 27 42 6f 75 6e 63 65  72 27 2c 20 62 75 74 20  | 'Bouncer', but |
000002e0  75 73 69 6e 67 20 6f 6e  6c 79 20 42 41 53 49 43  |using only BASIC|
000002f0  20 26 20 4f 53 5f 53 70  72 69 74 65 4f 70 2c 20  | & OS_SpriteOp, |
00000300  66 6f 72 0a 09 09 73 70  65 65 64 20 63 6f 6d 70  |for...speed comp|
00000310  61 72 69 73 6f 6e 73 20  77 69 74 68 20 27 42 6f  |arisons with 'Bo|
00000320  75 6e 63 65 72 27 20 2d  20 69 74 20 69 73 20 61  |uncer' - it is a|
00000330  62 6f 75 74 20 35 20 74  69 6d 65 73 0a 09 09 73  |bout 5 times...s|
00000340  6c 6f 77 65 72 20 74 6f  20 72 75 6e 20 74 68 61  |lower to run tha|
00000350  6e 20 27 42 6f 75 6e 63  65 72 27 2e 0a 0a 54 72  |n 'Bouncer'...Tr|
00000360  79 20 64 6f 75 62 6c 65  20 63 6c 69 63 6b 69 6e  |y double clickin|
00000370  67 20 6f 6e 20 21 43 6c  69 6b 4d 65 31 73 74 2c  |g on !ClikMe1st,|
00000380  20 26 20 74 68 65 6e 20  72 75 6e 6e 69 6e 67 20  | & then running |
00000390  65 61 63 68 20 6f 66 20  27 42 6f 75 6e 63 65 72  |each of 'Bouncer|
000003a0  27 20 26 0a 27 53 70 72  4f 70 27 2e 0a 0a 45 61  |' &.'SprOp'...Ea|
000003b0  63 68 20 70 72 6f 67 72  61 6d 20 77 69 6c 6c 20  |ch program will |
000003c0  70 72 6f 6d 70 74 20 79  6f 75 20 66 6f 72 20 74  |prompt you for t|
000003d0  68 65 20 6e 75 6d 62 65  72 20 6f 66 20 68 65 61  |he number of hea|
000003e0  64 73 20 74 6f 20 62 6f  75 6e 63 65 20 26 20 77  |ds to bounce & w|
000003f0  69 6c 6c 0a 73 75 67 67  65 73 74 20 61 20 76 61  |ill.suggest a va|
00000400  6c 75 65 2e 20 57 68 65  6e 20 79 6f 75 20 67 65  |lue. When you ge|
00000410  74 20 62 6f 72 65 64 20  77 69 74 68 20 74 68 65  |t bored with the|
00000420  20 62 6f 75 6e 63 69 6e  67 2c 20 70 72 65 73 73  | bouncing, press|
00000430  20 61 6e 79 20 6b 65 79  20 26 20 79 6f 75 0a 77  | any key & you.w|
00000440  69 6c 6c 20 62 65 20 74  61 6b 65 6e 20 62 61 63  |ill be taken bac|
00000450  6b 20 74 6f 20 74 68 65  20 70 72 6f 6d 70 74 20  |k to the prompt |
00000460  66 6f 72 20 6e 75 6d 62  65 72 20 6f 66 20 68 65  |for number of he|
00000470  61 64 73 2e 20 55 73 65  20 45 73 63 61 70 65 20  |ads. Use Escape |
00000480  74 6f 20 71 75 69 74 2e  0a 0a 54 68 65 73 65 20  |to quit...These |
00000490  70 72 6f 67 72 61 6d 73  20 61 74 74 65 6d 70 74  |programs attempt|
000004a0  20 74 6f 20 6d 61 69 6e  74 61 69 6e 20 74 68 65  | to maintain the|
000004b0  20 6d 61 78 69 6d 75 6d  20 73 70 65 65 64 20 6f  | maximum speed o|
000004c0  66 20 61 6e 69 6d 61 74  69 6f 6e 20 70 6f 73 73  |f animation poss|
000004d0  69 62 6c 65 0a 26 20 69  66 20 74 68 69 73 20 66  |ible.& if this f|
000004e0  61 6c 6c 73 20 62 65 6c  6f 77 20 74 68 65 20 70  |alls below the p|
000004f0  72 65 73 65 74 20 76 61  6c 75 65 20 28 69 6e 69  |reset value (ini|
00000500  74 69 61 6c 6c 79 20 35  30 20 66 72 61 6d 65 73  |tially 50 frames|
00000510  20 70 65 72 20 73 65 63  6f 6e 64 29 2c 0a 79 6f  | per second),.yo|
00000520  75 20 77 69 6c 6c 20 68  65 61 72 20 61 20 62 65  |u will hear a be|
00000530  65 70 2e 0a 0a 54 68 65  20 70 65 72 66 6f 72 6d  |ep...The perform|
00000540  61 6e 63 65 20 6f 66 20  74 68 65 20 74 77 6f 20  |ance of the two |
00000550  70 72 6f 67 72 61 6d 73  20 63 61 6e 20 62 65 20  |programs can be |
00000560  63 6f 6d 70 61 72 65 64  20 62 79 20 69 6e 69 74  |compared by init|
00000570  69 61 6c 6c 79 20 73 74  61 72 74 69 6e 67 0a 6f  |ially starting.o|
00000580  75 74 20 77 69 74 68 20  61 20 6c 6f 77 20 68 65  |ut with a low he|
00000590  61 64 20 63 6f 75 6e 74  20 26 20 67 72 61 64 75  |ad count & gradu|
000005a0  61 6c 6c 79 20 69 6e 63  72 65 61 73 69 6e 67 20  |ally increasing |
000005b0  69 74 20 75 6e 74 69 6c  20 79 6f 75 20 62 65 67  |it until you beg|
000005c0  69 6e 20 74 6f 20 68 65  61 72 0a 62 65 65 70 73  |in to hear.beeps|
000005d0  20 64 75 72 69 6e 67 20  74 68 65 20 62 6f 75 6e  | during the boun|
000005e0  63 69 6e 67 2c 20 69 6e  64 69 63 61 74 69 6e 67  |cing, indicating|
000005f0  20 74 68 61 74 20 74 68  65 20 70 72 6f 67 72 61  | that the progra|
00000600  6d 20 63 6f 6e 63 65 72  6e 65 64 20 68 61 73 20  |m concerned has |
00000610  62 65 65 6e 0a 73 74 72  65 74 63 68 65 64 20 74  |been.stretched t|
00000620  6f 20 69 74 73 20 6c 69  6d 69 74 73 2e 0a 0a 4f  |o its limits...O|
00000630  6e 20 6d 79 20 6d 61 63  68 69 6e 65 2c 20 74 68  |n my machine, th|
00000640  65 20 6d 6f 73 74 20 68  65 61 64 73 20 74 68 61  |e most heads tha|
00000650  74 20 63 61 6e 20 62 65  20 62 6f 75 6e 63 65 64  |t can be bounced|
00000660  20 61 74 20 61 20 72 65  6c 69 61 62 6c 65 20 35  | at a reliable 5|
00000670  30 66 70 73 20 69 73 0a  37 20 66 6f 72 20 27 53  |0fps is.7 for 'S|
00000680  70 72 4f 70 27 20 26 20  33 38 20 66 6f 72 20 27  |prOp' & 38 for '|
00000690  42 6f 75 6e 63 65 72 27  2e 0a                    |Bouncer'..|
0000069a