Speech
Posted: Mon Oct 09, 2006 9:33 pm
I recently found the software SPEECH program i used to use at college on the bbc (Early 6502 machine) all those years ago...
http://bbc.nvg.org/sw/Superior/Speech!.zip
This is an amazing piece of programming, because it allowed any sentence to be spoken in English(Possibly one of the most idiosyncratic languages around), reproduction was remarkably good for its age (1983 iirc) yet all sat in just 7.5K of memory!
http://bbc.nvg.org/doc/Speech.html
So i set about converting the program to the Oric.
I first found a cool BBC emulator here...
http://bbc.nvg.org/emulators.php3#BeebEm
Loaded up speech. had a look at some of the utilities and found the Original Speech relocator program which told me the original load address of $5500. I knew the length (7.5K or $1E00) so i just had to find this memory on the speech.ssd disk image. I also found a free binary viewer
http://www.hhdsoftware.com/Family/hex-editor.html
and some additional info about BBC Memory.
http://www.howell1964.freeserve.co.uk/A ... BC_Mem.htm
This (And the second link) told me the locations to access the sound chip ($FE43-$FE45).
So i loaded the speech.ssd file into the binary viewer and searched for $43FE (16 bit data is stored low then high). I found it and managed to find the data around it spanning 7.5K exactly.
So i extracted it using another editor and saved the flat file as speech.bin
I then used Dbugs really cool HEADER.EXE (You can find it elsewhere on this site) to add an ORIC tape header with the known start address of $5500.
I ran up Euphoric, loaded the tape file, then saved to a new works disc.
I enabled the printer (to a file).
I then loaded ORION (This is a well known Oric Disassembler) and then PDUMPO (An extension of ORION) that redirects output to printer.
http://oric.org/index.php?page=software ... m_log=1507
I then loaded speech file from disc($5500-$72FF), ran PDUMPO(BASIC) which calls into ORION ($8100-$97FF) and dumped the complete disassembled Speech memory range to printer.
I then returned to desktop and opened this up in my text editor, resaving it as a xa compliant .s file.
I then searched again for the $43FE and found that section of code.
Many areas had partial disassembly then BYTE which was unrecognised op-codes, this just meant data (Relied on the old code not having undocumented op-codes).
I went back to the binary viewer (HEX Editor) and found the word to phoneme conversion tables and other larger areas that hold the actual phoneme samples.
i am currently working out how the code works so that i may convert the code to work with the AY-3-8912 sound chip.
I have established thus far...
$5500 Phoneme Samples (and maybe some other tables) - 2816 Bytes!
$6000 Machine Code to play and decrypt passed sentences - 2199 Bytes
$6897 Word (or part of) to Phoneme data records - 2664 Bytes
$72FF End of Data
I finished the reformatting of the memory file, although a couple of areas are a bit strange. The mc appears to use a few BRK instructions, but i have not yet been able to determine what they are used for since i know little about the inner workings of BBC.
I provide below a link to the complete 7.5K source file of Speech!
http://www.defence-force.org/ftp/forum/ ... chdump.rar
I will report back as soon as the Oric speaks to me
http://bbc.nvg.org/sw/Superior/Speech!.zip
This is an amazing piece of programming, because it allowed any sentence to be spoken in English(Possibly one of the most idiosyncratic languages around), reproduction was remarkably good for its age (1983 iirc) yet all sat in just 7.5K of memory!
http://bbc.nvg.org/doc/Speech.html
So i set about converting the program to the Oric.
I first found a cool BBC emulator here...
http://bbc.nvg.org/emulators.php3#BeebEm
Loaded up speech. had a look at some of the utilities and found the Original Speech relocator program which told me the original load address of $5500. I knew the length (7.5K or $1E00) so i just had to find this memory on the speech.ssd disk image. I also found a free binary viewer
http://www.hhdsoftware.com/Family/hex-editor.html
and some additional info about BBC Memory.
http://www.howell1964.freeserve.co.uk/A ... BC_Mem.htm
This (And the second link) told me the locations to access the sound chip ($FE43-$FE45).
So i loaded the speech.ssd file into the binary viewer and searched for $43FE (16 bit data is stored low then high). I found it and managed to find the data around it spanning 7.5K exactly.
So i extracted it using another editor and saved the flat file as speech.bin
I then used Dbugs really cool HEADER.EXE (You can find it elsewhere on this site) to add an ORIC tape header with the known start address of $5500.
I ran up Euphoric, loaded the tape file, then saved to a new works disc.
I enabled the printer (to a file).
I then loaded ORION (This is a well known Oric Disassembler) and then PDUMPO (An extension of ORION) that redirects output to printer.
http://oric.org/index.php?page=software ... m_log=1507
I then loaded speech file from disc($5500-$72FF), ran PDUMPO(BASIC) which calls into ORION ($8100-$97FF) and dumped the complete disassembled Speech memory range to printer.
I then returned to desktop and opened this up in my text editor, resaving it as a xa compliant .s file.
I then searched again for the $43FE and found that section of code.
Many areas had partial disassembly then BYTE which was unrecognised op-codes, this just meant data (Relied on the old code not having undocumented op-codes).
I went back to the binary viewer (HEX Editor) and found the word to phoneme conversion tables and other larger areas that hold the actual phoneme samples.
i am currently working out how the code works so that i may convert the code to work with the AY-3-8912 sound chip.
I have established thus far...
$5500 Phoneme Samples (and maybe some other tables) - 2816 Bytes!
$6000 Machine Code to play and decrypt passed sentences - 2199 Bytes
$6897 Word (or part of) to Phoneme data records - 2664 Bytes
$72FF End of Data
I finished the reformatting of the memory file, although a couple of areas are a bit strange. The mc appears to use a few BRK instructions, but i have not yet been able to determine what they are used for since i know little about the inner workings of BBC.
I provide below a link to the complete 7.5K source file of Speech!
http://www.defence-force.org/ftp/forum/ ... chdump.rar
I will report back as soon as the Oric speaks to me