Jump to content
IGNORED

Adding Speech Back To TRS2 Nintendo Radarscope Boardsets


SNESNESCUBE64

Recommended Posts

So I have been playing around with this project for a while now. I did a proof of concept to see if I could do it back in June, but upon realizing that I couldn't talk to it without modifying the sound ROM I put it on the shelf. A few weeks ago I picked it back up after finishing up everything I really wanted to do with my Nintendo Helifire project.

Before I get into this, I'd like to add a bit of context. In some versions of Nintendo Radarscope, specifically the TRS1 boards have the ability to have speech using a goofball Mitsubishi speech chip. This chip seems to be a bit rare as I could not find a single example after looking for about a year. Most of them did not come with this speech circuit populated. The later and more common TRS2 Radarscope sound boards did not come with the speech section at all. The goal of this project was to try to be able to get speech on the more common boards because why not. Onto the nerd stuff!

The first thing I did was try to figure out how to modify the ROMs. Before I could even do that, I had to understand what I could write to make it meaningful. To my benefit, it was actually fairly simple to figure that out. In the MAME debugger, I could read the inputs, so I was able to see when the synth table was written to. To my benefit, there was also an awesome page going into detail about the table. From there, it was just finding out where in ROM it was reading these inputs. What is nice, is that in the original, all of the speech except for "Engine Trouble".

image.png.73561993864a814b3bccc5f47dea3d9a.png

Now that I knew what the states were, how was I going to get it to talk to a voice module. Well Nintendo made it really easy for me, they broke out part of the databus and the write line to a typically unused voice header on the sound board. This was going to be my vehicle for talking to my module. Luckily for me, the write line went unused other than this header. From there it was trivial to figure out how to write onto the databus (thank god some great folk scanned the intel 8035 datasheet and manuals).
image.png.31a6bc40d14f8f5ac2c3db405bcb6762.png


Now goes to the means of reading such writes. My whole voice module is based around an Arduino with the Talkie library. It is a neat library that takes data and outputs just like a TMS5220 (or a couple other speech chips) would. I was able to see the writes on my logic analyzer, but I realized that it would have been hard to keep the Arduino in sync with the databus even with using the write line as an interrupt. What I needed was a latch which my proof of concept didn't have. So for the first revision of the speech board I added a 74LS374 octal latch in order to capture the inputs as they are written. That way, the Arduino can just read the inputs at it's own pace.

20231211_220628.jpg.a449515f0c1ab1978b3086676d4b7b9e.jpg

With a working prototype that could effectively read the inputs, I was able to finally get to software. As I mentioned, I was using the talkie library to play these. Once again, I used the awesome ostermayer radar scope page to download the recorded samples and quickly convert them to the TMS5220 data that the library needed. After writing some code to read the inputs and make some decisions on what to play, I had a working speech board!


