Date : Tue, 27 Apr 2004 10:07:19 +0100
From : Richard_Talbot-Watkins@...
Subject: Re: Analogue Port Fire Buttons
Tom Walker wrote:
> Nope! The fire buttons are just connected to port B
> bits 4 and 5. I don't even think interrupts need to be
> disabled.
Yes, I think the BBC OS guarantees:
- port B bits 0-3: outputs (addressable latch)
- port B bits 4-5: inputs (fire buttons)
- port B bits 6-7: inputs (speech processor)
via setting ?&FE42 to &0F.
so, provided this is true, it should be possible to read
from &FE40 without needing to disable interrupts to
determine the fire button status.
(?&FE40 AND 16) = 0 : fire button 1 pressed
<> 0 : fire button 1 released
(?&FE40 AND 32) = 0 : fire button 2 pressed
<> 0 : fire button 2 released
Rich
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
postmaster@...
This footnote also confirms that this email message has been checked
for all known viruses.
**********************************************************************
SCEE 2004