-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch Mockingboard speech titles to use SAM software speech #272
Comments
If you can provide a code-sample that does it, then we can consider it.
|
Slightly off topic: I mentioned a similar idea on the Slack #totalreplay channel: Crime Wave (and Spy Strikes Back) both use the older Mockingboard w/Votrax SC-01 speech chip only. You could patch the games to use the newer SSI263 speech chip instead. In fact this is how AppleWin supports this SC-01 speech chip (by just translating the SC-01 to SSI263 phonemes on the fly). You'd also need to patch the setup & IRQ support. So it's a fair amount of effort just for 2 games. Taken further you could go the other way, and support older SC-01 based chips, by patching in the reverse direction! (Requires patching 3 games: Bejeweled, Berzap, Rescue Raiders). But does anyone even have one of these older Mockingboards? ...and then a step further would be to add speech support for games that never had it! IMO this goes beyond what TR is about, but for completeness I thought I'd mentioned it :-) |
A port of SAM engine into C and some modern resources including a wiki for the phonemes: https://github.com/s-macke/SAM |
Apple II disassembly of SAM and RECITER programs from the SAM hardware SDK. Discussion about the usage of the SAM software SDK Documentation for SAM (Hat tip to Antoine Vignau) |
In theory, if the games are using phonemes then only the SAM program would be necessary. |
Speech usage observed during a brief investigation using AppleWin: |
Using AppleWin, I was able to reproduce this crash too (Enhanced //e) or hang with unenhanced //e. Bug in TR4a1? |
It is a bug in TR4a1 which has since been fixed.
… On 18 Jul 2020, at 8:18 am, TomCh ***@***.***> wrote:
Bejeweled - crash to monitor in TR4a1 during load
Using AppleWin, I was able to reproduce this crash too (Enhanced //e) or hang with unenhanced //e.
Bug in TR4a1?
As the a2bejwld 2.6 release .dsk version works fine:
https://github.com/jeremysrand/a2bejwld/releases/tag/2.6
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Potentially, just target the 64k games - in which case the speech code could be added to AUX memory and then the //e users could also benefit from this. I have disassembled the SAM software engine enough to understand the differences from the hardware version. They are very similar. Potentially, the hardware version could be loaded for those who have the SAM hardware. I believe that the hardware audio output should be easier to understand than the software audio output, but I haven't tested this myself. Going for lowest common denominator, loading the software version into AUX memory for //e and //gs users would give the most bang for the buck. |
I need to understand each game's usage of the Mockingboard speech output to be able to patch in the SAM usage instead. Bejewelled source code is available which makes this a great starting point. |
Using the games' own Mockingboard phonemes for SAM output is probably not possible - unless it turns out that they are related. |
Bejewelled's precondition for speech output relies on the presence of a Mockingboard which will have to be changed to be independent. gMockingBoardSpeechEnabled is used to configure the speaker settings for mockingboard sounds. SAM Phonemes for Bejewelled: |
We need an assembled version of SAM software for AUX mem space with an aux -> main return routine. For investigation: ProRWTS, AUX memory soft switches and control passing from main->AUX and AUX->main. |
Ciderpress was unable to add SAM to the Bejewelled disk image. I'm off on a tangent to provide a reproducible use case to Andy McFadden. |
After the SAM software speech code is put into auxmem, the games that have Mockingboard speech need to be patched to use SAM instead. |
TR ProRWTS https://github.com/a2-4am/4cade/blob/master/src/prorwts2.a |
I was curious to hear how this would sound on real SSI263 h/w. So I dumped the SC-01 phonemes from 7 phrases from 4 games (The Spy Strikes Back, Crime Wave, Crypt of Medea & Berzap!), and then wrote some code to play them back using the SSI263. I used the same 64-phoneme translation table that's in AppleWin, and just do it on-the-fly in my SSI263 interrupt handler. The attached zip contains 4 recordings (directly from a real Phasor card w/SSI263) at different phoneme rates, the closest to SC-01 speed is the fastest one, "ssi263-A-to-G-attr-20C85CE9.wav". (Those 4 hex numbers are the 4x SSI263 fixed attribute values I used for each phoneme, where the 3rd nibble, eg. $C in this case, is the rate.) play-sc01-using-ssi263-v0.1.zip You can try the same code with MAME's Mockingboard which has an SC-01 (use keys 1-7 to playback each SC-01 phrase): NB. The code/dsk works with Mockingboards with either SC-01 or SSI263 chips (or with AppleWin which supports both chips... although the speech quality is poor). IMO the results of the SSI263 just playing back on-the-fly translated phonemes is pretty good, ie. the phrases are about as intelligible as MAME's SC-01 (of which I think the author has done an excellent emulation job!) Again, it's probably a lot of effort to support this old speech chip (SC-01) in just 2 games in the TR collection, but this demonstrates that it would work and be "understandable" speech. |
Here are some quick notes on Crime Wave, listing all the speech phrases and their addresses: btw, phrases $0b, $0c and $0f were so poor (both AppleWin & MAME), that I had to decode them manually (as you can see) to actually understand what the SC01 was trying to say! FYI, in AppleWin (config=Phasor in slot-4) then I know that the speech phonemes will be written to the 6522's ORB at $C400. So just set a watchpoint on write to $C400 from the debugger: If you now clear that watchpoint ( You can similarly do this in MAME (if you want to try better SC01 emulation).
|
Qkumba has added Teleport to the collection which also uses the Votrax. His notes from |
Bobbi Manners' Applecorn project provides a reference for loading code into aux memory, running it and returning back to main memory. |
I have completed coding a test application that loads SAM into AUX memory, loads phonemes into AUX memory, receives a pointer to the phrase to be spoken, passes control to AUX, looks up phrase, speaks phrase with SAM, & returns to main memory with stack intact. The software SAM and hardware SAM APIs are the same (although different entry points, but this can be aligned), so potentially the user could choose which method (soft; hard & SAM Slot) and TR could load the desired SAM driver to support both. |
I have determined where in memory Bejeweled is calling speech routines from and have crafted some patches for re-directing to SAM instead. |
This project was the subject of my Hackfest entry for Kansasfest 2021. See my entry video here |
I have fixed a couple of bugs in the Bejeweled patch code and now I can play through a whole game with SAM speech. |
I have relocated and assembled a version of SAM Software that starts on a page boundary and has the input buffer and SAM speak phoneme entry point in the same locations as SAM Hardware version. |
I have completed local integration with the Total Replay build for SAM software (by default if 128k and no mockingboard speech) and SAM hardware (user can press number key 1-7 during load and slot will be set to that number). I will submit a pull request. |
Ape Escape also uses SC01 speech. AppleWin >=1.30.2.0 works. |
SC-01 titles: (*) Present on Total Replay Rob Justice reports that Teleport does not use MB speech at all but supports the Votrax Type'n'Talk which is an external peripheral connected by serial card. The Scott Adams Adventures also support this peripheral. |
Thread on external (serial) Cricket device and converting MB to cricket: |
Can we patch TR titles that have Mockingboard speech to use SAM software speech instead?
Memory may preclude this on standard system but perhaps it could be a IIgs only patch.
The text was updated successfully, but these errors were encountered: