MAME: Speech

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

MAME: Speech

Postby 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, etc.

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

Re: MAME: Speech

Postby 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: 1001
Joined: Fri Jun 08, 2012 10:01 pm
Location: Croydon, UK

Re: MAME: Speech

Postby 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, etc.

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

Re: MAME: Speech

Postby 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.


Return to “emulators”

Who is online

Users browsing this forum: No registered users and 4 guests