Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF » P/+MOUSE1
P/+MOUSE1
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 » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF |
Filename: | P/+MOUSE1 |
Read OK: | ✔ |
File size: | 0803 bytes |
Load address: | 2B204556 |
Exec address: | 53554F4D |
File contents
6 Bollinbrook road, MACCLESFIELD, Cheshire. SK10 3DJ. MOUSEY ====== Following my article in response to a member's question about serial mice for a BBC I have plodded on in my quest for success... It turns out that the reason why my BASIC driver only returned 00 01 and FF in hex was not because BASIC couldn't keep up but because the light sensors had got bent out of place in the mouse casing! That aside,the next task is to get some machine code going.The new program on this disk ("MOUSEY") may be *RUN having set up your Mouse Systems compatible mouse (NB not Microsoft). The packets of 5 bytes will be printed on the screen as and when there is mouse or button movement. This software operates in the background as per a finished version would have to so you can carry on doing other things at the same time. I haven't tested it while accessing the disk - the DFS or ADFS hogs interrupts so its results are undetermined.Try it and report back to me how it responded. If the screen is in scroll lock mode then the OS's IRQ handling becomes dodgy.Likewise during background printing or using SEI for prolonged periods in assembler. My driver takes this into account,and if some of the mouse's bytes are lost while the BBC is doing long interrupts then it will resync itself to the start of the next 5 byte packet.You are informed of this by RR appearing on screen. Now all that remains (he says) is to get some sort of a pointer on the screen.I know what the 5 bytes received mean in terms of relative positions,but these will need scaling depending on which mode is in use. Pop the result in a ROM,package it up and we can all have mice - simple. Happy computing, R.P.Sprowson. SORRY THAT I ASCRIBED YOUR EXCELLENT ARTICLE IN EUG27 ON THIS SUBJECT TO MARK BELLIS. SORRY ALSO TO MARK BELLIS.
00000000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000010 20 20 20 36 20 42 6f 6c 6c 69 6e 62 72 6f 6f 6b | 6 Bollinbrook| 00000020 20 72 6f 61 64 2c 20 0d 20 20 20 20 20 20 20 20 | road, . | 00000030 20 20 20 20 20 20 20 20 20 20 20 20 4d 41 43 43 | MACC| 00000040 4c 45 53 46 49 45 4c 44 2c 20 20 20 0d 20 20 20 |LESFIELD, . | 00000050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000060 20 20 43 68 65 73 68 69 72 65 2e 20 20 20 0d 20 | Cheshire. . | 00000070 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000080 20 20 20 20 20 53 4b 31 30 20 33 44 4a 2e 20 20 | SK10 3DJ. | 00000090 20 0d 20 20 20 0d 4d 4f 55 53 45 59 20 20 20 0d | . .MOUSEY .| 000000a0 3d 3d 3d 3d 3d 3d 20 20 20 0d 46 6f 6c 6c 6f 77 |====== .Follow| 000000b0 69 6e 67 20 6d 79 20 61 72 74 69 63 6c 65 20 69 |ing my article i| 000000c0 6e 20 72 65 73 70 6f 6e 73 65 20 74 6f 20 61 20 |n response to a | 000000d0 20 0d 6d 65 6d 62 65 72 27 73 20 71 75 65 73 74 | .member's quest| 000000e0 69 6f 6e 20 61 62 6f 75 74 20 73 65 72 69 61 6c |ion about serial| 000000f0 20 6d 69 63 65 20 20 0d 66 6f 72 20 61 20 42 42 | mice .for a BB| 00000100 43 20 49 20 68 61 76 65 20 70 6c 6f 64 64 65 64 |C I have plodded| 00000110 20 6f 6e 20 69 6e 20 6d 79 20 20 0d 71 75 65 73 | on in my .ques| 00000120 74 20 66 6f 72 20 73 75 63 63 65 73 73 2e 2e 2e |t for success...| 00000130 20 20 0d 20 20 0d 49 74 20 74 75 72 6e 73 20 6f | . .It turns o| 00000140 75 74 20 74 68 61 74 20 74 68 65 20 72 65 61 73 |ut that the reas| 00000150 6f 6e 20 77 68 79 20 6d 79 20 20 0d 42 41 53 49 |on why my .BASI| 00000160 43 20 64 72 69 76 65 72 20 6f 6e 6c 79 20 72 65 |C driver only re| 00000170 74 75 72 6e 65 64 20 30 30 20 30 31 20 61 6e 64 |turned 00 01 and| 00000180 20 20 0d 46 46 20 69 6e 20 68 65 78 20 77 61 73 | .FF in hex was| 00000190 20 6e 6f 74 20 62 65 63 61 75 73 65 20 42 41 53 | not because BAS| 000001a0 49 43 20 20 0d 63 6f 75 6c 64 6e 27 74 20 6b 65 |IC .couldn't ke| 000001b0 65 70 20 75 70 20 62 75 74 20 62 65 63 61 75 73 |ep up but becaus| 000001c0 65 20 74 68 65 20 6c 69 67 68 74 20 0d 73 65 6e |e the light .sen| 000001d0 73 6f 72 73 20 68 61 64 20 67 6f 74 20 62 65 6e |sors had got ben| 000001e0 74 20 6f 75 74 20 6f 66 20 70 6c 61 63 65 20 69 |t out of place i| 000001f0 6e 20 20 0d 74 68 65 20 6d 6f 75 73 65 20 63 61 |n .the mouse ca| 00000200 73 69 6e 67 21 20 20 0d 20 20 0d 54 68 61 74 20 |sing! . .That | 00000210 61 73 69 64 65 2c 74 68 65 20 6e 65 78 74 20 74 |aside,the next t| 00000220 61 73 6b 20 69 73 20 74 6f 20 67 65 74 20 20 0d |ask is to get .| 00000230 73 6f 6d 65 20 6d 61 63 68 69 6e 65 20 63 6f 64 |some machine cod| 00000240 65 20 67 6f 69 6e 67 2e 54 68 65 20 6e 65 77 20 |e going.The new | 00000250 20 0d 70 72 6f 67 72 61 6d 20 6f 6e 20 74 68 69 | .program on thi| 00000260 73 20 64 69 73 6b 20 28 22 4d 4f 55 53 45 59 22 |s disk ("MOUSEY"| 00000270 29 20 6d 61 79 20 62 65 20 0d 2a 52 55 4e 20 68 |) may be .*RUN h| 00000280 61 76 69 6e 67 20 73 65 74 20 75 70 20 79 6f 75 |aving set up you| 00000290 72 20 4d 6f 75 73 65 20 53 79 73 74 65 6d 73 20 |r Mouse Systems | 000002a0 0d 63 6f 6d 70 61 74 69 62 6c 65 20 6d 6f 75 73 |.compatible mous| 000002b0 65 20 28 4e 42 20 6e 6f 74 20 4d 69 63 72 6f 73 |e (NB not Micros| 000002c0 6f 66 74 29 2e 20 0d 20 20 0d 54 68 65 20 70 61 |oft). . .The pa| 000002d0 63 6b 65 74 73 20 6f 66 20 35 20 62 79 74 65 73 |ckets of 5 bytes| 000002e0 20 77 69 6c 6c 20 62 65 20 70 72 69 6e 74 65 64 | will be printed| 000002f0 20 0d 6f 6e 20 74 68 65 20 73 63 72 65 65 6e 20 | .on the screen | 00000300 61 73 20 61 6e 64 20 77 68 65 6e 20 74 68 65 72 |as and when ther| 00000310 65 20 69 73 20 20 0d 6d 6f 75 73 65 20 6f 72 20 |e is .mouse or | 00000320 62 75 74 74 6f 6e 20 6d 6f 76 65 6d 65 6e 74 2e |button movement.| 00000330 20 20 0d 20 20 0d 54 68 69 73 20 73 6f 66 74 77 | . .This softw| 00000340 61 72 65 20 6f 70 65 72 61 74 65 73 20 69 6e 20 |are operates in | 00000350 74 68 65 20 20 0d 62 61 63 6b 67 72 6f 75 6e 64 |the .background| 00000360 20 61 73 20 70 65 72 20 61 20 66 69 6e 69 73 68 | as per a finish| 00000370 65 64 20 76 65 72 73 69 6f 6e 20 20 0d 77 6f 75 |ed version .wou| 00000380 6c 64 20 68 61 76 65 20 74 6f 20 73 6f 20 79 6f |ld have to so yo| 00000390 75 20 63 61 6e 20 63 61 72 72 79 20 6f 6e 20 20 |u can carry on | 000003a0 0d 64 6f 69 6e 67 20 6f 74 68 65 72 20 74 68 69 |.doing other thi| 000003b0 6e 67 73 20 61 74 20 74 68 65 20 73 61 6d 65 20 |ngs at the same | 000003c0 74 69 6d 65 2e 20 20 0d 20 20 0d 49 20 68 61 76 |time. . .I hav| 000003d0 65 6e 27 74 20 74 65 73 74 65 64 20 69 74 20 77 |en't tested it w| 000003e0 68 69 6c 65 20 61 63 63 65 73 73 69 6e 67 20 20 |hile accessing | 000003f0 0d 74 68 65 20 64 69 73 6b 20 2d 20 74 68 65 20 |.the disk - the | 00000400 44 46 53 20 6f 72 20 41 44 46 53 20 68 6f 67 73 |DFS or ADFS hogs| 00000410 20 20 0d 69 6e 74 65 72 72 75 70 74 73 20 73 6f | .interrupts so| 00000420 20 69 74 73 20 72 65 73 75 6c 74 73 20 61 72 65 | its results are| 00000430 20 20 0d 75 6e 64 65 74 65 72 6d 69 6e 65 64 2e | .undetermined.| 00000440 54 72 79 20 69 74 20 61 6e 64 20 72 65 70 6f 72 |Try it and repor| 00000450 74 20 62 61 63 6b 20 74 6f 20 0d 6d 65 20 68 6f |t back to .me ho| 00000460 77 20 69 74 20 72 65 73 70 6f 6e 64 65 64 2e 20 |w it responded. | 00000470 20 0d 20 20 0d 49 66 20 74 68 65 20 73 63 72 65 | . .If the scre| 00000480 65 6e 20 69 73 20 69 6e 20 73 63 72 6f 6c 6c 20 |en is in scroll | 00000490 6c 6f 63 6b 20 6d 6f 64 65 20 20 0d 74 68 65 6e |lock mode .then| 000004a0 20 74 68 65 20 4f 53 27 73 20 49 52 51 20 68 61 | the OS's IRQ ha| 000004b0 6e 64 6c 69 6e 67 20 62 65 63 6f 6d 65 73 20 20 |ndling becomes | 000004c0 0d 64 6f 64 67 79 2e 4c 69 6b 65 77 69 73 65 20 |.dodgy.Likewise | 000004d0 64 75 72 69 6e 67 20 62 61 63 6b 67 72 6f 75 6e |during backgroun| 000004e0 64 20 20 0d 70 72 69 6e 74 69 6e 67 20 6f 72 20 |d .printing or | 000004f0 75 73 69 6e 67 20 53 45 49 20 66 6f 72 20 70 72 |using SEI for pr| 00000500 6f 6c 6f 6e 67 65 64 20 20 0d 70 65 72 69 6f 64 |olonged .period| 00000510 73 20 69 6e 20 61 73 73 65 6d 62 6c 65 72 2e 20 |s in assembler. | 00000520 20 0d 20 20 0d 4d 79 20 64 72 69 76 65 72 20 74 | . .My driver t| 00000530 61 6b 65 73 20 74 68 69 73 20 69 6e 74 6f 20 61 |akes this into a| 00000540 63 63 6f 75 6e 74 2c 61 6e 64 20 20 0d 69 66 20 |ccount,and .if | 00000550 73 6f 6d 65 20 6f 66 20 74 68 65 20 6d 6f 75 73 |some of the mous| 00000560 65 27 73 20 62 79 74 65 73 20 61 72 65 20 6c 6f |e's bytes are lo| 00000570 73 74 20 20 0d 77 68 69 6c 65 20 74 68 65 20 42 |st .while the B| 00000580 42 43 20 69 73 20 64 6f 69 6e 67 20 6c 6f 6e 67 |BC is doing long| 00000590 20 69 6e 74 65 72 72 75 70 74 73 20 0d 74 68 65 | interrupts .the| 000005a0 6e 20 69 74 20 77 69 6c 6c 20 72 65 73 79 6e 63 |n it will resync| 000005b0 20 69 74 73 65 6c 66 20 74 6f 20 74 68 65 20 20 | itself to the | 000005c0 0d 73 74 61 72 74 20 6f 66 20 74 68 65 20 6e 65 |.start of the ne| 000005d0 78 74 20 35 20 62 79 74 65 20 70 61 63 6b 65 74 |xt 5 byte packet| 000005e0 2e 59 6f 75 20 20 0d 61 72 65 20 69 6e 66 6f 72 |.You .are infor| 000005f0 6d 65 64 20 6f 66 20 74 68 69 73 20 62 79 20 52 |med of this by R| 00000600 52 20 61 70 70 65 61 72 69 6e 67 20 20 0d 6f 6e |R appearing .on| 00000610 20 73 63 72 65 65 6e 2e 20 20 0d 20 20 0d 4e 6f | screen. . .No| 00000620 77 20 61 6c 6c 20 74 68 61 74 20 72 65 6d 61 69 |w all that remai| 00000630 6e 73 20 28 68 65 20 73 61 79 73 29 20 69 73 20 |ns (he says) is | 00000640 74 6f 20 20 0d 67 65 74 20 73 6f 6d 65 20 73 6f |to .get some so| 00000650 72 74 20 6f 66 20 61 20 70 6f 69 6e 74 65 72 20 |rt of a pointer | 00000660 6f 6e 20 74 68 65 20 20 0d 73 63 72 65 65 6e 2e |on the .screen.| 00000670 49 20 6b 6e 6f 77 20 77 68 61 74 20 74 68 65 20 |I know what the | 00000680 35 20 62 79 74 65 73 20 20 0d 72 65 63 65 69 76 |5 bytes .receiv| 00000690 65 64 20 6d 65 61 6e 20 69 6e 20 74 65 72 6d 73 |ed mean in terms| 000006a0 20 6f 66 20 72 65 6c 61 74 69 76 65 20 20 0d 70 | of relative .p| 000006b0 6f 73 69 74 69 6f 6e 73 2c 62 75 74 20 74 68 65 |ositions,but the| 000006c0 73 65 20 77 69 6c 6c 20 6e 65 65 64 20 73 63 61 |se will need sca| 000006d0 6c 69 6e 67 20 20 0d 64 65 70 65 6e 64 69 6e 67 |ling .depending| 000006e0 20 6f 6e 20 77 68 69 63 68 20 6d 6f 64 65 20 69 | on which mode i| 000006f0 73 20 69 6e 20 75 73 65 2e 20 20 0d 20 20 0d 50 |s in use. . .P| 00000700 6f 70 20 74 68 65 20 72 65 73 75 6c 74 20 69 6e |op the result in| 00000710 20 61 20 52 4f 4d 2c 70 61 63 6b 61 67 65 20 69 | a ROM,package i| 00000720 74 20 75 70 20 20 0d 61 6e 64 20 77 65 20 63 61 |t up .and we ca| 00000730 6e 20 61 6c 6c 20 68 61 76 65 20 6d 69 63 65 20 |n all have mice | 00000740 2d 20 73 69 6d 70 6c 65 2e 20 20 0d 20 20 20 20 |- simple. . | 00000750 20 20 0d 48 61 70 70 79 20 63 6f 6d 70 75 74 69 | .Happy computi| 00000760 6e 67 2c 20 20 20 0d 20 20 20 20 20 20 20 20 20 |ng, . | 00000770 20 20 20 20 20 20 20 52 2e 50 2e 53 70 72 6f 77 | R.P.Sprow| 00000780 73 6f 6e 2e 20 20 20 0d 20 20 20 0d 20 20 0d 53 |son. . . .S| 00000790 4f 52 52 59 20 54 48 41 54 20 49 20 41 53 43 52 |ORRY THAT I ASCR| 000007a0 49 42 45 44 20 59 4f 55 52 20 45 58 43 45 4c 4c |IBED YOUR EXCELL| 000007b0 45 4e 54 20 41 52 54 49 43 4c 45 20 0d 49 4e 20 |ENT ARTICLE .IN | 000007c0 45 55 47 32 37 20 4f 4e 20 54 48 49 53 20 53 55 |EUG27 ON THIS SU| 000007d0 42 4a 45 43 54 20 54 4f 20 4d 41 52 4b 20 42 45 |BJECT TO MARK BE| 000007e0 4c 4c 49 53 2e 20 0d 0d 53 4f 52 52 59 20 41 4c |LLIS. ..SORRY AL| 000007f0 53 4f 20 54 4f 20 4d 41 52 4b 20 42 45 4c 4c 49 |SO TO MARK BELLI| 00000800 53 2e 0d |S..| 00000803