VOGONS


First post, by snipe3687

User metadata
Rank Member
Rank
Member

Hi everyone,
please excuse me if this question has already been asked and addressed but I'm in the process of learning how to use kicad to make my own boards and I decided since I had so many CS4237b chips from other projects, I wanted to make my own sound blaster compatible sound card kind of similar to Eivind Bohler's LlamaBlaster but MUCH more basic. essentially I just want to have the standard I/O section for a card consisting of line in, line out, microphone, gameport and for fun I added a TOSLINK port. I'm not planning to do anything fancy like XT-IDE support or MT-32PI. not even planning to do the HIDman thing for USB gamepad support. The one feature I wanted to add since I also have a bunch of these chips is YMF262 as an external synth. The problem is, the projects I've used these on before, namely the ITXllama initialized the PNP stuff in the BIOS and didn't require an EEPROM. since this will be an add-on card that should in theory, work in any 16-bit ISA slot I will need to have an EEPROM correct?
If that is truly the case then how can I have both an EEPROM and external synth since the SDA, SCL lines are also the XA0 and XA1 lines? Before anyone starts giving me advice for ways to code a solution, I have no idea how to do that. something I plan to work on but am still trying to wrap my head around how to program at this level.
I read something on the datasheet about using the WTEN line on the chip to switch between the EEPROM and address lines for the external synth, but I don't fully understand how to do that either.
Could anyone point me in the right direction on how I would get both working? I see other similar cards like the Orpheus seemingly don't have an EEPROM but have a OPL3 chipset so I know it can be done somehow.

any help you guys could provide would be much appreciated. worst case-scenario, I just won't include the OPL3 chips on this version. really, I just want to learn more about circuits and PCB layout!

Reply 1 of 34, by MJay99

User metadata
Rank Member
Rank
Member

I've built mine with an eeprom.
SDA and SCL are connected to both the eeprom and YMF, with SCS being the Chip-Select for the YMF, afair.

Here's the eeprom (please ignore the usage of global flags instead of local ones - this was my first ever project a few years ago and I didn't know better):

The attachment 24LC16.jpg is no longer available

Here's the relevant part of the CS4237B:

The attachment cs24237b.jpg is no longer available

And here's the relevant part of the YMF262:

The attachment ymf262.jpg is no longer available

The programming of the eeprom is no issue with gerwin's driver / eeprom package from vogonsdrivers:
http://vogonsdrivers.com/getfile.php?fileid=9 … &menustate=41,0

Try and find the resource.exe and program it with e.g. a customized pnp37.ini
If necessary, I could try and find the one I programmed mine with (which is just only routing analog audio from the YAC and amp into the CS, though).

Hope this answers your questions?

Reply 2 of 34, by snipe3687

User metadata
Rank Member
Rank
Member
MJay99 wrote on 2024-06-30, 21:39:
I've built mine with an eeprom. SDA and SCL are connected to both the eeprom and YMF, with SCS being the Chip-Select for the YM […]
Show full quote

I've built mine with an eeprom.
SDA and SCL are connected to both the eeprom and YMF, with SCS being the Chip-Select for the YMF, afair.

Here's the eeprom (please ignore the usage of global flags instead of local ones - this was my first ever project a few years ago and I didn't know better):

The attachment 24LC16.jpg is no longer available

Here's the relevant part of the CS4237B:

The attachment cs24237b.jpg is no longer available

And here's the relevant part of the YMF262:

The attachment ymf262.jpg is no longer available

The programming of the eeprom is no issue with gerwin's driver / eeprom package from vogonsdrivers:
http://vogonsdrivers.com/getfile.php?fileid=9 … &menustate=41,0

Try and find the resource.exe and program it with e.g. a customized pnp37.ini
If necessary, I could try and find the one I programmed mine with (which is just only routing analog audio from the YAC and amp into the CS, though).

Hope this answers your questions?

