Bbc b second beep lasts forever

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
Post Reply
User avatar
aferenbach
Posts: 254
Joined: Sat Oct 01, 2005 4:00 pm
Location: Dundee, in Bonny Scotland
Contact:

Bbc b second beep lasts forever

Post by aferenbach » Wed Jul 17, 2019 9:36 pm

Hi all

I finally got round to examining a bbc b that a friend of mine gave me and when I plugged it in the two tone beep began hopefully but the second beep just kept on going like the energizer bunny.

Any guidance on what might be causing this and how to go about fixing it?

Thanks in advance

Kazzie
Posts: 918
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Bbc b second beep lasts forever

Post by Kazzie » Thu Jul 18, 2019 5:39 am

The second beep is generated as a 'BELL' character (like Ctrl-G) that is "printed" at the end of the 'BBC Computer 32K' message.

Do you have anything visible on-screen at all? How are the keyboard LEDs behaving? (Do they light up in the same pattern each time? Do they respond to pressing Caps Lock, etc.?)
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM, ZIDEFS with 512MB CF card
Acorn System 1 home-made replica

Coeus
Posts: 1378
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: Bbc b second beep lasts forever

Post by Coeus » Thu Jul 18, 2019 8:45 am

So what do we know about how the higher beep finishes? At a guess the OS will program the sound chip to start the sound when processing the ^G and then set a timer for the beep to finish so that happens in the background. That means the fault here is likely to be in that timer, i.e. probably the system VIA, or in the CPU seeing the interrupt. You could always try swapping the 6522s around so the system one becomes the user one and vice versa and see if that solves it.

Kazzie
Posts: 918
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Bbc b second beep lasts forever

Post by Kazzie » Thu Jul 18, 2019 8:45 pm

From what I can make out, a Bell (or VDU 7) is set up by a JSR to &E86F, which is inside the OSWORD 7 subroutine. From the OS 1.2 disassembly:

Code: Select all

 ************* set up sound data for Bell ********************************

E86F	PHP         ;push P
E870	SEI         ;bar interrupts
E871	LDA &0263   ;get bell channel number in A
E874	AND #&07    ; (bits 0-3 only set)
E876	ORA #&04    ;set bit 2
E878	TAX         ;X=A = bell channel number +4=buffer number
E879	LDA &0264   ;get bell amplitude/envelope number
E87C	JSR &E4B0   ;store it in buffer pointed to by X
E87F	LDA &0266   ;get bell duration
E882	PHA         ;save it
E883	LDA &0265   ;get bell frequency
E886	PHA         ;save it

; Insert sound pitch and duration into sound buffer
;
E887	SEC         ; Set carry
E888	ROR &0800,X ; Set bit 7 of channel flags to indicate it's active
E88B	BMI &E8A4   ; Jump forward to insert pitch and duration
 
 ....
 
; Insert two bytes into buffer
;
E8A4	PLA         ; Get word number high byte or pitch back
E8A5	JSR &E4B0   ; Insert into speech buffer
E8A8	PLA         ; Get word number low byte or duration back
E8A9	JSR &E4B0   ; Insert into speech buffer
E8AC	PLP         ; Restore flags
E8AD	RTS         ;  and return
 
The JSRs to &E4B0, to insert the pitch and duration into the buffer, are indirected (through &022A) to &E4B3:

Code: Select all

*************************************************************************
*                                                                       *
*       INSBV insert character in buffer vector default entry point     *
*                                                                       *
*************************************************************************
;on entry X is buffer number, A is character to be written

E4B3	PHP         ;save flags
E4B4	SEI         ;bar interrupts
E4B5	PHA         ;save A
E4B6	LDY &02E1,X ;get buffer input pointer
E4B9	INY         ;increment Y
E4BA	BNE &E4BF   ;if Y=0 then buffer is full else E4BF
E4BC	LDY &E447,X ;get default buffer start

