VOGONS


Reply 260 of 495, by root42

User metadata
Rank l33t
Rank
l33t

While Corona is delaying the metal brackets, I tried playing the C/MS demo tools on my Snark Barker. I know I used them on the MUS1099, but with the Snark Barker, I have no luck. The cmsdrv.com driver complains that the card is incorrectly jumpered (220h). Paku Paku and Sierra games all work fine. It's just the C/MS demo disks that won't work. Any idea what the cmsdrv is doing there? Trying some kind of autodetection that fails on non-C/MS cards?

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 261 of 495, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie
root42 wrote on 2020-05-02, 21:33:

Any idea what the cmsdrv is doing there? Trying some kind of autodetection that fails on non-C/MS cards?

IIRC, Sound Blaster and compatible cards don't support CMS auto-detection, at all, because the relevant port addresses are already used for other purposes.

Reply 262 of 495, by root42

User metadata
Rank l33t
Rank
l33t
Benedikt wrote on 2020-05-04, 21:06:
root42 wrote on 2020-05-02, 21:33:

Any idea what the cmsdrv is doing there? Trying some kind of autodetection that fails on non-C/MS cards?

IIRC, Sound Blaster and compatible cards don't support CMS auto-detection, at all, because the relevant port addresses are already used for other purposes.

So... can we patch the driver, so I can enjoy the C/MS demos without having to break out the MUS1099 card...?

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 263 of 495, by Benedikt

User metadata
Rank Oldbie
Rank
Oldbie

I'd say so. Wasn't CMS auto-detection based on writing a value to a port and reading it back to see if it is still the same, i.e. buffered by the CMS?
If you're looking for a good code analysis tool, try Ghidra!

Reply 265 of 495, by root42

User metadata
Rank l33t
Rank
l33t
kitten.may.cry wrote on 2020-05-06, 08:58:

Is there a way to buy it?

Not really. Last time I ordered 10 PCBs and everyone got their own components from favorite suppliers. You might want to ask around if anyone wants to do another batch.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 266 of 495, by kitten.may.cry

User metadata
Rank Member
Rank
Member
root42 wrote on 2020-05-06, 10:53:
kitten.may.cry wrote on 2020-05-06, 08:58:

Is there a way to buy it?

Not really. Last time I ordered 10 PCBs and everyone got their own components from favorite suppliers. You might want to ask around if anyone wants to do another batch.

Is it like a DIY kit or a fully assembled card? I don't understand.

Reply 267 of 495, by dionb

User metadata
Rank l33t++
Rank
l33t++
kitten.may.cry wrote on 2020-05-06, 10:55:

[...]

Is it like a DIY kit or a fully assembled card? I don't understand.

It's a PCB, just the circuit board - not even a kit. You need to buy all the additional components yourself, then break out the soldering iron.

Great fun (I have one here I made last year), but given your questions I'd recommend first getting a better grasp of how (ready-made) sound cards work, and depending on your soldering skills perhaps do a slightly smaller project first.

Also, as root42 points out, the batch he ordered has been used, so you'd have to order new PCBs made to this design yourself...

Reply 268 of 495, by Tronix

User metadata
Rank Member
Rank
Member
root42 wrote on 2020-05-05, 13:25:

So... can we patch the driver, so I can enjoy the C/MS demos without having to break out the MUS1099 card...?

I removed the check for CMS availability, but I think that not everything is so simple. So, this code:

loc_107::
mov dx,data_16 ; DX = 220h
add dl,0Bh ; DX = 22Bh
in al,dx ; port 22Bh
cmp al,0A0h
je loc_109 ; Jump if equal - OK

Read data from 22B port and compare value to 0xA0. If ok, then display 'installed at 80h interrupt', otherwise display 'CMS not found'. We can patch conditional jump (JE) with unconditional jump short (JMPS) and allways going to needeed brunch. I will attach the modified file, but it seems to me that there is something else that will not allow it to be used normally. I have not tested this file. If anyone have time to test on real hardware - you are wellcome -)

Last edited by Tronix on 2020-05-06, 16:40. Edited 1 time in total.

https://github.com/Tronix286/

Reply 269 of 495, by root42

User metadata
Rank l33t
Rank
l33t
Tronix wrote on 2020-05-06, 13:39:
I removed the check for CMS availability, but I think that not everything is so simple. So, this code: […]
Show full quote
root42 wrote on 2020-05-05, 13:25:

So... can we patch the driver, so I can enjoy the C/MS demos without having to break out the MUS1099 card...?