Perfect! this is exactly what I need. thank you so much for this! I figured there was a way to select between the two. 😀
If you have the .ini file you used I would love to take a look at it just so I have something to compare to but if you don't that's fine too.
If I have any additional questions I will let you know but this is a great start.

Reply 3 of 34, by MJay99

User metadata
Rank Member
Rank
Member

Of course, here is the visual diff (after removing other testing parts, I actually found I didn't really change much in the end):

The attachment pnp37.ini.diff.jpg is no longer available

This is using the PNP37.ini from the 'crystal_isa_audio_drivers.zip\EEPROM Resource\original' subdirectory of the above zip-file.

Again, there might be other (or better) ways to attach the YMF262, but this is the way I managed to make it work for me back then 😀

By the way, since JazeFox was really nice to implement it: with unisound's /XOFe and /XOFi you can now change between the internal CrystalFM and external OPL, without needing to reflash the default or changing it by other means.

Oh, and in this post, 640K!enough was really nice to create an easy switching tool, too:
Re: Adding an external YMF289 to the CS4237B.

Actually, that thread above also hints on the other way to make the OPL work and also how to configure that in the pnp37.ini - I did go with the DAC and Amp, though, as I'm mixing it with another input into the Line-In of the Crystal.

Reply 4 of 34, by snipe3687

User metadata
Rank Member
Rank
Member
MJay99 wrote on 2024-07-01, 19:24:
Of course, here is the visual diff (after removing other testing parts, I actually found I didn't really change much in the end) […]
Show full quote

Of course, here is the visual diff (after removing other testing parts, I actually found I didn't really change much in the end):

The attachment pnp37.ini.diff.jpg is no longer available

This is using the PNP37.ini from the 'crystal_isa_audio_drivers.zip\EEPROM Resource\original' subdirectory of the above zip-file.

Again, there might be other (or better) ways to attach the YMF262, but this is the way I managed to make it work for me back then 😀

By the way, since JazeFox was really nice to implement it: with unisound's /XOFe and /XOFi you can now change between the internal CrystalFM and external OPL, without needing to reflash the default or changing it by other means.

Oh, and in this post, 640K!enough was really nice to create an easy switching tool, too:
Re: Adding an external YMF289 to the CS4237B.

Actually, that thread above also hints on the other way to make the OPL work and also how to configure that in the pnp37.ini - I did go with the DAC and Amp, though, as I'm mixing it with another input into the Line-In of the Crystal.

This is very helpful thank you. If I'm understanding this right, the EEPROM is always read by default unless the CS line for the YMF262 is pulled up which would appear is done through the code provided.
I will have to play around with this and see what trouble I can get myself into.

Thanks again!

Reply 5 of 34, by snipe3687

User metadata
Rank Member
Rank
Member

Follow up question:
How can I route both the line-in port and the wavetable into the LLINE and RLINE port on the CS4237? I can't connect them together directly I'm assuming. do I need a DAC or something? sorry, I'm still new at this!

Reply 6 of 34, by MJay99

User metadata
Rank Member
Rank
Member

There might be better and maybe more HiFi ways, but this worked more than well enough for me:

The attachment TL082.jpg is no longer available

If you run across another solution, please don't consider this a gold-standard idea and I'm always interested in other/ better ways.
And maybe there'll be others who want to chime in on this, too.

Reply 7 of 34, by snipe3687

User metadata
Rank Member
Rank
Member
MJay99 wrote on 2024-07-03, 18:33:
There might be better and maybe more HiFi ways, but this worked more than well enough for me: […]
Show full quote

There might be better and maybe more HiFi ways, but this worked more than well enough for me:

The attachment TL082.jpg is no longer available

If you run across another solution, please don't consider this a gold-standard idea and I'm always interested in other/ better ways.
And maybe there'll be others who want to chime in on this, too.

interesting so would you run the left line through the other side of the IC?

Reply 8 of 34, by MJay99

User metadata
Rank Member
Rank
Member
snipe3687 wrote on 2024-07-03, 21:01:

interesting so would you run the left line through the other side of the IC?

Exactly that, it's identical, just with labels for the left channel.
It's not used for amplification here (though it'd be possible by adapting the feedback resistor), it's just only mixing the signals.

And since the OPL and WT can't really be used at the same time, unless someone wants to create music soup, I didn't see much need for selective muting, etc.
If your WT would be noisy though, it will inject it into the output and can't then be selectively muted.
But that wasn't much of a concern to me either, since my WT-devices aren't an issue.

But if muting, volume adaption or the 'lowest-ever-noise-floor' is s something you're looking for, it might need more logic (and possibly a driver).
There's also no selective variable amplification for the inputs here - you could theoretically connect one of them to AUX and then be able to selectively influence the volume and muting with e.g. unisound, but as far as I remember, that's usually meant to be the regular Line-In (which is what I used it for).

Reply 9 of 34, by snipe3687

User metadata
Rank Member
Rank
Member
MJay99 wrote on 2024-07-03, 22:00:
Exactly that, it's identical, just with labels for the left channel. It's not used for amplification here (though it'd be possi […]
Show full quote
snipe3687 wrote on 2024-07-03, 21:01:

interesting so would you run the left line through the other side of the IC?

Exactly that, it's identical, just with labels for the left channel.
It's not used for amplification here (though it'd be possible by adapting the feedback resistor), it's just only mixing the signals.

And since the OPL and WT can't really be used at the same time, unless someone wants to create music soup, I didn't see much need for selective muting, etc.
If your WT would be noisy though, it will inject it into the output and can't then be selectively muted.
But that wasn't much of a concern to me either, since my WT-devices aren't an issue.

But if muting, volume adaption or the 'lowest-ever-noise-floor' is s something you're looking for, it might need more logic (and possibly a driver).
There's also no selective variable amplification for the inputs here - you could theoretically connect one of them to AUX and then be able to selectively influence the volume and muting with e.g. unisound, but as far as I remember, that's usually meant to be the regular Line-In (which is what I used it for).

Would you mind sharing your entire schematic by chance? It helps me to understand how things should work together. I appreciate your help so far!

Reply 10 of 34, by MJay99

User metadata
Rank Member
Rank
Member

I actually thought to share it maybe some 2.5 years ago, but always found little things to improve or change (mostly due to parts availabilty) and then also saw marmes' and keropi's Orpheus II project, which I really didn't want to step on, as it's pretty much the same Interwave / CS4237B / OPL amalgamation (without the PCMIDI and maybe some little details, though).

Meanwhile, it's actually even gone to a PicoGUS / CS4237B / OPL variant also, after seeing that the Interwave supply is slowly drying up. But, that's another project I really don'want to step on, too.

As for the interwave version: when marmes and keropi are done with it for good, I guess I could put it out there (unless they decide to publish their surely even better works). Till then I can always help with some details, if necessary (and as long as I still remember them). Oh, and there is also Elvind's LLamablaster that might be published at some point: The LlamaBlaster

Reply 11 of 34, by snipe3687

User metadata
Rank Member
Rank
Member
MJay99 wrote on 2024-07-04, 18:20:

I actually thought to share it maybe some 2.5 years ago, but always found little things to improve or change (mostly due to parts availabilty) and then also saw marmes' and keropi's Orpheus II project, which I really didn't want to step on, as it's pretty much the same Interwave / CS4237B / OPL amalgamation (without the PCMIDI and maybe some little details, though).

Meanwhile, it's actually even gone to a PicoGUS / CS4237B / OPL variant also, after seeing that the Interwave supply is slowly drying up. But, that's another project I really don'want to step on, too.

As for the interwave version: when marmes and keropi are done with it for good, I guess I could put it out there (unless they decide to publish their surely even better works). Till then I can always help with some details, if necessary (and as long as I still remember them). Oh, and there is also Elvind's LLamablaster that might be published at some point: The LlamaBlaster

The LlamaBlaster is one of the one's I've been watching carefully. I love all his projects and that was kind of my inspiration for making my own since I had all the extra CS chips because of his other projects I built.

Do you think the PicoGus is mature enough to be considered a completely adequate replacement for the Interwave chip cards like the Orpheus and the later Ultrasounds?
I realize the Interwave itself was a replacement for the original GF1 so maybe its just a matter of having a good microcontroller to run the code on. I built a few PicoGus cards, but I seem to have problems with the one's I built myself, go figure.

Reply 12 of 34, by snipe3687

User metadata
Rank Member
Rank
Member

Ok so I’m going to bump this topic a bit. I built this project finally but I’m having a slight issue. When I go to program the eeprom it sees the sound chip on 0x120 but when I go to initiate the programming using resource.exe it says “no eeprom found” what am I missing? I’ve been able to program them in the past the only difference is the OPL3 is on the SDA and SCL lines as well. May I just need to check my soldering?

Reply 13 of 34, by MJay99

User metadata
Rank Member
Rank
Member

Did you try force the control address in resource.exe?

As far as I remember, it always worked by simply invoking resource.exe, pressing Alt+A and using the default address.

Just had a quick look on how it looked on my side: Do you have pull-ups to VCC on SDA / SCL? Connecting SDA & SCL to both the eeprom and OPL is correct.

Reply 14 of 34, by snipe3687

User metadata
Rank Member
Rank
Member

I’m attaching parts of my schematic.
I think I did it right so hopefully it’s me doing something silly on my end!

Reply 15 of 34, by MJay99

User metadata
Rank Member
Rank
Member

Which model is your EEPROM? The 24LC16 I was using does have a fundamentally different pinout (e.g. pin 5 being SDA, pin 6 being SCL):

The attachment 24lc16.jpg is no longer available

Edit: The rest looks identical to mine.

Reply 16 of 34, by snipe3687

User metadata
Rank Member
Rank
Member

welp....I feel dumb. I had it wrong on the schematic. Funny because I just got new symbols for the EEPROM because I couldn't find my old ones as I've been using SOT-23-3 EEPROMs on my other projects which weren't large enough for the firmware.
It's working now however, when I switch to the OPL3 module I get sound FX in Duke3D setup but when I go to test music it says "could not detect FM chip. clearly, if it's playing sound FX then it CAN detect something but for whatever reason it's not fully working. any thoughts on that?

Reply 17 of 34, by MJay99

User metadata
Rank Member
Rank
Member

No worries, these things happen 😀 Were you able you rewire and program the eeprom?
If it's running without at the moment, it'll work to some extend in a default state and can and needs to be setup by the driver, if I remember correctly.

Just curious: are other games also not working with FM and OPL, like Doom, Descent, etc., or is it just an issue in Duke3D?

Reply 18 of 34, by snipe3687

User metadata
Rank Member
Rank
Member
MJay99 wrote on 2024-10-07, 08:13:

No worries, these things happen 😀 Were you able you rewire and program the eeprom?
If it's running without at the moment, it'll work to some extend in a default state and can and needs to be setup by the driver, if I remember correctly.

Just curious: are other games also not working with FM and OPL, like Doom, Descent, etc., or is it just an issue in Duke3D?

yep, got it rewired and programmed. I've only tested duke3d so far, I'll try a few others when I get home later. It just seemed weird since it worked fine with the CS4237.
Every time I think I got everything on my project perfect something like this happens! 🤣.

Reply 19 of 34, by snipe3687

User metadata
Rank Member
Rank
Member
MJay99 wrote on 2024-10-07, 08:13:

No worries, these things happen 😀 Were you able you rewire and program the eeprom?
If it's running without at the moment, it'll work to some extend in a default state and can and needs to be setup by the driver, if I remember correctly.

Just curious: are other games also not working with FM and OPL, like Doom, Descent, etc., or is it just an issue in Duke3D?

ok follow up. tried doom with both the CS4237 and OPL3 chips. sound FX and music both work with the CS but only sound with the OPL3. what could possibly be different between the 2?