Covox Sound Master Reverse Engineering / Replica

Discussion about old sound cards, MIDI devices and sound related accessories.

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-11-09 @ 00:12

While there is no more answers for my questions above I almost finished PCB layout.

Here are some steps of refining:

AY_2018-11-09_01.png
Covox Sound Master: PCB refinement 1
AY_2018-11-09_02.png
Covox Sound Master: PCB refinement 2
AY_2018-11-09_03.png
Covox Sound Master: PCB refinement 3

- refined layout;
- added power bypass capacitor for AY;
- oriented all electrolytic capacitors in the same way (for consistency and ease of assembly);
- replaced LM386 power amplifiers with a good quality standard stereo opamp output buffer for line out;
- replaced "5 isolated resistors" resistor network and two separate 10k resistors with two "7 bussed resistors" networks, the same one that are used for joystick inputs (decreased BOM list, more easy assembly).

Basically, layout is done. Will it work flawlessly? Who knows, prototype production run will tell. I think I'll make some more iterations of refining and checking the layout and then I'll order first prototypes. :roll:

The last thing to do - to get working firmware for the GAL chip. I'm curious to know about progress at that.
If nothing helps, I think I can try to "read" GAL my ways. Like, attaching logic analyzer to control outputs of GAL and some address/data lines and run some games that support this card and get information about what ports are each of the components are, how GAL controlls AY in regards of ports and read/write operations.
So, if there is low or no progress on GAL reading, I want to offer moturimi1 an option to send GAL to me to try it. Obviously I can not do anything more with this card, because it will not work without the GAL.
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-11-09 @ 21:46

I've got some help from the programmer called Cerenas.
Here are some hooked DOSBox dumps with some games that support CSM:

Code: Select all
DOSBox version 0.74-2-vs2017
Copyright 2002-2018 DOSBox Team, published under GNU GPL.
---
SDL_Init: Starting up with SDL windib video driver.
          Try to update your video card and directx drivers!
CONFIG:Loading primary settings from config file dosbox.conf
Maximum memory size is 63 MB
Memory sizes above 31 MB are NOT recommended.
Stick with the default values unless you are absolutely certain.
MIDI:Opened device:win32
[CSM] Covox Sound Master hooks installed
[CSM] Write on port 223h, len 1, val 0h
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val adh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val fh
[CSM] Write on port 221h, len 1, val e0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val ffh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 1h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 2h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 3h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 4h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 5h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 6h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 8h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 9h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val ah
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val bh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val ch
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val bdh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 1h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 2h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 3h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 4h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 5h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 6h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 8h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 9h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val ah
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val fh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val ffh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val adh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val aah
[CSM] Read on port 221h, len 1
[CSM] Write on port 222h, len 1, val 88h
[CSM] Write on port 222h, len 1, val 88h
[CSM] Write on port 222h, len 1, val 8ah
[CSM] Write on port 222h, len 1, val 86h
[CSM] Write on port 222h, len 1, val 8ch
[CSM] Write on port 222h, len 1, val 90h
...


Code: Select all
[CSM] Covox Sound Master hooks installed
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val ffh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 22h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 44h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 66h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 223h, len 1, val 0h
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val a0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val fh
[CSM] Write on port 221h, len 1, val e0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val ffh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 1h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 2h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 3h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 4h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 5h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 6h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 8h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 9h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val ah
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val bh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val ch
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val b0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 1h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 2h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 3h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 4h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 5h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 6h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 8h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 9h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val ah
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val fh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val ffh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val a0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 223h, len 1, val 0h
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val a0h
[CSM] Read on port 221h, len 1
...