I have a rough project that works correctly with the game now! I still have a lot of work ahead of me and things that I want to do to make this thing better though. Let me know what you think!

  • Clean up the original speech samples / convert speech ROM data to work with this library.
  • Utilize the dip switches to add a bit of extra functionality
  • Work on making a better sounding amp circuit
  • Alternate voice saying original lines (they don't sound to great)
  • Alternate voice lines
  • Wow! 1
Link to comment
Share on other sites

Just as an update to this project, yesterday I had fiddled around with my opamp circuit to make it a bit louder and increased the volume of the samples in order to make them a bit louder. So volume is no longer an issue. One other thing I looked into was how the TRS1 boards figured out when to play "Engine Trouble". Referring back to the ostermayer Radarscope sound page to double check to see if there was any way that I could read that the damage level was maxed out from the sound CPU, I noticed that /SOUND3 was undocumented.

1702530038805.png.aa857dd93f40e4f9f00271107c3af177.png

I figured, well if it would be anything, perhaps it would be the indicator for maxed out damage. The sound CPU cannot see when the siren or any of the other discrete logic sounds were playing. The TRS1 boards had a similar interface, so it had to be figuring it out SOMEHOW. So I hooked my logic probe up using some mini grabbers to check. To my surprise, it only went low when damage was maxed out, indicated by the pulse light being on since I used "mem"

20231213_194109.jpg.431a42f3803e58bb0f6ce7bbed10b0b8.jpg
Because /SOUND3 was the trigger here, I was able to update my code to trigger engine trouble on DB4 from the module side. The only thing that I had really modify in terms of the sound rom was my databus write routine. Because /SOUND3 was on the port 2 databus (pin 35 - P25/PB5), I had to add a check to see if it indeed was active. The only issue is that I kind of injected this code into the original sound rom, so I had to make sure I restored the registers back to the way they were when I got to the routine. What really sucks about testing this, is that MAME doesn't implement port 2 since it goes unused from the input perspective and is only used for addressing as an output. I could test it good enough as I could change the port value just to make sure my logic worked, but to see if it actually worked, I had to test it out on the real cabinet.

1702529666858.png.6b503f20662dcb5f3b54cc1b2d5841d4.png

I was able to get the module to work correctly because of this and am very happy about that. I am able to FULLY recreate the original TRS1 voice experience with my module on the newer and more common TRS2 boards. I am super excited to finish my code and work out the handful of bugs I've encountered while doing it. So what remains is these action items:

  • Utilize the dip switches to add a bit of extra functionality
  • Work on making a better sounding amp circuit
  • Alternate voice saying original lines (they don't sound to great)
  • Alternate voice lines
  • Software cleanup
  • Like 1
Link to comment
Share on other sites

Things are going well with the project. I've just about finalized the amp circuit. After trying just about every opamp that I stock (I think it was 14) I settled on the LM1458. I am able to just about get the sound levels of the LM324 but without the distortion. I've started designing the next hardware revision. I will have a couple of pins leftover so I will have a expansion port in case I want to hook up to any other peripherals in the future.

The next hardware revision will be removing all the jumpers and test points as well as the pullup resistors for the databus. The pullup resistors are not really necessary it seems so I am just not going to include them. The 7404 inverter IC will also be removed as it was unecessary. I arduino will also have no knowledge of the write line in the future. I am already not using it in software, so I am using that I/O elsewhere. The next version will still have the arduino pro mini serial header for debug and programing but will just be using an atmega328p (as well as the supporting circuitry) all onboard. I was also left with one extra I/O, so that will be resulting in one extra dip switch option. It's option will probably be for the expansion header, but I am unsure yet.

20231218_204657.jpg.d1a0527cf76dfa621124de3b9845d28b.jpg

20231218_204701.jpg.3d1f72152746304db3810de7eafd5d8a.jpg

I also added a test button so that way I can hear all the samples get played back with the settings applied. It really came in handy when testing the different amps.

In terms of software, soundboard rom is done. Code to interface with the soundboard is done. I am currently not using ACK but might if I feel it is necessary. It shouldn't be if the sound rom is done. I've started writing code to interface with the dip switches. All options work as they should but I am not handling certain functionality completely. Part of that is because I don't have the rerecorded samples and alternate lines samples done. Hopefully during my holiday break I will have time to do that.

I am super happy with the progress so far and cannot wait to finish this up.

Edited by SNESNESCUBE64
Link to comment
Share on other sites

I've just about finished the hardware design. There is one last thing that I want to try before, but I don't really expect it to improve much so I might call this design good. Basically, I wanna try to add an audio isolation transformer inbetween the atmega and the amp. I was told that it might help me with a the noise I am getting. I ordered a couple different audio transformers on amazon, so I guess I will see if that improves things.

image.png.1d6ce136ae239b5a681c301e7bb8af79.png

  • Like 1
Link to comment
Share on other sites

I ordered the (hopefully) final revision of the speech boards before the end of 2023. So hopefully I can get the rest of this taken care of this month. I am also toying around with the idea of a rank board since I had extra I/O available to me, but we will see how that works out.

I did add an audio transformer and saw improvement, so I was able to sneak that into the final revision of the board.

Link to comment
Share on other sites

Posted (edited)

I spent all day yesterday messing around with QBoxPro to try and generate clearer voice samples. It's very neat old software designed to generates LPC byte streams for speech chips such as the TMS5220 (which is what I am emulating) with weird quirks but seems to work ok. I've re-recorded most of the voice lines using my voice and it sounds alright so far. I might play around with it more.

PXL_20240107_192409729.jpg.27fe80c3774f14467032ddcec864625f.jpg

Edited by SNESNESCUBE64
Link to comment
Share on other sites

  • 4 weeks later...

I'm hopefully finishing up the software soon. However, I decided to make a couple minor changes to the hardware:

  • Removed the debug port
  • Removed individual pullup resistors
  • Removed DTR capacitor on reset line (unecessary without debug port)
  • Replaced resistor array with two extra resistors to account for the removed individual pullup resistors.

1707188414611.png.11029d5fcd21a6d6d3e7769b43f6f0dd.png

I did an interest check on another forum. If you want one of these speech boards let me know. I am doing one run of these and that's it.

Edited by SNESNESCUBE64
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

April has been incredibly chaotic for me, but I think things are calming down just a bit. So I've been reworking a few things:

  • Changed up dip switch settings
  • Increased speech options from 3 to 7
  • Started recording speech set 4. Everything is good minus a little bit of tweaking.
  • Prepping for sets 5 and 6, the plan is try and get some samples of a SC-01

I do have to work in an additional bit of hardware. My speech board relies on a slightly modified sound board rom (about 28 bytes out of the 2k), most of which is new code. The only issue is I cannot sell this with the modified rom. So I am working on a hardware-based patch that switches between my code and the original. That way only the supplimental code has to be distributed, not the original. As such, I've been learning how to program for GAL16 and GAL22 PLDs. I also made a proof of concept board.

PXL_20240412_103421089.jpg.51649b9a15f3d8a1ce9491dc951d66ec.jpg

PXL_20240412_103432454.jpg.1b14966870ff77e90af5f3f198da6b4f.jpg

The only issue is that the board is too tall, so I am working out a solution where I can do two things:

  • Eliminate the need for an extra rom with my code (embed it into the PLD)
  • Potentially move the patch stuff to the main speech board.

The first topic I did this morning before work. It seems to be working just fine so far, but more testing is needed.

Progress is still being made ultimately. I've also started writing a proper manual for this. Hoping this will be completed within the next couple months.

  • Love 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...