Author Topic: Arcade game S/PDIF mods  (Read 8748 times)

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Arcade game S/PDIF mods
« on: August 15, 2010, 09:03:13 am »
I have used the DIT4096 as i used for MU10 on a couple of arcade games.

Seibu SPI mobo... i'ts good this is cartridge based so only one PCB needs to be modified, most arcade games use unique PCB's for each game.
For the SPI did i use the exact same setup of DIT4096 as for MU10..see pic:



Seibu SPI uses a Yamaha YMF271-F soundchip and a YAC513-M DAC.
LRCK is pin 7 (DAC)
Bitclock is pin 5  (DAC)
Data is pin 8 (DAC)
Masterclock is pin 44 (YMF271)

Here is a gameplay recording how it sounds when i play "Viper Phase 1"  :) http://www.ym2149.com/spdif/viperphase1_gameplay.mp3


I have an "Brave Blade" PCB also and tested this and it works perfect, the YMF271 on BB actually ouput 44.11 khz but that was no problem. BB only uses the YMF271 only for music and the soundeffects are coming from the playstation SPU (BB's is based on playstations hardware).

This setup should work on all arcade games using YMF271...  like other "Eighting / Raizing" games using the Brave Blade hardware and "Jaleco Megasystem 32" games.

Offline l_oliveira

  • MassiveMember
  • ****
  • Posts: 497
Re: Arcade game S/PDIF mods
« Reply #1 on: August 16, 2010, 12:28:04 pm »
That works only for games with I2S compatible soundchips but I can suggest a lot which you could use your circuit with:

YMF-278B (OPL4)  Newer  Raizing/Psyko and other games with SH-2 CPU
YMF271 (as you were able to)
Any variations of other Yamaha sound chips using YAC513 or YAC516 DAC.
Some Konami games which use I2S output from custom sampler chips
Some modern 3D games from Konami using Ricoh samplers.

SEGA Titanvideo, NAOMI, Namco System 246/256...  Etc.


Great stuff. Excellent way to get rid of processing noise too... :)

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #2 on: August 19, 2010, 02:29:35 pm »
Yes i have some arcade games using YMF278B and have thought about testing this on them also  :)

I did S/PDIF mod "Taito F3" also... only Top Ranking Stars but it should work on all F3 games.
Two pins needs a change compared from the setup i posted earlier... that is "CLK0" to be connected to 5v and "FMT1" connected to ground... see pic:



F3 uses a TDA1543 DAC.

Bitclock is pin 1 (on DAC)
LRclock is pin 2 (on DAC)
Data is pin 3 (on DAC)
Masterclock is pin 34 (on 5505, Otis)

Taito F3 outputs 29.99 khz so it's not S/PDIF standard, and you need to connect it to a device that can sync to external clock.
« Last Edit: August 30, 2010, 02:07:32 am by Stefan_L »

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #3 on: August 30, 2010, 02:37:21 am »
Did try and modify a OPL4 (YMF278) arcade game... "Bang Bang Ball" and it worked perfect.. of course ;-)
Here is a recording of some gameplay: http://www.ym2149.com/spdif/bangbangball_gameplay_spdif.mp3
It output 44.1 khz and the setup is exactly like what i showed in the first post.

I don't have any Psikyo games that use OPL4 to try this on but i know they have a different oscillator so maybe the setup needs some changes to work properly with them?

Bang Bang Ball uses a NEC "D6376" DAC.
LRCLK = pin 14 (on DAC)
Bitclock = pin 16 (on DAC)
Data  = pin 15 (on DAC)
Masterclock = pin 19 (on YMF278)

BTW i tend to write "LRclk" wich actually is called "Sync" on DIT4096 and "Bitclock" wich is called "Sclk" on Dit4096... this is becuase the first S/PDIF mod i did was the one for SNES and thats where i got those names stuck in my head  ;D

It's possible to list games using YMF278 (and other soundchips)  on MAWS:

YMF278:
http://maws.mameworld.info/maws/srch.php?cpu2=282

YMF271-F:
http://maws.mameworld.info/maws/srch.php?cpu2=281

