VOGONS


First post, by 1337xp

User metadata
Rank Newbie
Rank
Newbie

Sorry if this comes up as a dumb or obvious question, but I'm somewhat curious as to whether it'd be possible to use nearly all the features of the OPNA (YM2608) on a IBM PC and compats.
Also I'm looking if I should implement DMA for such a chip, and how hard it would be to implement if needed.
Any feedback is appreciated. 😀
Some context:

This is a project of mine to bring the OPNA hardware to the PC, if not done so already. (Even if it is, I'll still continue the project). Right now I'm looking to design an ISA card based around this chip.
Chip itself has some nice features:

A built in YM2203 with 3 4op FM channels and 3 SSG channels
A built in YM2149 (AY-3-8910 variant) with 3 square wave channels
8 bit ADPCM, with sampling rates ranging from 2k to 16kHz
and a Rhythm Sound Source (according to Yamaha) that has 6 ADPCM percussion channels.

Datasheet is included in the Attachments section.
Sorry if I posted this in the wrong section. 😐

Attachments

Reply 1 of 13, by carlostex

User metadata
Rank l33t
Rank
l33t

I don't know the chip, but it should be possible. You need to be careful how you expose all the I/O into the ISA bus, check if something like the 240 to 25F range is enough for all registers, and if you need IRQ and DMA for the PCM stuff.

The big question here is that you need software development to support the card. Otherwise its useless. You can always start with developing AIL/MSS drivers which would open up immediately good game support. But all this is a gargantuous amount of work.

Reply 2 of 13, by 1337xp

User metadata
Rank Newbie
Rank
Newbie

Ahh, I see. That's good, at least I can get started on the designs. Well, I'm gonna use buffers for almost everything anyway, sooo. About the registers, I need to check the manual for that, haven't read the entire thing yet. 😀

About the software dev. I'm looking to make a tracker for it (with some help from a friend of course) and about the drivers... I don't mind how long it would take, but I do wonder what sort of games?

Reply 3 of 13, by SuperDeadite

User metadata
Rank Member
Rank
Member

Biggest issue with 2608 is that external mixer is required to properly set the SSG volume.

If you want to go all out YM2610B would be the better choice, but it's getting difficult to get legit chips.

Best use for boards like these is vgmplay.

Modules: CM-64, CM-500, SC-55MkII, SC-88 Pro, SY22, TG100, MU2000EX, PLG100-SG, PLG150-DR, PLG150-AN, SG01k, NS5R, GZ-50M, SN-U110-07, SN-U110-10, Pocket Studio 5, DreamBlaster S2, X2, McFly, E-Wave, QWave, CrystalBlaster C2

Reply 5 of 13, by SuperDeadite

User metadata
Rank Member
Rank
Member

Most 2608's tend to be legit. Real 2610Bs however are getting quite rare. Most of the chips on ebay are normal 2610's with a B painted on.

But, 2610B is one hell of a chip. You can use Grauw's VGMTransmute tool to convert 2608 data to 2610B. 90% of the music will sound identical. A 2612 to 2610B converter is also going to be released soon, incredibly clean sound.

2608 on 2610B:
https://youtu.be/ChdTPAcFnLU
2612on 2610B:
https://youtu.be/uOE9SgImH5k

Modules: CM-64, CM-500, SC-55MkII, SC-88 Pro, SY22, TG100, MU2000EX, PLG100-SG, PLG150-DR, PLG150-AN, SG01k, NS5R, GZ-50M, SN-U110-07, SN-U110-10, Pocket Studio 5, DreamBlaster S2, X2, McFly, E-Wave, QWave, CrystalBlaster C2

Reply 6 of 13, by 1337xp

User metadata
Rank Newbie
Rank
Newbie

Interesting... I'll see what chip works for me. If I end up using the 2608, I might do a dual chip one (to compensate for the lack of FM channels), if that's not super hard to implement of course...

If I were to use the 2610B, would I just put the ADPCM drum samples into ROM or something? Doesn't seem extremely different.

Reply 7 of 13, by SuperDeadite

User metadata
Rank Member
Rank
Member

2608 can address up to 256kb of sample memory. 2610B can address up 2x16MBs (one bank for each type of ADPCM). 2608's percussion samples have long been dumped, vgmtransmute just converts them to standard adpcm sample data.

As for FM channels, 2608 and 2610B both have 6 and are practically identical. The normal 2610 only has 4.

Modules: CM-64, CM-500, SC-55MkII, SC-88 Pro, SY22, TG100, MU2000EX, PLG100-SG, PLG150-DR, PLG150-AN, SG01k, NS5R, GZ-50M, SN-U110-07, SN-U110-10, Pocket Studio 5, DreamBlaster S2, X2, McFly, E-Wave, QWave, CrystalBlaster C2

Reply 8 of 13, by Error 0x7CF

User metadata
Rank Member
Rank
Member

It should be perfectly possible to get the YM2608 on an ISA bus, actually almost trivial as long as it's an 8-bit card. Mostly you'll want to find four consecutive addresses in PC I/O space that isn't going to already have something else mapped to it, then check all the upper bits but two for a match to get your chip select signal, then use the two bottom bits as your A0 and A1 inputs to the chip. The decoder match is probably going to produce a logic high, so you'll want to feed that into a NOT gate, and use that as your YM2608 chip-select line. You'll want to NOR (functionally an active-low AND) together the address-decode-match-chip-select line with the ISA IOR and IOW lines, then use the IOR and IOW as your RD and WR signals. (active-low inputs CS and IOW NORed to active-low output WR, active-low inputs CS and IOR NORed to active-low output RD)

You mentioned DMA, but that's completely unnecessary for a chip like the YM2608. You could potentially have samples to upload, but on the PC, i8237 DMA tends to be slower than programmed I/O, and has a large number of restrictions. (DMA copy length, where can and can't be gone from and to, low number of DMA channels, etc).

