What's new
What is the Type-2 version?
it's a newer software revision that came out on the original hardware, it has yellow bullets, and different scoring. I'm not exactly sure on all the differences.

it's bgareggat2 in mame
 
Ah, those should all surely be compatible. The only real compatibility point is that the hacks (mine included) disable or modify text layer access since trying to write to the text layer scroll table produces corrupt garbage instead.

I think you could easily apply my patch to other revisions of Garegga, but I won't be putting in the work to port it.
 
OK so I spent some time today digging into the audio problems.

I can't speak for all of these bootleg boards, but I'm kind of impressed by the component quality of my board (Red Sun version with the JAMMA notch), it appears to have Legit Yamaha chips, the Amp is a legit Toshiba chip and all of the electrolytic caps appear to be legit Suncon caps.

From what I can hear there are 4 problem with the audio (from most important to least important)
1. There's a very loud hum
2. the speaker +/- appear to be wired backwards
3. bass sounds like in-game explosions and the kick drum sound like they're being over-driven by the amp/clipped.
4. mid range sounds are really muffled/muddy

Despite the appearance of high quality Japanese caps I did recap it anyway but it made no difference what so ever.

After that I decided to dig into the Audio Amp Circuit

the Amplifier is a Toshiba TA8201AK: http://pdf.datasheetcatalog.com/datasheet/toshiba/1144.pdf

it's a mono amp designed to run on 12V, so at least that's correct. looking at the data sheet the recommend wiring for the amp looks like this:

recommended_ta8201ak.jpg


poking around the PCB it appears that the way it's using the amp is like this:
bgbl_ta8201ak.jpg


Right off the bat the first thing I notice is that Speaker + and - are NOT actually backward at all. Speaker - is routed correctly, it's just the speaker + is not I've actually seen some legit PCBs wired this way. So technically if swapped speaker + and - to "fix" this you'd be inverting the audio... not that it really matters with mono audio.

Another interesting thing is C1 cap is actually 2x 10uF caps run in series to act like a single 5uF cap... I think a big problem with the audio setup here is actually that they decided to only use 3 values of caps (10uF, 22uF and 220uF), and then just picked the nearest value out of the 3 available. Kind of clever way to get close to 4.7uF, I left this as is but you could replace then with a 4.7uF easy enough.

Following the data sheet Cap C2 is the "feedback condenser" and determines the "low cut-off frequency" so this will likely fix our bass clipping.

C3 isn't even equipped at all, in-fact the whole of pin 3 doesn't seem to go anywhere.

Again looking at the data sheet the function of C5 is "for filtering power supply hum and ripple" this cap is WAY out of the recommended spec no wonder I'm getting hum

and that leaves us with the addition of a cap in-line on the speaker -, I'm not sure at all why it was added but I'd venture a guess that it's responsible for our muddy mid-range sound.

Since none of the caps are labeled on this PCB here is how they map to the above circuit:

bgbl_amp_caps.jpg


One other thing to note is that the square via on the Amp is actually Pin 7 NOT Pin 1 like you'd expect. so keep that in mind if you're going to hack around with this.


What I've fixed so far:
So far I replaced C5 with a 1000uF 16V cap and it's eliminated 95% of the hum, hooking up Pin 3 and adding C3 into the circuit by adding a 220uF cap across pins 3 and 4 of the Amp takes away that last 5% so there is 0 hum remaining.

Replacing C2 with a 47uF 16V cap has fixed the bass clipping issue as well.


What I plan to try next:
I'd also like to get rid of the C? cap and add a resistor and replace C4 for a proper output circuit I think this will fix the muddy mid-range audio I'm still trying to work out a clean way to do that and I'll probably have to order some parts as I don't have the right sized caps and resistors on hand.

I'd also like to properly tie the output + to the speaker + pin on the JAMMA edge (and leave the speaker - hooked up as it is). I think doing that could give much clearer output and potentially 0 hum since then the speakers will be completely isolated from the PCB's power circuit.


Other areas of investigation:
so there are a lot more caps on here not related to the Amp, given how off the values were of the amp caps I'd suspect the others might be off too, so it could be worth investigating the proper values for the rest of them.

for now though I'm super happy with the world of difference just replacing C2, C3, and C5 has made.


TLDR; here is how you de-shittify your Audio:
Replace C5 with a 1000uF 16V Cap
Replace C2 with a 47uF 16V Cap
install a 220uF 16V cap between pins 3 and 4 of the amp (negative on pin 4, positive on Pin 3 and note that pin 7 is the one nearest the JAMMA edge)

More upgrades may follow but for now this will make a substantial improvement.
 
Last edited:
Excellent write up, thanks.

My board is an older style by the looks of it without the JAMMA key but I can confirm it also has the genuine Yamaha audio chips.

Audio.jpg


The audio amplifier is an NEC UPC1242H which is an 8 pin amplifier. Looking at the datasheet of confirms that C5 & C? should be 1000μF, they're currently 220μF so I'll order some some. All of the other caps appear to be the correct values.


NEC.png
 
The audio amplifier is an NEC UPC1242H which is an 8 pin amplifier. Looking at the datasheet of confirms that C5 & C? should be 1000μF, they're currently 220μF so I'll order some some. All of the other caps appear to be the correct values.
Interesting, I wonder if the inclusion of C? and the lack of a C3 on mine is because they basically reworked the amp circuit for the NEC chip.
 
any chance this patch will work on the Type-2 version ROMs?
I figure if both can be made to work I could throw a 27c160 on there and switch between the two.
I had a quick play with this earlier and managed to realign the top sprite layer but in the process managed to misalign all of the other layers. X/

I'll have a 'hopefully better' attempt when I've got some free time.

BG.png



Whilst experimenting with that I noticed the checksum removal in Mikes patch notes so that's been added to the previous rom.

View attachment Garegga_Hack_ByteFlipped_Daisakusen_Unlocked_No_checksum.zip
 
FYI the sprite layer has no quick fix. You can not use the offset registers; those aren't respected by this board and I'm not sure they even exist on the real hardware.


The newer style board with the proper JAMMA notch has distorted audio, while the other ones don't. Other than lacking dedicated grounding and power routing for the audio (resulting in some buzzing) the audio section on the first revisions is actually pretty decent.
 
@twistedsymphony I just got @kuze’s board and I must say, your mod absolutely de-shittified the audio. Thanks! It sounded decent on the supergun for whatever reason but was 100% awful in my blast. Now it’s solid. Gonna get my ass kicked by this game now bbl.
 
Last edited:
I also dinked around with a little thing I've wanted to try for a while. With some changes to the sound driver code to accommodate the different clocks it shouldn't be too hard to get going on these bootleg PCBs.
 

Attachments

  • Screenshot from 2020-06-08 02-54-36.png
    Screenshot from 2020-06-08 02-54-36.png
    57.8 KB · Views: 222
Can you upgrade the Ramz so it can run DDP SDOJ with -1ms of lag?
 
Can you upgrade the Ramz so it can run DDP SDOJ with -1ms of lag?
Sorry, all CV1000 games come with an inherent 3 frames of lag to begin with, so the best we can do is 2.5.
 
Back
Top