ES5505 (Taito F3):
http://maws.mameworld.info/maws/srch.php?cpu2=65

I don't really know what to test now... possible G-Net (using "Zoom ZSG-2" soundchip for music) or maybe Battletoads wich uses "BSMT2000" soundchip.

So far it's only the Taito F3 that really benefits from the S/PDIF mod as they have such a noise output, the others are sounding fairly clean any way... well maybe they get slightly sharper sound after the mod, but only hi-fi nerds will hear it :)


« Last Edit: August 30, 2010, 04:38:43 am by Stefan_L »

Offline l_oliveira

  • MassiveMember
  • ****
  • Posts: 497
Re: Arcade game S/PDIF mods
« Reply #4 on: September 01, 2010, 01:19:09 pm »
It's called "LRclk" because it's used to toggle the DAC internal panpot circuitry. It's what gives the stereo effect.
Bitclock should pulse once a bit is sent.  I2S is actually an special (audio data) application of the I2C bus.

SPDIF and TOSLINK is just methods for encoding all those signals in a single wire. :)

Good to see you have things under control :)

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #5 on: December 09, 2010, 04:44:42 am »
Just have to correct the samplerate of Taito F3... it is "29.76" khz and not "29.99" as i wrote first :)

Anyway i have no way of doing recordings from F3 as no souncards seems to support that sample rate.
I can record at 32khz and then resample to 29.76, but i dont know how accurat that will be?


Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #6 on: December 12, 2010, 09:43:49 am »
ok here is a recording from Taito F3 (Top Ranking Stars)... i recorded it at 44.1khz and changed the sample rate of the recording to 29.762khz using Audacity.

Attract mode and some ingame:
http://www.ym2149.com/spdif/top_ranking_stars_spdif_ingame.flac

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #7 on: December 27, 2010, 02:30:25 am »
Another Taito F3 thing is that left and right channels are reversed using this S/PDIF mod? Compared to how the PCB output the channels... i don't know if my mod is wrong or Taito did not follow the DAC left and right when designing the F3 PCB's?

Anyway here is a gameplay recording from one of the more popular F3 games... Rayforce:
http://www.ym2149.com/spdif/rayforce_spdif_29762khz_%28gameplay%29.flac
I recorded it at 44.1khz and then changed the samplerate to 29.762khz, and also switched the left and right channels.
The "Top Ranking Stars" recording i posted earlier have wrong left and right channles as i did not know how it should be (only listened to it from the mono jamma output earlier).

Offline l_oliveira

  • MassiveMember
  • ****
  • Posts: 497
Re: Arcade game S/PDIF mods
« Reply #8 on: December 29, 2010, 10:03:05 am »
Add an inverter to the LRCK pin if you need to invert the output pins which each channel goes to. ;)


In fact that's just an "detail" and I suppose the board actually outputs the channels inverted "by design". Obviously I don't know why but that might be the case.

There's a few things that could cause the channels to be swapped:

-The software is programming the synthesizer chip in that way.
-The original DAC is rigged in a way the channels are inverted but the new data transfer method you're using is not ready for that. (The analog outputs would be set in a way they would swap the channels)
-Something regarding the behavior/configuration of your SPDIF encoder chip...

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #9 on: January 10, 2011, 06:22:37 am »
About F3... the data format that goes to the DAC is I2S but the actual data format from the sound chip 5505 and DSP 5510 is "24-bit Left Justified" and if you take the signal directly from the 5510 insted of from the DAC so do the left and right not get reversed and the DIT4096 must be configed to "24-bit left justified" then of course.
I will write more about it later maybe.

Anyway i did a post at mametesters wich has lots of F3 recordings from both 5505 and from 5510 wich could be interesting:
http://mametesters.org/view.php?id=4173

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #10 on: March 28, 2011, 01:46:27 am »
Time for "Konami GX"... it was not easy to find where to get the data for the DIT4096, i could not use the direct output from the TMS57002 DSP as it was further mixing with the Konami soundchips (054539) but i managed after a while to get the signals from the Konami custum 056602 circuit, the 056602 contain an unknown DAC.