I removed the check for CMS availability, but I think that not everything is so simple. So, this code:

loc_107::
mov dx,data_16 ; DX = 220h
add dl,0Bh ; DX = 22Bh
in al,dx ; port 22Bh
cmp al,0A0h
je loc_109 ; Jump if equal - OK

Read data from 22B port and compare value to 0xA0. If ok, then display 'installed at 80h interrupt', otherwise display 'CMS not found'. We can patch conditional jump (JE) with unconditional jump short (JMPS) and allways going to needeed brunch. I will attach the modified file, but it seems to me that there is something else that will not allow it to be used normally. I have not tested this file. If anyone have time to test on real hardware - you are wellcome -)

Very cool. I will test this later on my 386!

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 270 of 495, by root42

User metadata
Rank l33t
Rank
l33t
kitten.may.cry wrote on 2020-05-06, 10:55:
root42 wrote on 2020-05-06, 10:53:
kitten.may.cry wrote on 2020-05-06, 08:58:

Is there a way to buy it?

Not really. Last time I ordered 10 PCBs and everyone got their own components from favorite suppliers. You might want to ask around if anyone wants to do another batch.

Is it like a DIY kit or a fully assembled card? I don't understand.

You have to buy everything yourself. Someone could make a DIY kit, but that's a load of work due to the sheer amount of components to sort.

Anyway, if you want to see how one is made, you can check out my video: https://youtu.be/q9df2g3YivY

I might have to make a video on how to make a DIY kit yourself, by ordering components and PCBs... that could be fun...

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 271 of 495, by root42

User metadata
Rank l33t
Rank
l33t
root42 wrote on 2020-05-06, 14:13:
Tronix wrote on 2020-05-06, 13:39:
I removed the check for CMS availability, but I think that not everything is so simple. So, this code: […]
Show full quote
root42 wrote on 2020-05-05, 13:25:

So... can we patch the driver, so I can enjoy the C/MS demos without having to break out the MUS1099 card...?

I removed the check for CMS availability, but I think that not everything is so simple. So, this code:

loc_107::
mov dx,data_16 ; DX = 220h
add dl,0Bh ; DX = 22Bh
in al,dx ; port 22Bh
cmp al,0A0h
je loc_109 ; Jump if equal - OK

Read data from 22B port and compare value to 0xA0. If ok, then display 'installed at 80h interrupt', otherwise display 'CMS not found'. We can patch conditional jump (JE) with unconditional jump short (JMPS) and allways going to needeed brunch. I will attach the modified file, but it seems to me that there is something else that will not allow it to be used normally. I have not tested this file. If anyone have time to test on real hardware - you are wellcome -)

Very cool. I will test this later on my 386!

well, your binary crashes my 386, or with QEMM triggers an illegal instruction. 😀

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 272 of 495, by Tronix

User metadata
Rank Member
Rank
Member
root42 wrote on 2020-05-06, 14:25:

well, your binary crashes my 386, or with QEMM triggers an illegal instruction. 😀

As I said, everything is not so simple there. I found self-modified code at the end of programm, so code look like

seg000:13A1 loc_113A1:                              ; DATA XREF: sub_11199+3B↑w
seg000:13A1 mov ax, 4C00h
seg000:13A4 mov dx, 1439h
seg000:13A7 shr dx, 1
seg000:13A9 shr dx, 1
seg000:13AB shr dx, 1
seg000:13AD shr dx, 1
seg000:13AF inc dx
seg000:13B0 int 21h ; DOS -

0x4C DOS function - terminate program without stay it resident, but we need stay resident becourse its TSR driver. So another piece of code look like:

seg000:11CF                 mov     al, byte ptr start+1
seg000:11D2 add al, 7Bh ; '{'
seg000:11D4 sub byte ptr loc_113A1+2, al

mean take byte from 0x1 offset then add this with 0x7b then substract with 0x4c and place result in 0x13A3 offset. After executing this code mov ax,4c00h must be changed to mov ax,3100h. 31 dos function - terminate and stay resident. For some reason, this piece of code is not executed. I remove this self-modification and change mov ax,4c00 to mov ax,3100. So, driver is loaded into memory, but don't work with real CMS 🙁 Somewhere there is something else, some kind of protection.

UPD: Okay, i found CRC proc caclulation