E4BF	TYA         ;put it in A
E4C0	CMP &02D8,X ;compare it with input pointer
E4C3	BEQ &E4D4   ;if equal buffer is full so E4D4
E4C5	LDY &02E1,X ;else get buffer end in Y
E4C8	STA &02E1,X ;and set it from A
E4CB	JSR &E450   ;and point &FA/B at it
E4CE	PLA         ;get back byte
E4CF	STA (&FA),Y ;store it in buffer
E4D1	PLP         ;pull flags
E4D2	CLC         ;clear carry for success
E4D3	RTS         ;and exit

E4D4	PLA         ;get back byte
E4D5	CPX #&02    ;if we are working on input buffer
E4D7	BCS &E4E0   ;then E4E0

E4D9	LDY #&01    ;else Y=1
E4DB	JSR &E494   ;to service input buffer full event
E4DE	PHA         ;push A

***** return with carry set *********************************************

E4DF	PLA         ;restore A

E4E0	PLP         ;restore flags
E4E1	SEC         ;set carry
E4E2	RTS         ;and exit
So...

The machine is clearly able to communicate with the 76489 sound chip (IC18) to some extent, as it is able to shut the sound chip up after boot (end of the first beep) and tells it to start sounding the second beep.

The Beeb isn't meant to issue a third command (to end the second beep) as it tells the sound chip the duration of the second beep when it starts it. The settings used are:

Code: Select all

D9A3	DB  &03     ; BELL channel number                    &263   *FX211
D9A4	DB  &90     ; BELL amplitude/Envelope number         &264   *FX212
D9A5	DB  &64     ; BELL frequency                         &265   *FX213
D9A6	DB  &06     ; BELL duration                          &266   *FX214
Wild theory time:

If there's a fault with Port A of the System VIA (IC3), with some high-order bits stuck high, then that could increase the bell duration far beyond it's default value of &06. Port A is connected to the 76489 sound chip, the (optional) speech chip, and the keyboard. Ironically, if the stuck bit(s) generate phantom keypresses, then by the time the bell has ended, the keyboard buffer could have been filled with keypresses, resulting in... another bell! :roll:

