What's new

dodgydood

Beginner
Joined
May 21, 2019
Messages
3
Reaction score
4
Location
Canberra, Australia
Hi Im new here, does anyone know how to do a stereo audio mod on the pgm?
 
We discuss a bit here but the games are not in stereo, at least the ones we looked at. Do you know any that have stereo?

IGS PGM Cart PCB Scans (And Projects)

if we end up figuring out how to separate audio channels either in the audio file or the processor I think it’ll show up here though.
 
Was searching for information in regards to the modification and if necessary considering games are not in stereo. Thanks ekors for the link ill keep and eye out
 
Look up the data sheet for UPD6379
I used a Neo Geo amp minus the effects channel.
This will also 5v mod your PGM...


1445E419-C548-4C1F-9624-89D0BEC1F36E.png

Link to previous discussion
 
I started to disassemble the z80 audio driver, but got distracted by other things...

One relatively easy option would be to hard code a left/right position for each channel, similar to the default settings for a MOD tracker. Adding 2D position for gameplay elements is a bigger job.
 
Well... if you have stereo you can maybe do Surround. With more voices and some control over phase shift you should be able to do Pro Logic...
But I agree, without patches (or homebrew) there is little point to it.

(Edit: Though I guess if you want to run sound through your own amplifier instead of going through the JAMMA connector it doesn't hurt to get the stereo signal...)
 
Last edited:
I made some quick PCB pictures, mostly for my own reference:
Stereo.jpg


Not sure what the best point to get the signal is, yet. Though I guess attaching a cable to the opamp is easiest.
 
I came up with this:
AudioBreakout.jpg


Is it overkill? Yes, of course. Will it sound any better? No, of course not. Is it faster to install? No, of course not.
The only advantage is that is looks a bit neater and reduces mechanical stress on the solder joints. I still have to actually measure the signal level to see if it is worth it. I may order this with my next PCB order, though...
 
I had a moment to attach my scope to the OpAmp output:
picture.jpg


I measured the music test from the bios test menu:
NewFile1.png


Interesting observation: This seems to be a stereo track. The menu "blip" is the same level on both channels. Can someone who has done a stereo mod confirm?
And the signal is offset to 2V. Analog electronics is not my strength, can someone confirm that this means that you probably want AC coupling?

Edit: Also, does anyone know which line level would be expected for normal RCA stereo connectors or SCART? Should this be attenuated to ±0.447V, or is it OK as it is?

https://en.wikipedia.org/wiki/Line_level
 
Last edited:
Got some of the adapter boards made:

IMG_20201224_132524_s.jpg


There are various options for installation depending on personal taste and how reversible you want this. On another project I found that using a socket on the adapter collides with the middle header, so you either have to file out the plastic on the header, file down the pins on the middle row, or use single row sockets.

I want to install it below the motherboard so I don't have to route the cable around the motherboard edge. For that I got a wire wrap socket which should allow soldering the board from the bottom.

I'll report back once I've got it installed.
 
that other thread reminded me, how's this going @Fluffy? Any actual stereo going on with the PGM?
 
Yes, I do have stereo (as the scope screenshot shows), at least for the song in the test menu. I am planning to add the stereo output to my PGM consolise thing, though I don't think it is much use without a stereo patch for games...
 
maybe ctr would share his sound driver notes. Are you thinking about making a patcher that sniffs out the z80 code and offsets channels? I am admittedly not up to snuff to work through all that myself, but I'm learning on some other z80 stuff now so maybe I'll be a little more knowledgeable soon.

He did rip the three cave games to MOD with panning as if they came that way, and his C code for pgm2xm includes a panning comment, so maybe those are already in stereo?
 
He did rip the three cave games to MOD with panning as if they came that way, and his C code for pgm2xm includes a panning comment, so maybe those are already in stereo?
That is what I thought at the start - the thing is, MOD has a "default" panning as 2 channels are fixed to left, and 2 channels are fixed to right as they are in the original Amiga hardware. IIRC he mentions that his extracted MOD for Espgaluda matches the soundtrack, though that may be pure luck as the panning was something simple like LLRRLLRRLLRR... etc.
Though that would be easy enough to bodge into the driver - if I can find the time...

Edit: I did run one game through Ghidra and found where it uploads the Z80 code (just a simple memcpy, no decryption or decompression), and ran the Z80 code through Ghidra as well and found some register access code. Though that didn't go far, and I lost the existing project files. So I don't mind if anyone else wants to try.
IIRC the code from ctr has some info how the data is stored.
 
Last edited:
Necromancing an old thread.. I just took a quick look at the PGM audio and potential stereo mod. But as people have pointed out, there's no stereo audio in the games and there's also no multichannel synth business for stereo modding like eg. an NES, so barring actual stereo sound, remaining benefits for the "stereo" output mod are:

- Separate and independent. JAMMA edge continues to function as-is.
- Line level and clean. No accidents involving the PCB volume knob, and more importantly coupling caps for cleaning up noise-causing DC components from the audio.
- Properly impedance matched. Only misguided "audiophiles" care about this one, though. Audio quality on arcade gear in general is so bad, you'll need a rich imagination for this to make any difference.
- 2x RCA connectors, or whatever you choose. If you want the audio going somewhere else than a supergun or a cab, 2x RCA is usually most convenient (also for mono audio, since what you actually want is probably 2x mono).
- If some day people actually do produce stereo-modded games and put them on carts, you'll be ready. Linux users in particular are likely to get hard over this one.

Since PGM has a suitable opamp to tap to, it doesn't need a separate line driver and it can also be used to drive consumer headphones.

Felt like I needed to write this, since googling for PGM stereo mod produced so many profoundly unhelpful "no benefit whatsoever" responses...

Not that this post is actually very helpful, either. I quickly tested things to see how it works, but not yet built any proper prototypes or even decided on the design. Sorry!
 
I do have a video or 2 on the subject. Its very simple to mod. Straight off the opamp you have ground in the middle pin and left and right out puts on either end pins. That's all you need.
 
I do have a video or 2 on the subject. Its very simple to mod. Straight off the opamp you have ground in the middle pin and left and right out puts on either end pins. That's all you need.
At least my rev 5 board additionally needed attenuation to line level and AC coupling to get rid a whole ton of noise. Latter problem is likely greatly aggravated by the miserable state of electricity wiring in my house, though.

About the design, I'm thinking about a small PCB with 3-pin input for tapping the opamp and some kind of circuit for having both line level 2xRCA and for headphones, a 3.5mm stereo jack with volume control which disables the RCA out when engaged. AC coupling on output, and same board can be built with only one of the two outputs, with or without volume control. Also need to inspect the PGM case more closely to ensure the design with PCB mounted connectors can be easily attached by just drilling a few holes.

That's the plan, anyway. But, it's not very high on project priority list at the moment, because frankly there are too many things I don't yet understand well enough to feel confident doing it.
 
Someone who has done this mod should try capturing BGM from a mix of games on their PC and then do a scan of the files for any difference between the two channels. It's possible some dev went ahead and used stereo, perhaps inadvertently. Or, more likely, there's nothing, and at least it would confirm.

I think all the Cave games are just mono PCM recordings for their music (no individual instruments). Am I wrong?
 
Back
Top