<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 05 Aug 2002 02:38:08 +0100
From   : jgh@... (Jonathan Graham Harston)
Subject: BBC with no keyboards (Was: Executable programs on EPROM)

Sprow <news@...> wrote:
>    Dave Gilbert (Home) <gilbertd@...> wrote:
> > > Are there any circumstances whereby a BASIC program can be written to
> > > EPROM and then run, the Equivalent of CHAINing them?
> 
> > Yes it can.  The trick is to build an EPROM that is a ROM filesystem
> > with a !Boot file that gets run (or is it chained....). There was a
> ...or
>  http://www.sprow.co.uk/bbc/bbconly.htm
> look at the "RFSHEAD" program.
 
...or http://www.mdfsnet.f9.co.uk/Apps/Unsorted/RomFiler
 
> > Can a BBC or Master run without a keyboard being
> > attached?  I suspect not,
 
Yes, you can.
 
The Master will notice that there's no keyboard and start up as usual. 
Configuring it to Boot will make it start some code, eg *Config. FILE 9
and *Config. BOOT will make it do a Shift-Break to DFS on startup.
 
The BBC doesn't notice that there's no keyboard, and a bit of extra work
need to be done.  Theoretically, it should be possible to plug a bit of
dummy hardware into the keyboard socket to respond as though no keys were
pressed.  It's fiddly to do, so four years ago I resorted to doing it in
software, see http://www.mdfs.net/Docs/Comp/BBC/Keyboard
 
Essentially, with no keyboard, the BBC thinks that all the keyas are being
pressed down.  Imprortantly, it thinks that CRTL and SHIFT are being held
down, which is the action to pause screen output. So, of course, as soon
as the BBC tries to print "BBC Computer 32K", it pauses.
 
If a sideways rom calls the following code on service call &01 then when
no keyboard is present, calls to read SHIFT/CTRL return "not pressed
down".
 
.Service1
.CheckKeyboard
PHP:SEI:LDA &28F:BNE CheckKbdOk
LDA &229:BPL Serv1bKbd:\ Already claimed
LDX #7:.CheckKbdLp
LDA CheckKbdCode,X:STA &3D6,X:DEX:BPL CheckKbdLp
LDA &228:STA &3DE:LDA &229:STA &3DF
LDA #&D6:STA &228:LDA #3:STA &229
.CheckKbdOk
PLP
LDX &F4:LDA #1
\ Continue with any other Service call 1 code
RTS
:
.CheckKbdCode
BVS OldKeyJmp:BCS OldKeyJmp:LDA #0:RTS:.OldKeyJmp:EQUB &4C
:
 
This code is in the HADFS ROM in versions 5 onwards.  I give permission to
anyone to use this code fragment in any other software.
 
-- 
J.G.Harston (JGH BBC PD Library) 70 Camm Street, Walkley, SHEFFIELD S6 3TR
jgh@...                - Running on BBCs & Masters with SJ MDFS FileServer
Z80+6502/CoPro+Tubes/Econet+SJ - - - - - - - http://www.mdfs.net/User/JGH/
 Never, ever, EVER, *EVER*, *E*V*E*R* use an apostrophe to make a plural
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>