You can do ROM or RAM for samples, I think you can upload samples to the sample RAM by interacting with the registers of the 2608 itself. If not, I don't know why it would have a WE pin intended to go from the chip itself to a DRAM. I'm not familiar enough with the 2608 or the other Yamaha chips with sample playback to be able to tell you whether you'll need some way to tell the CPU to delay writes if the chip is refreshing its DRAM or if it gets access contention while playing a sample or something.

You'll want to have your own 8MHz crystal on the board to clock the chip, ISA won't provide any consistent clock-source (besides a 14.38Mhz one, which some boards don't implement...)

If you feel like 6 FM channels, 3 AY-3-8910 channels, some random percussion, and one ADPCM isn't enough, you can always add another chip. 🙃

Old precedes antique.

Reply 9 of 13, by AppleSauce

User metadata
Rank Member
Rank
Member
carlostex wrote on 2022-04-30, 07:12:

I don't know the chip, but it should be possible. You need to be careful how you expose all the I/O into the ISA bus, check if something like the 240 to 25F range is enough for all registers, and if you need IRQ and DMA for the PCM stuff.

The big question here is that you need software development to support the card. Otherwise its useless. You can always start with developing AIL/MSS drivers which would open up immediately good game support. But all this is a gargantuous amount of work.

Didn't the NEC-PC98 use this chip?
Perhaps considering the similarities , but not total sameness (PC-98 using intel cpus and a variant of DOS but being a bit different design and software wise)
Maybe someone could reverse engineer some PC-98 DOS/V games to run on regular ibm compatibles with bog standard dos and to make use of this chip?

http://radioc.web.fc2.com/column/pc98bas/pc98 … 2D9801%2D26K%22.

Here's a pic of the expansion board of it helps

i-img1200x796-1651192024eikaxk269911.jpg
Filename
i-img1200x796-1651192024eikaxk269911.jpg
File size
175.82 KiB
Views
543 views
File license
Public domain

Reply 10 of 13, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

Schematic and PLD code for my YM2203 card are on my site (march 16). YM2608 has the same audio output and bus interface (except it can take a higher clock frequency, so 14MHz divided by two could be used instead of dividing by four, 22V10 could probably replace the ATF750). The big differences are that YM2608 also supports audio INPUT, and external memory. A couple 4-bit-wide DRAM chips would probably make for the simplest memory interface, you'd just need something to latch the address bits during data transfer. Or a 44-pin PLD and an SRAM chip.

edit: just remembered that there is a different DAC chip (Y3012) for stereo, so YM2608 would use that instead of the Y3014 mono one

Last edited by bakemono on 2022-05-02, 08:02. Edited 1 time in total.

yet another retro game on itch: https://90soft90.itch.io/super-wild-war-22

Reply 11 of 13, by 1337xp

User metadata
Rank Newbie
Rank
Newbie

Holy crap, tons of information...

SuperDeadite, I see. I think for now I'd go with the YM2608, since the PC-98 soundcard (also mentioned by AppleSauce) used that exact chip... I might make a future design with the YM2610B, though.

0x7CF, that's pretty cool... Thanks for the information. And about the DMA, yep. I figured that for just a chip like this it'd be unnecessary work. I think the WE pin might be for ROM, though I cannot confirm...
True that, one YM2608 already seems enough 😀. For a second I thought that it only had 3 FM channels..

AppleSauce, holy crap... That was my intention too, to let people be able to somehow port PC-98 games to the IBM PC in some way. (Specifically the Touhou games.) Interestingly enough, I think a bog standard 486 with a normal-ish video card might be able to technically run PC-98 games (when ported to the PC of course)

Bakemono, interesting... I think I might go with some 74 series logic instead of the PLD, if possible (for the SRAM system).

Reply 12 of 13, by cuba200611

User metadata
Rank Newbie
Rank
Newbie

On PC-98s, the OPN(A) on sound boards defaults to INT5 (which is IRQ 12) and I/O port 188h. PC-98s aren't IBM compatible though (with many things completely different).

Now IRQ 12 on IBMs is used by the PS/2 mouse port if there is one, while I couldn't find anything that uses I/O port 188h on IBMs.

Reply 13 of 13, by Error 0x7CF

User metadata
Rank Member
Rank
Member
cuba200611 wrote on 2022-05-03, 01:47:

the OPN(A) on sound boards defaults to INT5 (which is IRQ 12)

Does the PC98 actually use the sound card interrupt? A lot of the times Yamaha chips are used, even if the interrupt is wired, it goes ignored.

Also, what is meant by "INT5" in this case? The fifth interrupt pin on the second controller (irq12)? If not, then IRQ 5 is an IRQ that is often free in PC systems unless a LPT2 is in use or there's another sound card using it.

afaik 0x188-0x18f should be fine for the 8 addresses you need for the ym2608's 3 address lines.

Old precedes antique.