Wilba Posted December 22, 2003 Report Share Posted December 22, 2003 Hi,I finally got my core and SID modules done, hooked them up and can't get MIDIbox SID app to produce sound when I send note on events.Everything else appears to work fine though.I have run the SID player app and that works - I get cheesy C64 game themes without problems.The MB SID step C app runs OK, control surface (I have step A hardware) works, I can use jsynth to upload patches, I can change volume with control surface or from MIDI and get pops and a changing volume of background hiss (all normal I assume from reading posts). I can even change parameters remotely from MIDI-OX or jsynth. What I don't get is any response from note on events other than an increase in noise - I hear the digital traffic or the SID registers being changed... there's a definite change in state, just no note being played.I've tried the prebuilt hex and syx files - no success.My rebuilt app should be making sound because I explicitly called SID_TUNE_Play1 in USER_Init and get that rising pitch sound on startup. I haven't changed the source other than that and setting menu items to 4.Any troubleshooting advice is welcome.My config (not that relevant though):MIOS v1.4b (valid CRC), MIDIbox SID v1.5cSID chip is 6581R3/4385Core has step A control surface with rotary encoder, 2x16 LCD, no BankStick.Regards,Wilba Quote Link to comment Share on other sites More sharing options...
TK. Posted December 22, 2003 Report Share Posted December 22, 2003 Hi Wilba,sorry for this stupid answer, but have you also checked the MIDI channel?You could also send some note events from MIDI-Ox, just enable the virtual keyboard and press some keys. The channel can be changed with the "+" and "-" key of the keypad (so far as I remember...)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Wilba Posted December 23, 2003 Author Report Share Posted December 23, 2003 I'm already using MIDI-OX to send the Note On/Note Off events.While debugging what might be wrong, I even validated that MIDI-OX was sending those events by running MIDImon on the core.I can send other events (eg. on channel 1) and they're received and do things, ie. changing CC values update the displayed values (and changing volume using MIDI-OX to send CC #7 events results in pops and background hiss volume changes).ALSO if I change the MIDIbox SID's MIDI channel to 2 and keep sending channel 1 note on events, I don't get the same digital noise - therefore I believe that it's not a MIDI communications problem.I'm at the stage now of running debug commands to peek into RAM and see what's going on! What annoys me is that it will probably turn out to be some really simple mistake on my part, but I'm blind to it! >:( I can't see how it's a bug in the application, but that's what my troubleshooting suggests... ???Regards,Wilba Quote Link to comment Share on other sites More sharing options...
TK. Posted December 23, 2003 Report Share Posted December 23, 2003 Hi Wilba,you could try CC#08 to trigger a note:B0 08 3c: Play C-3B0 08 00: Note Offif this doesn't work, there is propably a problem with the sound patch you are using (very strange!)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
TK. Posted December 24, 2003 Report Share Posted December 24, 2003 Hi Wilba,I just remembered that CC#8 will only re-trigger a new note when a note is already active (played with a common Note On command). So, a CC won't give you a new insight.Two suggestions: Watch the Note Stacks from 0x1c9-0x1d4, they should contain the semitone numbers of the played notes.You could also send a dummy MIDI event from interesting functions to check if it has been executed, example:SID_MIDI_NoteOn movlw 0xfa call MIOS_MIDI_TxBufferPut ;; ... I'm curious about the reason!Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Wilba Posted December 24, 2003 Author Report Share Posted December 24, 2003 I'm just about to add some debugging output - was planning to write to LCD but sending MIDI is a better idea, thanks.I tried adding a BankStick last night which didn't fix the problem. I turned on the "Link to Slaves" (I don't have slaves yet) and I get an echo of the note on/off events. I definitely get a change of state (ie. noise increase) with a note on event with some patches (like ones with WT) as if the WT gets started up, and this stays noisy even after the note off.My SID PCB is slightly different (missing pull-up resistor on reset pin, which you said was OK). Since the SID file player works, I don't think I had a hardware problem.No one is more curious than I am!Lucky for me I'm a coder by trade or I'd be LOST trying to debug this problem! (I think I'll have to write a SID troubleshooting guide after this!)Merry Christmas to all!Regards, Wilba Quote Link to comment Share on other sites More sharing options...
Wilba Posted December 26, 2003 Author Report Share Posted December 26, 2003 Did memory peeking, MIDI note stacks all ok.The problem has something to do with the reset pin on the SID chip.When using SID player, this pin is low when nothing is playing, then goes high while the song is being played, then back to low when it's done.Whe using SID synth app, it goes high while in an explicit call to SID_TUNE_Play1 (in sid_init.inc right after the "reset" of the SID)... then it goes low most of the time and occasionally goes high when a note is played or when a patch has a wavetable. The tunes don't play when it reads the bankstick.I added a 10k pullup to the reset pin (as per original schematic/PCB) which did nothing.I changed code to always set the reset pin high and it didn't appear to change anything.I hardwired the reset pin high (disconnect shift register completely). Success! MIDI notes play!I'm not fully understanding what the real problem is, but I guess I'm getting closer. It's basically because the reset line is brought low whenever the shift registers aren't being used... this all seems to suggest it IS a hardware problem after all. TK, what should I expect the reset pin state to be most of the time? Quote Link to comment Share on other sites More sharing options...
Wilba Posted December 30, 2003 Author Report Share Posted December 30, 2003 The mystery is almost solved! (This post is mostly to sate TK's curiosity!)SID player works because it doesn't do any BankStick or DIN/DOUT handling, thus there's no clocking of J4:SC/J8:SC/J9:SC (shared serial clock) other than the SID register updates, and thus there's no "garbage" getting shifted into the shift registers.MIDIbox SID app has BankStick and DIN/DOUT handling, thus garbage (zeroes?) gets shifted into the shift registers in between SID register updates, but it shouldn't be LATCHED. In my case it does get latched, therefore the shift register's RCLK pins must be going from low to high.If I ground SID module's J2:RC, I still get garbage latched to the shift registers. If I force J2:RC high, no garbage gets latched.Maybe there's a spike getting into the RCLK tracks on my SID module (latching occurs on the low-to-high edge transition of the RC line). It's too fast for my logic probe to see, but it has to be there. Quote Link to comment Share on other sites More sharing options...
TK. Posted January 2, 2004 Report Share Posted January 2, 2004 Hi Wilba,it still sounds strange. The latch input is driven by a strong driver pin, the signal shouldn't be influenced by ambient noise that much. Could you lift the RC.4 pin of the PIC from the socket and make a direct connection to the SID module with a short cable? If this works, the root cause must be a bad track or junction.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Wilba Posted January 4, 2004 Author Report Share Posted January 4, 2004 I got it working, finally... ;D To cut an already long story short:I isolated the reset clock line - using a wire direct from PIC to shift register's reset clock pins. Problem persisted. BUT... I was lucky to notice some audio difference when I moved the logic probe near the reset pins.More debugging... I discovered that touching this wire (ie. grounding it with my body) made it WORK. I start to think my ground rails are at fault... then realise my fundamental mistake (aka. major F.U.)My power supply is currently on a breadboard, and consists of 15v DC from transformer going into a 12v regulator and a 9v regulator. The 12v output goes to the SID. The 9v output goes to a 5v regulator, this 5v output goes to the SID.I was connecting the 9v output of my power supply to J1 on the core. That's the setup that DOESN'T WORK.When I connect the 5v output of my power supply to J2, then that WORKS.By powering the core with the 9v at J1, it's going through the bridge rectifier before it gets to the 5v regulator, and that means it's going through diodes, which means that the ground of the core is actually 0.7v higher than the ground of the power supply and the SID module, which (I assume) means PIC outputs will be shifted up by 0.7v as well.Why that should matter, why the reset clock goes intermittant and yet the other shift register inputs aren't affected... no idea. I don't think it matters... I've got a working SID synth... hooray! ;DRegards,Wilba Quote Link to comment Share on other sites More sharing options...
TK. Posted January 5, 2004 Report Share Posted January 5, 2004 Hi Wilba,thats really something absolutely unexpected! This explains, why your SID module was so sensitive against spikes.Well done! :)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.