The same setup as i show in the first post in this thread can be used but with one change.. see pic:



Here are the points you can get the signals from:



And showing the 056602:



Those pics show the old version of the GX mobo, newer ones have different PCB layout but still use the 056602 so it is no problem.

And this is how it sounds like (Sexy Paroudius attract mode and gameplay) :D
http://www.ym2149.com/spdif/sexyparodius_attractmode_gameplay_spdif.mp3


Offline RGB32E

  • ThrobbingMember
  • *****
  • Posts: 563
Re: Arcade game S/PDIF mods
« Reply #11 on: May 06, 2012, 11:15:51 am »
Have any of you tried SPDIF modding any of the CPS PCBs?

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #12 on: May 17, 2012, 05:29:28 am »
It is not possible for me to S/PDIF modify CPS as the curcuit i use needs a masterclock signal and CPS is missing that :(
Also CPS uses two soundchips... one of them only output analog sound.

Offline RGB32E

  • ThrobbingMember
  • *****
  • Posts: 563
Re: Arcade game S/PDIF mods
« Reply #13 on: May 19, 2012, 01:14:30 am »
It is not possible for me to S/PDIF modify CPS as the curcuit i use needs a masterclock signal and CPS is missing that :(
Also CPS uses two soundchips... one of them only output analog sound.

That's too bad.  So this is the same for CPS2 &3?  Have you used any other interface ICs other than the DIT4096?  I've used the CS8406 with several of my SNES systems and would be curious to know some scenarios where the DIT4096 would be preferred?  The main difference between the two ICs is that there is a master clock bit on the DIT to allow better compatibility for interfacing some devices? 

Offline Hojo_Norem

  • MassiveMember
  • ****
  • Posts: 198
    • JCOM Computer Productions
Re: Arcade game S/PDIF mods
« Reply #14 on: May 19, 2012, 03:30:50 am »
It is not possible for me to S/PDIF modify CPS as the curcuit i use needs a masterclock signal and CPS is missing that :(
Also CPS uses two soundchips... one of them only output analog sound.

That's too bad.  So this is the same for CPS2 &3?  Have you used any other interface ICs other than the DIT4096?  I've used the CS8406 with several of my SNES systems and would be curious to know some scenarios where the DIT4096 would be preferred?  The main difference between the two ICs is that there is a master clock bit on the DIT to allow better compatibility for interfacing some devices? 

The main advantage the DIT4096 has over the CS8406 is that it can handle more timing options without having to rely on a uIC to control it in software.  Essentially the CS8406 can do what the DIT4096 can and under microprocessor control both chips should have similar capabilities.  The main signal wiring on both is exactly the same, not counting differences in pin layouts.

In short the DIT4096 is slightly easier for DIY projects. (as long as you use a suitable mounting PCB where needed)

As for CPS2, (fingers crossed) I am actually getting a Super Street Fighter II soon and I'll take a look under the hood.  AFAIK the QSound system used on the CPS2 is pure digital sampled sound.  I would not be surprised if there is some form of I2S based DAC inside but then again I wouldn't be surprised if there wasn't either.
Formerly 'butter_pat_head'

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #15 on: May 19, 2012, 10:23:47 pm »
Actaully i have already checked the QSound system... and it also lacks a masterclock... so it does not work with DIT4096 :-\
BTW the samplerate of QSound is 24khz... not so hifi really :D

Offline RGB32E

  • ThrobbingMember
  • *****
  • Posts: 563
Re: Arcade game S/PDIF mods
« Reply #16 on: May 20, 2012, 04:20:07 am »
The main advantage the DIT4096 has over the CS8406 is that it can handle more timing options without having to rely on a uIC to control it in software.  Essentially the CS8406 can do what the DIT4096 can and under microprocessor control both chips should have similar capabilities.  The main signal wiring on both is exactly the same, not counting differences in pin layouts.

In short the DIT4096 is slightly easier for DIY projects. (as long as you use a suitable mounting PCB where needed)

As for CPS2, (fingers crossed) I am actually getting a Super Street Fighter II soon and I'll take a look under the hood.  AFAIK the QSound system used on the CPS2 is pure digital sampled sound.  I would not be surprised if there is some form of I2S based DAC inside but then again I wouldn't be surprised if there wasn't either.

Interesting.  I compared the datasheets and both ICs have two pins/bits for master clock selection (both available in HW mode).  The CS8406 lacks 384*Fs:



Have any of you encountered HW that requires 384*Fs?  Also, in the DIT datasheet, the wiring of TXP and TXN differs between the two ICs.  The CS8406 uses a resistor divider circuit for the signal, and GND is just ground for unbalanced, whereas the DIT4096 needs an isolation transformer and uses both TXP and TXN?  Is this correct in practice?

Offline Hojo_Norem

  • MassiveMember
  • ****
  • Posts: 198
    • JCOM Computer Productions
Re: Arcade game S/PDIF mods
« Reply #17 on: May 21, 2012, 03:40:24 am »
The main advantage the DIT4096 has over the CS8406 is that it can handle more timing options without having to rely on a uIC to control it in software.  Essentially the CS8406 can do what the DIT4096 can and under microprocessor control both chips should have similar capabilities.  The main signal wiring on both is exactly the same, not counting differences in pin layouts.

In short the DIT4096 is slightly easier for DIY projects. (as long as you use a suitable mounting PCB where needed)


Interesting.  I compared the datasheets and both ICs have two pins/bits for master clock selection (both available in HW mode).  The CS8406 lacks 384*Fs.


The CS8406 lacks the ability to select 384*Fs in hardware control mode.  If you use the IC in software control mode and control it over the SPI bus from a microcontroller then you can select 384*Fs with the correct commands.  Only Cirrus Logic themselves know why they decided to omit 384*Fs from hardware mode  ???

Quote
Have any of you encountered HW that requires 384*Fs?

The PSX does.  Its the reason I gave the DIT a go in the first place.

Quote
Also, in the DIT datasheet, the wiring of TXP and TXN differs between the two ICs.  The CS8406 uses a resistor divider circuit for the signal, and GND is just ground for unbalanced, whereas the DIT4096 needs an isolation transformer and uses both TXP and TXN?  Is this correct in practice?

Take a look at the S/PDIF output buffer circuits found in the S/PDIF conversion circuit building blocks section on this site.  There are a few different methods of taking a TTL level SPDIF signal (whit I am assuming is what you get directly at the IC pin) and converting it to the 'consumer' level.  I use the same resistor divider circuit with the DIT on my PSX mod and it works fine however I wouldn't be the first one to say that using a isolating transformer based circuit would be the ideal way to do it.
Formerly 'butter_pat_head'

Offline RGB32E

  • ThrobbingMember
  • *****
  • Posts: 563
Re: Arcade game S/PDIF mods
« Reply #18 on: May 31, 2013, 12:47:42 pm »
Anyone tried modding a Capcom Sony ZN-2?  Is it blocked due to the use of the QSound circuitry?

http://www.system16.com/hardware.php?id=797

Offline Stefan_L

  • SmallMember
  • **
  • Posts: 30
    • YM2149
Re: Arcade game S/PDIF mods
« Reply #19 on: June 06, 2013, 07:15:45 pm »
In my latest post so did it sound like i tested a CPS2 when checking the Qsound but it was in fact a ZN-1/2 system i ment.... so no.. ZN-2 does not have a master clock signal that is needed :)

Offline RGB32E

  • ThrobbingMember
  • *****
  • Posts: 563
Re: Arcade game S/PDIF mods
« Reply #20 on: February 07, 2015, 08:58:23 am »
https://oshpark.com/shared_projects/Qdy2pZzr
http://www.head-fi.org/t/740288/super-n ... t_11227890

So, someone made a SPDIF transmitter circuit intended for the SNES that has a sample rate converter and uses it's own master clock.  Hence, it appears CPS2 SPDIF might actually be possible?  :D

Here's a picture of the board:


http://shmups.system11.org/viewtopic.php?p=1084691#p1084691
« Last Edit: February 07, 2015, 09:01:07 am by RGB32E »