Code: Select all
[CSM] Write on port 221h, len 1, val 0h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 2h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 3h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 4h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 5h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 6h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 7h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 8h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 9h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val ah
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val bh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val ch
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val dh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val eh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val fh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 10h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 11h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 12h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 13h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 14h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 15h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 16h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 17h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 18h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 19h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1ah
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1bh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1ch
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1dh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1eh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1fh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1ch
[CSM] Write on port 220h, len 1, val 2h
[CSM] Write on port 221h, len 1, val 1ch
[CSM] Write on port 220h, len 1, val 1h
[CSM] Write on port 223h, len 1, val 0h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 2h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 3h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 4h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 5h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 6h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 7h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 8h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 9h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val ah
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val bh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val ch
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val dh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val eh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val fh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 10h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 11h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 12h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 13h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 14h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 15h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 16h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 17h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 18h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 19h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1ah
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1bh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1ch
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1dh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1eh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1fh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1ch
[CSM] Write on port 222h, len 1, val 2h
[CSM] Write on port 223h, len 1, val 1ch
[CSM] Write on port 222h, len 1, val 1h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 1h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 2h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 3h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 4h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 5h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 6h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 7h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 8h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 9h
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val ah
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val bh
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val ch
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val dh
...

There is some very interesting stuff. :cool:

A little pause for clarification. :exclamation:
There are four devices on the board that are connected to ISA data bus:
- AY chip
- 2x74HC365 (joystick ports)
- 74HC373 (PCM DAC)
Nothing else has access to it, even GAL does not.

Address bus pre-decoding is done by 74HC138 then GAL takes over and does all the rest of address decoding and also it knows type of access (read or write). After address decoding GAL has control over every device on the board:
- 2 pins to control AY via BDIR and BC1 (setting mode of operation: offline, write register address, write data to a register, read data from a register);
- 2 pins control each of the 74HC365s (those can only dump data to the ISA bus by read command, neither AY or GAL can read joystick ports or know about state change);
- 1 pin to control 74HC373 (it can not be read, only writes from ISA data bus are possible);
- 2 pins to control 74HC74 that after some mess outputs IRQ to the ISA.

Back to the logs.
First of all, there is frequent access to ports 0x220 and 0x221. 0x220 is the base address, so offsets +0x00 and +0x01 are frequently used.
+0x00 is always being written, never read.
+0x01 is being read or written

Reminds of anything?
AY_modes.png
AY PSG modes of operation

If we'll look one step forward, we'll se that four MSBs in write operations to +0x00 are almost always "0".
AY_addresses.png
AY PSG address bits

Yep, seems like write-only operations at +0x00 are writing AY address number with BDIR="1", BC1="1".
For now let's assume that +0x01 handles data writes and reads for AY with corresponding BDIR and BC1 produced by GAL.

Let's try to "disassemble" this log:
Code: Select all
Example:
// [AY] Select register D (envelope shape)
[CSM] Write on port 220h, len 1, val dh

// [AY] Read envelope shape (didn't find the default state of the register yet)
[CSM] Read on port 221h, len 1

// [AY] Repeat of register D selection (it's not necessary, address stays the same, probably just a way that procedure accessing AY in software works)
[CSM] Write on port 220h, len 1, val dh

// [AY] Write 0xAD: "D" - select rising and holding amplitude.
[CSM] Write on port 221h, len 1, val adh

// [AY] Read from the same register (for verification).
[CSM] Read on port 221h, len 1

// [AY] Select register E (data for I/O port A, which has two 4-bit DACs connected, that contol analog amplifier).
[CSM] Write on port 220h, len 1, val eh

// [AY] Write 0x00: clear both DACs.
[CSM] Write on port 221h, len 1, val 0h

// [AY] Read from the same register (for verification).
[CSM] Read on port 221h, len 1

// [AY] Select register F (data for I/O port B, that controls enabling IRQ/DRQ and switching to mono).
[CSM] Write on port 220h, len 1, val fh

// [AY] Write 0xE0: mono is disabled, IRQ is disabled, DRQ is disabled, "1" on pin 6 of the GAL.
[CSM] Write on port 221h, len 1, val e0h

// [AY] Read from the same register (for verification).
[CSM] Read on port 221h, len 1

// [AY] Select register 7 (I/O ports and mixer settings).
[CSM] Write on port 220h, len 1, val 7h

// [AY] Write 0xFF: set I/O port A and I/O port B as outputs, turn off sound for all channels.
[CSM] Write on port 221h, len 1, val ffh

