Jump to content

Driving the SID


4
 Share

Recommended Posts

Hi.

I have been inspired by ucapps to use SID in my home-made keyboard project.

However, I am that kind of person, that tries to build it's own design. I have obtained the MOS 6581 datasheet but I am facing with some problems playing sounds. There are some pops sometimes and also strange problems with only voice2 working (tests on C64 shows that SID is in perfect condition).

I have two main questions:

1. Is this SID driver sequence OK: 

note on: attack/decay=0, sustain/release=0, voice&gate=0, frequency set, attack/decay set, sustain/release set, voice set with gate=1;

note off: just gate=0 (voice shape remains untached)

2. In wich file is the program code with communication between PIC and SID that is used in midibox projects? I would like to compare it with my code. I am using CCS C-compiler and 16f877a.

Thank you for your responce.

Link to comment
Share on other sites

Hi,

the MBSID code is located here, and the SID transfer routine in sid_sr.inc, but I guess that it won't really help you. The synth engine which handles the gate is interrupt driven (-> sid_se*.inc), and very complex

Did you already solve the issue? If not, I can give you some more explicite hints.

The "Pops" could be related to the ADSR bug, which require you to handle the gate very carefully (more infos if still required), and the non-working voices could be related to an erroronous filter assignment configuration

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 3 weeks later...

Thank you for your reply.

I haven't solved the problem because I have put off it for a while :) I am finishing the midi controller part at the moment (It uses Crumar Performer keyboard, touch pads from broken  laptop computers and a touchscreen)

However, I would be glad if you would give me some additional hints about the gate triggering. I have looked at the code you linked but it is complicated indeed. If it will be necesary to go trough it, I will take a chance.

Regards, Ziga.

Link to comment
Share on other sites

Additional hints: between clearing all ADSR registers and setting new values, you should wait at least for 20 mS to ensure, that the envelope generator has reached the lowest level, before setting the gate again. If you re-configure the ADSR earlier, the next envelope could fail (related to ADSR bug -> "hick ups")

Since you are at a very early programming phase, I propose you to use a static ADSR setting "00F0". Attack, Decay, Sustain are set to 0 - with this configuration, you won't notice effects related to the ADSR bug -> better for debugging

Once the voices can be triggered properly, you should setup an interrupt driven timer which takes care about proper gate/ADSR control.

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...