@badwolf If it comes about audio part I didn't invent it. I've just saw existing design Resound OPL3 card schematics and adapted everything as best I could. Maybe I've misinterpreted some parts of drawings (they look ambiguous especially in decoupling caps parts) and/or there were some parts fixing additional issues on ISA interface, which will not apply to ST cartridges, like +12V/-12V power rails.
They have used filmic capacitors to reduce noise on the board, there's no electrolitic caps (I probably will add them, but couldn't find proper footprint in KiCad). Some Sound Blasters had problems with noise on output and it seems that this card is quitest of them all. Here is
link and
schematics (there's no pcb project I could look on). Hard to tell how many layers they have used. I like this form factor and if I could achieve similar result for ST cartridge it would be great. Reset circuit and clock generation I think I've took from
8-bit opl3 cartridge by TOri(Yamari, which can read/write opl3 state btw) or OPL2 sound board, I don't remember.
So I've taken audio parts (OPL3 Resound 2 channel mode, there is also posibility to make 4 channel / surround output it's based on opl3 documentation by Yamaha, but for some reason no one has picked up this design in pc sound blaster cards, it would be cool to create this variant too btw) and I've added interface which is my 'invention' after lecture of old articles.
And why latches? Well I've done some research and I've looked through those old articles
1 2 and I've seen some videos about latching address lines and this looked like something I could use. I've ditched reading from opl3, because it wasn't needed in all opl3 devices I've programmed previously.
Need for this latch was purely to save state of adress lines to have certain pattern set on OPL3 data / address lines, after setting this I need to (assert /WR low or high OPL3 for certain time to set either address to which I'm writing data and next the value). Timings are different for data and address setting and depend on m68k cpu speed (because point of reference is always opl3 clock, OPL2 has slower clock and writes take more time for instance, which is not true on opl3). There are also some different wait states after writing opl3 address and opl3 data (we need to hold /WR for certain number of opl cycles). I also wanted to have an option to add second opl3 chip, that's why on second latch there are some unconnected signals, one is reserved for selecting opl3 unit (0/1) (like in
opl3 duo).
Regarding your NAND remark I need some time to digest your idea, if it could remove need of latches it would great (one part out, less space). I've considered use of NAND gate, but for different purpose i.e using byte/word read to set /WR to high/low by wiring output of the NAND gate to UDS/LDS lines, so if UDS/LDS would be low(16 bit read attempt), then it we would set WR to low, in other cases (like byte read) it would be set to high. So, sequence would be like WR high(on init), set data/address bits, set /WR to LOW state, set WR to HIGH state (we usualy set opl3 address, next opl3 data). I'm not very sure if it would work the way I think (need to make reality check with logic analyser I guess). But maybe existing solution will be good enough as long it will not trigger address / bus error on m68k cpu.
Here is sample, which TOri has sent me (with A0 taken from LDS (,which is active low) and is our /WR strobe):
We want to set $01 adress register YM262 (A0=0, A1=0) - LSI TEST (Array 0)
1. We read back from #$FA0101 to d0, this will set 01 - data, 01 - adress (H - /WR) on latches
2. We turn off /WR by clearing /WR to 0 - low state
3. (we idling if needed)
4. We turn on /WR by setting /WR to 1 - high state
We need to repeat similar procedure to write to previously selected OPL3 address some data..
I don't have existing solution yet (there's no working drivers yet, but I've got some inspiration from OPL2 cartridge code made by Insane/TSCC some years ago, but I haven't seen no cartridge or schematics). After fiddling with several devices that use OPL3 chip (centronics/usb/spi) I came to conclusion that there should be something simpler and quicker way to write to OPL3 (from all of them OPL3LPT was the best, but printer port handling is awkward and there's missing signal on STs, which cripples OPL3 to OPL2, the only plus are reduced wait states).
Keeping separate planes for audio and rest is a good point, I'm aware of this issue, but I'm not sure if I can execute it properly. Maybe with some guidance I could make version with ground plane separation. I also didn't know that placing small elements on one side is cheaper when manufacturing, currently I'm ready to solder everything by hand (at least for first prototypes). I will be certainly planning next steps, when I will have working prototype and drivers (which should be much easiest than for other devices, of course if machine will be alive after inserting carrtridge :D). And I would like to make proper cases and labels for it to make it more like 'real thing'. I'm not a fan of dangling pcbs from cartridge port.
Thanks for pointing out your edge connector and eev links, I will check everything out.