// [AY] Read from the same register (for verification).
[CSM] Read on port 221h, len 1

// [AY] Repeat clearing two 4-bit DACs.
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1

// [AY] Clear registers 0...D: reset all frequencies and levels, set decaying envelope, enable output of tone and noise on all channels, set I/O port A and I/O port B as inputs.
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val 1h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
...
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1

// [AY] Set rising and holding envelope.
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val bdh
[CSM] Read on port 221h, len 1

// [AY] Repeat clear of registers 0...D.
[CSM] Write on port 220h, len 1, val 0h
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
...
[CSM] Write on port 220h, len 1, val fh
[CSM] Write on port 221h, len 1, val 0h
[CSM] Read on port 221h, len 1
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1

// [AY] Set rising and holding envelope.
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val dh
[CSM] Read on port 221h, len 1

// [AY] Set I/O port A and I/O port B as outputs, turn off sound for all channels.
[CSM] Write on port 220h, len 1, val 7h
[CSM] Write on port 221h, len 1, val ffh
[CSM] Read on port 221h, len 1

// [AY] Read (verification?) envelope shape.
[CSM] Write on port 220h, len 1, val dh
[CSM] Read on port 221h, len 1

// [AY] Repeat setting rising and holding envelope.
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val adh
[CSM] Read on port 221h, len 1

// [AY] Output value 0x0A (170) on each of 4-bit DACs: set 66% from maximum level.
[CSM] Write on port 220h, len 1, val eh
[CSM] Write on port 221h, len 1, val aah
[CSM] Read on port 221h, len 1

Next in the same log there is something else interesting:
Code: Select all
...
[CSM] Write on port 222h, len 1, val 90h
[CSM] Write on port 222h, len 1, val 84h
[CSM] Write on port 222h, len 1, val 7eh
[CSM] Write on port 222h, len 1, val 80h
[CSM] Write on port 222h, len 1, val 82h
[CSM] Write on port 222h, len 1, val 82h
[CSM] Write on port 222h, len 1, val 7ah
[CSM] Write on port 222h, len 1, val 7eh
[CSM] Write on port 222h, len 1, val 78h
[CSM] Write on port 222h, len 1, val 76h
[CSM] Write on port 222h, len 1, val 70h
[CSM] Write on port 222h, len 1, val 86h
[CSM] Write on port 222h, len 1, val 74h
[CSM] Write on port 222h, len 1, val 80h
[CSM] Write on port 222h, len 1, val 78h
[CSM] Write on port 222h, len 1, val 74h
[CSM] Write on port 222h, len 1, val 90h
[CSM] Write on port 222h, len 1, val 8eh
[CSM] Write on port 222h, len 1, val 7ah
[CSM] Write on port 222h, len 1, val 8ah
[CSM] Write on port 222h, len 1, val 6eh
[CSM] Write on port 222h, len 1, val 88h
[CSM] Write on port 222h, len 1, val 94h
[CSM] Write on port 222h, len 1, val 80h
[CSM] Write on port 222h, len 1, val 7eh
[CSM] Write on port 222h, len 1, val 7ch
[CSM] Write on port 222h, len 1, val 7ch
[CSM] Write on port 222h, len 1, val 70h
[CSM] Write on port 222h, len 1, val 70h
[CSM] Write on port 222h, len 1, val 8ah
[CSM] Write on port 222h, len 1, val 8ah
[CSM] Write on port 222h, len 1, val 6eh
[CSM] Write on port 222h, len 1, val 84h
[CSM] Write on port 222h, len 1, val 8ch
[CSM] Write on port 222h, len 1, val 90h
[CSM] Write on port 222h, len 1, val 9ah
[CSM] Write on port 222h, len 1, val 74h
[CSM] Write on port 222h, len 1, val 6ah
[CSM] Write on port 222h, len 1, val 7ch
[CSM] Write on port 222h, len 1, val 88h
[CSM] Write on port 222h, len 1, val 92h
[CSM] Write on port 222h, len 1, val 92h
[CSM] Write on port 222h, len 1, val 82h
[CSM] Write on port 222h, len 1, val 70h
[CSM] Write on port 222h, len 1, val 66h
[CSM] Write on port 222h, len 1, val 7ah
[CSM] Write on port 222h, len 1, val 8ch
[CSM] Write on port 222h, len 1, val 94h
[CSM] Write on port 222h, len 1, val 82h
[CSM] Write on port 222h, len 1, val 7eh
...

