MAME: Speech

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
Post Reply
User avatar
Pernod
Posts: 1216
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

MAME: Speech

Post by Pernod » Mon Oct 23, 2017 5:25 pm

Whilst rewriting the VIA handling in MAME I thought it's about time to get Speech working. All the components have been in there for many years but has never worked.

There's been previous discussion on the ordering of INT/READY on PB 6/7 of the system VIA, both the B and B+ schematic show PB6=INT and PB7=READY but I believe tricky implemented them in BeebEm the other way around for AstroBlaster, so which way are they? The AUG states "PB6 is the speech processor 'ready' output and PB7 is from the speech processor 'interrupt' output", to add to the confusion.

When should I actually perform the R/W from the slow data bus to the TMS5220, in terms of RS,WS,READY?

When I have Acorn Speech working I'll take a look at the Cheetah Sweet Talker, as it uses the same socket.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

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

Re: MAME: Speech

Post by tricky » Tue Oct 24, 2017 8:31 pm

AstroBlaster will work either way, so will computer concepts speech. I think acorn speech requires them the new way (issue 7), which I think works in my mod of beebem.
Last edited by tricky on Fri Oct 27, 2017 5:51 pm, edited 1 time in total.

User avatar
Pernod
Posts: 1216
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

Re: MAME: Speech

Post by Pernod » Fri Oct 27, 2017 5:50 pm

I'm suspecting maybe a bug in the MAME implementation of tms5220.

On my real Beeb with Speech at startup I get:
&FE40 = &7B
and after a SOUND -1,...
&FE40 = &3B

Is this telling me that after a tms5220 reset (¬RS and ¬WS both high) the ¬INT line is high on PB6?
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

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

Re: MAME: Speech

Post by tricky » Fri Oct 27, 2017 6:07 pm

In AstroBlaster I use this code to check for the ready signal to see if speech is fitted and to find out which line (SysVia PB6/7) it is connected to:

Code: Select all

SysPB6_SpeechReady     =  64 \\ These will be swapped on Issue <= 4 that
SysPB7_SpeechInterrupt = 128 \\ have not been modified to match series 7

SysPA5_SpeechEmpty   =  32 \\ ran out during speak / speak external
SysPA6_SpeechLow     =  64 \\ FIFO <= half full (8 bytes)
SysPA7_SpeechTalking = 128 \\ Speak / Speak External

.speak_init
{
	SEI

	lda #&0F : sta SysViaDDRB
	lda #0   : sta SysViaDDRA
	lda #0+1 : sta SysViaRegB \\ read select speech
	lda SysViaRegB : and #SysPB6_SpeechReady OR SysPB7_SpeechInterrupt : sta speak_READY
.find_READY
	LDA SysViaRegB : and #SysPB6_SpeechReady OR SysPB7_SpeechInterrupt
	eor speak_READY
	beq find_READY
	sta speak_READY
	lda #8+1 : sta SysViaRegB \\ read deselect speech

	ldy #9
	lda #&FF
.reset
	jsr speak_write_A
	dey
	bne reset

	CLI

	RTS
}

.speak_write_A
{
  PHA
  lda #&FF : sta SysViaDDRA
  PLA
             sta SysViaRegA
  lda #0+2 : jsr speak_write_rw \\ speech write enable
  lda #8+2 : sta SysViaRegB     \\ speech write disable
  RTS
}

.speak_write_rw
{
	sta SysViaRegB
}
.speak_wait_ready
{
	lda speak_READY
.wait
	bit SysViaRegB
	bne wait
	RTS
}

.speak_read_status \\ MI=Talking VS=Low NE=Empty
{
  lda #0   : sta SysViaDDRA
  lda #0+1 : jsr speak_write_rw \\ speech read enable
  lda #SysPA5_SpeechEmpty : bit SysViaRegA \\ 
  PHP
  lda #8+1 : sta SysViaRegB      \\ speech read disable
  PLP
  RTS
}
It's all a bit dim and distant now, but I'll try and help if I can.

User avatar
Pernod
Posts: 1216
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

Re: MAME: Speech

Post by Pernod » Fri May 04, 2018 8:36 pm

After finding the ROM for the Beeb Speech Synthesizer from Watford it was very easy to implement, considering no schematic or even a photo of the board.

It has a SP0256-AL2 connected to PB0-PB6 to speak allophones. PB7/PB8 specify high/low intonation. The CB1/CB2 lines are connected to LRQ/SBY.