:arrow: On that basis, I'd echo Coeus' suggestion of swapping the 6522 VIAs (IC3 and IC69) to see if that changes things. (Plus checking if there's anything displayed on the screen and LEDs.)
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM, ZIDEFS with 512MB CF card
Acorn System 1 home-made replica

User avatar
aferenbach
Posts: 254
Joined: Sat Oct 01, 2005 4:00 pm
Location: Dundee, in Bonny Scotland
Contact:

Re: Bbc b second beep lasts forever

Post by aferenbach » Thu Jul 18, 2019 9:07 pm

First things first I hooked it up to a screen. It displayed

BBC computer 32k

Econet station 254 no clock

Then no prompt after that

I thought to myself that it is having a freak out as there is no Econrt to connect to.

I plucked out the ANFS rom

Then I saw this instead...
Also here is an image of the fitted roms (minus the ANFS ).
It is an issue 7 with no disc interface

Any thoughts chaps?
Attachments
20190718_215737.jpg
20190718_215847.jpg
Last edited by aferenbach on Thu Jul 18, 2019 9:07 pm, edited 1 time in total.

User avatar
1024MAK
Posts: 9207
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Bbc b second beep lasts forever

Post by 1024MAK » Thu Jul 18, 2019 9:12 pm

Err, the 76489 sound chip is a fairly dumb chip. The sound duration and envelope functions are all carried out by the OS not the 76489.

By inserting the bell tone details into the sound buffer, that part of the code is just putting a sound into the buffer. The part of the OS that deals with the buffer will then process it...

Mark

Kazzie
Posts: 918
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Bbc b second beep lasts forever

Post by Kazzie » Thu Jul 18, 2019 9:17 pm

1024MAK wrote:
Thu Jul 18, 2019 9:12 pm
Err, the 76489 sound chip is a fairly dumb chip. The sound duration and envelope functions are all carried out by the OS not the 76489.

By inserting the bell tone details into the sound buffer, that part of the code is just putting a sound into the buffer. The part of the OS that deals with the buffer will then process it...

Mark
Hm. That explains why I couldn't find anything about the buffer in its datasheet. #-o

Guess I didn't dig deep enough into the OS source. :oops: Thanks for the correction.
Last edited by Kazzie on Thu Jul 18, 2019 9:31 pm, edited 2 times in total.
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM, ZIDEFS with 512MB CF card
Acorn System 1 home-made replica

Kazzie
Posts: 918
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales
Contact:

Re: Bbc b second beep lasts forever

Post by Kazzie » Thu Jul 18, 2019 9:26 pm

aferenbach wrote:
Thu Jul 18, 2019 9:07 pm
First things first I hooked it up to a screen. It displayed

BBC computer 32k

Econet station 254 no clock

Then no prompt after that

I thought to myself that it is having a freak out as there is no Econrt to connect to.

I plucked out the ANFS rom

Then I saw this instead...
Also here is an image of the fitted roms (minus the ANFS ).
It is an issue 7 with no disc interface

Any thoughts chaps?
I presume the board has econet circuitry fitted (top left or north-west of board) for it to give that message. Failing to detect an Econet clock won't cause the Beeb to beep endlessly at you, though.

From the screenshot you've shown, your Beeb finishes printing the "32K" (and bell) message, and then continues to search for a Language ROM, finds BASIC, and hands over control to the BASIC ROM. But it then doesn't get as far as printing a prompt in BASIC (or stopping the second beep).

I'll put my thinking cap on overnight and see if any inspiration comes.
Last edited by Kazzie on Thu Jul 18, 2019 9:37 pm, edited 1 time in total.
BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM, ZIDEFS with 512MB CF card
Acorn System 1 home-made replica

User avatar
1024MAK
Posts: 9207
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Bbc b second beep lasts forever

Post by 1024MAK » Thu Jul 18, 2019 10:17 pm

Is this a problem with the maskable interrupt. I’m sure the OS sound system uses the 100Hz system ‘tick’.
So test 6502 CPU pin 4 (/IRQ).

Mark

Coeus
Posts: 1378
Joined: Mon Jul 25, 2016 11:05 am
Contact:

Re: Bbc b second beep lasts forever

Post by Coeus » Thu Jul 18, 2019 10:57 pm

Ok, another suggestion: is the BASIC ROM correctly inserted and working? The "BASIC" in the start up message is printed by the OS, not by the BASIC ROM. Languages are entered with interrupts disabled. If the BASIC ROM were faulty the CLI instruction to enable interrupts may never be executed and thus the interrupt to end the ^G beep would never be taken by the CPU.

User avatar
leenew
Posts: 3963
Joined: Wed Jul 04, 2012 3:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: Bbc b second beep lasts forever

Post by leenew » Sat Jul 20, 2019 11:27 am

Every time I have had a beeb with these symptoms, it has been keyboard/ keyboard cable related...
Plug and unplug the cable in 20 times each end...
Lee

User avatar
tricky
Posts: 3723
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Bbc b second beep lasts forever

Post by tricky » Sat Jul 20, 2019 6:12 pm

And try the cable reversed.

User avatar
DutchAcorn
Posts: 2130
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: Bbc b second beep lasts forever

Post by DutchAcorn » Mon Jul 22, 2019 7:43 pm

It’s because you have hi-basic installed without a 6502 second processor. Remove that rom and you should be ok.
Paul

Image

User avatar
1024MAK
Posts: 9207
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Bbc b second beep lasts forever

Post by 1024MAK » Mon Jul 22, 2019 7:51 pm

Remove all ROM/EPROM chips except:
  • HN613128PB04 (‘B04) - OS 1.20
  • HN613128PB05 (‘B05) - BASIC 2
Mark
Last edited by 1024MAK on Mon Jul 22, 2019 7:52 pm, edited 1 time in total.

Post Reply