It definitely looks like writes to PCM DAC! Only writes (DAC can not be read), no address presetting, value is oscillating near 0x80 (128) - that's exactly the half of 0...255 span, so the waveform can go equal distance positive (to 255) or negative (to 0).
So, +0x02 seems to be the offset for PCM DAC!

Strangely enough there is one more address being accessed - 0x223. And it is write access. So, that can not be any of the joystick ports.
In two logs it just sometimes is being written with "00" before accessing 0x220:
Code: Select all
[CSM] Write on port 223h, len 1, val 0h

But in another log it is being constantly written with increasing number, interleaving with writing "0x00" to 0x222 (presumably PCM DAC port).
Code: Select all
[CSM]
... Write on port 221h, len 1, val 1ch
[CSM] Write on port 220h, len 1, val 1h
[CSM] Write on port 223h, len 1, val 0h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 1h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 2h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 3h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 4h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 5h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 6h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 7h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 8h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 9h
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val ah
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val bh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val ch
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val dh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val eh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val fh
[CSM] Write on port 222h, len 1, val 0h
[CSM] Write on port 223h, len 1, val 10h
...

Feels like programmer error (?), substituting pair 0x220/0x221 with 0x223/0x222... But who knows? Maybe GAL can switch its decoding functions? :confused:
Either way, after 0x220, 0x221 and 0x222 writes there are no more devices left on the board to write to. So, I don't know what 0x223 is directed to. Can it be mirrored to 0x220?
Also, there is no sign of reading joystick ports, strange.

Nevertheless, I've already started to try replace GAL with standard logic.
LSB address decoder: +1x 74HC138
BDIR decoder: +1x 74HC00
BC1 decoder: +1x 74HC00, +1x 74HC32

Here is my crude schematic:
2018-11-10 00.05.32.jpg
GAL replacement

Here is how it should work:
ay_control.png
AY control decoding
(9.8 KiB) Not downloaded yet

Grey text - not allowed combinations (like, simultaneous decoding of two addresses, simultaneous access for read and write).
Blue - writing address of the register to the AY.
Red - writing data to the register of the AY.
Green - reading data from the register of the AY.

How address decoder works for now:
ay_ports_2018-11-09.png
LSB address decoder
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-11-09 @ 22:19

Addition to my post above, how SMD "GAL replacement" looks like:

AY_SMD_2018-11-09.png
Covox Sound Master: trying SMD

And something else about data being written to AY.
Most of the times register 0x0D is written with MSBs b4...b7 set to "0" as stated in datasheet:
Code: Select all
...
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val dh
...
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val 0h
...

But sometimes..
Code: Select all
...
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val adh
...
[CSM] Write on port 220h, len 1, val dh
[CSM] Write on port 221h, len 1, val bdh
...


Now take a look at this:
AY_comparison.png
Covox Sound Master: AY variants

It is totally software dependent, but while on the original card there is exactly AY8930, some software takes advantages of "expanded mode" of AY8930 by switching banks that are not available on AY-8-8910 and YM2149. Something to be aware of. :exclamation:

And last piece of information about CSM hardware for now, joystick ports pin mapping:
Code: Select all
Mapping is the same for both joystick ports.

Pin 1 ("Up") = DB1
Pin 2 ("Down") = DB0
Pin 3 ("Left") = DB3
Pin 4 ("Right") = DB2
Pin 5 (MB) = DB5
Pin 6 ("Fire"/LB) = DB4
Pin 7 = +5V
Pin 8 = GND
Pin 9 (RB) = NC
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby moturimi1 » 2018-11-10 @ 00:17