It seems to work according to the manual, but I have no information on the clock used. If anyone has one of these I'd like to see a photo of the board and some recordings for comparison.
0057.png
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: MAME: Speech

Post by marcusjambler » Tue Jun 05, 2018 5:27 pm

Photos of the PCB of WE speech unit... I'm struggling to spot a crystal
Strangely pin 28 is not connected which, according to the SPO256, data sheet should be one side of the crystal

IMG_3620a.jpg
IMG_3623a.jpg
IMG_3636a.jpg
Marcus

User avatar
Pernod
Posts: 1216
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

Re: MAME: Speech

Post by Pernod » Tue Jun 05, 2018 5:35 pm

marcusjambler wrote:
Tue Jun 05, 2018 5:27 pm
Photos of the PCB of WE speech unit... I'm struggling to spot a crystal
Strangely pin 28 is not connected which, according to the SPO256, data sheet should be one side of the crystal
Thanks for those, though the lack of crystal has thrown me. They're typically clocked between 3-4MHz. Anyone any ideas?

Oh, and could you post your ROM image? We currently have two variants so would be nice to compare your known genuine ROM with what we already have.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: MAME: Speech

Post by marcusjambler » Tue Jun 05, 2018 5:44 pm

Rom Dump
WESPEECH.zip
(4.56 KiB) Downloaded 6 times

User avatar
Pernod
Posts: 1216
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

Re: MAME: Speech

Post by Pernod » Tue Jun 05, 2018 6:21 pm

marcusjambler wrote:
Tue Jun 05, 2018 5:44 pm
Rom Dump

WESPEECH.zip
Thanks, that matches a version with incorrect allophones for O'CLOCK.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
Pernod
Posts: 1216
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

Re: MAME: Speech

Post by Pernod » Wed Jun 06, 2018 1:01 am

marcusjambler wrote:
Tue Jun 05, 2018 5:27 pm
Strangely pin 28 is not connected which, according to the SPO256, data sheet should be one side of the crystal
Pin 27 goes to the 74LS629 which is a voltage controlled oscillator. Anyone know how to calculate the frequency generated?
Last edited by Pernod on Wed Jun 06, 2018 8:56 am, edited 1 time in total.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

User avatar
daveejhitchins
Posts: 4188
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: MAME: Speech

Post by daveejhitchins » Wed Jun 06, 2018 7:24 am

The 74LS269 is listed as an: 8-BIT BIDIRECTIONAL BINARY COUNTER - and seems to indicate a 24 pin part - which is obviously isn't - added to that the links I've followed seem to result in the 24 pin part being a 74F269!! Hmmm! Interesting . . .

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: MAME: Speech

Post by marcusjambler » Wed Jun 06, 2018 7:27 am

It looks like you set the range (RNG) and the actual frequency depends on the value of Cext and the pot.
According to Fig. 1 to 5

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: MAME: Speech

Post by marcusjambler » Wed Jun 06, 2018 7:28 am

74LS629 is the IC

User avatar
hoglet
Posts: 7229
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: MAME: Speech

Post by hoglet » Wed Jun 06, 2018 7:29 am

(Snap!)

It's a 74LS629, data sheet is here:
http://www.ti.com/lit/ds/symlink/sn54ls628.pdf

User avatar
daveejhitchins
Posts: 4188
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: MAME: Speech

Post by daveejhitchins » Wed Jun 06, 2018 9:16 am

D'oh! Dyslexic, or what . . .

Dave H :lol:
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
marcusjambler
Posts: 361
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: MAME: Speech

Post by marcusjambler » Wed Jun 06, 2018 9:29 am


User avatar
Pernod
Posts: 1216
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK
Contact:

Re: MAME: Speech

Post by Pernod » Wed Jun 06, 2018 9:29 am

daveejhitchins wrote:
Wed Jun 06, 2018 9:16 am
D'oh! Dyslexic, or what . . .

Dave H :lol:
Apologies, I did typo it earlier.

The frequency is also changed by the state of PB6/7 to change intonation. The frequencies I use in MAME are currently guessed.
- Nigel

BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, BeebZIF, etc.

OneSwitch
Posts: 86
Joined: Tue Nov 22, 2011 5:50 pm
Contact:

Re: MAME: Speech

Post by OneSwitch » Wed Jun 06, 2018 12:16 pm

BBC Micro on MAME? Does this work?! I had no idea. Is this a small step from getting it working on RetroPie without too much faff I wonder?

Is there development to get it on a par with BeebEm does anyone know? Would love to see emulation for the User Port and touch-screen added so it will work with some of the special needs educational stuff.

Post Reply