seg000:1177 loc_11177:                              ; CODE XREF: seg000:loc_110FD↑j
seg000:1177 pop es
seg000:1178 push ax
seg000:1179 sub ah, ah
seg000:117B mov cx, 0F31h
seg000:117E mov si, 4B3h
seg000:1181
seg000:1181 loc_11181: ; CODE XREF: sub_1113C:loc_11184↓j
seg000:1181 lodsb
seg000:1182 add ah, al
seg000:1184
seg000:1184 loc_11184: ; CODE XREF: seg000:110F↑j
seg000:1184 loop loc_11181
seg000:1186 mov word ptr start, ax
seg000:1189 add byte_10F32, ah
seg000:118D mov dx, word_1010F
seg000:1191 add dx, 7
seg000:1194 mov al, ah
seg000:1196 out dx, al
seg000:1197 pop ax
seg000:1198 retn

So, original calculated CRC is 0xA02E placed into first bytes at cs:100 offset (2E A0), then used many times to check code integrity. I patched this routine and viola - cmsdrv.com running OK with original CMS. Also it run without CMS, but dosn't play any music.

https://github.com/Tronix286/

Reply 273 of 495, by Tronix

User metadata
Rank Member
Rank
Member

Oh okay, i found another strange place and patched it.
Finaly, CMSDRV.COM now run on SB 1.x with CMS chips well. I tested it with real 486 and Snark Barker with original song disks from CMS (player.exe).
Enjoy.

Attachments

  • Filename
    CMSDRV.zip
    File size
    3.48 KiB
    Downloads
    52 downloads
    File license
    Public domain

https://github.com/Tronix286/

Reply 274 of 495, by keropi

User metadata
Rank l33t++
Rank
l33t++
Tronix wrote on 2020-05-06, 18:48:

Oh okay, i found another strange place and patched it.
Finaly, CMSDRV.COM now run on SB 1.x with CMS chips well. I tested it with real 486 and Snark Barker with original song disks from CMS (player.exe).
Enjoy.

great! thanks for sharing!
is this also needed for SB2.0 ?

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 275 of 495, by root42

User metadata
Rank l33t
Rank
l33t
keropi wrote on 2020-05-06, 18:56:
Tronix wrote on 2020-05-06, 18:48:

Oh okay, i found another strange place and patched it.
Finaly, CMSDRV.COM now run on SB 1.x with CMS chips well. I tested it with real 486 and Snark Barker with original song disks from CMS (player.exe).
Enjoy.

great! thanks for sharing!
is this also needed for SB2.0 ?

Probably? Well, the 2.0 has the GALs, not sure what they are doing. But I assumed that the SB only provided the SAA1099s without the rest of the GameBlaster (whatever that big IC on that thing was doing anyway).

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 276 of 495, by root42

User metadata
Rank l33t
Rank
l33t
Tronix wrote on 2020-05-06, 18:48:

Oh okay, i found another strange place and patched it.
Finaly, CMSDRV.COM now run on SB 1.x with CMS chips well. I tested it with real 486 and Snark Barker with original song disks from CMS (player.exe).
Enjoy.

Works perfectly! Thank you. Now the Snark Barker is so much better. 😉

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 277 of 495, by appiah4

User metadata
Rank l33t++
Rank
l33t++

I've started assembling mine (FINALLY!) but found out that two of my ICs are slightly off spec. To be specific:

The 12MHz crystal I got has 50pF capacitance while the BOM crystal has 18pF
The 500mW 5.1V Zener diode I got has 35R impedence while the BOM zener diode has 17R

Would either of these be a problem or can I use them safely on the board?

Retronautics: A digital gallery of my retro computers, hardware and projects.

Reply 278 of 495, by root42

User metadata
Rank l33t
Rank
l33t
appiah4 wrote on 2020-05-08, 08:55:
I've started assembling mine (FINALLY!) but found out that two of my ICs are slightly off spec. To be specific: […]
Show full quote

I've started assembling mine (FINALLY!) but found out that two of my ICs are slightly off spec. To be specific:

The 12MHz crystal I got has 50pF capacitance while the BOM crystal has 18pF
The 500mW 5.1V Zener diode I got has 35R impedence while the BOM zener diode has 17R

Would either of these be a problem or can I use them safely on the board?

I didn't even check (or know that I had to) on my boards for those values. And both cards work. 😀 I would expect for the card to have some leeway in this respect. One way to find out!

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 279 of 495, by appiah4

User metadata
Rank l33t++
Rank
l33t++

As you said, one way to find out 😁

One last question, that wire going across the crystal - Is that for properly grounding the thing? And if so, is it soldered onto the crystal itself, or only to the PCB?

Retronautics: A digital gallery of my retro computers, hardware and projects.