Fagear wrote:But for the "original replica" what should be done?
1) Component placement and routing:
a) should be left as close to original as possible (even if it degrades output quality and looks bad);
b) can be re-done in some places to get some improvements;
c) should be fully made from scratch (as an example: Malinov's OPL2 board vs. AdLib).

2) Components on the board:
a) should stay as they were: in same packages, all through-hole;
b) should be replaced with compact SMD analogs where possible.

3) Joystick ports:
a) will be implemented as on the original;
b) will be implemented as standard 15-pin PC joystick port;
c) will be removed.


I vote for 1.b, 2.a, 3. too.
moturimi1
Member
 
Posts: 158
Joined: 2014-6-01 @ 16:45

Re: Covox Sound Master Reverse Engineering / Replica

Postby Great Hierophant » 2018-11-10 @ 15:07

Fagear wrote:But for the "original replica" what should be done?
1) Component placement and routing:
a) should be left as close to original as possible (even if it degrades output quality and looks bad);
b) can be re-done in some places to get some improvements;
c) should be fully made from scratch (as an example: Malinov's OPL2 board vs. AdLib).

2) Components on the board:
a) should stay as they were: in same packages, all through-hole;
b) should be replaced with compact SMD analogs where possible.

3) Joystick ports:
a) will be implemented as on the original;
b) will be implemented as standard 15-pin PC joystick port;
c) will be removed.

Please give some answers like "1.a, 2.b, ...".


Here are my answers :

1.a, depends, 3.a.

1, This is supposed to be a replica, something to show others how the very rare original worked. I have no issue with basic improvements to the sound quality so long as the original "stereo" function is maintained. 2 (GAL vs. discrete) is really immaterial if the functionality can be perfected in discrete SMD logic instead of a GAL if you are offering fully assembled boards :) 3 should be kept, the digital joysticks are part of the function and charm of the original board.

So as I understand this the I/O map as we understand it thus far for this card is :
0x220 is AY control
0x221 is AY register access
0x222 is for DAC writes
0x223 is a mystery or possible alias for 0x222

Can you access the DAC via 0x378, the parallel port data register?

Do we know which addresses allow for joystick reads?

Is the board fully decoded from 0x220-0x23F (or 22F)? Do the registers repeat themselves across that address space?
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2390
Joined: 2003-4-27 @ 08:20

Re: Covox Sound Master Reverse Engineering / Replica

Postby iret » 2018-11-10 @ 19:27

Great Hierophant wrote:So as I understand this the I/O map as we understand it thus far for this card is :
0x220 is AY control
0x221 is AY register access
0x222 is for DAC writes
0x223 is a mystery or possible alias for 0x222

I think, 0x223 is only for triggering something in GAL. Log with many writes in 0x223/0x222 ports may be bug or conflict due to incomplete emulation of CSM.
Joysticks access may require interrupts/DMA emulation, i was too lazy to dig it :blah: .
iret
Newbie
 
Posts: 1
Joined: 2018-11-08 @ 23:29

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-11-11 @ 01:23

Great Hierophant wrote:1, This is supposed to be a replica, something to show others how the very rare original worked. I have no issue with basic improvements to the sound quality so long as the original "stereo" function is maintained.

Well, I went for 1.c variant, but preserving looks of the original board. Original layout was a mess, as I described before.
So, I've took all the same components (except output amplifiers), fixed some errors of the original design, composed all components in a way that looks "close enough" to original and made a new layout from scratch with the same schematics.

Take a look.
Here is SSI-2001 vs. SSI-2001 replica. Board on the right is significantly smaller, it has new features (like +9 V regulator for 8580 and bypass capacitors), but it looks like the original, because it uses the same parts in roughly the same places:
ssi_front_photo.jpg
SSI-2001 vs. replica

Now take a look at current CSM replica project:
IMG_7277.jpg
CSM vs. replica

Is it bad in your opinion and should be done "closer" to original? Or is it "close enough". :confused:

Great Hierophant wrote:2 (GAL vs. discrete) is really immaterial if the functionality can be perfected in discrete SMD logic instead of a GAL if you are offering fully assembled boards :)

Well, full functionality of the GAL is still unknown. Addresses for joysticks are still unknown, what does write to 0x223 do - still unknown. How DMA and IRQ are used and how operate within GAL - unknown. I've just started to "emulate" already known part of the GAL in SMD. It can not be implemented in standard logic yet.

Great Hierophant wrote:So as I understand this the I/O map as we understand it thus far for this card is :
0x220 is AY control
0x221 is AY register access
0x222 is for DAC writes
0x223 is a mystery or possible alias for 0x222

Yep, that's it. Where are joysticks - I don't know yet. How (and what for) to use IRQ and DMA - unknown.

Great Hierophant wrote:Can you access the DAC via 0x378, the parallel port data register?

No way, 74HC138 decodes 0x20 addresses from base that could be 0x220/0x240/0x280/0x2C0. It can not cover 0x370.

Great Hierophant wrote:Is the board fully decoded from 0x220-0x23F (or 22F)? Do the registers repeat themselves across that address space?

It's unknown. I have the card without GAL, so I can not test anything (yet). 74HC138 decodes up to +0x20 from base (0x220 default) and then GAL takes over for LSB address decoding.

Also, I have a corrections about your article.
the bits from the joysticks are read via the AY8930's two 8-bit parallel I/O ports

They are not. I/O ports of AY are used as outputs for 4-bit DACs, controlling IRQ/DMA and switching analog switches. Joystick are read with two 74HC365 buffers by command from GAL.
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby Great Hierophant » 2018-11-11 @ 14:48

I think your current layout is "close enough", I'm definitely on board with one. I like that an AY-3-8910 or YM2149 can be used for the sound chip with only a slight reduction in game support.

I'll fix that joystick error in my article. These Covoxes become more mysterious as we learn more about them.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2390
Joined: 2003-4-27 @ 08:20

Re: Covox Sound Master Reverse Engineering / Replica

Postby awgamer » 2018-11-11 @ 17:28

As far as the innovation replica goes, it's a real downer that they didn't include the innovation logo.
awgamer
Oldbie
 
Posts: 561
Joined: 2014-7-26 @ 07:42

Re: Covox Sound Master Reverse Engineering / Replica

Postby carlostex » 2018-12-02 @ 00:24

I don't really care much about how the layout looks, but rather have a fully functional replica, even improve it for less noise, reduced component count, PCB size, everything that can make it more affordable without sacrificing quality.
User avatar
carlostex
l33t
 
Posts: 2077
Joined: 2010-4-03 @ 21:39
Location: Portugal

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-12-13 @ 23:20

moturimi1 had sent me a *.JED file that was read from the original GAL16V8. It seems like it was not protected. But also after some analysis I've came to conclusion that either this JED file or original GAL chip is corrupted.
СSM_GAL16V8.7z
JED from CSM
(439 Bytes) Downloaded 3 times

With help of Tronix and JED2EQN utility following results were received:
Code: Select all
; JED2EQN — JEDEC file to Boolean Equations disassembler (Version V063)
; Copyright © National Semiconductor Corporation 1990-1993
; Disassembled from cms.jed. Date: 11-25-118
;$GALMODE MEDIUM

chip cms GAL16V8

i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 i7=7 i8=8 i9=9 GND=10 /i11=11 o12=12
o13=13 f14=14 o15=15 o16=16 o17=17 o18=18 o19=19 VCC=20

@ues 0000000000000000
@ptd unused

equations

o19 = /i2 * /i1 * /i6
    + /i2 * /i1 * /i4 * /i6 * /i7 * /f14 * /i8 * i9 * i11
o19.oe = vcc
o18 = /i3 * /i4 * /i7 * /f14 * i8 * /i9 * /i11
o18.oe = gnd
o17 = /i3 * /i4 * /i7 * /f14 * i8 * /i9 * i11
o17.oe = gnd
o16 = /i2 * /i4 * /i7 * /f14 * /i8 * /i9 * i11
    + /i2 * /i3 * /i4 * /i7 * /f14 * /i8 * /i9 * /i11 * i11
o16.oe = gnd
o15 = /i2 * /i4 * /i7 * /f14 * /i8 * /i9 * i11
    + /i2 * /i4 * /i7 * /f14 * /i8 * /i9 * /i11 * i11
o15.oe = gnd
f14 = gnd
f14.oe = gnd
o13 = /i2 * /i1 * i5 * /i6
o13.oe = vcc
o12 = /i2 * /i4 * /i7 * /f14 * /i8 * i9 * /i11
o12.oe = gnd

Input/output configuration is exactly as I've predicted:
So, total map of pins 12...19 (that could be configured as inputs or as outputs on the GAL) is: OOIOOOOO.

Next, I've substituted signals from the real board into those equations:
Code: Select all
Pin 12 (74HC74 /CLR): /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x A1 x /A0 = 0
Pin 13 (74HC74 CLK): /IOW x /ACK x TC x /IOB5 = 1
Pin 14: feedback
Pin 15 (BDIR): /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x A0 + /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x /A0 x A0 = 0
Pin 16 (BC1): /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x A0 + /IOW x /IOR x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x /A0 x A0 = 0
Pin 17 (J1EN): /IOR x /BASE_ADDR x /A4 x /A3 x A2 x /A1 x A0 = 0
Pin 18 (J2EN): /IOR x /BASE_ADDR x /A4 x /A3 x A2 x /A1 x /A0 = 0
Pin 19 (DACEN): /IOW x /DACK x /IOB5 + /IOW x /DACK x /BASE_ADDR x /IOB5 x /A4 x /A3 x /A2 x A1 x A0 = 1

...and there are some very strange if not erroneous lines. I've checked some of those lines via manual JED decoding by following JED specification - everything matches output of JED2EQN.

Look at Pin 15: the equation consists of two "ORed" "ANDs". The pin will became active (level = 0) if left or right part ("+" as separator) will be TRUE. Left side seems fine (for now), but at the right there is "/A0 x A0". That statement will ALWAYS be false, as well as the whole right side. :dead:
The same problem is in the equation for Pin 16: right side also contains "/A0 x A0". But not only that: there is also "/IOW x /IOR" (simultaneous read and write requests)! :neutral:
If we look closer at Pin 15 and Pin 16 together than addresses don't match with what was discovered earlier.
By the equations Pin 15 (BDIR) AND Pin 16 (BC1) should be set to "0" when writing to BASE+0x01 or to "1" otherwise. That's total nonsence, because "00" combination means "AY is not listening". Also, according to simulator logs, AY can be accessed at least via two addresses: BASE+0x00 and BASE+0x01 and both via write and read.

Correct equations should be something like this:
Code: Select all
Pin 15 (BDIR): /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x A0 + /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x /A0 = 1
Pin 16 (BC1): /IOR x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x A0 + /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x /A1 x /A0 = 1

Now Pin 19 (DACEN).
Right part of the equation will never trigger because that part contains the whole left part (/IOW x /DACK x /BASE_ADDR x /IOB5 x /A4 x /A3 x /A2 x A1 x A0). :neutral:
If so, that means that DAC will be refreshed ONLY via DMA, which seems not to be true, because there was information that DAC on the CSM can be updated via both DMA and direct-write. Also, simulation logs showed that there are cases when software performs direct-port write to DAC via BASE+0x02. If we look at the equation, address there is translated into BASE+0x03, which also seems wrong. :confused:

I think that correct equation should be like this:
Code: Select all
Pin 19 (DACEN): /IOW x /DACK x /IOB5 + /IOW x /BASE_ADDR x /A4 x /A3 x /A2 x A1 x /A0 = 1

Equations determine that Pin 12 will be activated when writing to BASE+0x02. As was written above, that address should belong to DAC, so I don't think that this line is correct. I think that it should be triggered on BASE+0x03. And that will solve the mystery of those strange infrequent writes to that port in simulation.
When this signal is active, it sets output of one of the 74HC74 to "0" and that will clear IRQ (if it was allowed by AY's Port B pin 6 set to "0").

Now, what is useful in this JED (with a small grain of salt).
Pin 13 (that controls count pin of the same 74HC74) will set the IRQ (if allowed by AY), and it will do that when DMA timer will elapse (/IOW x /ACK x TC x /IOB5). Seems reasonable for typical DMA operation.

Also it seems like Joystick 1 port is BASE+0x05 and Joystick 2 port is BASE+0x04 (if those equations are not corrupted).

TL;DR
I don't think that the card will work with spare GAL16V8 that I've flashed with that JED file because of corrupted equations. But I think that those can be fixed to make it work as I've described above. :confused:
Also, I think there no more "hidden secrets" in that GAL and now the replacement schematics can be done for it. :cool:

I'm in the process of recreating schematics based on standard NAND and OR gates (74HC00 and 74HC32) that were already used in FMonster project (to keep the same BOM).
At the moment there are 4x 74HC00 and 2x 74HC32 for "GAL replacement".
I'm shuffling around those gates and there is no final schematic yet, but I'm working on it.
AY_SMD_relogic.png
CSM SMD GAL replacement

At the moment almost the whole digital part of the board is done. Analog was not touched yet and I still don't understand how to replace that LM13600...
AY_SMD_2018-12-13.png
SMD CSM @2018-12-13
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-12-14 @ 20:01

Current "GAL replacement" looks like this:
2018-12-14 21.20.00.png
GAL replacement @2018-12-14

And should work like this:
2018-12-14 22.09.39.png
GAL replacement logic @2018-12-14
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby matze79 » 2018-12-15 @ 07:02

Image

Hehe i like the irony, Proud to be made in USA -> and now "Designed in Russia" :D
https://dosreloaded.de - The German Retro DOS PC Community
https://www.retroianer.de
matze79
Oldbie
 
Posts: 1347
Joined: 2014-12-12 @ 14:25
Location: Germany, Frankonia

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-12-28 @ 00:15

I've ordered first prototypes of CSM replica... :roll:
Скриншот 2018-12-27 23.16.32.png
PCB progress
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby Tiido » 2018-12-28 @ 01:45

JLCPCB ? :D
User avatar
Tiido
Oldbie
 
Posts: 678
Joined: 2018-1-14 @ 04:40
Location: Estonia

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2018-12-28 @ 02:30

Tiido wrote:JLCPCB ? :D

JLCPCB it is! I usually use PCBWay, but for boards <100 mm. JLCPCB was the cheapest way to get >100 mm board with proper gold finish on the edge connector.
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby carlostex » 2018-12-28 @ 14:07

Really looking forward to this, great to finally see this project close to a conclusion. Hope the prototypes work well. I have a plethora of different DOS systems if you need testers.

If one wants this card to work alongside a SSI-2001 replica, one compromise has to be made since for cards share the 280h address as default. The list of supported games is small so patching is always a solution.
User avatar
carlostex
l33t
 
Posts: 2077
Joined: 2010-4-03 @ 21:39
Location: Portugal

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2019-2-03 @ 21:48

First prototypes of the replica showed up:
2019-02-04 00.44.48.jpg
First prototype
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby Fagear » 2019-2-18 @ 21:39

I've started to assemble the prototype board.
IMG_8300.jpg
CSM: assembly

Not all of the parts are available now.
User avatar
Fagear
Member
 
Posts: 233
Joined: 2014-7-10 @ 22:27
Location: Russia, Moscow

Re: Covox Sound Master Reverse Engineering / Replica

Postby vetz » 2019-2-19 @ 09:41

Amazing!

I bought some AY-3 chips from China couple of years ago (see start of thread) incase you have trouble sourcing it. They turned out to be the real thing according to Yvan256
User avatar
vetz
Hardware Mod
 
Posts: 3245
Joined: 2012-4-23 @ 17:13

PreviousNext

Return to Sound

Who is online

Users browsing this forum: peklop and 6 guests